Startup Sequence FAQ

From PhatHack Wiki
Revision as of 20:33, 15 June 2005 by Sbingner (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ok, what do we know about the PB startup? This is what we think so far

The brackets contain the corresponding filenames. These file are signed and therefore validated before usage!

Boot procedure (on power)

  • The 8051 boots out of its internal 64k EEPROM [firmware.pac]
  • It boots up linux (see below) and the rest of the software to ask it what version of firmware.pac is stored on the drive; if it is newer than that in the 8051, it will reflash itself. (This is why the instructions that come with the unit are insistent that you have the drive in the unit when you plug it in for the first time.)

Boot procedure (on ignition)

  • The 8051 will receive the turn*on sequence and apply power to the EP7312 (ARM)
  • The ARM will execute the bootloader code out of the 2mbit flash chip
  • This bootloader will query the drive for its ID and compare it to the signature written to the drive. It will also load the following files off the root directory of partition 1 and verify their corresponding signatures: linux, ramdisk, phatd, and rc.sh. It will hang with a blinking green light if anything is amiss.
  • If that check succeeds, the bootloader will load the linux and ramdisk files into memory, and jump to the linux kernel

System startup

  • Linux will mount the ramdisk as / and execute /bin/bash
  • bash [busybox] will read /etc/inittab, which will read /etc/init.d/rcS, which will mount the two partitions and execute /dos/rc.sh
  • /dos/rc.sh will execute phatd
  • phatd will check the signature of 51d and then start it, 51d then connects with the 8051 chip over ttyS1 and pbutts button presses back to phatd to make the system do stuff.