[U-Boot] Booting kernel from NAND flash on AT91SAM9 custom board using fsload

Nicholas Kinar n.kinar at usask.ca
Mon Apr 4 03:25:54 CEST 2011


Nicholas Kinar wrote:
>
> I now strongly believe that the bootargs are not being passed in
> properly to the kernel.  Having found a posting on the AT91 website [1],
> I now realize that the Linux kernel has been built with a load address
> of 0x20008000, but must be loaded to different address 0x20080000.
>
> Posting:
> [1]
> http://www.at91.com/forum/viewtopic.php/f,12/t,5038/start,0/st,0/sk,t/sd,a/
>
> Now the kernel boots, but as shown below a kernel panic occurs, so I
> think that the issue might be due to the "root=ubi0:container" bootarg.
> How would I set the root bootarg for this particular NAND flash filesystem?
>

Yes, this was exactly the issue; the environment variables were not 
getting passed in properly to the kernel.  Here are the environment 
variables that I used to successfully boot the Linux kernel:

bootargs=noinitrd console=ttyS0,115200 ubi.mtd=1 root=ubi0:rootfs 
mtdparts=flash:10M(kernel),100M(root),-(storage) rw rootfstype=ubifs
nand-boot=ubi part kernel; ubifsmount kernelfs; ubifsload 0x20080000 
uImage; bootm 0x20080000
bootcmd=run nand-boot

Note that on my setup,  "root=ubi0:rootfs", where "rootfs" is the name 
of the volume on the UBI  "root" partition, which is indicated by 
"ubi.mtd=1".  The UBI device being used in the system is "ubi0".  I've 
also checked to see if support for UBIFS and UBI are compiled into the 
kernel (and not loaded as a module).  I had to pass "noinitrd" to ensure 
that the kernel detected the UBI file system on the flash.  In addition, 
as shown in a U-Boot tutorial 
(http://free-electrons.com/doc/u-boot.pdf), I was able to use a nice 
script (nand-boot) that runs from the bootcmd.

So thank you very much to those on this mailing list who helped me to 
get started with this!

Nicholas




More information about the U-Boot mailing list