
On 4/7/20 9:51 AM, Patrick DELAUNAY wrote:
Dear Marek,
Hi,
[...]
b/board/dhelectronics/dh_stm32mp1/board.c index a3458a2623..36b8652521 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -133,6 +133,90 @@ int checkboard(void) return 0; }
It is really need to add weak and duplicate all this function ?
Is it possible to define a weak function called just before DDR init ?
As board_early_init_f for example....done in mach-rockchip/spl.c Or at91_spl_board_init() in mach-at91/spl_at91.c
In ./arch/arm/mach-stm32mp/spl.c
+__weak int board_early_init_f(void) +{
- return 0;
+}
void board_init_f(ulong dummy) { struct udevice *dev; int ret;
arch_cpu_init();
[....] /* enable console uart printing */ preloader_console_init();
- board_early_init_f();
[...]
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig index 97e95bde7d..6c5ca31f40 100644 --- a/configs/stm32mp15_dhcor_basic_defconfig +++ b/configs/stm32mp15_dhcor_basic_defconfig @@ -11,7 +11,10 @@ CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_TEXT_BASE=0x2FFC2500 CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_SOURCE="board/dhelectronics/dh_stm32mp1/u-boot.its" CONFIG_BOOTCOMMAND="run bootcmd_stm32mp" +CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3 CONFIG_SPL_I2C_SUPPORT=y
To include the needed target in "make all" you can also add
- CONFIG_BUILD_TARGET="u-boot.itb"
Or change default in Kconfig (add ARCH_STM32MP for SPL_LOAD_FIT case)
I very much have both in my tree already, so I'll send a non-RFC.