This article describes the boot sequence of the PowerPC G5 starting a Xenon kernel and OS.
The PowerPC G5 has a ROM containing the openfirmware (OF) bios, as well as a NVRAM containing variables used by the openfirmware to find bootable partitions or bootloaders like yaBoot or BootX(MacOSX). Its the task of openfirmware (OF) to find and start the os.
The basics are:
- After CPU reset vector and cpu initialization the boot ROM stored in NVRAM provides power on self test (POST - diagnostics), and initializes enough of the system to load Open Firmware. When enough initialization has occurred to execute Open Firmware, the boot chime is played and Open Firmware is loaded.
- OpenFirmware (Init) will then probe the system's I/O buses to determine the device configuration and build a device tree.. the system will then examine the values of its enviroment variables. If the auto-boot? variable is flagged as true, the system will then read the value... and attempt to boot from that device. If additional information is required the boot-file variable is read. If the auto-boot? variable is flagged as false, the system will halt the boot process and drop to the Open Firmware user interface.
- Default Boot Device on Apple systems is "hd:,\\:tbxi". ("tbxi", tells the system to look for files of type tbxi. )
- the tbxi (bootfile) is started and from here on we follow the "Xenon" bootpath instead of the MacOSX.
Xenon boot from OF
In case of the Xenon Alpha, we found that a special Partition called XeBoot is at the beginning of the harddrive. This contains either or what we asume 2 files, a bootx file (like MacOSX, containing a configuration script) and a xboxroma.bin file, wich is a (stripped ?) ELF file like the MacOSx kernel. This "rom" file will start looking for the Xenon OS kernel on various devices and start it. citation needed Known location the xboxroma.bin is looking:
(NT/WINworld notation) citation needed(is this realy the rom, or kernel that does check if its running the latest kernel?)
When the latest kernel is found and started it will locate its Dashboard or XShell files and optionaly if found, start the XBDM.dll (named XBDM.XEX)
- OF will automatically convert "hd" into the appropriate device path, as hd is simply an alias. The notation "\\" tells the system to start searching for "blessed" folders (directories) starting on the first HFS or HFS+ partition found on the system.
- All versions of MacOS have a folder known as System Folder that is "blessed", and contains a MacOS Boot ROM file which is of type tbxi. The Boot ROM file is simply a stripped ELF executable image wrapped with a forth boot script.
- A "blessed" folder is simply one with a special attribute (or flag) set on it. The system will search all HFS partitions for a bblessed folder and a file of type tbxi within it, if none are located, the boot will fail. The system will always select the first one found, unless the boot-device is modified to a specific partition id.
"tbxi", tells the system to look for files of type tbxi.
To get into openfirmware, press Command (⌘) + Option (⌥) + O + F citation needed
commands in openfirmware
The following commands work in the openfirmware used in the Apple G5 version known to boot Xbox software
citation needed (Please check commands on real Mac and add missing helpfull commands)
|Boot [option]||boot the device stored in nvram variable boot or boot the given option citation needed|
|ls||list the current device list (handy to find if a device is found by OF and its partitions are listed) citation needed|
|devalias||list all current known aliasses for devices citation needed|
Reverting OF into MacOSX bootable state
try booting macos from OF by typing:
If this fails, try checking if the bootdevice is actualy set by typing:
Asuming the Harddisk containing MacOSX is reinserted and NVram or Openfirmware is not able to boot macosx, try:
setenv auto-boot true