[OpenBIOS] About HFS+ support

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Oct 15 14:00:53 CEST 2012


On 13/10/12 06:37, Segher Boessenkool wrote:

> On a Mac-partitioned disk, there is no such thing as a "system
> partition" (that is a DOS thing).
>
> Apple OF looks at the partition types (which are strings), and
> uses the first one that is "Apple_Boot", "Apple_HFS", or "DOS_FAT_",
> if you do not give a partition number (or partition # 0).

Oh that's interesting. Perhaps the reason I'm getting distracted is by 
looking at the partition flags #defines in the code:

enum {
	kPartitionAUXIsValid         = 0x00000001,
	kPartitionAUXIsAllocated     = 0x00000002,
	kPartitionAUXIsInUse         = 0x00000004,
	kPartitionAUXIsBootValid     = 0x00000008,
	kPartitionAUXIsReadable      = 0x00000010,
	kPartitionAUXIsWriteable     = 0x00000020,
	kPartitionAUXIsBootCodePositionIndependent = 0x00000040,
	kPartitionISMountedAtStartup = 0x40000000,
	kPartitionIsStartup          = 0x80000000,
	kPartitionIsChainCompatible  = 0x00000100,
	kPartitionIsRealDeviceDriver = 0x00000200,
	kPartitionCanChainToNext     = 0x00000400,
};

This would in itself suggest that kPartitionAUXIsBootValid or 
kPartitionIsStartup would be good indicators of which partition to 
choose. Unfortunately I don't have any PPC OS X images or much Apple 
experience, so guesswork is all I have at the moment.

Do you have a source for your algorithm above?

> FWIW, it normally boots "hd:,\\:tbxi" which means the disk with
> alias "hd", potentially some partition on that, in the blessed
> folder ("\\"), the file with any creator and file type "tbxi"
> (which is a bootinfo file) (":tbxi").

Yes, I believe this is currently what happens when attempting a boot.

> I don't think you want to recreate all the logic (and lack of it!)
> behind how Macs boot.

;)  Agreed.


ATB,

Mark.



More information about the OpenBIOS mailing list