Booting Custom Kernels And Os Images From Within Linux - Technologic Systems TS-7400 Hardware & Software Installation

Table of Contents

Advertisement

3.3 Booting custom kernels and OS images from within Linux

Technologic Systems has developed a Linux application "bootload" that allows arbitrary
booting of Linux and other OS kernels within Linux itself.
contained in the MBR of the flash chip is not extremely flexible as it was instead designed
to be very fast (1.1 second Linux bootup) and small (fits in the 443 bytes of empty space
in the MBR). The "bootload" program allows one to use the full facilities of Linux to
retrieve kernel files. Doing so also allows the use of standard shell scripts for the
programmatic selection of appropriate kernels, Linux initrd's, and kernel command line
arguments for maximum flexibility.
By default, the "linuxrc-mtdroot" sample startup script will look for a file in the YAFFS2
NAND flash filesystem named "/vmlinux.bin" and attempt to load and boot it. You can
modify the kernel command line parameters or image file by changing the respective line
in the startup script. By using a file in the YAFFS2 filesystem in this way for the kernel, it
is possible to atomically and safely field update the kernel from, e.g., ftp with a command
such as:
wget
ftp://mycompany.com/newvmlnx.bin
/vmlinux.bin
Command usage information follows:
$ bootload --help
Usage: bootload [OPTION] FILE
Linux to Linux bootloader - (re)boots a TS-7xxx board to another
kernel, OS image, or raw executable by replacing the running Linux
kernel.
General options:
-c, --cmdline=CMD Use CMD as the Linux kernel boot args
-r, --initrd=FILE Use FILE for Linux initial ramdisk
-s, --initrdsz=SZ Only read SZ bytes from the initrd file
-b, --base=ADDR
--version
-h, --help
When FILE is -, reads from standard input.
Some "one-line" examples of usage:
# Boot a compressed kernel image:
bunzip -c vmlinux.bin.bz2 | bootload -
# Reboot a kernel, but pass the 1MB running ramdisk to the new
kernel:
mount -o remount,ro /dev/rd/0 /
bootload -c "console=ttyAM0,115200 root=/dev/ram0" -r /dev/rd/0
\
-r 0x100000
# Boot one of 2 kernels based on the state of DIO line #7:
if dio_data_get 7; then bootload vmlinux.backup.bin; else \
bootload vmlinux.bin; fi
The bootload application requires a kernel module "bootloader.o" to be installed using
"insmod" prior to invocation. This module, as well the the "bootload" application itself are
installed on the default onboard YAFFS2 NAND flash Linux filesystem (/dev/mtdblock/3).
© May, 2010
TS-7400/TS-9441 MANUAL
Load the image at ADDR instead of 0x218000
Print version and copyright information
This help
www.embeddedARM.com
SOFTWARE
The power-on bootloader
&&
mv
newvmlnx.bin
16

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ts-9441

Table of Contents