Taskit ARM9 CPU-module with Linux Stamp9261-series Stamp9261 (64F/64R) 542310 Data Sheet

Product codes
542310
Page of 65
Linux Guide
taskit GmbH
mv /tmp/sysapps /develop
After that go to the util directory: cd /develop/sysapps/mtd/util
Edit the makefile here. It is important to set the environment variable 
CROSS_COMPILE=arm-linux-3.4.2- for indicating the cross-compiler and DESTDIR
which gives the installation directory and must point to the directory with the root file 
system for the target system (in our example, /develop/rootfs).
Now type make to compile the MTD-utils.
7.4. Creating the initial ramdisk image
The easiest way to make a root file system available to the kernel when booting is to use 
an initial RAM disk (initrd). This initrd contains a compressed root file system which is 
decompressed by the kernel and saved in a RAM disk. Then it can be mounted by the 
kernel as the root file system. 
A description follows for creating an initrd image with an ext2 file system on a development 
computer.
Pre-requisite: a corresponding root directory with content needs to have been created 
beforehand.
We assume in this example that a /develop directory exists, containing the root file system 
directory /develop/rootfs.
First, create a new directory for the image to be generated:
cd /develop
mkdir images
In the same directory, create the folder initrd, in which the image is be mounted:
mkdir /initrd
Now create a blank 8MiB file system image, which will take on the root file system later, 
and store it in the newly created images directory:
dd if=/dev/zero of=images/initrd.img bs=1k count=8192
Using /dev/zero initializes the image with nulls to start with, which leads to higher 
compression rates later.
Note: If you want to change the size of the 8MiB root filesystem image you also have to 
change the size of the initial ramdisk in the kernel by changing the value 'Device Drivers-
>Block Devices->Ram disk support->Default RAM disk size'
 with menuconfig.
After initialising the file system image, add a file system to the image and mount it. Then 
write the contents of the root file system to the RAM disk and, finally, remove it from the 
file system with umount. Root permissions are required for these steps.
su -m
/sbin/mke2fs -F -v -m0 images/initrd.img
mount -o loop images/initrd.img initrd/
cp -av rootfs/* initrd/
umount initrd/
exit
Page 24 of 65
Version 1.26
 (2008-04-30)