Changes

Jump to: navigation, search

DESK-MX6-L/Deployment/Booting from NAND flash

651 bytes added, 08:35, 25 February 2022
Update NAND boot section for DESK-MX6-L v3.0.0 release
<section begin="History" />
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Jun 2021|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |3.0.0| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |Feb 2022| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |3.0.0 DESK release
|}
<section end="History" />
__FORCETOC__
<section begin="Body" />
==Booting from NAND flash==
Even though the example shown here refers to an i.MX6 DualLite board, the approach is substantially the same across all the i.MX6 family.
The test bed used in this example consists of an i.MX6 DualLite board equipped with a 512MB 8-bit asynchronous 1-bit ECC SLC NAND memory which is connected to the EIM bus of the SoC. The boot firmware image are the U-Boot binary files (<code>mx6qdlaxel_SPLdesk-mx6-l-3.0.0_mx6qdldesk_nand_SPL</code> and <code>mx6qdlaxel_udesk-mx6-l-3.0.0_mx6qdldesk_nand_u-boot.img</code>). Their sizes are about 55kB 60kB (SPL) and 550 612 kB (u-boot).
From the point of view of MTD partitions, the boot partition for SPL is <code>mtd0</code> is 2MB while the second stage partition <code>mtd1</code> is 6MB.
*The second copy of the firmware.
For more details about the bootrom e and the NAND boot process, please refer to the ''System Boot'' chapter of the Reference Manual of the specific i.MX6 Application Processor.
The following section will describe how to burn the boot partition in practice.
<pre class="board-terminal">
root@imx6qdlxelkdesk-mx6:~# kobs-ng -x -v -w desk-mx6-l-13.0.0_mx6qdldesk_nand_SPL
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 524288
mtd: boot_stream_size_in_bytes = 5734461440mtd: boot_stream_size_in_pages = 2830mtd: #1 0x00100000 - 0x00180000 (0x0010e0000x0010f000)mtd: #2 0x00180000 - 0x00200000 (0x0018e0000x0018f000)
FCB
m_u32Checksum = 0x00000000
m_u32Firmware1_startingPage = 512
m_u32Firmware2_startingPage = 768
m_u32PagesInFirmware1 = 2830 m_u32PagesInFirmware2 = 2830
m_u32DBBTSearchAreaStartAddress = 256
m_u32BadBlockMarkerByte = 2028
m_u32Version = 0x01000000
m_u32DBBTNumOfPages = 0
Firmware: image #0 @ 0x100000 size 0xe000 0xf000 - available 0x80000Firmware: image #1 @ 0x180000 size 0xe000 0xf000 - available 0x80000-------------- Start to write the [ FCB ] -----
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x20000
---------- Start to write the [ .tmp_kobs_ng ]----
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x0010e0000x0010f000
mtd: erasing @0:0x100000-0x120000
mtd: We write one page for save guard. *
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00180000 - 0x0018e0000x0018f000
mtd: erasing @0:0x180000-0x1a0000
mtd: We write one page for save guard. *
root@imx6qdlxelk:~#
</pre>
<pre class="board-terminal">
root@imx6qdlxelkdesk-mx6:~# flash_erase /dev/mtd1 0 0Erasing 128 Kibyte @ 5e0000 -- 100 % completeroot@imx6qdlxelkdesk-mx6:~# nandwrite -p /dev/mtd1 desk-mx6-l-13.0.0_mx6qdldesk_nand_u-boot.img
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
root@imx6qdlxelk:~#
</pre>
In this case, the SPL boot partition–<code>/dev/mtd0</code>, indicated as a parameter of the command line– is 2MB. The u-boot.img partition–<code>/dev/mtd1</code> - used for the second stage binary image is 6MB
It is possible to see those partition on uU-bootBoot:
<pre>
=> printenv mtdparts
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>
<pre>
root@imx6qdlxelkdesk-mx6:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "nand-SPL"
mtd6: 00800000 00020000 "nand-kernel"
mtd7: 00400000 00020000 "nand-splash"
mtd8: 1e800000 3e800000 00020000 "nand-ubi"root@imx6qdlxelk:~#
</pre>
devwiki_user
120
edits

Navigation menu