Changes

Jump to: navigation, search

XELK-AN-007: Migrating u-boot to SPL

602 bytes added, 12:13, 13 August 2019
update u-boot on NAND flash
=== update u-boot on NAND flash ===
The SPL and u-boot image, must be flashed on NAND using the NXP <code>kobs-ng</code> utility. This tool is required for writing correct information needed by bootrom to identify the NAND as a boot device.
 
'''N.B.''' for programming the second stage, the <code>nandwrite</code> command hs to identify a proper mtd part witch correct size. Foir this reason, the ''mtdparts'' variable has to be modified for writing the complete u-boot image.
The following steps are therefore necessary:
# execute '''kobs-ng''' passing the parameters for flashing the SPL on NAND
# execute '''nandwrite''' to flash uboot image on NAND
 
* configure the ''mtdparts''
<pre class="board-terminal">
=> setenv mtdparts 'mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi)'
</pre>
* configure u-boot vars for booting from NFS
mtd: We write one page for save guard. *
root@imx6qxelk:~# </pre>
 
* erase the mtd part with <code>flash_erase</code>
<pre class="board-terminal">
root@imx6qxelk:~# flash_erase /dev/mtd1 0 0
</pre>
* execute <code>nandwrite</code> for second stage programming
8,153
edits

Navigation menu