From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicholas Kinar Date: Sun, 03 Apr 2011 19:25:54 -0600 Subject: [U-Boot] Booting kernel from NAND flash on AT91SAM9 custom board using fsload In-Reply-To: <4D97D257.6080502@usask.ca> References: <4D920553.8040809@usask.ca> <4D9218D5.70608@usask.ca> <20110329125620.387153ac@schlenkerla.am.freescale.net> <4D92428E.6030503@usask.ca> <20110329210517.B469CEDFFCF@gemini.denx.de> <4D92531E.4030206@usask.ca> <20110329215106.DF78AEDFFCF@gemini.denx.de> <4D975F24.8060409@usask.ca> <4D97D257.6080502@usask.ca> Message-ID: <4D991E22.1090807@usask.ca> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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