Software; Software-Update Facility In Factory Configuration; Updating/Recovering The Bootloader Kernel - Technologic Systems TS-7400 Hardware & Software Installation

Table of Contents

Advertisement

3 SOFTWARE

3.1 Software-update facility in factory configuration

Although Technologic Systems can load the flash with customer supplied software from
the factory, it is often more convenient to have a local production process for installing or
updating the files and programs that make your product unique. The default software
installation enables this by providing a hook to allow customer code to "hijack" the normal
fast-boot bootup process. The default linuxrc (linuxrc-fastboot) will run a program
"/bin/check-usb-update" in the background after bootup has completed. This program
looks for a script "/tsinit" on the USB mass storage device (USB thumb-drive, or USB hard
drive) connected to the bottom USB slot. If this script exists, it is then run automatically as
the Linux "root" user-ID. A sample /tsinit script that copies a program "myprogram" to
onboard flash, and then changes the default bootup to the SD card follows:
#!/bin/sh
ln -sf /linuxrc-sdroot /linuxrc
mount /dev/mtdblock/3 /onboardflash
cp /mnt/root/myprogram /onboardflash/bin
umount /onboardflash
save
reboot
While the "tsinit" script is run, the red LED will be on. After it is complete, the red LED will
go off. A customer could mass-update many hundred TS-7400's easily by using a USB
flash dongle with a custom "tsinit" and data files and applying power with the USB dongle
on, wait for the LED to go off, then proceed to the next board. The "tsinit" script will begin
to execute approximately 3 seconds after power-on.

3.2 Updating/Recovering the bootloader kernel

Although usually not necessary, customers wanting to build and install their own
bootloader kernels can do so from the fastboot environment by using NFS and an internal
busybox utility "mtdcp". To mount an NFS filesystem from the fastboot shell, type:
mount 192.168.0.1:/tsarm-nfsroot /mnt/root
You may have to change the server IP and server mount point to whats appropriate on
your network. The default TS-7400 IP address is 192.168.0.50, but this could be changed
with the command:
ifconfig eth0 <NEW_IP_ADDRESS>
Then, assuming /mnt/root/zImage is your new kernel. Issue the command:
insmod /ts7xxx_nand.o; mtdcp /mnt/root/zImage 1 0
This copies the zImage kernel binary to /dev/mtdblock/1, with appropriate handling of any
potentially bad flash sectors. /dev/mtdblock/1 is the first MBR partition of the TS-7400
NAND flash chip. Do not use the 'dd' command to copy as it does not do the right thing
when presented with bad NAND flash sectors.
Note that changing the default bootloader kernel should be limited to only when absolutely
necessary. Instead, you should keep the known-good, factory default Linux kernel as the
bootloader kernel and then use the facilities of the "bootload" Linux command to reboot
into your custom kernel as described in the following section.
© May, 2010
TS-7400/TS-9441 MANUAL
www.embeddedARM.com
SOFTWARE
15

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ts-9441

Table of Contents