User manual
Linux Guide taskit GmbH
Next, compress the image containing the root file system and set the correct access rights:
gzip -9 < images/initrd.img > images/initrd.bin
chmod 644 images/initrd.bin
The parameter -9 tells gzip to use the highest level of compression.
You can also carry out this process by running the simple shell script mkfsimage.sh, found
in the folder scripts on the starterkit-CD:
cd /develop
cp /dev/cdrom/scripts/mkfsimage.sh /develop
./mkfsimage.sh
Now you can transfer the initrd.bin image to the flash of the taskit board and configure the
boot loader, in order to give the kernel the appropriate boot parameter for using the initrd.
7.5. Testing the new root filesystem
Before copying the image to flash memory, you should test whether it will be booted
properly, without errors.
The initrd created in the previous step must first be transferred from the development
computer to your device. You can use TFTP to do this.
If a TFTP server is running on the development system, move the compressed initrd.bin
image file to the /tftpboot directory.
All further steps are undertaken on the taskit device by means of a terminal program. After
start-up and pressing a key within 3 seconds, the system shows the U-Boot prompt.
Now we can make use of the bootscript we have created in chapter “Creating a
bootscript”:
run ramboot
7.6. Installing the new root filesystem permanently
If the kernel boots without any problems, you can reset the board and copy the root file
system image again via TFTP and write it to the flash memory.
Use the tftpboot command to load the initrd.bin from the server and write it to RAM:
U-Boot> tftpboot 20000000 initrd.bin
After the TFTP transfer, the variable filesize contains the size of the image, this is needed
for copying the file to flash memory.
Now copy the image to flash memory.
First erase the target flash memory range. The start and end addresses must point to
exactly the beginning and end of a flash-sector:
U-Boot> erase 10200000 104FFFFF
After clearing the memory, you can write the file system image to the flash memory.
Note: If the initrd is bigger then the flash partition that is used for storing it, the you will
overwrite other flash partitions (i.e.: /config in our example).
U-Boot> cp.b 20000000 10200000 0x$(filesize) .
Page 25 of 65 Version 1.26 (2008-04-30)