Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
<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"|X.Y.Z{{oldid|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"14115|Month Year2021/07/16}}|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"|TBDFirst 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" |{{oldid|16991|2022/03/04}}
| 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" |DESK-MX6-L 3.0.0 release
|-
|! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000"|[TBD_link X.Y.Z]2023/04/06|! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000"|Month Year|style="borderDESK-left:solid 2px #73B2C7; borderMX6-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBDL 4.0.0 release
|-
|}
<section end="History" />__FORCETOC__<section begin="Body" />
==Booting from NAND flash==
 
'''TBD: rifare tutti i dump con le versioni corrette '''
 
'''TBD: verificare l'immagine delle partizioni '''
 
With respect to the NOR flash memories, NAND devices are known to be quite challenging with regard to the reliability. This is especially true when the NAND flash is used as the boot device. Several techniques such as wear leveling and bad block management have to be implemented to achieve an acceptable reliability.
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 is are the U-Boot binary files (<code>mx6qdlaxel_SPLdesk-mx6-l-4.0.0_mx6qdldesk_nand_SPL</code> and <code>mx6qdlaxel_udesk-mx6-l-4.0.0_mx6qdldesk_nand_u-boot.img</code>). Its size is Their sizes are about 550 60kB (SPL) and 612 kB. From the point of view of MTD partitions, the (u-boot partition for SPL is <code>mtd0</code> is 2MB while the second stage partition <code>mtd1</code> is 6MB).
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. ===Boot partition organization===
The following image shows the organization of the boot partition.
*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.
===How to burn the boot partition===
The burning of the boot partition is performed by the [https://github.com/NXPmicro/imx-kobs <code>kobs-ng</code> tool] and the standard [http://git.infradead.org/mtd-utils.git <code>flash_erase</code> and <code>nandwrite</code>] flash utilities.
When the NAND flash is not burned yet, the product is usually configured in order to boot from a different device such as an SD card or through serial download mode.  Once the Linux kernel is up and running, the <code>kobs-ng</code> can be run as shown in the following example:
<pre class="board-terminal">
root@imx6qdlxelkdesk-mx6:~# kobs-ng -x -v -w desk-mxmx6-l-14.0.0_mx6qdlaxel_nand_SPL0_mx6qdldesk_nand_SPL
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
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-mxmx6-l-14.0.0_mx6qdlaxel_u0_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 line– is 2MB. The u-boot.img partition–<code>/dev/mtd1</code> is - used for the second stage binary image.is 6MB
It is possible to see those partition on U-Boot:
<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>
 
or on Linux userspace:
 
<pre>
root@desk-mx6:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "nand-SPL"
mtd1: 00600000 00020000 "nand-uboot"
mtd2: 00100000 00020000 "nand-env1"
mtd3: 00100000 00020000 "nand-env2"
mtd4: 00100000 00020000 "nand-fdt"
mtd5: 00100000 00020000 "nand-spare"
mtd6: 00800000 00020000 "nand-kernel"
mtd7: 00400000 00020000 "nand-splash"
mtd8: 3e800000 00020000 "nand-ubi"
</pre>
----
[[Category:AXEL Lite]]
8,221
edits