[PATCH V3 3/6] ARM: stm32: Implement board coding on AV96

Patrick DELAUNAY patrick.delaunay at st.com
Wed Apr 22 17:04:19 CEST 2020


Hi Marek,

> From: Marek Vasut <marex at denx.de>
> Sent: mercredi 22 avril 2020 13:18
> 
> The AV96 board does exist in multiple variants. To cater for all of them, implement
> board code handling. There are two GPIOs which code the type of the board, read
> them out and use the value to pick the correct device tree from an fitImage.
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay at st.com>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
> Cc: Patrick Delaunay <patrick.delaunay at st.com>
> Cc: Patrice Chotard <patrice.chotard at st.com>
> ---
> V2: No change
> V3: Drop dm-pre-reloc and gpio-cells from config node
> ---
>  arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi    |  1 +
>  .../stm32mp15xx-dhcor-avenger96-u-boot.dtsi   |  1 +
>  arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi    |  7 +++
>  board/dhelectronics/dh_stm32mp1/Kconfig       |  2 +-
>  board/dhelectronics/dh_stm32mp1/board.c       | 61 +++++++++++++++++++
>  .../dh_stm32mp1/u-boot-dhcom.its              | 39 ++++++++++++
>  .../dh_stm32mp1/u-boot-dhcor.its              | 39 ++++++++++++
>  configs/stm32mp15_dhcom_basic_defconfig       |  3 +
>  configs/stm32mp15_dhcor_basic_defconfig       |  3 +
>  include/configs/dh_stm32mp1.h                 | 15 +++++
>  10 files changed, 170 insertions(+), 1 deletion(-)  create mode 100644
> board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its
>  create mode 100644 board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its
>  create mode 100644 include/configs/dh_stm32mp1.h
> 

I have 2 compilation issue on this patch with buildman

tools/buildman/buildman -v -V stm32mp15_dhcom_basic stm32mp15_dhcor_basic

Building current source for 2 boards (2 threads, 6 jobs per thread)
       arm:  +   stm32mp15_dhcor_basic
+FATAL ERROR: Couldn't open "board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its": No such file or directory
+./tools/mkimage: Can't open u-boot.itb.tmp: No such file or directory
+/local/home/frq07632/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd: common/built-in.o: in function `fit_find_config_node':
+common/common_fit.c:66: undefined reference to `board_fit_config_name_match'
+make[2]: *** [spl/u-boot-spl] Error 1
+make[1]: *** [spl/u-boot-spl] Error 2
+make: *** [sub-make] Error 2
       arm:  +   stm32mp15_dhcom_basic                   
+FATAL ERROR: Couldn't open "board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its": No such file or directory
+./tools/mkimage: Can't open u-boot.itb.tmp: No such file or directory
+/local/home/frq07632/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd: common/built-in.o: in function `fit_find_config_node':
+common/common_fit.c:66: undefined reference to `board_fit_config_name_match'
+make[2]: *** [spl/u-boot-spl] Error 1
+make[1]: *** [spl/u-boot-spl] Error 2
+make: *** [sub-make] Error 2
    0    0    2 /2      stm32mp15_dhcom_basic
 

The 'board_fit_config_name_match'  error 
is just because CONFIG_BOARD_EARLY_INIT_F=y is missing in the 2 defconfig 
(added in PATH 6/6 but needed in patch 3)


But I reproduce of other buildman just with out of dir compilation
KBUILD_OUTPUT=../build

I think that Makefile  serach CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its" 
in the builddir but it is present in the srcdir.

And you are the first user of CONFIG_SPL_FIT_SOURCE...

I want to propose to copy the file with:

----------------------------------- Makefile -----------------------------------
index 26307fd4a6..2dbf96a073 100644
@@ -1320,7 +1320,12 @@ endif
 # Boards with more complex image requirements can provide an .its source file
 # or a generator script
 ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
-U_BOOT_ITS = $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
+
+U_BOOT_ITS := u-boot.its
+
+$(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
+	$(call if_changed,copy)
+
 else
 ifneq ($(CONFIG_SPL_FIT_GENERATOR),"")
 U_BOOT_ITS := u-boot.its


But then you need to update the patch in .its files....

=> remove no more necessary "../../../"

Regards

Patrick



More information about the U-Boot mailing list