| How to write the Linux kernel to NAND |
|
|
|
|
The images on this site are normally run from a bootable SD card. For OMAP boards with NAND, it is also possible to boot from a NAND image. To boot from NAND you will need to write four different binary images to NAND:
This article covers the third step of that process, the Linux kernel. Click on each of the other links above for instructions on how to write the other images to NAND. Unlike x-loader, the Linux kernel does not have any special requirements in the way it must be written. As a result it can be written to NAND from either u-boot or from the Linux command line. The following instructions assume that you are using a bootable SD card prepared from the GNOME or console images available on this site. Method 1: U-bootPower up or reset your OMAP board and break into u-boot by pressing a key on your serial console when you see the message: Hit any key to stop autoboot: Next have u-boot scan to find your bootable SD card and load the Linux binary from the FAT partition of the bootable SD card. # mmc rescan 0 At this point the kernel binary has been copied into RAM. We now specify the use of swecc and erase the area of NAND where kernel will reside: # nandecc sw Next we write the kernel image to the just erased area of NAND: # nand write ${loadaddr} 280000 ${filesize}
Method 2: LinuxThe first step in using Linux to write NAND is to mount the FAT parition of the bootable SD card so that we can read the kernel binary: # mount -t vfat /dev/mmcblk0p1 /media/card Next we erase the kernel partition: # flash_erase /dev/mtd3 0 0 And then write the kernel binary: # nandwrite -p /dev/mtd3 /media/card/uImage |
| Last Updated on Friday, 08 July 2011 14:33 |
0 Comments