|
If you forget for a minute about any special trickery like miniroot and NFS, and so on, and consider just the boot process of a standard image, the dreambox boots something like this:
1) The firmware starts and loads the kernel from flash (from the cramfs part) and also displays an initial picture on the TV.
2) The kernel starts running. The first part of the kernel image is really a loader program which unpacks the kernel (it is stored in compressed form in the flash), moves stuff around a bit, relocates some addresses etc. Then the kernel-loader displays a line of kernel options, allows the user (on the serial console) to change the kernel option, and jumps to the kernel proper if there is no response on the serial console.
3) The kernel does a minimum of initialization, and starts /sbin/init. In many ways, this is the end of the booting part. Files and programs on the root file system is now in control over which programs should be run.
4) A standard /sbin/init is controlled by /etc/inittab, and in our case, this says that /etc/init.d/rcS should be started. And so on and so on.
It can be quite illuminating to turn on console output and just read the messages produced during boot.
Connect a serial cable between the PC and the dreambox, and start "hyperterminal" on the PC. Hyperterminal should be set up with COM1, 115200 baud, no parity, 8 data, XON/XOFF handshake. It's also a good idea increase the number of lines of saved text in File->Properties->Settings->Backscroll buffer lines.
No restart your dreambox. You should see a line in hyperterminal saying "Dreambox DM7000". Now you have a second or so to press "RETURN". If your PC is too far away from your dreambox, you need some help, one person restarts the dreambox, the other sits tapping "RETURN" on the PC every second or so. By pressing "RETURN" at this point , the boot process is interrupted in point 1) of my list above. You'll get a menu of various things you can do, and you're in fact "talking" to the bootloader in the firmware. If you press "0", the boot process continues. By tapping the "space" key every second or so, you will get a new interruption in the boot process (in point 2) in my list above). You're now "talking" to the loader at the start of the linux kernel. You should see a line saying
Linux/PPC load: console=null root=/dev/mtdblock5 rootfstype=squashfs ro
and maybe an emtpy space or three at the end, which comes from your tapping the "space" key. Just backspace however much you need, leave one space at the end, and add "console=ttyS0,115200n8" to this line, (you don't need to remove the other "console=null" at the start of the line, the last console statement takes precedense in this case).
Press "RETURN", and read the boot messages as they scroll by. A large number of saved lines will make it possible to scroll back up and read all the stuff that scrolled by too fast for anyone to read.
Also, after the box is booted, telnetting in to it and running
dmesg | more
gives you most of the boot messages that was produced by the kernel during initialization.
|