PB6 - Bootup Sequence

From Pandora's Box Hacking
Jump to navigation Jump to search

This is our current understanding of how the Pandora's Box 6 bootup sequence works. There are still some unknown areas at the moment but we feel like we have a good understanding of it right now.

Step 1: U-Boot
This is one of the steps we know the least about at the moment. U-Boot is launched with boot0, it then may or may not load up any of the boot files from Partition 1, at which point it appears to load the Linux kernel and passes control over to it.

U-Boot for Sunxi
Booting from SD Card

Step 2: Linux Kernel
The Linux kernel is loaded and the U-Boot SPL hands off control to it. We are not currently sure where the Linux kernel is stored, nor do we have any info on it at the moment. We believe that the uboot files files are stored in PB6 - Partition 01. The SD card's PB6 - Partition 02 gets mounted.

Step 3: SysV Init/rcS
At this point, init takes over and runs the contents of /etc/init.d/rcS which will set the machine's hostname to "hhh", set up the PATH variable with reasonable defaults and then runs /usr/myinit.

Step 4: myinit
Once myinit is executed, myinit will set up the PATH variable just the same way that /etc/init.d/rcS does, then sets up sane defaults for the library paths to load from. It will then set up QT to use the Linux Framebuffer for graphical output. It will mount all the virtual file systems in fstab, then populate /dev with all the device files it needs. It then launches emulotar and enters an endless loop so that if emulotar is not running, it will get run again immediately.

Step 5: emulotar
Emulotar is responsible for setting up /tmp, decrypting and extracting the emulators and support files into /tmp, playing boot up videos through mplayer and finally running the frontend.

Step 6: app
At this point, one of the apps, a combination of Final Burn Alpha and an emulator frontend running in QT is launched. It will then loop in the game menu until you select a game. When a game is selected, it will check the internal database for the game and will try to run the emulator needed as noted in the 1300 internal game database inside of the app. If that app isn't running yet, it will launch the app and game.

Additional Notes
Startup Process