
On Fri, Oct 22, 2021 at 6:16 PM Marcel Ziswiler marcel@ziswiler.com wrote:
From: Marcel Ziswiler marcel.ziswiler@toradex.com
With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Move the comon part of that configuration to the common imx8mm-u-boot.dtsi include file.
The initial patch fixes an issue with intermediate binary naming for the imx8mm-cl-iot-gate. And subsequent patches further clean up that dtsi.
This series is based on my refresh of Adam's imx8mm_beacon switch to binman patch [1], my refresh of Michael's sl28 patches [2] and Tim's switching imx8mm_venice to using binman to pack images [3].
Thanks for doing the rebase. I wonder if we should drop the imx8mm-beacon patch and just add the adjusted defconfig changes rather than applying either my patch or the rebased patch, then undoing it right away with this series. I like the idea of merging them all together into one nice series using the common imx8mm-u-boot.dtsi file, but I wonder if we should split this into another sub-file called im8mm-lpddr4-u-boot.dtsi. If someone uses a different DDR, these referenced files won't be appropriate for their DDR type.
I tried applying this series on u-boot/master, but it didn't apply correctly, so the rest of my message might not apply if there is a patch somewhere that fixes it, and I just missed it.
1. The build fails because there is a file in a location different than what's expected:
make flash.bin CROSS_COMPILE=aarch64-linux-gnu- -j8 <snip> BINMAN flash.bin MKIMAGE flash.bin ./tools/mkimage: Can't open spl/u-boot-spl-ddr.bin: No such file or directory make[1]: *** [arch/arm/mach-imx/Makefile:167: flash.bin] Error 1 make[1]: *** Deleting file 'flash.bin' make: *** [Makefile:1516: flash.bin] Error 2
If I copy u-boot-spl-ddr.bin from the main build directory to the spl directory and run make again, it completes successfully.
2. I noticed that the offset doesn't appear to be jumping to the right location. I am not sure if something has changed in binman, but I intentionally loaded this over a much older flash.bin file because I wanted to make sure the correct version of u-boot loaded, but it did not.
Notice the version mismatch between SPL and U-Boot.
U-Boot SPL 2021.10-00983-geed0aab6ff-dirty (Oct 29 2021 - 14:24:10 -0500) WDT: Started watchdog@30280000 with servicing (60s timeout) Trying to boot from MMC1 NOTICE: BL31: v2.2(release):imx_5.4.24_er3-0-gb0a00f22b-dirty NOTICE: BL31: Built : 03:05:00, May 12 2021
U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1 (Jun 03 2021 - 19:41:40 +0000)
CPU: Freescale i.MX8MMQ rev1.0 1600 MHz (running at 500 MHz) CPU: Industrial temperature grade (-40C to 105C) at 56C Reset cause: POR Model: Beacon EmbeddedWorks i.MX8M Mini Development Kit DRAM: 2 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial Out: serial Err: serial
I can try to determine the proper offset again, but there is another binman patch that might make this easier if the elf properly has the offset defined [4].
[1] https://marc.info/?l=u-boot&m=163493902915471 [2] https://marc.info/?l=u-boot&m=163494122816224 [3] https://marc.info/?l=u-boot&m=163355140309636
[4] - https://patchwork.ozlabs.org/project/uboot/patch/20211026033058.430010-6-sjg...
If there is a patch I missed somewhere, please let me know, and I will go back and try again. I'll try to figure out what's going on with the u-boot offset sometime this weekend.
Changes in v3:
- Integrated imx8mm_beacon as well.
- Re-based on top of imx/master.
Changes in v2:
- New patch preparing cl-iot-gate.
- New patch preparing cl-iot-gate.
- Morph common binman dtsi into regular common u-boot dtsi as discussed on mailing list.
- Re-based.
- Rather than doing that clean-up to the separate binman dtsi now do it to the common u-boot dtsi one.
- Rather than doing that clean-up to the separate binman dtsi now do it to the common u-boot dtsi one.
- Rather than doing that clean-up to the separate binman dtsi now do it to the common u-boot dtsi one.
Changes in v1:
- This was suggested by Simon on my earlier patch set upon which we decided to first break this up into a common binman dtsi and then subsequently do such further improvements.
Marcel Ziswiler (7): imx8mm-cl-iot-gate: fix imximage intermediate binary naming arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-order arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsi arm64: dts: imx8mm: use common binman configuration arm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order properties arm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filename arm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext naming
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi | 122 ---------- .../dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 209 ++++-------------- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 188 +++------------- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 123 ----------- arch/arm/dts/imx8mm-u-boot.dtsi | 149 ++++++++++++- arch/arm/dts/imx8mm-venice-u-boot.dtsi | 119 ---------- arch/arm/dts/imx8mm-verdin-u-boot.dtsi | 122 +--------- .../imximage-8mm-lpddr4.cfg | 2 +- 8 files changed, 212 insertions(+), 822 deletions(-)
-- 2.26.2