Hi Waldemar
On 9/19/22 23:03, Waldemar Brodkorb wrote:
> Hi Patrice,
> Patrice CHOTARD wrote,
>
>> Waldemar,
>>
>> You can applied the following series on current U-Boot master
>> branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
>>
>> https://patchwork.ozlabs.org/project/uboot/list/?series=318991
>>
>
> I applied the patches on top of u-boot master and the non-SPL
> build still works fine. It seems only 2022.07 is broken, master is fine.
>
> The SPL build compiles, but I get no output via serial console after
> flashing. I changed the openocd command to use 0x8009000 for u-boot.
>
> /home/wbx/openadk/host_x86_64-linux-gnu/usr/bin/openocd \
> -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
> -c "init" \
> -c "reset init" \
> -c "flash probe 0" \
> -c "flash info 0" \
> -c "flash write_image erase spl/u-boot-spl.bin 0x08000000" \
> -c "flash write_image erase u-boot-dtb.bin 0x08009000" \
> -c "reset run" \
> -c "shutdown"
>
> Is this change correct or do I misread your patches?
Due to the flash layout (the 4 first sectors size is 32KB) using
"flash write_image erase" command, as you did, can't be used anymore due
to the SPL size increase.
SPL size is over 32KB (0x8000), so SPL binary occupies the first and a part
of the second 32KB sectors.
When you execute "flash write_image erase u-boot-dtb.bin 0x08009000",
this command erase the second 32KB sector (where a part of SPL has been
previously copied) before copying the u-boot-dtb.bin binary.
So i advice you to use the method described in doc/board/st/stm32_MCU.rst
Copy directly the generated binary u-boot-with-spl.bin into the mass-storage
exposed by the board.
Example, under Ubuntu you should see the following directory
/media/$USER/DIS_F746NG
>
> BTW: Do you have a working Linux configuration file you can share
> with me? Which Linux version do you use on the device?
Yes, i have tested the kernel v6.0-rc4 on STM32F746-disco board recently.
Before you have to apply the attached patch.
Patrice
>
> best regards
> Waldemar
diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig
index 1f5446cda8b6..e1f86bd1eed4 100644
--- a/arch/arm/configs/stm32_defconfig
+++ b/arch/arm/configs/stm32_defconfig
@@ -17,12 +17,10 @@ CONFIG_EMBEDDED=y
CONFIG_ARCH_STM32=y
CONFIG_CPU_V7M_NUM_IRQ=240
CONFIG_SET_MEM_PARAM=y
-CONFIG_DRAM_BASE=0x90000000
-CONFIG_FLASH_MEM_BASE=0x08000000
+CONFIG_DRAM_BASE=0xC0000000
+CONFIG_DRAM_SIZE=0x01000000
CONFIG_FLASH_SIZE=0x00200000
# CONFIG_ATAGS is not set
-CONFIG_XIP_KERNEL=y
-CONFIG_XIP_PHYS_ADDR=0x08008000
CONFIG_BINFMT_FLAT=y
# CONFIG_COREDUMP is not set
# CONFIG_VM_EVENT_COUNTERS is not set