Upgrading the bootloader
This is a local copy of the information from technologic systems, just in case they remove the page at http://www.embeddedarm.com/software/arm-linux-fastboot-ts7300.php
Technologic Systems provides a new SD Card image that includes kernel tweaks, initrd tweaks and a few tweaks inside the Debian filesystem itself on partition 3. In addition, fast boot optimizations have been applied to the TS-SDBOOT bootup firmware that resides in ROM memory. Installing the Image
The new SD Card image that enables the fast bootup option is available on our FTP site:
* Download the fast boot SD Card image (07-18-2007)
The SD Card image requires an SD Card with a minimum size of 256MB. To install the image, follow the instructions below:
1. Extract the new SD Card image file: $ bunzip2 sdimage.dd.bz2 2. Using an SD Card reader and the "dd" utility, copy the image to the disc device of the 256MB SD Card: $ dd if=sdimage.dd of=/dev/sda Or, using the second SD Card slot of your TS-7300: $ dd if=sdimage.dd of=/dev/sdcard1/disc0/disc WARNING: This will completely overwrite the contents of your SD Card, so make sure you do the appropriate backups before updating. 3. To use the image on a larger card (512MB, for example), just "dd" to the larger card, use fdisk to increase the size of part3 to the remaining space (taking care to keep the same start sector), and then use the "ext2resize" command on that partition: $ fdisk /dev/sdcard1/disc0/disc $ ext2resize /dev/sdcard1/disc0/part3 4. Download the proper kernel for the SD card(only required for TS-7260 and TS-7400). TS-7260 kernel (32MB of onboard flash) TS-7260 kernel (more than 32MB of onboard flash) TS-7400 kernel Using an SD Card reader and the "dd" utility, copy the kernel to the first partition of the 256MB SD Card: $ dd if=<KERNEL> of=/dev/sda1 Or, using the second SD Card slot of your TS-7300: $ dd if=<KERNEL> of=/dev/sdcard1/disc0/part1 5. Download the tsbootrom-update utility and update preboot. (Only required for TS-7260 and TS-7400) $ mac=`ifconfig eth0 | grep HWaddr | cut -d' ' -f11` $ tsbootrom-update -s -m $mac WARNING: Once you set a TS-7260 to boot from the SD card, there is no easy way to reverse the process so it boots from the flash again. ts-bootrom-update is a generic utility and while the -f option will work on other boards it doesn't work on the 7260. 6. Download and update the modules on your board(only required for TS-7400) Using an SD Card reader, copy the modules to the third partition of the SD Card: mount /dev/sda3 /mnt tar xzvfp tskernelmodules-2.4.26-ts11-7400.tar.gz -C /mnt/lib/modules/ umount /mnt
How Fastboot Works
Note: The TS-7400 TS-FLASHBOOT (the default bootloader) also supports this feature.
The new SD image will look at the state of jumper 6 on a TS-7300 or in the case of a TS-7260 or TS-7400 will check for the presence of /tsfastboot on the Linux partition(third partition). If jumper 6 is on or tsfastboot exists, the full Debian bootup will be bypassed and the system will instead drop straight to a shell prompt. Within 2 seconds after power-on the serial console prompt is active and 2.62 seconds after power-on the video console is displayed on the TS-7300. Video takes a bit longer to start up due to the fact that the FPGA must be initialized, a splash screen is displayed, and USB keyboard kernel modules must be loaded. To initiate a full Debian startup, simply type "exit" at either the shell prompt on the serial port or the shell prompt on the VGA monitor (using the USB keyboard).
The time it takes for bootup is also displayed right before the SH prompt is printed. On new Rev C CPLD TS-7300's, the CPLD has a 32-bit counter that starts at 0 at power-on and is used to measure the bootup time extremely accurately. On other boards, the EP9302 983Khz debug4 timer is used since it starts out as 0 also, but is slightly less accurate than the 32-bit 14.7Mhz counter implemented in the new CPLD rev.
If you want something other than a shell prompt running as soon as possible on bootup, it is possible by editing the /linuxrc shell script on the initrd. When you do the fast boot, you are actually booting to an initrd with the Debian parts of filesystem mounted read-only. After modifying the /linuxrc shell script on the initrd, run the "save" command to save the initrd back to the SD card, otherwise your changes won't "stick".
The bootup firmware was designed to be much faster than a x86 PC/SBC BIOS. So even better bootup times can be achieved with an RTOS, such as eCos, instead of Linux. Of the entire bootup time, about 1.4 seconds represents Linux bootstrap, while the rest is the hardware initialization.