DENX . DULG . LinuxInNANDFlash

Topic LinuxInNANDFlash not in WebOrder Boot from NAND Flash Memory

The previous section described how to load the Linux kernel image over ethernet using TFTP. This is especially well suited for your development and test environment, when the kernel image is still undergoing frequent changes, for instance because you are modifying kernel code or configuration.

Later in your development cycle you will work on application code or device drivers, which can be loaded dynamically as modules. If the Linux kernel remains the same then you can save the time needed for the TFTP download and put the kernel image into the NAND flash memory of your canyonlands board.

After having deleted the target flash area, you can download the Linux image and write it to flash. Below is a transcript of the complete operation with a final iminfo command to check the newly placed Linux kernel image in the flash memory.

Note: Included topic DULGData_canyonlands.UBootInstallNandKernelTftp? does not exist yet

Note how the filesize variable (which gets set by the TFTP transfer) is used to automatically adjust for the actual image size.

Since kernel requires the flattened device tree blob to be passed at boot time, you have to also write the blob to the flash memory. Below is a transcript of this operation. Note: Included topic DULGData_canyonlands.UBootInstallNandBlobTftp? does not exist yet

Now we can boot directly from flash. All we need to do is passing the in-flash address of the image (FC000000) and the in-flash address of the flattened device tree (FC1E0000) with the bootm command; we also make the definition of the bootargs variable permanent now:

=> setenv bootcmd bootm FC000000 - FC1E0000 
=> setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off

Use printenv to verify that everything is OK before you save the environment settings:

=> printenv
bootcmd=bootm FC000000 - FC1E0000 
bootargs=root=/dev/nfs rw nfsroot=

=> saveenv

To test booting from flash you can now reset the board (either by power-cycling it, or using the U-Boot command reset), or you can manually call the boot command which will run the commands in the bootcmd variable:

Note: Included topic DULGData_canyonlands.LinuxBootSelfNand? does not exist yet

----- Revision r1.2 - 14 Dec 2012 - 14:26 - DetlevZundel
Copyright © 2002-2022 by DENX Software Engineering