Open main menu

DAVE Developer's Wiki β

Changes

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

503 bytes added, 14:18, 8 October 2020
no edit summary
{{AppliesToAxelEsatta}}
{{AppliesToAxelLite}}
{{AppliesToAXEL Lite AN}}
{{InfoBoxBottom}}
=== 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 has to identify a proper mtd part witch correct size. For 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
U-Boot 2016.03-xelk-3.5.0-rc5 (Feb 25 Apr 19 2019 - 1623:1637:57 42 +01000200), Build: jenkins-XELK-u-boot-6062
CPU: Freescale i.MX6DL rev1.3 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 53C56C
Reset cause: POR
Environment: NAND
I2C: ready
DRAM: 1 GiB
Relocating to 4ff310004ff30000, new gd at 4df30eb84df2feb8, sp at 4df30e904df2fe90
PMIC: PFUZE100 ID=0x10
NAND: 1024 MiB
MMC: FSL_SDHC: 0
NAND read from offset 800000 failed -74
*** Warning - some problems detected reading environment; recovered successfully
WARNING: CB ConfigID on block 0 is UNLOCKED
Display: LDB-AM-800480STMQW-TA1-SBCX-REVB (800x480)
Fastboot: unsupported boot devices
Net: FEC [PRIME]
Warning: FEC (eth0) using random MAC address - 62a6:1b1d:e761:8882:e7c9:4b0f
Normal Boot
8,221
edits