Difference between revisions of "Transclusion: CL-SOM-iMX7: U-Boot: Boot from NAND"

From Compulab Mediawiki
Jump to: navigation, search
(New page: * Use the following U-Boot commands to configure NAND as the main storage for both Linux kernel and root filesystem images: <pre> CL-SOM-iMX7 # env default -a CL-SOM-iMX7 # setenv bootdela...)
 
Line 1: Line 1:
 
* Use the following U-Boot commands to configure NAND as the main storage for both Linux kernel and root filesystem images:
 
* Use the following U-Boot commands to configure NAND as the main storage for both Linux kernel and root filesystem images:
 
<pre>
 
<pre>
CL-SOM-iMX7 # env default -a
+
setenv bootdelay 3
CL-SOM-iMX7 # setenv bootdelay 3
+
setenv loadaddr 0x80800000
CL-SOM-iMX7 # setenv loadaddr 0x80800000
+
setenv fdtaddr 0x83000000
CL-SOM-iMX7 # setenv fdt_addr 0x83000000
+
setenv nandroot "ubi0:rootfs rootfstype=ubifs ubi.mtd=rootfs rw"
CL-SOM-iMX7 # setenv nandroot "ubi0:rootfs rootfstype=ubifs ubi.mtd=rootfs rw"
+
setenv loadimage 'nand read ${loadaddr} 0 0x600000'
CL-SOM-iMX7 # setenv loadimage 'nand read ${loadaddr} 0 0x600000'
+
setenv loadfdt 'nand read ${fdtaddr} 0x980000 0x10000'
CL-SOM-iMX7 # setenv loadfdt 'nand read ${fdt_addr} 0x980000 0x10000'
+
setenv bootargs "console=ttymxc0,115200 root=${nandroot}"
CL-SOM-iMX7 # setenv bootargs "console=ttymxc0,115200 root=${nandroot}"
+
setenv bootcmd 'run loadimage; run loadfdt; bootz ${loadaddr} - ${fdtaddr}'
CL-SOM-iMX7 # setenv bootcmd 'run loadimage; run loadfdt; bootz ${loadaddr} - ${fdt_addr}'
 
 
</pre>
 
</pre>
 
* To save this configuration:
 
* To save this configuration:
 
<pre>
 
<pre>
CL-SOM-iMX7 # saveenv
+
saveenv
 
</pre>
 
</pre>
 
* To boot Linux type:
 
* To boot Linux type:
 
<pre>
 
<pre>
CL-SOM-iMX7 # run bootcmd
+
run bootcmd
 
</pre>
 
</pre>

Revision as of 11:22, 22 August 2017

  • Use the following U-Boot commands to configure NAND as the main storage for both Linux kernel and root filesystem images:
setenv bootdelay 3
setenv loadaddr 0x80800000
setenv fdtaddr 0x83000000
setenv nandroot "ubi0:rootfs rootfstype=ubifs ubi.mtd=rootfs rw"
setenv loadimage 'nand read ${loadaddr} 0 0x600000'
setenv loadfdt 'nand read ${fdtaddr} 0x980000 0x10000'
setenv bootargs "console=ttymxc0,115200 root=${nandroot}"
setenv bootcmd 'run loadimage; run loadfdt; bootz ${loadaddr} - ${fdtaddr}'
  • To save this configuration:
saveenv
  • To boot Linux type:
run bootcmd