u-boot 2022-07 on STM32F746G-DISCO
Waldemar Brodkorb
wbx at openadk.org
Tue Sep 20 12:53:48 CEST 2022
Hi Patrice,
Patrice CHOTARD wrote,
> 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
When I copy u-boot-with-spl.bin to the mass-storage device I get
following output on the serial console:
U-Boot SPL 2022.10-rc5-00009-g41530b5b3e (Sep 20 2022 - 12:37:40
+0200)
Trying to boot from XIP
fdt_root: FDT_ERR_BADMAGIC
Hard fault
pc : 08009000 lr : 0800070b xPSR : 41000000
r12 : 2004f108 r3 : 40011000 r2 : 080c0000
r1 : ffffffff r0 : 00000000
Resetting CPU ...
resetting ...
How is it supposed to work to start the full u-boot-dtb.bin and
u-boot-with-spl.bin? When I copy both files I get no output, it
seems this is not supported, right?
Maybe I should stick with the normal non-SPL boot, I see no
advantage to have the SPL boot. What is the advantage of the SPL
build?
best regards
Waldemar
More information about the U-Boot
mailing list