[PATCH v2 4/5] imx: imx6ul: Add support for Kontron Electronics SL/BL i.MX6UL/ULL boards (N63xx/N64xx)
Frieder Schrempf
frieder.schrempf at kontron.de
Mon Jul 19 13:57:37 CEST 2021
Hi Stefano,
On 17.07.21 14:08, Stefano Babic wrote:
> Hi Frieder,
>
> On 13.07.21 11:14, Frieder Schrempf wrote:
>> From: Frieder Schrempf <frieder.schrempf at kontron.de>
>>
>> This adds support for i.MX6UL/ULL-based evaluation kits with SoMs by
>> Kontron Electronics GmbH.
>>
>> Currently there are the following SoM flavors (SoM-Line):
>> * N6310: SOM with i.MX6UL-2, 256MB RAM, 256MB SPI NAND
>> * N6311: SOM with i.MX6UL-2, 512MB RAM, 512MB SPI NAND
>> * N6411: SOM with i.MX6ULL, 512MB RAM, 512MB SPI NAND
>>
>> And the according evaluation boards (Board-Line):
>> * N6310-S: Baseboard with SOM N6310, eMMC, display (optional), ...
>> * N6311-S: Baseboard with SOM N6311, eMMC, display (optional), ...
>> * N6411-S: Baseboard with SOM N6411, eMMC, display (optional), ...
>>
>> Currently U-Boot describes i.MX6UL and i.MX6ULL through separate config
>> options at compile-time. Though the differences are so minor, that for
>> the scope of these SoMs we just use a single defconfig that is compatible
>> with both SoCs.
>>
>> Signed-off-by: Frieder Schrempf <frieder.schrempf at kontron.de>
>> Reviewed-by: Stefano Babic <sbabic at denx.de>
>> ---
>> Fixes in v2:
>> * Add MAINTAINERS file
>> * Rename board directory
>> * Use binman to generate FIT
>
> Something weird happens here. kontron_mx6ul is built well, however this breaks the rest of i.MX6UL boards. The point is when another board is built, but your DT is built as well due to:
>
> + imx6ul-pico-pi.dtb \
> + imx6ul-kontron-n631x-s.dtb \
> + imx6ull-kontron-n641x-s.dtb
>
>
> In fact, I get :
>
> Building current source for 5 boards (32 threads, 7 jobs per thread)
> arm: + mx6ul_14x14_evk
> +(mx6ul_14x14_evk) Error: arch/arm/dts/imx6ul-kontron-n6x1x-s-u-boot.dtsi:57.27-28 syntax error
> +(mx6ul_14x14_evk) FATAL ERROR: Unable to parse input tree
> +(mx6ul_14x14_evk) make[3]: *** [scripts/Makefile.lib:332: arch/arm/dts/imx6ul-kontron-n631x-s.dtb] Error 1
> +(mx6ul_14x14_evk) make[3]: *** [scripts/Makefile.lib:332: arch/arm/dts/imx6ull-kontron-n641x-s.dtb] Error 1
> +(mx6ul_14x14_evk) make[2]: *** [dts/Makefile:44: arch-dtbs] Error 2
> +(mx6ul_14x14_evk) make[1]: *** [Makefile:1141: dts/dt.dtb] Error 2
> +(mx6ul_14x14_evk) make: *** [Makefile:171: sub-make] Error 2
> arm: + mx6ul_9x9_evk
> +(mx6ul_9x9_evk) Error: arch/arm/dts/imx6ul-kontron-n6x1x-s-u-boot.dtsi:57.27-28 syntax error
> +(mx6ul_9x9_evk) FATAL ERROR: Unable to parse input tree
> +(mx6ul_9x9_evk) make[3]: *** [scripts/Makefile.lib:332: arch/arm/dts/imx6ul-kontron-n631x-s.dtb] Error 1
> +(mx6ul_9x9_evk) make[3]: *** [scripts/Makefile.lib:332: arch/arm/dts/imx6ull-kontron-n641x-s.dtb] Error 1
> +(mx6ul_9x9_evk) make[2]: *** [dts/Makefile:44: arch-dtbs] Error 2
> +(mx6ul_9x9_evk) make[1]: *** [Makefile:1141: dts/dt.dtb] Error 2
> +(mx6ul_9x9_evk) make: *** [Makefile:171: sub-make] Error 2
> 3 0 2 /5 0:00:05 : mx6ul_9x9_evk
>
> And same errors with other MX6UL boards. Just to check this, I hacked the Makefile as follows:
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 6030ff4aeb..89317f3979 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -809,7 +809,9 @@ dtb-$(CONFIG_MX6UL) += \
> imx6ul-liteboard.dtb \
> imx6ul-phytec-segin-ff-rdk-nand.dtb \
> imx6ul-pico-hobbit.dtb \
> - imx6ul-pico-pi.dtb \
> + imx6ul-pico-pi.dtb
> +
> +dtb-$(CONFIG_TARGET_KONTRON_MX6UL) += \
> imx6ul-kontron-n631x-s.dtb \
> imx6ull-kontron-n641x-s.dtb
>
> Note: if this could be an accepted solution, I have no problems to do it - on at91 is accepted, too. But I am wondering what is happening, it looks like a CONFIG_ is missing, but in the other boards and not yours.
>
> Any idea ?
It looks like when boards don't have CONFIG_FIT set then CONFIG_FIT_EXTERNAL_OFFSET is not defined, but my devicetree uses this and is compiled for all of the boards as it is under CONFIG_MX6UL.
Instead of separating the dts, we could also add a "#if defined(CONFIG_FIT)" around the binman nodes in the dts. I saw that other boards also do this (e. g. socfpga_soc64_fit-u-boot.dtsi).
Shall I send an update with this fix?
Best regards
Frieder
More information about the U-Boot
mailing list