FPGARM4ULinux Linux

From Fpga4u

Jump to: navigation, search

Linux kernel development

Untar and patch the Linux kernel

The kernel version that will be used is 2.6.24.7.

Go to the root directory, untar the sources and go into them.

# cd /root/
# tar xjf prog-patch/linux-2.6.24.7.tar.gz
# cd linux-2.6.24.7

Apply the patches. Be careful, the order is important !

# zcat ../prog-patch/2.6.24-at91.patch.gz | patch -p1
# zcat ../prog-patch/2.6.24-at91-Fpgarm4U.patch.gz | patch -p1

Configure and compile the Linux kernel

You need to configure and compile the whole Linux Kernel.

Copy the configuration of the kernel and load it. You should use config_2.6.24.7-4 if you would like to use a TFTP-NFS system or config_2.6.24.7-5 if you would like an autonomous system.

# cp ../config_kernel/config_2.6.24.7-5 .config
# make ARCH=arm oldconfig

It is possible, but not necessary, to modify the configuration using the first command below. If you make any modification, do not forget to save it in the config_kernel directory using the second command.

# make ARCH=arm menuconfig
# cp .config /root/config_kernel/config_2.6.24.7-6

Then... compilation !

# make ARCH=arm CROSS_COMPILE=arm-linux-gnu-

At the end, the image of the kernel should be in the arch/arm/boot/ directory.

Prepare the Kernel Image for Das U-Boot

To be able to use the "bootm" command in U-Boot, we need to add some headers and CRC information to the kernel image.

Make the uImages directory in the /root/ directory and go to.

# mkdir /root/uImages
# cd /root/uImages

Copy the tool (mkimage) from u-boot directory to uImages directory.

# cp ../u-boot-1.1.5/tools/mkimage mkimage.bin

Verify that the binary can be executed.

# chmod 554 mkimage.bin

Add the headers to the kernel image.

# ./mkimage.bin -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-2.6.24.7-FPGARM4U \
  -d ../linux-2.6.24.7/arch/arm/boot/Image uImage-2.6.24.7-FPGARM4U

Verify that the shown information is the same as the entered information.

The file uImage-2.6.24.7-FPGARM4U, which is the Linux kernel that will be used on the fpgarm4u card, is ready.

Copy it to /root/final/. Copy also the file to /srv/kernel/ (directory of the TFTP server) if you would like to use the TFTP-NFS way.

# cp uImage-2.6.24.7-FPGARM4U /root/final/uImage-2.6.24.7
# cp uImage-2.6.24.7-FPGARM4U /srv/kernel/uImage-2.6.24.7
Personal tools