* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst
@ 2020-02-11 15:19 Igor Opaniuk
2020-02-11 15:19 ` [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST Igor Opaniuk
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Igor Opaniuk @ 2020-02-11 15:19 UTC (permalink / raw)
To: u-boot
From: Igor Opaniuk <igor.opaniuk@toradex.com>
- add initial index for toradex boards reST documentation
- add initial readme.rst file which provides all needed information
for obtaining a workable image ready for flashing
for both eMMC/NAND versions of Colibri iMX7.
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---
doc/board/index.rst | 1 +
doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++
doc/board/toradex/index.rst | 9 ++
3 files changed, 138 insertions(+)
create mode 100644 doc/board/toradex/colibri_imx7.rst
create mode 100644 doc/board/toradex/index.rst
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 00e72f57cd..f2f5907b8c 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -15,4 +15,5 @@ Board-specific doc
intel/index
renesas/index
sifive/index
+ toradex/index
xilinx/index
diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst
new file mode 100644
index 0000000000..9d770251af
--- /dev/null
+++ b/doc/board/toradex/colibri_imx7.rst
@@ -0,0 +1,128 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Colibri iMX7
+=======================
+
+Quick Start
+-----------
+
+- Build U-Boot
+- NAND IMX image adjustments before flashing
+- Flashing manually U-Boot to eMMC
+- Flashing manually U-Boot to NAND
+- Using ``update_uboot`` script
+
+Build U-Boot
+------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=arm-linux-gnueabi-
+ $ export ARCH=arm
+ $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig
+ $ make
+
+After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific
+image, ready for flashing (but check next section for additional
+adjustments).
+
+Final IMX program image includes (section ``6.6.7`` from `IMX7DRM
+<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_):
+
+* **Image vector table** (IVT) for BootROM
+* **Boot data** -indicates the program image location, program image size
+ in bytes, and the plugin flag.
+* **Device configuration data**
+* **User image**: U-Boot image (``u-boot-dtb.bin``)
+
+
+IMX image adjustments prior to flashing
+--------------------------------------------
+
+1. U-Boot for both Colibri iMX7 NAND and eMMC versions
+is built with HABv4 support (`AN4581.pdf
+<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_)
+enabled by default, which requires to generate a proper
+Command Sequence File (CSF) by srktool from NXP (not included in the
+U-Boot tree, check additional details in introduction_habv4.txt)
+and concatenate it to the final ``u-boot-dtb.imx``.
+
+2. In case if you don't want to generate a proper ``CSF`` (for any reason),
+you still need to pad the IMX image so i has the same size as specified in
+in **Boot Data** section of IMX image.
+To obtain this value, run:
+
+.. code-block:: bash
+
+ $ od -X -N 0x30 u-boot-dtb.imx
+ 0000000 402000d1 87800000 00000000 877ff42c
+ 0000020 877ff420 877ff400 878a5000 00000000
+ ^^^^^^^^
+ 0000040 877ff000 000a8060 00000000 40b401d2
+ ^^^^^^^^ ^^^^^^^^
+
+Where:
+
+* ``877ff400`` - IVT self address
+* ``877ff000`` - Program image address
+* ``000a8060`` - Program image size
+
+To calculate the padding:
+
+* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400``
+* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60``
+
+and then pad the image:
+
+.. code-block:: bash
+
+ $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \
+ u-boot-dtb.imx u-boot-dtb.imx.zero-padded
+
+3. Also, according to requirement from ``6.6.7.1``, the final image
+should have ``0x400`` offset for initial IVT table.
+
+For eMMC setup we handle this by flashing it to ``0x400``, howewer
+for NAND setup we adjust the image prior to flashing, adding padding in the
+beginning of the image.
+
+.. code-block:: bash
+
+ $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1
+
+Flash U-Boot IMX image to eMMC
+------------------------------
+
+Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware
+boot area partition:
+
+.. code-block:: bash
+
+
+ => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded
+ => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
+ => mmc dev 0 1
+ => mmc write ${loadaddr} 0x2 ${blkcnt}
+
+Flash U-Boot IMX image to NAND
+------------------------------
+
+.. code-block:: bash
+
+ => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready
+ => nand erase.part u-boot1
+ => nand write ${loadaddr} u-boot1 ${filesize}
+ => nand erase.part u-boot2
+ => nand write ${loadaddr} u-boot2 ${filesize}
+
+Using update_uboot script
+-------------------------
+
+You can also usb U-Boot env update_uboot script,
+which wraps all eMMC/NAND specific command invocation:
+
+.. code-block:: bash
+
+ => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready
+ => run update_uboot
+
diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst
new file mode 100644
index 0000000000..aa418d6bad
--- /dev/null
+++ b/doc/board/toradex/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Toradex
+=======
+
+.. toctree::
+ :maxdepth: 2
+
+ colibri_imx7
--
2.17.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk @ 2020-02-11 15:19 ` Igor Opaniuk 2020-02-11 17:05 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 3/5] doc: board: apalis-imx8: " Igor Opaniuk ` (3 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 15:19 UTC (permalink / raw) To: u-boot From: Igor Opaniuk <igor.opaniuk@toradex.com> Convert README to reStructuredText format. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> --- board/toradex/verdin-imx8mm/README | 88 ---------------------- doc/board/toradex/index.rst | 1 + doc/board/toradex/verdin-imx8mm.rst | 112 ++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 88 deletions(-) delete mode 100644 board/toradex/verdin-imx8mm/README create mode 100644 doc/board/toradex/verdin-imx8mm.rst diff --git a/board/toradex/verdin-imx8mm/README b/board/toradex/verdin-imx8mm/README deleted file mode 100644 index 1dac969476..0000000000 --- a/board/toradex/verdin-imx8mm/README +++ /dev/null @@ -1,88 +0,0 @@ -U-Boot for the Toradex Verdin iMX8M Mini Module - -Quick Start -=========== - -- Build the ARM trusted firmware binary -- Get the DDR firmware -- Build U-Boot -- Flash to eMMC -- Boot - -Get and Build the ARM Trusted Firmware (Trusted Firmware A) -=========================================================== - -$ echo "Downloading and building TF-A..." -$ git clone -b imx_4.14.98_2.3.0 https://source.codeaurora.org/external/imx/imx-atf -$ cd imx-atf - -Please edit `plat/imx/imx8mm/include/platform_def.h` so it contains proper -values for UART configuration and BL31 base address (correct values listed -below): -#define BL31_BASE 0x910000 -#define IMX_BOOT_UART_BASE 0x30860000 -#define DEBUG_CONSOLE 1 - -Then build ATF (TF-A): -$ make PLAT=imx8mm bl31 - -Get the DDR Firmware -==================== - -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin -$ chmod +x firmware-imx-8.4.1.bin -$ ./firmware-imx-8.4.1.bin -$ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ - -Build U-Boot -============ - -$ export CROSS_COMPILE=aarch64-linux-gnu- -$ make verdin-imx8mm_defconfig -$ make flash.bin - -Flash to eMMC -============= - -> tftpboot ${loadaddr} flash.bin -> setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 -> mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} - -As a convenience, instead of the last two commands one may also use the update -U-Boot wrapper: -> run update_uboot - -Boot -==== - -ATF, U-boot proper and u-boot.dtb images are packed into FIT image, -which is loaded and parsed by SPL. - -Boot sequence is: -SPL ---> ATF (TF-A) ---> U-boot proper - -Output: -U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) -Normal Boot -Trying to boot from MMC1 -NOTICE: Configuring TZASC380 -NOTICE: RDC off -NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty -NOTICE: BL31: Built : 01:11:41, Jan 25 2020 -NOTICE: sip svc init - - -U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) - -CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz -Reset cause: POR -DRAM: 2 GiB -MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 -Loading Environment from MMC... OK -In: serial -Out: serial -Err: serial -Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial# 06535149 -Net: eth0: ethernet at 30be0000 -Hit any key to stop autoboot: 0 -Verdin iMX8MM # diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst index aa418d6bad..6cd2ade9f4 100644 --- a/doc/board/toradex/index.rst +++ b/doc/board/toradex/index.rst @@ -7,3 +7,4 @@ Toradex :maxdepth: 2 colibri_imx7 + verdin-imx8mm diff --git a/doc/board/toradex/verdin-imx8mm.rst b/doc/board/toradex/verdin-imx8mm.rst new file mode 100644 index 0000000000..5363251dee --- /dev/null +++ b/doc/board/toradex/verdin-imx8mm.rst @@ -0,0 +1,112 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Verdin iMX8M Mini Module +=============================================== + +Quick Start +----------- + +- Build the ARM trusted firmware binary +- Get the DDR firmware +- Build U-Boot +- Flash to eMMC +- Boot + +Get and Build the ARM Trusted Firmware (Trusted Firmware A) +----------------------------------------------------------- + +.. code-block:: bash + + $ echo "Downloading and building TF-A..." + $ git clone -b imx_4.14.98_2.3.0 \ + https://source.codeaurora.org/external/imx/imx-atf + $ cd imx-atf + +Please edit ``plat/imx/imx8mm/include/platform_def.h`` so it contains proper +values for UART configuration and BL31 base address (correct values listed +below): + +.. code-block:: bash + + #define BL31_BASE 0x910000 + #define IMX_BOOT_UART_BASE 0x30860000 + #define DEBUG_CONSOLE 1 + +Then build ATF (TF-A): + +.. code-block:: bash + + $ make PLAT=imx8mm bl31 + +Get the DDR Firmware +-------------------- + +.. code-block:: bash + + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin + $ chmod +x firmware-imx-8.4.1.bin + $ ./firmware-imx-8.4.1.bin + $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ + +Build U-Boot +------------ +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-linux-gnu- + $ make verdin-imx8mm_defconfig + $ make flash.bin + +Flash to eMMC +------------- + +.. code-block:: bash + + > tftpboot ${loadaddr} flash.bin + > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 + > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} + +As a convenience, instead of the last two commands one may also use the update +U-Boot wrapper: + +.. code-block:: bash + + > run update_uboot + +Boot +---- + +ATF, U-boot proper and u-boot.dtb images are packed into FIT image, +which is loaded and parsed by SPL. + +Boot sequence is: + +* SPL ---> ATF (TF-A) ---> U-boot proper + +Output: + +.. code-block:: bash + + U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) + Normal Boot + Trying to boot from MMC1 + NOTICE: Configuring TZASC380 + NOTICE: RDC off + NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty + NOTICE: BL31: Built : 01:11:41, Jan 25 2020 + NOTICE: sip svc init + + + U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) + + CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz + Reset cause: POR + DRAM: 2 GiB + MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 + Loading Environment from MMC... OK + In: serial + Out: serial + Err: serial + Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial: + Net: eth0: ethernet at 30be0000 + Hit any key to stop autoboot: 0 + Verdin iMX8MM # -- 2.17.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST 2020-02-11 15:19 ` [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST Igor Opaniuk @ 2020-02-11 17:05 ` Heinrich Schuchardt 0 siblings, 0 replies; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 17:05 UTC (permalink / raw) To: u-boot On 2/11/20 4:19 PM, Igor Opaniuk wrote: > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > Convert README to reStructuredText format. Please, run checkpatch on your patch set: ERROR: DOS line endings #334: FILE: doc/board/toradex/verdin-imx8mm.rst:111: + Hit any key to stop autoboot: 0^M$ ERROR: DOS line endings #335: FILE: doc/board/toradex/verdin-imx8mm.rst:112: + Verdin iMX8MM #^M$ Best regards Heinrich > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > --- > > board/toradex/verdin-imx8mm/README | 88 ---------------------- > doc/board/toradex/index.rst | 1 + > doc/board/toradex/verdin-imx8mm.rst | 112 ++++++++++++++++++++++++++++ > 3 files changed, 113 insertions(+), 88 deletions(-) > delete mode 100644 board/toradex/verdin-imx8mm/README > create mode 100644 doc/board/toradex/verdin-imx8mm.rst > > diff --git a/board/toradex/verdin-imx8mm/README b/board/toradex/verdin-imx8mm/README > deleted file mode 100644 > index 1dac969476..0000000000 > --- a/board/toradex/verdin-imx8mm/README > +++ /dev/null > @@ -1,88 +0,0 @@ > -U-Boot for the Toradex Verdin iMX8M Mini Module > - > -Quick Start > -=========== > - > -- Build the ARM trusted firmware binary > -- Get the DDR firmware > -- Build U-Boot > -- Flash to eMMC > -- Boot > - > -Get and Build the ARM Trusted Firmware (Trusted Firmware A) > -=========================================================== > - > -$ echo "Downloading and building TF-A..." > -$ git clone -b imx_4.14.98_2.3.0 https://source.codeaurora.org/external/imx/imx-atf > -$ cd imx-atf > - > -Please edit `plat/imx/imx8mm/include/platform_def.h` so it contains proper > -values for UART configuration and BL31 base address (correct values listed > -below): > -#define BL31_BASE 0x910000 > -#define IMX_BOOT_UART_BASE 0x30860000 > -#define DEBUG_CONSOLE 1 > - > -Then build ATF (TF-A): > -$ make PLAT=imx8mm bl31 > - > -Get the DDR Firmware > -==================== > - > -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin > -$ chmod +x firmware-imx-8.4.1.bin > -$ ./firmware-imx-8.4.1.bin > -$ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ > - > -Build U-Boot > -============ > - > -$ export CROSS_COMPILE=aarch64-linux-gnu- > -$ make verdin-imx8mm_defconfig > -$ make flash.bin > - > -Flash to eMMC > -============= > - > -> tftpboot ${loadaddr} flash.bin > -> setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > -> mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} > - > -As a convenience, instead of the last two commands one may also use the update > -U-Boot wrapper: > -> run update_uboot > - > -Boot > -==== > - > -ATF, U-boot proper and u-boot.dtb images are packed into FIT image, > -which is loaded and parsed by SPL. > - > -Boot sequence is: > -SPL ---> ATF (TF-A) ---> U-boot proper > - > -Output: > -U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) > -Normal Boot > -Trying to boot from MMC1 > -NOTICE: Configuring TZASC380 > -NOTICE: RDC off > -NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty > -NOTICE: BL31: Built : 01:11:41, Jan 25 2020 > -NOTICE: sip svc init > - > - > -U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) > - > -CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz > -Reset cause: POR > -DRAM: 2 GiB > -MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 > -Loading Environment from MMC... OK > -In: serial > -Out: serial > -Err: serial > -Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial# 06535149 > -Net: eth0: ethernet at 30be0000 > -Hit any key to stop autoboot: 0 > -Verdin iMX8MM # > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > index aa418d6bad..6cd2ade9f4 100644 > --- a/doc/board/toradex/index.rst > +++ b/doc/board/toradex/index.rst > @@ -7,3 +7,4 @@ Toradex > :maxdepth: 2 > > colibri_imx7 > + verdin-imx8mm > diff --git a/doc/board/toradex/verdin-imx8mm.rst b/doc/board/toradex/verdin-imx8mm.rst > new file mode 100644 > index 0000000000..5363251dee > --- /dev/null > +++ b/doc/board/toradex/verdin-imx8mm.rst > @@ -0,0 +1,112 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Verdin iMX8M Mini Module > +=============================================== > + > +Quick Start > +----------- > + > +- Build the ARM trusted firmware binary > +- Get the DDR firmware > +- Build U-Boot > +- Flash to eMMC > +- Boot > + > +Get and Build the ARM Trusted Firmware (Trusted Firmware A) > +----------------------------------------------------------- > + > +.. code-block:: bash > + > + $ echo "Downloading and building TF-A..." > + $ git clone -b imx_4.14.98_2.3.0 \ > + https://source.codeaurora.org/external/imx/imx-atf > + $ cd imx-atf > + > +Please edit ``plat/imx/imx8mm/include/platform_def.h`` so it contains proper > +values for UART configuration and BL31 base address (correct values listed > +below): > + > +.. code-block:: bash > + > + #define BL31_BASE 0x910000 > + #define IMX_BOOT_UART_BASE 0x30860000 > + #define DEBUG_CONSOLE 1 > + > +Then build ATF (TF-A): > + > +.. code-block:: bash > + > + $ make PLAT=imx8mm bl31 > + > +Get the DDR Firmware > +-------------------- > + > +.. code-block:: bash > + > + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin > + $ chmod +x firmware-imx-8.4.1.bin > + $ ./firmware-imx-8.4.1.bin > + $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ > + > +Build U-Boot > +------------ > +.. code-block:: bash > + > + $ export CROSS_COMPILE=aarch64-linux-gnu- > + $ make verdin-imx8mm_defconfig > + $ make flash.bin > + > +Flash to eMMC > +------------- > + > +.. code-block:: bash > + > + > tftpboot ${loadaddr} flash.bin > + > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > + > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} > + > +As a convenience, instead of the last two commands one may also use the update > +U-Boot wrapper: > + > +.. code-block:: bash > + > + > run update_uboot > + > +Boot > +---- > + > +ATF, U-boot proper and u-boot.dtb images are packed into FIT image, > +which is loaded and parsed by SPL. > + > +Boot sequence is: > + > +* SPL ---> ATF (TF-A) ---> U-boot proper > + > +Output: > + > +.. code-block:: bash > + > + U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) > + Normal Boot > + Trying to boot from MMC1 > + NOTICE: Configuring TZASC380 > + NOTICE: RDC off > + NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty > + NOTICE: BL31: Built : 01:11:41, Jan 25 2020 > + NOTICE: sip svc init > + > + > + U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) > + > + CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz > + Reset cause: POR > + DRAM: 2 GiB > + MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 > + Loading Environment from MMC... OK > + In: serial > + Out: serial > + Err: serial > + Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial: > + Net: eth0: ethernet at 30be0000 > + Hit any key to stop autoboot: 0 > + Verdin iMX8MM # > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 3/5] doc: board: apalis-imx8: convert readme to reST 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk 2020-02-11 15:19 ` [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST Igor Opaniuk @ 2020-02-11 15:19 ` Igor Opaniuk 2020-02-11 17:06 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 4/5] doc: board: colibri-imx8x: " Igor Opaniuk ` (2 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 15:19 UTC (permalink / raw) To: u-boot From: Igor Opaniuk <igor.opaniuk@toradex.com> Convert README to reStructuredText format. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> --- board/toradex/apalis-imx8/README | 66 ------------------------ doc/board/toradex/apalix-imx8.rst | 83 +++++++++++++++++++++++++++++++ doc/board/toradex/index.rst | 1 + 3 files changed, 84 insertions(+), 66 deletions(-) delete mode 100644 board/toradex/apalis-imx8/README create mode 100644 doc/board/toradex/apalix-imx8.rst diff --git a/board/toradex/apalis-imx8/README b/board/toradex/apalis-imx8/README deleted file mode 100644 index e6e3dcb367..0000000000 --- a/board/toradex/apalis-imx8/README +++ /dev/null @@ -1,66 +0,0 @@ -U-Boot for the Toradex Apalis iMX8QM V1.0B Module - -Quick Start -=========== - -- Build the ARM trusted firmware binary -- Get scfw_tcm.bin and ahab-container.img -- Build U-Boot -- Load U-Boot binary using uuu -- Flash U-Boot binary into the eMMC -- Boot - -Get and Build the ARM Trusted Firmware -====================================== - -$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf -$ cd imx-atf/ -$ make PLAT=imx8qm bl31 - -Get scfw_tcm.bin and ahab-container.img -======================================= - -$ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes-bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true -$ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin -$ chmod +x firmware-imx-8.0.bin -$ ./firmware-imx-8.0.bin - -Copy the following binaries to the U-Boot folder: - -$ cp imx-atf/build/imx8qm/release/bl31.bin . -$ cp u-boot/u-boot.bin . - -Copy the following firmware to the U-Boot folder: - -$ cp firmware-imx-8.0/firmware/seco/ahab-container.img . - -Build U-Boot -============ - -$ make apalis-imx8qm_defconfig -$ make u-boot-dtb.imx - -Load the U-Boot Binary Using UUU -================================ - -Get the latest version of the universal update utility (uuu) aka mfgtools 3.0: - -https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases - -Put the module into USB recovery aka serial downloader mode, connect USB device -to your host and execute uuu: - -sudo ./uuu u-boot/u-boot-dtb.imx - -Flash the U-Boot Binary into the eMMC -===================================== - -Burn the u-boot-dtb.imx binary to the primary eMMC hardware boot area partition: - -load mmc 1:1 $loadaddr u-boot-dtb.imx -setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 -mmc dev 0 1 -mmc write ${loadaddr} 0x0 ${blkcnt} - -Boot diff --git a/doc/board/toradex/apalix-imx8.rst b/doc/board/toradex/apalix-imx8.rst new file mode 100644 index 0000000000..e0c2929032 --- /dev/null +++ b/doc/board/toradex/apalix-imx8.rst @@ -0,0 +1,83 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Apalis iMX8QM V1.0B Module +================================================= + +Quick Start +----------- + +- Build the ARM trusted firmware binary +- Get scfw_tcm.bin and ahab-container.img +- Build U-Boot +- Load U-Boot binary using uuu +- Flash U-Boot binary into the eMMC +- Boot + +Get and Build the ARM Trusted Firmware +-------------------------------------- + +.. code-block:: bash + + $ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf + $ cd imx-atf/ + $ make PLAT=imx8qm bl31 + +Get scfw_tcm.bin and ahab-container.img +--------------------------------------- + +.. code-block:: bash + + $ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes- + bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true + $ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin + $ chmod +x firmware-imx-8.0.bin + $ ./firmware-imx-8.0.bin + +Copy the following binaries to the U-Boot folder: + +.. code-block:: bash + + $ cp imx-atf/build/imx8qm/release/bl31.bin . + $ cp u-boot/u-boot.bin . + +Copy the following firmware to the U-Boot folder: + +.. code-block:: bash + + $ cp firmware-imx-8.0/firmware/seco/ahab-container.img . + +Build U-Boot +------------ +.. code-block:: bash + + $ make apalis-imx8qm_defconfig + $ make u-boot-dtb.imx + +Load the U-Boot Binary Using UUU +-------------------------------- + +Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: + +https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases + +Put the module into USB recovery aka serial downloader mode, connect USB device +to your host and execute uuu: + +.. code-block:: bash + + sudo ./uuu u-boot/u-boot-dtb.imx + +Flash the U-Boot Binary into the eMMC +------------------------------------- + +Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area +partition and boot: + +.. code-block:: bash + + load mmc 1:1 $loadaddr u-boot-dtb.imx + setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 + mmc dev 0 1 + mmc write ${loadaddr} 0x0 ${blkcnt} + diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst index 6cd2ade9f4..da65ad2408 100644 --- a/doc/board/toradex/index.rst +++ b/doc/board/toradex/index.rst @@ -6,5 +6,6 @@ Toradex .. toctree:: :maxdepth: 2 + apalix-imx8 colibri_imx7 verdin-imx8mm -- 2.17.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 3/5] doc: board: apalis-imx8: convert readme to reST 2020-02-11 15:19 ` [PATCH v3 3/5] doc: board: apalis-imx8: " Igor Opaniuk @ 2020-02-11 17:06 ` Heinrich Schuchardt 0 siblings, 0 replies; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 17:06 UTC (permalink / raw) To: u-boot On 2/11/20 4:19 PM, Igor Opaniuk wrote: > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > Convert README to reStructuredText format. ERROR: DOS line endings #277: FILE: doc/board/toradex/apalix-imx8.rst:83: +^M$ ERROR: DOS line endings #286: FILE: doc/board/toradex/index.rst:9: + apalix-imx8^M$ Best regards Heinrich > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > --- > > board/toradex/apalis-imx8/README | 66 ------------------------ > doc/board/toradex/apalix-imx8.rst | 83 +++++++++++++++++++++++++++++++ > doc/board/toradex/index.rst | 1 + > 3 files changed, 84 insertions(+), 66 deletions(-) > delete mode 100644 board/toradex/apalis-imx8/README > create mode 100644 doc/board/toradex/apalix-imx8.rst > > diff --git a/board/toradex/apalis-imx8/README b/board/toradex/apalis-imx8/README > deleted file mode 100644 > index e6e3dcb367..0000000000 > --- a/board/toradex/apalis-imx8/README > +++ /dev/null > @@ -1,66 +0,0 @@ > -U-Boot for the Toradex Apalis iMX8QM V1.0B Module > - > -Quick Start > -=========== > - > -- Build the ARM trusted firmware binary > -- Get scfw_tcm.bin and ahab-container.img > -- Build U-Boot > -- Load U-Boot binary using uuu > -- Flash U-Boot binary into the eMMC > -- Boot > - > -Get and Build the ARM Trusted Firmware > -====================================== > - > -$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf > -$ cd imx-atf/ > -$ make PLAT=imx8qm bl31 > - > -Get scfw_tcm.bin and ahab-container.img > -======================================= > - > -$ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes-bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true > -$ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin > -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin > -$ chmod +x firmware-imx-8.0.bin > -$ ./firmware-imx-8.0.bin > - > -Copy the following binaries to the U-Boot folder: > - > -$ cp imx-atf/build/imx8qm/release/bl31.bin . > -$ cp u-boot/u-boot.bin . > - > -Copy the following firmware to the U-Boot folder: > - > -$ cp firmware-imx-8.0/firmware/seco/ahab-container.img . > - > -Build U-Boot > -============ > - > -$ make apalis-imx8qm_defconfig > -$ make u-boot-dtb.imx > - > -Load the U-Boot Binary Using UUU > -================================ > - > -Get the latest version of the universal update utility (uuu) aka mfgtools 3.0: > - > -https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases > - > -Put the module into USB recovery aka serial downloader mode, connect USB device > -to your host and execute uuu: > - > -sudo ./uuu u-boot/u-boot-dtb.imx > - > -Flash the U-Boot Binary into the eMMC > -===================================== > - > -Burn the u-boot-dtb.imx binary to the primary eMMC hardware boot area partition: > - > -load mmc 1:1 $loadaddr u-boot-dtb.imx > -setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > -mmc dev 0 1 > -mmc write ${loadaddr} 0x0 ${blkcnt} > - > -Boot > diff --git a/doc/board/toradex/apalix-imx8.rst b/doc/board/toradex/apalix-imx8.rst > new file mode 100644 > index 0000000000..e0c2929032 > --- /dev/null > +++ b/doc/board/toradex/apalix-imx8.rst > @@ -0,0 +1,83 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Apalis iMX8QM V1.0B Module > +================================================= > + > +Quick Start > +----------- > + > +- Build the ARM trusted firmware binary > +- Get scfw_tcm.bin and ahab-container.img > +- Build U-Boot > +- Load U-Boot binary using uuu > +- Flash U-Boot binary into the eMMC > +- Boot > + > +Get and Build the ARM Trusted Firmware > +-------------------------------------- > + > +.. code-block:: bash > + > + $ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf > + $ cd imx-atf/ > + $ make PLAT=imx8qm bl31 > + > +Get scfw_tcm.bin and ahab-container.img > +--------------------------------------- > + > +.. code-block:: bash > + > + $ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes- > + bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true > + $ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin > + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin > + $ chmod +x firmware-imx-8.0.bin > + $ ./firmware-imx-8.0.bin > + > +Copy the following binaries to the U-Boot folder: > + > +.. code-block:: bash > + > + $ cp imx-atf/build/imx8qm/release/bl31.bin . > + $ cp u-boot/u-boot.bin . > + > +Copy the following firmware to the U-Boot folder: > + > +.. code-block:: bash > + > + $ cp firmware-imx-8.0/firmware/seco/ahab-container.img . > + > +Build U-Boot > +------------ > +.. code-block:: bash > + > + $ make apalis-imx8qm_defconfig > + $ make u-boot-dtb.imx > + > +Load the U-Boot Binary Using UUU > +-------------------------------- > + > +Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: > + > +https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases > + > +Put the module into USB recovery aka serial downloader mode, connect USB device > +to your host and execute uuu: > + > +.. code-block:: bash > + > + sudo ./uuu u-boot/u-boot-dtb.imx > + > +Flash the U-Boot Binary into the eMMC > +------------------------------------- > + > +Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area > +partition and boot: > + > +.. code-block:: bash > + > + load mmc 1:1 $loadaddr u-boot-dtb.imx > + setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > + mmc dev 0 1 > + mmc write ${loadaddr} 0x0 ${blkcnt} > + > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > index 6cd2ade9f4..da65ad2408 100644 > --- a/doc/board/toradex/index.rst > +++ b/doc/board/toradex/index.rst > @@ -6,5 +6,6 @@ Toradex > .. toctree:: > :maxdepth: 2 > > + apalix-imx8 > colibri_imx7 > verdin-imx8mm > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 4/5] doc: board: colibri-imx8x: convert readme to reST 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk 2020-02-11 15:19 ` [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST Igor Opaniuk 2020-02-11 15:19 ` [PATCH v3 3/5] doc: board: apalis-imx8: " Igor Opaniuk @ 2020-02-11 15:19 ` Igor Opaniuk 2020-02-11 17:06 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 5/5] doc: board: add rockchip subfolder Igor Opaniuk 2020-02-11 17:04 ` [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Heinrich Schuchardt 4 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 15:19 UTC (permalink / raw) To: u-boot From: Igor Opaniuk <igor.opaniuk@toradex.com> Convert README to reStructuredText format. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> --- board/toradex/colibri-imx8x/README | 66 ----------------------- doc/board/toradex/colibri-imx8x.rst | 82 +++++++++++++++++++++++++++++ doc/board/toradex/index.rst | 1 + 3 files changed, 83 insertions(+), 66 deletions(-) delete mode 100644 board/toradex/colibri-imx8x/README create mode 100644 doc/board/toradex/colibri-imx8x.rst diff --git a/board/toradex/colibri-imx8x/README b/board/toradex/colibri-imx8x/README deleted file mode 100644 index 708bb3e51c..0000000000 --- a/board/toradex/colibri-imx8x/README +++ /dev/null @@ -1,66 +0,0 @@ -U-Boot for the Toradex Colibri iMX8QXP V1.0B Module - -Quick Start -=========== - -- Build the ARM trusted firmware binary -- Get scfw_tcm.bin and ahab-container.img -- Build U-Boot -- Load U-Boot binary using uuu -- Flash U-Boot binary into the eMMC -- Boot - -Get and Build the ARM Trusted Firmware -====================================== - -$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf -$ cd imx-atf/ -$ make PLAT=imx8qxp bl31 - -Get scfw_tcm.bin and ahab-container.img -======================================= - -$ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes-bsp/imx-sc-firmware/files/mx8qx-colibri-scfw-tcm.bin?raw=true -$ mv mx8qx-colibri-scfw-tcm.bin\?raw\=true mx8qx-colibri-scfw-tcm.bin -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin -$ chmod +x firmware-imx-8.0.bin -$ ./firmware-imx-8.0.bin - -Copy the following binaries to the U-Boot folder: - -$ cp imx-atf/build/imx8qxp/release/bl31.bin . -$ cp u-boot/u-boot.bin . - -Copy the following firmware to the U-Boot folder: - -$ cp firmware-imx-8.0/firmware/seco/ahab-container.img . - -Build U-Boot -============ - -$ make colibri-imx8qxp_defconfig -$ make u-boot-dtb.imx - -Load the U-Boot Binary Using UUU -================================ - -Get the latest version of the universal update utility (uuu) aka mfgtools 3.0: - -https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases - -Put the module into USB recovery aka serial downloader mode, connect USB device -to your host and execute uuu: - -sudo ./uuu u-boot/u-boot-dtb.imx - -Flash the U-Boot Binary into the eMMC -===================================== - -Burn the u-boot-dtb.imx binary to the primary eMMC hardware boot area partition: - -load mmc 1:1 $loadaddr u-boot-dtb.imx -setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 -mmc dev 0 1 -mmc write ${loadaddr} 0x0 ${blkcnt} - -Boot diff --git a/doc/board/toradex/colibri-imx8x.rst b/doc/board/toradex/colibri-imx8x.rst new file mode 100644 index 0000000000..ce9195af73 --- /dev/null +++ b/doc/board/toradex/colibri-imx8x.rst @@ -0,0 +1,82 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Colibri iMX8QXP V1.0B Module +=================================================== + +Quick Start +----------- + +- Build the ARM trusted firmware binary +- Get scfw_tcm.bin and ahab-container.img +- Build U-Boot +- Load U-Boot binary using uuu +- Flash U-Boot binary into the eMMC +- Boot + +Get and Build the ARM Trusted Firmware +-------------------------------------- + +.. code-block:: bash + + $ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf + $ cd imx-atf/ + $ make PLAT=imx8qxp bl31 + +Get scfw_tcm.bin and ahab-container.img +--------------------------------------- +.. code-block:: bash + + $ wget https://github.com/toradex/meta-fsl-bsp-release/blob/ + toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes- + bsp/imx-sc-firmware/files/mx8qx-colibri-scfw-tcm.bin?raw=true + $ mv mx8qx-colibri-scfw-tcm.bin\?raw\=true mx8qx-colibri-scfw-tcm.bin + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin + $ chmod +x firmware-imx-8.0.bin + $ ./firmware-imx-8.0.bin + +Copy the following binaries to the U-Boot folder: + +.. code-block:: bash + + $ cp imx-atf/build/imx8qxp/release/bl31.bin . + $ cp u-boot/u-boot.bin . + +Copy the following firmware to the U-Boot folder: + +.. code-block:: bash + + $ cp firmware-imx-8.0/firmware/seco/ahab-container.img . + +Build U-Boot +------------ + +.. code-block:: bash + + $ make colibri-imx8qxp_defconfig + $ make u-boot-dtb.imx + +Load the U-Boot Binary Using UUU +-------------------------------- + +Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: + +https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases + +Put the module into USB recovery aka serial downloader mode, connect USB device +to your host and execute ``uuu``: + +.. code-block:: bash + + sudo ./uuu u-boot/u-boot-dtb.imx + +Flash the U-Boot Binary into the eMMC +------------------------------------- + +Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area partition: + +.. code-block:: bash + + load mmc 1:1 $loadaddr u-boot-dtb.imx + setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 + mmc dev 0 1 + mmc write ${loadaddr} 0x0 ${blkcnt} diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst index da65ad2408..16b5a0770d 100644 --- a/doc/board/toradex/index.rst +++ b/doc/board/toradex/index.rst @@ -8,4 +8,5 @@ Toradex apalix-imx8 colibri_imx7 + colibri-imx8x verdin-imx8mm -- 2.17.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 4/5] doc: board: colibri-imx8x: convert readme to reST 2020-02-11 15:19 ` [PATCH v3 4/5] doc: board: colibri-imx8x: " Igor Opaniuk @ 2020-02-11 17:06 ` Heinrich Schuchardt 0 siblings, 0 replies; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 17:06 UTC (permalink / raw) To: u-boot On 2/11/20 4:19 PM, Igor Opaniuk wrote: > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > Convert README to reStructuredText format. ERROR: DOS line endings #276: FILE: doc/board/toradex/colibri-imx8x.rst:82: + mmc write ${loadaddr} 0x0 ${blkcnt}^M$ ERROR: DOS line endings #285: FILE: doc/board/toradex/index.rst:11: + colibri-imx8x^M$ Best regards Heinrich Schuchardt > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > --- > > board/toradex/colibri-imx8x/README | 66 ----------------------- > doc/board/toradex/colibri-imx8x.rst | 82 +++++++++++++++++++++++++++++ > doc/board/toradex/index.rst | 1 + > 3 files changed, 83 insertions(+), 66 deletions(-) > delete mode 100644 board/toradex/colibri-imx8x/README > create mode 100644 doc/board/toradex/colibri-imx8x.rst > > diff --git a/board/toradex/colibri-imx8x/README b/board/toradex/colibri-imx8x/README > deleted file mode 100644 > index 708bb3e51c..0000000000 > --- a/board/toradex/colibri-imx8x/README > +++ /dev/null > @@ -1,66 +0,0 @@ > -U-Boot for the Toradex Colibri iMX8QXP V1.0B Module > - > -Quick Start > -=========== > - > -- Build the ARM trusted firmware binary > -- Get scfw_tcm.bin and ahab-container.img > -- Build U-Boot > -- Load U-Boot binary using uuu > -- Flash U-Boot binary into the eMMC > -- Boot > - > -Get and Build the ARM Trusted Firmware > -====================================== > - > -$ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf > -$ cd imx-atf/ > -$ make PLAT=imx8qxp bl31 > - > -Get scfw_tcm.bin and ahab-container.img > -======================================= > - > -$ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes-bsp/imx-sc-firmware/files/mx8qx-colibri-scfw-tcm.bin?raw=true > -$ mv mx8qx-colibri-scfw-tcm.bin\?raw\=true mx8qx-colibri-scfw-tcm.bin > -$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin > -$ chmod +x firmware-imx-8.0.bin > -$ ./firmware-imx-8.0.bin > - > -Copy the following binaries to the U-Boot folder: > - > -$ cp imx-atf/build/imx8qxp/release/bl31.bin . > -$ cp u-boot/u-boot.bin . > - > -Copy the following firmware to the U-Boot folder: > - > -$ cp firmware-imx-8.0/firmware/seco/ahab-container.img . > - > -Build U-Boot > -============ > - > -$ make colibri-imx8qxp_defconfig > -$ make u-boot-dtb.imx > - > -Load the U-Boot Binary Using UUU > -================================ > - > -Get the latest version of the universal update utility (uuu) aka mfgtools 3.0: > - > -https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases > - > -Put the module into USB recovery aka serial downloader mode, connect USB device > -to your host and execute uuu: > - > -sudo ./uuu u-boot/u-boot-dtb.imx > - > -Flash the U-Boot Binary into the eMMC > -===================================== > - > -Burn the u-boot-dtb.imx binary to the primary eMMC hardware boot area partition: > - > -load mmc 1:1 $loadaddr u-boot-dtb.imx > -setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > -mmc dev 0 1 > -mmc write ${loadaddr} 0x0 ${blkcnt} > - > -Boot > diff --git a/doc/board/toradex/colibri-imx8x.rst b/doc/board/toradex/colibri-imx8x.rst > new file mode 100644 > index 0000000000..ce9195af73 > --- /dev/null > +++ b/doc/board/toradex/colibri-imx8x.rst > @@ -0,0 +1,82 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Colibri iMX8QXP V1.0B Module > +=================================================== > + > +Quick Start > +----------- > + > +- Build the ARM trusted firmware binary > +- Get scfw_tcm.bin and ahab-container.img > +- Build U-Boot > +- Load U-Boot binary using uuu > +- Flash U-Boot binary into the eMMC > +- Boot > + > +Get and Build the ARM Trusted Firmware > +-------------------------------------- > + > +.. code-block:: bash > + > + $ git clone -b imx_4.14.78_1.0.0_ga https://source.codeaurora.org/external/imx/imx-atf > + $ cd imx-atf/ > + $ make PLAT=imx8qxp bl31 > + > +Get scfw_tcm.bin and ahab-container.img > +--------------------------------------- > +.. code-block:: bash > + > + $ wget https://github.com/toradex/meta-fsl-bsp-release/blob/ > + toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes- > + bsp/imx-sc-firmware/files/mx8qx-colibri-scfw-tcm.bin?raw=true > + $ mv mx8qx-colibri-scfw-tcm.bin\?raw\=true mx8qx-colibri-scfw-tcm.bin > + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin > + $ chmod +x firmware-imx-8.0.bin > + $ ./firmware-imx-8.0.bin > + > +Copy the following binaries to the U-Boot folder: > + > +.. code-block:: bash > + > + $ cp imx-atf/build/imx8qxp/release/bl31.bin . > + $ cp u-boot/u-boot.bin . > + > +Copy the following firmware to the U-Boot folder: > + > +.. code-block:: bash > + > + $ cp firmware-imx-8.0/firmware/seco/ahab-container.img . > + > +Build U-Boot > +------------ > + > +.. code-block:: bash > + > + $ make colibri-imx8qxp_defconfig > + $ make u-boot-dtb.imx > + > +Load the U-Boot Binary Using UUU > +-------------------------------- > + > +Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: > + > +https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases > + > +Put the module into USB recovery aka serial downloader mode, connect USB device > +to your host and execute ``uuu``: > + > +.. code-block:: bash > + > + sudo ./uuu u-boot/u-boot-dtb.imx > + > +Flash the U-Boot Binary into the eMMC > +------------------------------------- > + > +Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area partition: > + > +.. code-block:: bash > + > + load mmc 1:1 $loadaddr u-boot-dtb.imx > + setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > + mmc dev 0 1 > + mmc write ${loadaddr} 0x0 ${blkcnt} > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > index da65ad2408..16b5a0770d 100644 > --- a/doc/board/toradex/index.rst > +++ b/doc/board/toradex/index.rst > @@ -8,4 +8,5 @@ Toradex > > apalix-imx8 > colibri_imx7 > + colibri-imx8x > verdin-imx8mm > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 5/5] doc: board: add rockchip subfolder 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk ` (2 preceding siblings ...) 2020-02-11 15:19 ` [PATCH v3 4/5] doc: board: colibri-imx8x: " Igor Opaniuk @ 2020-02-11 15:19 ` Igor Opaniuk 2020-02-11 16:48 ` Heinrich Schuchardt 2020-02-11 17:04 ` [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Heinrich Schuchardt 4 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 15:19 UTC (permalink / raw) To: u-boot From: Igor Opaniuk <igor.opaniuk@toradex.com> This fixes a warning when invoking make htmldocs: checking consistency... doc/board/rockchip/index.rst: WARNING: document isn't included in any toctree Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> --- doc/board/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/board/index.rst b/doc/board/index.rst index f2f5907b8c..f061e8ecfc 100644 --- a/doc/board/index.rst +++ b/doc/board/index.rst @@ -14,6 +14,7 @@ Board-specific doc google/index intel/index renesas/index + rockchip/index sifive/index toradex/index xilinx/index -- 2.17.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 5/5] doc: board: add rockchip subfolder 2020-02-11 15:19 ` [PATCH v3 5/5] doc: board: add rockchip subfolder Igor Opaniuk @ 2020-02-11 16:48 ` Heinrich Schuchardt 2020-02-11 17:07 ` Heinrich Schuchardt 0 siblings, 1 reply; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 16:48 UTC (permalink / raw) To: u-boot On 2/11/20 4:19 PM, Igor Opaniuk wrote: > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > This fixes a warning when invoking make htmldocs: > checking consistency... > doc/board/rockchip/index.rst: WARNING: document isn't included in any toctree > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> I stumbled over the same issue: https://lists.denx.de/pipermail/u-boot/2020-February/399494.html Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 5/5] doc: board: add rockchip subfolder 2020-02-11 16:48 ` Heinrich Schuchardt @ 2020-02-11 17:07 ` Heinrich Schuchardt 0 siblings, 0 replies; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 17:07 UTC (permalink / raw) To: u-boot On 2/11/20 5:48 PM, Heinrich Schuchardt wrote: > On 2/11/20 4:19 PM, Igor Opaniuk wrote: >> From: Igor Opaniuk <igor.opaniuk@toradex.com> >> >> This fixes a warning when invoking make htmldocs: >> checking consistency... >> doc/board/rockchip/index.rst: WARNING: document isn't included in any >> toctree >> >> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > > I stumbled over the same issue: > https://lists.denx.de/pipermail/u-boot/2020-February/399494.html > > Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> ERROR: DOS line endings #121: FILE: doc/board/index.rst:17: + rockchip/index^M$ Best regards Heinrich Schuchardt ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk ` (3 preceding siblings ...) 2020-02-11 15:19 ` [PATCH v3 5/5] doc: board: add rockchip subfolder Igor Opaniuk @ 2020-02-11 17:04 ` Heinrich Schuchardt 2020-02-11 19:37 ` Igor Opaniuk 4 siblings, 1 reply; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 17:04 UTC (permalink / raw) To: u-boot On 2/11/20 4:19 PM, Igor Opaniuk wrote: > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > - add initial index for toradex boards reST documentation > - add initial readme.rst file which provides all needed information > for obtaining a workable image ready for flashing > for both eMMC/NAND versions of Colibri iMX7. Please, run checkpatch on your patch set: ERROR: trailing whitespace #196: FILE: doc/board/toradex/colibri_imx7.rst:66: +* ``877ff400`` - IVT self address^M$ ERROR: DOS line endings #273: FILE: doc/board/toradex/index.rst:9: + colibri_imx7^M$ Best regards Heinrich > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > --- > > doc/board/index.rst | 1 + > doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++ > doc/board/toradex/index.rst | 9 ++ > 3 files changed, 138 insertions(+) > create mode 100644 doc/board/toradex/colibri_imx7.rst > create mode 100644 doc/board/toradex/index.rst > > diff --git a/doc/board/index.rst b/doc/board/index.rst > index 00e72f57cd..f2f5907b8c 100644 > --- a/doc/board/index.rst > +++ b/doc/board/index.rst > @@ -15,4 +15,5 @@ Board-specific doc > intel/index > renesas/index > sifive/index > + toradex/index > xilinx/index > diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst > new file mode 100644 > index 0000000000..9d770251af > --- /dev/null > +++ b/doc/board/toradex/colibri_imx7.rst > @@ -0,0 +1,128 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Colibri iMX7 > +======================= > + > +Quick Start > +----------- > + > +- Build U-Boot > +- NAND IMX image adjustments before flashing > +- Flashing manually U-Boot to eMMC > +- Flashing manually U-Boot to NAND > +- Using ``update_uboot`` script > + > +Build U-Boot > +------------ > + > +.. code-block:: bash > + > + $ export CROSS_COMPILE=arm-linux-gnueabi- > + $ export ARCH=arm > + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig > + $ make > + > +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific > +image, ready for flashing (but check next section for additional > +adjustments). > + > +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM > +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_): > + > +* **Image vector table** (IVT) for BootROM > +* **Boot data** -indicates the program image location, program image size > + in bytes, and the plugin flag. > +* **Device configuration data** > +* **User image**: U-Boot image (``u-boot-dtb.bin``) > + > + > +IMX image adjustments prior to flashing > +-------------------------------------------- > + > +1. U-Boot for both Colibri iMX7 NAND and eMMC versions > +is built with HABv4 support (`AN4581.pdf > +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_) > +enabled by default, which requires to generate a proper > +Command Sequence File (CSF) by srktool from NXP (not included in the > +U-Boot tree, check additional details in introduction_habv4.txt) > +and concatenate it to the final ``u-boot-dtb.imx``. > + > +2. In case if you don't want to generate a proper ``CSF`` (for any reason), > +you still need to pad the IMX image so i has the same size as specified in > +in **Boot Data** section of IMX image. > +To obtain this value, run: > + > +.. code-block:: bash > + > + $ od -X -N 0x30 u-boot-dtb.imx > + 0000000 402000d1 87800000 00000000 877ff42c > + 0000020 877ff420 877ff400 878a5000 00000000 > + ^^^^^^^^ > + 0000040 877ff000 000a8060 00000000 40b401d2 > + ^^^^^^^^ ^^^^^^^^ > + > +Where: > + > +* ``877ff400`` - IVT self address > +* ``877ff000`` - Program image address > +* ``000a8060`` - Program image size > + > +To calculate the padding: > + > +* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400`` > +* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60`` > + > +and then pad the image: > + > +.. code-block:: bash > + > + $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \ > + u-boot-dtb.imx u-boot-dtb.imx.zero-padded > + > +3. Also, according to requirement from ``6.6.7.1``, the final image > +should have ``0x400`` offset for initial IVT table. > + > +For eMMC setup we handle this by flashing it to ``0x400``, howewer > +for NAND setup we adjust the image prior to flashing, adding padding in the > +beginning of the image. > + > +.. code-block:: bash > + > + $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1 > + > +Flash U-Boot IMX image to eMMC > +------------------------------ > + > +Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware > +boot area partition: > + > +.. code-block:: bash > + > + > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded > + => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > + => mmc dev 0 1 > + => mmc write ${loadaddr} 0x2 ${blkcnt} > + > +Flash U-Boot IMX image to NAND > +------------------------------ > + > +.. code-block:: bash > + > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > + => nand erase.part u-boot1 > + => nand write ${loadaddr} u-boot1 ${filesize} > + => nand erase.part u-boot2 > + => nand write ${loadaddr} u-boot2 ${filesize} > + > +Using update_uboot script > +------------------------- > + > +You can also usb U-Boot env update_uboot script, > +which wraps all eMMC/NAND specific command invocation: > + > +.. code-block:: bash > + > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > + => run update_uboot > + > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > new file mode 100644 > index 0000000000..aa418d6bad > --- /dev/null > +++ b/doc/board/toradex/index.rst > @@ -0,0 +1,9 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Toradex > +======= > + > +.. toctree:: > + :maxdepth: 2 > + > + colibri_imx7 > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst 2020-02-11 17:04 ` [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Heinrich Schuchardt @ 2020-02-11 19:37 ` Igor Opaniuk 2020-02-11 19:56 ` Igor Opaniuk 0 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 19:37 UTC (permalink / raw) To: u-boot Hi Heinrich, On Tue, Feb 11, 2020 at 7:04 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > On 2/11/20 4:19 PM, Igor Opaniuk wrote: > > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > > > - add initial index for toradex boards reST documentation > > - add initial readme.rst file which provides all needed information > > for obtaining a workable image ready for flashing > > for both eMMC/NAND versions of Colibri iMX7. > > Please, run checkpatch on your patch set: > I did, and this is strange, because in my case it didn't report anything. I do use patman, so checkpatch is forced everytime, so I would definitely catch these issues. In my case it was just 4 warnings: Interesting thing is that it does report also 4 warnings and that's it for this 5 patches: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? checkpatch.pl found 0 error(s), 4 warning(s), 0 checks(s) Magic? > ERROR: trailing whitespace > #196: FILE: doc/board/toradex/colibri_imx7.rst:66: > +* ``877ff400`` - IVT self address^M$ > > ERROR: DOS line endings > #273: FILE: doc/board/toradex/index.rst:9: > + colibri_imx7^M$ > > Best regards > > Heinrich > > > > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > > --- > > > > doc/board/index.rst | 1 + > > doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++ > > doc/board/toradex/index.rst | 9 ++ > > 3 files changed, 138 insertions(+) > > create mode 100644 doc/board/toradex/colibri_imx7.rst > > create mode 100644 doc/board/toradex/index.rst > > > > diff --git a/doc/board/index.rst b/doc/board/index.rst > > index 00e72f57cd..f2f5907b8c 100644 > > --- a/doc/board/index.rst > > +++ b/doc/board/index.rst > > @@ -15,4 +15,5 @@ Board-specific doc > > intel/index > > renesas/index > > sifive/index > > + toradex/index > > xilinx/index > > diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst > > new file mode 100644 > > index 0000000000..9d770251af > > --- /dev/null > > +++ b/doc/board/toradex/colibri_imx7.rst > > @@ -0,0 +1,128 @@ > > +.. SPDX-License-Identifier: GPL-2.0+ > > + > > +Colibri iMX7 > > +======================= > > + > > +Quick Start > > +----------- > > + > > +- Build U-Boot > > +- NAND IMX image adjustments before flashing > > +- Flashing manually U-Boot to eMMC > > +- Flashing manually U-Boot to NAND > > +- Using ``update_uboot`` script > > + > > +Build U-Boot > > +------------ > > + > > +.. code-block:: bash > > + > > + $ export CROSS_COMPILE=arm-linux-gnueabi- > > + $ export ARCH=arm > > + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig > > + $ make > > + > > +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific > > +image, ready for flashing (but check next section for additional > > +adjustments). > > + > > +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM > > +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_): > > + > > +* **Image vector table** (IVT) for BootROM > > +* **Boot data** -indicates the program image location, program image size > > + in bytes, and the plugin flag. > > +* **Device configuration data** > > +* **User image**: U-Boot image (``u-boot-dtb.bin``) > > + > > + > > +IMX image adjustments prior to flashing > > +-------------------------------------------- > > + > > +1. U-Boot for both Colibri iMX7 NAND and eMMC versions > > +is built with HABv4 support (`AN4581.pdf > > +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_) > > +enabled by default, which requires to generate a proper > > +Command Sequence File (CSF) by srktool from NXP (not included in the > > +U-Boot tree, check additional details in introduction_habv4.txt) > > +and concatenate it to the final ``u-boot-dtb.imx``. > > + > > +2. In case if you don't want to generate a proper ``CSF`` (for any reason), > > +you still need to pad the IMX image so i has the same size as specified in > > +in **Boot Data** section of IMX image. > > +To obtain this value, run: > > + > > +.. code-block:: bash > > + > > + $ od -X -N 0x30 u-boot-dtb.imx > > + 0000000 402000d1 87800000 00000000 877ff42c > > + 0000020 877ff420 877ff400 878a5000 00000000 > > + ^^^^^^^^ > > + 0000040 877ff000 000a8060 00000000 40b401d2 > > + ^^^^^^^^ ^^^^^^^^ > > + > > +Where: > > + > > +* ``877ff400`` - IVT self address > > +* ``877ff000`` - Program image address > > +* ``000a8060`` - Program image size > > + > > +To calculate the padding: > > + > > +* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400`` > > +* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60`` > > + > > +and then pad the image: > > + > > +.. code-block:: bash > > + > > + $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \ > > + u-boot-dtb.imx u-boot-dtb.imx.zero-padded > > + > > +3. Also, according to requirement from ``6.6.7.1``, the final image > > +should have ``0x400`` offset for initial IVT table. > > + > > +For eMMC setup we handle this by flashing it to ``0x400``, howewer > > +for NAND setup we adjust the image prior to flashing, adding padding in the > > +beginning of the image. > > + > > +.. code-block:: bash > > + > > + $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1 > > + > > +Flash U-Boot IMX image to eMMC > > +------------------------------ > > + > > +Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware > > +boot area partition: > > + > > +.. code-block:: bash > > + > > + > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded > > + => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > > + => mmc dev 0 1 > > + => mmc write ${loadaddr} 0x2 ${blkcnt} > > + > > +Flash U-Boot IMX image to NAND > > +------------------------------ > > + > > +.. code-block:: bash > > + > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > > + => nand erase.part u-boot1 > > + => nand write ${loadaddr} u-boot1 ${filesize} > > + => nand erase.part u-boot2 > > + => nand write ${loadaddr} u-boot2 ${filesize} > > + > > +Using update_uboot script > > +------------------------- > > + > > +You can also usb U-Boot env update_uboot script, > > +which wraps all eMMC/NAND specific command invocation: > > + > > +.. code-block:: bash > > + > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > > + => run update_uboot > > + > > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > > new file mode 100644 > > index 0000000000..aa418d6bad > > --- /dev/null > > +++ b/doc/board/toradex/index.rst > > @@ -0,0 +1,9 @@ > > +.. SPDX-License-Identifier: GPL-2.0+ > > + > > +Toradex > > +======= > > + > > +.. toctree:: > > + :maxdepth: 2 > > + > > + colibri_imx7 > > > -- Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk mailto: igor.opaniuk at gmail.com skype: igor.opanyuk +380 (93) 836 40 67 http://ua.linkedin.com/in/iopaniuk ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst 2020-02-11 19:37 ` Igor Opaniuk @ 2020-02-11 19:56 ` Igor Opaniuk 2020-02-11 21:32 ` Heinrich Schuchardt 0 siblings, 1 reply; 15+ messages in thread From: Igor Opaniuk @ 2020-02-11 19:56 UTC (permalink / raw) To: u-boot Heinrich, On Tue, Feb 11, 2020 at 9:37 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote: > > Hi Heinrich, > > On Tue, Feb 11, 2020 at 7:04 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > > > On 2/11/20 4:19 PM, Igor Opaniuk wrote: > > > From: Igor Opaniuk <igor.opaniuk@toradex.com> > > > > > > - add initial index for toradex boards reST documentation > > > - add initial readme.rst file which provides all needed information > > > for obtaining a workable image ready for flashing > > > for both eMMC/NAND versions of Colibri iMX7. > > > > Please, run checkpatch on your patch set: > > > I did, and this is strange, because in my case it didn't report anything. > I do use patman, so checkpatch is forced everytime, > so I would definitely catch these issues. > > In my case it was just 4 warnings: > Interesting thing is that it does report also 4 warnings and that's it > for this 5 patches: > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > checkpatch.pl found 0 error(s), 4 warning(s), 0 checks(s) > > Magic? u-boot-imx.git$ ./scripts/checkpatch.pl --no-tree -f doc/board/toradex/* --------------------------------- doc/board/toradex/apalix-imx8.rst --------------------------------- total: 0 errors, 0 warnings, 0 checks, 83 lines checked doc/board/toradex/apalix-imx8.rst has no obvious style problems and is ready for submission. ---------------------------------- doc/board/toradex/colibri_imx7.rst ---------------------------------- total: 0 errors, 0 warnings, 0 checks, 128 lines checked doc/board/toradex/colibri_imx7.rst has no obvious style problems and is ready for submission. ----------------------------------- doc/board/toradex/colibri-imx8x.rst ----------------------------------- total: 0 errors, 0 warnings, 0 checks, 82 lines checked doc/board/toradex/colibri-imx8x.rst has no obvious style problems and is ready for submission. --------------------------- doc/board/toradex/index.rst --------------------------- total: 0 errors, 0 warnings, 0 checks, 12 lines checked doc/board/toradex/index.rst has no obvious style problems and is ready for submission. ----------------------------------- doc/board/toradex/verdin-imx8mm.rst ----------------------------------- total: 0 errors, 0 warnings, 0 checks, 112 lines checked doc/board/toradex/verdin-imx8mm.rst has no obvious style problems and is ready for submission. NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE PREFER_ETHER_ADDR_COPY USLEEP_RANGE > > > ERROR: trailing whitespace > > #196: FILE: doc/board/toradex/colibri_imx7.rst:66: > > +* ``877ff400`` - IVT self address^M$ > > > > ERROR: DOS line endings > > #273: FILE: doc/board/toradex/index.rst:9: > > + colibri_imx7^M$ > > > > Best regards > > > > Heinrich > > > > > > > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > > > --- > > > > > > doc/board/index.rst | 1 + > > > doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++ > > > doc/board/toradex/index.rst | 9 ++ > > > 3 files changed, 138 insertions(+) > > > create mode 100644 doc/board/toradex/colibri_imx7.rst > > > create mode 100644 doc/board/toradex/index.rst > > > > > > diff --git a/doc/board/index.rst b/doc/board/index.rst > > > index 00e72f57cd..f2f5907b8c 100644 > > > --- a/doc/board/index.rst > > > +++ b/doc/board/index.rst > > > @@ -15,4 +15,5 @@ Board-specific doc > > > intel/index > > > renesas/index > > > sifive/index > > > + toradex/index > > > xilinx/index > > > diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst > > > new file mode 100644 > > > index 0000000000..9d770251af > > > --- /dev/null > > > +++ b/doc/board/toradex/colibri_imx7.rst > > > @@ -0,0 +1,128 @@ > > > +.. SPDX-License-Identifier: GPL-2.0+ > > > + > > > +Colibri iMX7 > > > +======================= > > > + > > > +Quick Start > > > +----------- > > > + > > > +- Build U-Boot > > > +- NAND IMX image adjustments before flashing > > > +- Flashing manually U-Boot to eMMC > > > +- Flashing manually U-Boot to NAND > > > +- Using ``update_uboot`` script > > > + > > > +Build U-Boot > > > +------------ > > > + > > > +.. code-block:: bash > > > + > > > + $ export CROSS_COMPILE=arm-linux-gnueabi- > > > + $ export ARCH=arm > > > + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig > > > + $ make > > > + > > > +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific > > > +image, ready for flashing (but check next section for additional > > > +adjustments). > > > + > > > +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM > > > +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_): > > > + > > > +* **Image vector table** (IVT) for BootROM > > > +* **Boot data** -indicates the program image location, program image size > > > + in bytes, and the plugin flag. > > > +* **Device configuration data** > > > +* **User image**: U-Boot image (``u-boot-dtb.bin``) > > > + > > > + > > > +IMX image adjustments prior to flashing > > > +-------------------------------------------- > > > + > > > +1. U-Boot for both Colibri iMX7 NAND and eMMC versions > > > +is built with HABv4 support (`AN4581.pdf > > > +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_) > > > +enabled by default, which requires to generate a proper > > > +Command Sequence File (CSF) by srktool from NXP (not included in the > > > +U-Boot tree, check additional details in introduction_habv4.txt) > > > +and concatenate it to the final ``u-boot-dtb.imx``. > > > + > > > +2. In case if you don't want to generate a proper ``CSF`` (for any reason), > > > +you still need to pad the IMX image so i has the same size as specified in > > > +in **Boot Data** section of IMX image. > > > +To obtain this value, run: > > > + > > > +.. code-block:: bash > > > + > > > + $ od -X -N 0x30 u-boot-dtb.imx > > > + 0000000 402000d1 87800000 00000000 877ff42c > > > + 0000020 877ff420 877ff400 878a5000 00000000 > > > + ^^^^^^^^ > > > + 0000040 877ff000 000a8060 00000000 40b401d2 > > > + ^^^^^^^^ ^^^^^^^^ > > > + > > > +Where: > > > + > > > +* ``877ff400`` - IVT self address > > > +* ``877ff000`` - Program image address > > > +* ``000a8060`` - Program image size > > > + > > > +To calculate the padding: > > > + > > > +* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400`` > > > +* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60`` > > > + > > > +and then pad the image: > > > + > > > +.. code-block:: bash > > > + > > > + $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \ > > > + u-boot-dtb.imx u-boot-dtb.imx.zero-padded > > > + > > > +3. Also, according to requirement from ``6.6.7.1``, the final image > > > +should have ``0x400`` offset for initial IVT table. > > > + > > > +For eMMC setup we handle this by flashing it to ``0x400``, howewer > > > +for NAND setup we adjust the image prior to flashing, adding padding in the > > > +beginning of the image. > > > + > > > +.. code-block:: bash > > > + > > > + $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1 > > > + > > > +Flash U-Boot IMX image to eMMC > > > +------------------------------ > > > + > > > +Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware > > > +boot area partition: > > > + > > > +.. code-block:: bash > > > + > > > + > > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded > > > + => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > > > + => mmc dev 0 1 > > > + => mmc write ${loadaddr} 0x2 ${blkcnt} > > > + > > > +Flash U-Boot IMX image to NAND > > > +------------------------------ > > > + > > > +.. code-block:: bash > > > + > > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > > > + => nand erase.part u-boot1 > > > + => nand write ${loadaddr} u-boot1 ${filesize} > > > + => nand erase.part u-boot2 > > > + => nand write ${loadaddr} u-boot2 ${filesize} > > > + > > > +Using update_uboot script > > > +------------------------- > > > + > > > +You can also usb U-Boot env update_uboot script, > > > +which wraps all eMMC/NAND specific command invocation: > > > + > > > +.. code-block:: bash > > > + > > > + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > > > + => run update_uboot > > > + > > > diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > > > new file mode 100644 > > > index 0000000000..aa418d6bad > > > --- /dev/null > > > +++ b/doc/board/toradex/index.rst > > > @@ -0,0 +1,9 @@ > > > +.. SPDX-License-Identifier: GPL-2.0+ > > > + > > > +Toradex > > > +======= > > > + > > > +.. toctree:: > > > + :maxdepth: 2 > > > + > > > + colibri_imx7 > > > > > > > > -- > Best regards - Freundliche Grüsse - Meilleures salutations > > Igor Opaniuk > > mailto: igor.opaniuk at gmail.com > skype: igor.opanyuk > +380 (93) 836 40 67 > http://ua.linkedin.com/in/iopaniuk -- Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk mailto: igor.opaniuk at gmail.com skype: igor.opanyuk +380 (93) 836 40 67 http://ua.linkedin.com/in/iopaniuk ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst 2020-02-11 19:56 ` Igor Opaniuk @ 2020-02-11 21:32 ` Heinrich Schuchardt 2020-02-12 14:47 ` Igor Opaniuk 0 siblings, 1 reply; 15+ messages in thread From: Heinrich Schuchardt @ 2020-02-11 21:32 UTC (permalink / raw) To: u-boot On 2/11/20 8:56 PM, Igor Opaniuk wrote: > Heinrich, > > On Tue, Feb 11, 2020 at 9:37 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote: >> >> Hi Heinrich, >> >> On Tue, Feb 11, 2020 at 7:04 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: >>> >>> On 2/11/20 4:19 PM, Igor Opaniuk wrote: >>>> From: Igor Opaniuk <igor.opaniuk@toradex.com> >>>> >>>> - add initial index for toradex boards reST documentation >>>> - add initial readme.rst file which provides all needed information >>>> for obtaining a workable image ready for flashing >>>> for both eMMC/NAND versions of Colibri iMX7. >>> >>> Please, run checkpatch on your patch set: >>> >> I did, and this is strange, because in my case it didn't report anything. >> I do use patman, so checkpatch is forced everytime, >> so I would definitely catch these issues. >> >> In my case it was just 4 warnings: >> Interesting thing is that it does report also 4 warnings and that's it >> for this 5 patches: >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? >> checkpatch.pl found 0 error(s), 4 warning(s), 0 checks(s) >> >> Magic? > > u-boot-imx.git$ ./scripts/checkpatch.pl --no-tree -f doc/board/toradex/* > --------------------------------- > doc/board/toradex/apalix-imx8.rst > --------------------------------- > total: 0 errors, 0 warnings, 0 checks, 83 lines checked > > doc/board/toradex/apalix-imx8.rst has no obvious style problems and is > ready for submission. > ---------------------------------- > doc/board/toradex/colibri_imx7.rst > ---------------------------------- > total: 0 errors, 0 warnings, 0 checks, 128 lines checked > > doc/board/toradex/colibri_imx7.rst has no obvious style problems and > is ready for submission. > ----------------------------------- > doc/board/toradex/colibri-imx8x.rst > ----------------------------------- > total: 0 errors, 0 warnings, 0 checks, 82 lines checked > > doc/board/toradex/colibri-imx8x.rst has no obvious style problems and > is ready for submission. > --------------------------- > doc/board/toradex/index.rst > --------------------------- > total: 0 errors, 0 warnings, 0 checks, 12 lines checked > > doc/board/toradex/index.rst has no obvious style problems and is ready > for submission. > ----------------------------------- > doc/board/toradex/verdin-imx8mm.rst > ----------------------------------- > total: 0 errors, 0 warnings, 0 checks, 112 lines checked > > doc/board/toradex/verdin-imx8mm.rst has no obvious style problems and > is ready for submission. > > NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX > MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE > PREFER_ETHER_ADDR_COPY USLEEP_RANGE > >> >>> ERROR: trailing whitespace >>> #196: FILE: doc/board/toradex/colibri_imx7.rst:66: >>> +* ``877ff400`` - IVT self address^M$ >>> >>> ERROR: DOS line endings >>> #273: FILE: doc/board/toradex/index.rst:9: >>> + colibri_imx7^M$ >>> >>> Best regards >>> >>> Heinrich >>> >>>> >>>> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> >>>> --- >>>> >>>> doc/board/index.rst | 1 + >>>> doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++ >>>> doc/board/toradex/index.rst | 9 ++ >>>> 3 files changed, 138 insertions(+) >>>> create mode 100644 doc/board/toradex/colibri_imx7.rst >>>> create mode 100644 doc/board/toradex/index.rst >>>> >>>> diff --git a/doc/board/index.rst b/doc/board/index.rst >>>> index 00e72f57cd..f2f5907b8c 100644 >>>> --- a/doc/board/index.rst >>>> +++ b/doc/board/index.rst >>>> @@ -15,4 +15,5 @@ Board-specific doc >>>> intel/index >>>> renesas/index >>>> sifive/index >>>> + toradex/index >>>> xilinx/index >>>> diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst >>>> new file mode 100644 >>>> index 0000000000..9d770251af >>>> --- /dev/null >>>> +++ b/doc/board/toradex/colibri_imx7.rst >>>> @@ -0,0 +1,128 @@ >>>> +.. SPDX-License-Identifier: GPL-2.0+ >>>> + >>>> +Colibri iMX7 >>>> +======================= >>>> + >>>> +Quick Start >>>> +----------- >>>> + >>>> +- Build U-Boot >>>> +- NAND IMX image adjustments before flashing >>>> +- Flashing manually U-Boot to eMMC >>>> +- Flashing manually U-Boot to NAND >>>> +- Using ``update_uboot`` script >>>> + >>>> +Build U-Boot >>>> +------------ >>>> + >>>> +.. code-block:: bash >>>> + >>>> + $ export CROSS_COMPILE=arm-linux-gnueabi- >>>> + $ export ARCH=arm >>>> + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig >>>> + $ make >>>> + >>>> +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific >>>> +image, ready for flashing (but check next section for additional >>>> +adjustments). >>>> + >>>> +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM >>>> +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_): >>>> + >>>> +* **Image vector table** (IVT) for BootROM >>>> +* **Boot data** -indicates the program image location, program image size >>>> + in bytes, and the plugin flag. >>>> +* **Device configuration data** >>>> +* **User image**: U-Boot image (``u-boot-dtb.bin``) >>>> + >>>> + >>>> +IMX image adjustments prior to flashing >>>> +-------------------------------------------- >>>> + >>>> +1. U-Boot for both Colibri iMX7 NAND and eMMC versions >>>> +is built with HABv4 support (`AN4581.pdf >>>> +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_) >>>> +enabled by default, which requires to generate a proper >>>> +Command Sequence File (CSF) by srktool from NXP (not included in the >>>> +U-Boot tree, check additional details in introduction_habv4.txt) >>>> +and concatenate it to the final ``u-boot-dtb.imx``. >>>> + >>>> +2. In case if you don't want to generate a proper ``CSF`` (for any reason), >>>> +you still need to pad the IMX image so i has the same size as specified in >>>> +in **Boot Data** section of IMX image. >>>> +To obtain this value, run: >>>> + >>>> +.. code-block:: bash >>>> + >>>> + $ od -X -N 0x30 u-boot-dtb.imx >>>> + 0000000 402000d1 87800000 00000000 877ff42c >>>> + 0000020 877ff420 877ff400 878a5000 00000000 >>>> + ^^^^^^^^ >>>> + 0000040 877ff000 000a8060 00000000 40b401d2 >>>> + ^^^^^^^^ ^^^^^^^^ >>>> + >>>> +Where: >>>> + >>>> +* ``877ff400`` - IVT self address >>>> +* ``877ff000`` - Program image address >>>> +* ``000a8060`` - Program image size >>>> + >>>> +To calculate the padding: >>>> + >>>> +* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400`` >>>> +* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60`` >>>> + >>>> +and then pad the image: >>>> + >>>> +.. code-block:: bash >>>> + >>>> + $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \ >>>> + u-boot-dtb.imx u-boot-dtb.imx.zero-padded >>>> + >>>> +3. Also, according to requirement from ``6.6.7.1``, the final image >>>> +should have ``0x400`` offset for initial IVT table. >>>> + >>>> +For eMMC setup we handle this by flashing it to ``0x400``, howewer >>>> +for NAND setup we adjust the image prior to flashing, adding padding in the >>>> +beginning of the image. >>>> + >>>> +.. code-block:: bash >>>> + >>>> + $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1 >>>> + >>>> +Flash U-Boot IMX image to eMMC >>>> +------------------------------ >>>> + >>>> +Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware >>>> +boot area partition: >>>> + >>>> +.. code-block:: bash >>>> + >>>> + >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded >>>> + => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 >>>> + => mmc dev 0 1 >>>> + => mmc write ${loadaddr} 0x2 ${blkcnt} >>>> + >>>> +Flash U-Boot IMX image to NAND >>>> +------------------------------ >>>> + >>>> +.. code-block:: bash >>>> + >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready >>>> + => nand erase.part u-boot1 >>>> + => nand write ${loadaddr} u-boot1 ${filesize} >>>> + => nand erase.part u-boot2 >>>> + => nand write ${loadaddr} u-boot2 ${filesize} >>>> + >>>> +Using update_uboot script >>>> +------------------------- >>>> + >>>> +You can also usb U-Boot env update_uboot script, >>>> +which wraps all eMMC/NAND specific command invocation: >>>> + >>>> +.. code-block:: bash >>>> + >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready >>>> + => run update_uboot >>>> + >>>> diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst >>>> new file mode 100644 >>>> index 0000000000..aa418d6bad >>>> --- /dev/null >>>> +++ b/doc/board/toradex/index.rst >>>> @@ -0,0 +1,9 @@ >>>> +.. SPDX-License-Identifier: GPL-2.0+ >>>> + >>>> +Toradex >>>> +======= >>>> + >>>> +.. toctree:: >>>> + :maxdepth: 2 >>>> + >>>> + colibri_imx7 >>>> >>> >> >> >> -- >> Best regards - Freundliche Grüsse - Meilleures salutations >> >> Igor Opaniuk I guess my failure was to run the checkpacht.pl directly on the saved mail messages and not first apply the patches and then to use git format-patch to get the cleaned form. After git am and git format-patch this patch checkpatch.pl does not complain any more. The only message I see when reapplying the patch is: git am 0001-doc-board-colibri_imx7-add-readme.rst.patch Applying: doc: board: colibri_imx7: add readme.rst .git/rebase-apply/patch:152: new blank line at EOF. + warning: 1 line adds whitespace errors. due to a blank line at the end of doc/board/toradex/colibri_imx7.rst Best regards Heinrich >> >> mailto: igor.opaniuk at gmail.com >> skype: igor.opanyuk >> +380 (93) 836 40 67 >> http://ua.linkedin.com/in/iopaniuk > > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst 2020-02-11 21:32 ` Heinrich Schuchardt @ 2020-02-12 14:47 ` Igor Opaniuk 0 siblings, 0 replies; 15+ messages in thread From: Igor Opaniuk @ 2020-02-12 14:47 UTC (permalink / raw) To: u-boot Hi Heinrich, On Tue, Feb 11, 2020 at 11:32 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > On 2/11/20 8:56 PM, Igor Opaniuk wrote: > > Heinrich, > > > > On Tue, Feb 11, 2020 at 9:37 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote: > >> > >> Hi Heinrich, > >> > >> On Tue, Feb 11, 2020 at 7:04 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > >>> > >>> On 2/11/20 4:19 PM, Igor Opaniuk wrote: > >>>> From: Igor Opaniuk <igor.opaniuk@toradex.com> > >>>> > >>>> - add initial index for toradex boards reST documentation > >>>> - add initial readme.rst file which provides all needed information > >>>> for obtaining a workable image ready for flashing > >>>> for both eMMC/NAND versions of Colibri iMX7. > >>> > >>> Please, run checkpatch on your patch set: > >>> > >> I did, and this is strange, because in my case it didn't report anything. > >> I do use patman, so checkpatch is forced everytime, > >> so I would definitely catch these issues. > >> > >> In my case it was just 4 warnings: > >> Interesting thing is that it does report also 4 warnings and that's it > >> for this 5 patches: > >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > >> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > >> checkpatch.pl found 0 error(s), 4 warning(s), 0 checks(s) > >> > >> Magic? > > > > u-boot-imx.git$ ./scripts/checkpatch.pl --no-tree -f doc/board/toradex/* > > --------------------------------- > > doc/board/toradex/apalix-imx8.rst > > --------------------------------- > > total: 0 errors, 0 warnings, 0 checks, 83 lines checked > > > > doc/board/toradex/apalix-imx8.rst has no obvious style problems and is > > ready for submission. > > ---------------------------------- > > doc/board/toradex/colibri_imx7.rst > > ---------------------------------- > > total: 0 errors, 0 warnings, 0 checks, 128 lines checked > > > > doc/board/toradex/colibri_imx7.rst has no obvious style problems and > > is ready for submission. > > ----------------------------------- > > doc/board/toradex/colibri-imx8x.rst > > ----------------------------------- > > total: 0 errors, 0 warnings, 0 checks, 82 lines checked > > > > doc/board/toradex/colibri-imx8x.rst has no obvious style problems and > > is ready for submission. > > --------------------------- > > doc/board/toradex/index.rst > > --------------------------- > > total: 0 errors, 0 warnings, 0 checks, 12 lines checked > > > > doc/board/toradex/index.rst has no obvious style problems and is ready > > for submission. > > ----------------------------------- > > doc/board/toradex/verdin-imx8mm.rst > > ----------------------------------- > > total: 0 errors, 0 warnings, 0 checks, 112 lines checked > > > > doc/board/toradex/verdin-imx8mm.rst has no obvious style problems and > > is ready for submission. > > > > NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX > > MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE > > PREFER_ETHER_ADDR_COPY USLEEP_RANGE > > > >> > >>> ERROR: trailing whitespace > >>> #196: FILE: doc/board/toradex/colibri_imx7.rst:66: > >>> +* ``877ff400`` - IVT self address^M$ > >>> > >>> ERROR: DOS line endings > >>> #273: FILE: doc/board/toradex/index.rst:9: > >>> + colibri_imx7^M$ > >>> > >>> Best regards > >>> > >>> Heinrich > >>> > >>>> > >>>> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> > >>>> --- > >>>> > >>>> doc/board/index.rst | 1 + > >>>> doc/board/toradex/colibri_imx7.rst | 128 +++++++++++++++++++++++++++++ > >>>> doc/board/toradex/index.rst | 9 ++ > >>>> 3 files changed, 138 insertions(+) > >>>> create mode 100644 doc/board/toradex/colibri_imx7.rst > >>>> create mode 100644 doc/board/toradex/index.rst > >>>> > >>>> diff --git a/doc/board/index.rst b/doc/board/index.rst > >>>> index 00e72f57cd..f2f5907b8c 100644 > >>>> --- a/doc/board/index.rst > >>>> +++ b/doc/board/index.rst > >>>> @@ -15,4 +15,5 @@ Board-specific doc > >>>> intel/index > >>>> renesas/index > >>>> sifive/index > >>>> + toradex/index > >>>> xilinx/index > >>>> diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst > >>>> new file mode 100644 > >>>> index 0000000000..9d770251af > >>>> --- /dev/null > >>>> +++ b/doc/board/toradex/colibri_imx7.rst > >>>> @@ -0,0 +1,128 @@ > >>>> +.. SPDX-License-Identifier: GPL-2.0+ > >>>> + > >>>> +Colibri iMX7 > >>>> +======================= > >>>> + > >>>> +Quick Start > >>>> +----------- > >>>> + > >>>> +- Build U-Boot > >>>> +- NAND IMX image adjustments before flashing > >>>> +- Flashing manually U-Boot to eMMC > >>>> +- Flashing manually U-Boot to NAND > >>>> +- Using ``update_uboot`` script > >>>> + > >>>> +Build U-Boot > >>>> +------------ > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + $ export CROSS_COMPILE=arm-linux-gnueabi- > >>>> + $ export ARCH=arm > >>>> + $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig > >>>> + $ make > >>>> + > >>>> +After build succeeds, you will obtain final ``u-boot-dtb.imx`` IMX specific > >>>> +image, ready for flashing (but check next section for additional > >>>> +adjustments). > >>>> + > >>>> +Final IMX program image includes (section ``6.6.7`` from `IMX7DRM > >>>> +<https://www.nxp.com/webapp/Download?colCode=IMX7DRM>`_): > >>>> + > >>>> +* **Image vector table** (IVT) for BootROM > >>>> +* **Boot data** -indicates the program image location, program image size > >>>> + in bytes, and the plugin flag. > >>>> +* **Device configuration data** > >>>> +* **User image**: U-Boot image (``u-boot-dtb.bin``) > >>>> + > >>>> + > >>>> +IMX image adjustments prior to flashing > >>>> +-------------------------------------------- > >>>> + > >>>> +1. U-Boot for both Colibri iMX7 NAND and eMMC versions > >>>> +is built with HABv4 support (`AN4581.pdf > >>>> +<https://www.nxp.com/docs/en/application-note/AN4581.pdf>`_) > >>>> +enabled by default, which requires to generate a proper > >>>> +Command Sequence File (CSF) by srktool from NXP (not included in the > >>>> +U-Boot tree, check additional details in introduction_habv4.txt) > >>>> +and concatenate it to the final ``u-boot-dtb.imx``. > >>>> + > >>>> +2. In case if you don't want to generate a proper ``CSF`` (for any reason), > >>>> +you still need to pad the IMX image so i has the same size as specified in > >>>> +in **Boot Data** section of IMX image. > >>>> +To obtain this value, run: > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + $ od -X -N 0x30 u-boot-dtb.imx > >>>> + 0000000 402000d1 87800000 00000000 877ff42c > >>>> + 0000020 877ff420 877ff400 878a5000 00000000 > >>>> + ^^^^^^^^ > >>>> + 0000040 877ff000 000a8060 00000000 40b401d2 > >>>> + ^^^^^^^^ ^^^^^^^^ > >>>> + > >>>> +Where: > >>>> + > >>>> +* ``877ff400`` - IVT self address > >>>> +* ``877ff000`` - Program image address > >>>> +* ``000a8060`` - Program image size > >>>> + > >>>> +To calculate the padding: > >>>> + > >>>> +* IVT offset = ``0x877ff400`` - ``0x877ff000`` = ``0x400`` > >>>> +* Program image size = ``0xa8060`` - ``0x400`` = ``0xa7c60`` > >>>> + > >>>> +and then pad the image: > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + $ objcopy -I binary -O binary --pad-to 0xa7c60 --gap-fill=0x00 \ > >>>> + u-boot-dtb.imx u-boot-dtb.imx.zero-padded > >>>> + > >>>> +3. Also, according to requirement from ``6.6.7.1``, the final image > >>>> +should have ``0x400`` offset for initial IVT table. > >>>> + > >>>> +For eMMC setup we handle this by flashing it to ``0x400``, howewer > >>>> +for NAND setup we adjust the image prior to flashing, adding padding in the > >>>> +beginning of the image. > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + $ dd if=u-boot-dtb.imx.zero-padded of=u-boot-dtb.imx.ready bs=1024 seek=1 > >>>> + > >>>> +Flash U-Boot IMX image to eMMC > >>>> +------------------------------ > >>>> + > >>>> +Flash the ``u-boot-dtb.imx.zero-padded`` binary to the primary eMMC hardware > >>>> +boot area partition: > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + > >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.zero-padded > >>>> + => setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 > >>>> + => mmc dev 0 1 > >>>> + => mmc write ${loadaddr} 0x2 ${blkcnt} > >>>> + > >>>> +Flash U-Boot IMX image to NAND > >>>> +------------------------------ > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > >>>> + => nand erase.part u-boot1 > >>>> + => nand write ${loadaddr} u-boot1 ${filesize} > >>>> + => nand erase.part u-boot2 > >>>> + => nand write ${loadaddr} u-boot2 ${filesize} > >>>> + > >>>> +Using update_uboot script > >>>> +------------------------- > >>>> + > >>>> +You can also usb U-Boot env update_uboot script, > >>>> +which wraps all eMMC/NAND specific command invocation: > >>>> + > >>>> +.. code-block:: bash > >>>> + > >>>> + => load mmc 1:1 $loadaddr u-boot-dtb.imx.ready > >>>> + => run update_uboot > >>>> + > >>>> diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst > >>>> new file mode 100644 > >>>> index 0000000000..aa418d6bad > >>>> --- /dev/null > >>>> +++ b/doc/board/toradex/index.rst > >>>> @@ -0,0 +1,9 @@ > >>>> +.. SPDX-License-Identifier: GPL-2.0+ > >>>> + > >>>> +Toradex > >>>> +======= > >>>> + > >>>> +.. toctree:: > >>>> + :maxdepth: 2 > >>>> + > >>>> + colibri_imx7 > >>>> > >>> > >> > >> > >> -- > >> Best regards - Freundliche Gr?sse - Meilleures salutations > >> > >> Igor Opaniuk > > I guess my failure was to run the checkpacht.pl directly on the saved > mail messages and not first apply the patches and then to use git > format-patch to get the cleaned form. > > After git am and git format-patch this patch checkpatch.pl does not > complain any more. > > The only message I see when reapplying the patch is: > > git am 0001-doc-board-colibri_imx7-add-readme.rst.patch > Applying: doc: board: colibri_imx7: add readme.rst > .git/rebase-apply/patch:152: new blank line at EOF. > + > warning: 1 line adds whitespace errors. > > due to a blank line at the end of > doc/board/toradex/colibri_imx7.rst Thanks for reporting, fixed that and sent v4. Thanks! > > Best regards > > Heinrich > > >> > >> mailto: igor.opaniuk at gmail.com > >> skype: igor.opanyuk > >> +380 (93) 836 40 67 > >> http://ua.linkedin.com/in/iopaniuk > > > > > > > -- Best regards - Freundliche Gr?sse - Meilleures salutations Igor Opaniuk mailto: igor.opaniuk at gmail.com skype: igor.opanyuk +380 (93) 836 40 67 http://ua.linkedin.com/in/iopaniuk ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-02-12 14:47 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-02-11 15:19 [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Igor Opaniuk 2020-02-11 15:19 ` [PATCH v3 2/5] doc: board: verdin-imx8mm: convert readme to reST Igor Opaniuk 2020-02-11 17:05 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 3/5] doc: board: apalis-imx8: " Igor Opaniuk 2020-02-11 17:06 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 4/5] doc: board: colibri-imx8x: " Igor Opaniuk 2020-02-11 17:06 ` Heinrich Schuchardt 2020-02-11 15:19 ` [PATCH v3 5/5] doc: board: add rockchip subfolder Igor Opaniuk 2020-02-11 16:48 ` Heinrich Schuchardt 2020-02-11 17:07 ` Heinrich Schuchardt 2020-02-11 17:04 ` [PATCH v3 1/5] doc: board: colibri_imx7: add readme.rst Heinrich Schuchardt 2020-02-11 19:37 ` Igor Opaniuk 2020-02-11 19:56 ` Igor Opaniuk 2020-02-11 21:32 ` Heinrich Schuchardt 2020-02-12 14:47 ` Igor Opaniuk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox