[PATCH] distro_boot: Fix block device after DHCP boot sequence

Tom Rini trini at konsulko.com
Fri Jul 23 14:34:37 CEST 2021


On Mon, Jul 12, 2021 at 12:07:09AM +0100, Andre Przywara wrote:

> The generic distro boot sequence iterates over several types of devices,
> trying one after another. In doing do, it starts with setting the
> "devtype" variable, then uses this later in more generic commands.
> 
> Now most (block) device types use a local variable for that, but DHCP
> puts the type into the environment, where it shadows any local variables.
> As a consequence any boot attempt after bootcmd_dhcp has been run fails:
> ===========================
> VExpress64# run bootcmd_dhcp
> ...
> VExpress64# run bootcmd_sata0
> SATA#0:
>         (3.0 Gbps)
> SATA#1:
>         (No RDY)
> Device 0: Model: 16GB SATA Flash Drive  ....
> ... is now current device
> Couldn't find partition dhcp 0:1
> ===========================
> This problem typically doesn't show, because DHCP is mostly the last
> command to try, but is a problem when this order is different, or when
> distro_bootcmd or bootcmd_xxx are run separately or multiple times.
> 
> Let bootcmd_dhcp use a local variable, as the other kids do, to make the
> order of boot commands irrelevant, and allow repeated calls.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210723/bbee75f8/attachment.sig>


More information about the U-Boot mailing list