Robert Murrell
|
How to reboot really fast?
|
Robert Murrell
08/12/2011 8:53 AM
post88060
|
How to reboot really fast?
First, some details on my development environment. I'm working with a small embedded system with a minimal QNX install.
Its an x86 board with PC BIOS booting. The boot device is a compact flash card with the QNX 4 format. I'm developing
under QNX 6.5.0. Since this system is small, I've packaged the whole system, including our software, into a single IFS
image file.
When we need to do a software update, our code does the following:
1. When the operator request it, we copy the selected file from a USB drive to /.altboot, which is normally zero length.
We check the file for the boot signature to insure we are loading a QNX image.
2. The system calls shutdown_system:
shutdown_system(SHUTDOWN_REBOOT, FLAG_FAST);
3. The system reboots. Our custom IPL, ipl-diskpc2, sees that /.altboot is non-zero length, and loads it. Otherwise it
would load /.boot
4. Our system starts and sees that /.altboot is non-zero length. This means that a update is in progress. It copies
the contents of /.altboot to /.boot, and then truncates /.altboot to zero length. It performs some other cleanup and
the update is complete.
This process works well except for shutdown_system. This process takes almost 30 seconds. We need to be faster than
this. I tried to trick the system by performing an indirect call to 0xFFFFFFF0, but this just caused a segmentation
fault. Is there a way to force a fast reboot through software, the functional equivalent of pressing the reset button
or cycling power?
|
|
|