5. Installing the kernel

Finally the image has to be programmed into the flash memory. We will do the procedure in linux.

First, we have to identify the flash partition, where the image has to be programmed to. You can get a list of all partitions with the following command:

cat /proc/mtd

You should get something like this:

dev:    size   erasesize  name
mtd0: 00020000 00020000 "bootstrap"
mtd1: 00040000 00020000 "uboot"
mtd2: 00020000 00020000 "env1"
mtd3: 00020000 00020000 "env2"
mtd4: 00200000 00020000 "linux"
mtd5: 1fd60000 00020000 "root"

The image must be written to the partition with the name linux, in this case mtd4. We will use this name in the following descriptions, replace all occurences of mtd4 in the next steps with right one for your system.

Now you have to erase the flash partition:

flash_eraseall /dev/mtd4

Now you can write the image to the flash. It is assumed, that your development directory is mounted on the target board and you changed your current working directory to the kernel source tree.

flashcp -v uImage /dev/mtd4

If your board uses NAND flash, use these commands:

flash_eraseall /dev/mtd4
nandwrite -p /dev/mtd4 uImage