Once developers get the system to boot for the first time, bootloader development is often neglected. Here are a few techniques that sometimes get overlooked:
Enable the data and instruction cache as early as possible. This consideration sounds obvious, but some of the tight copy loops used in the bootloader benefit immensely from having the instruction cache enabled.
Minimize or eliminate the boot script timeout. Bootloaders like RedBoot and U-Boot, which run a script, typically contain an automatic timeout that lets you abort the loading of one OS load and then load another OS. Also, the bootloader might print messages (for instance, help or welcome messages) to the serial port; you should suppress these. To modify the timeout in U-Boot, use the bootdelay, bootcmd, and preboot environment variables. For RedBoot, use fconfig to change the value for Boot script timeout. This step applies only if you're using a bootloader other than the IPL (which is not recommended for production systems).
Don't scan for the OS image. If the system uses a primary QNX IPL, you should look at the code in main() within main.c and remove anything that's unnecessary. In particular, look for code that calls image_scan() and replace it with the OS image's hardcoded address. You can also turn off the scan option when you generate the IPL (see the Use the optimized image scan functions section later in this chapter).
Note: If you pad the IPL to a fixed size, you will always know where the OS image begins.
Eliminate the bootup checksum. In most cases, the system has a single OS image. Consequently, performing a checksum to ensure the image's validity has little value, since you can't perform a recovery if the image has failed. Also, the checksum takes time; removing it allows your important code to start running sooner.