[PATCH] Init virtio before loading ENV from EXT4 or FAT

Tom Rini trini at konsulko.com
Sat May 18 02:08:32 CEST 2024


On Wed, May 01, 2024 at 10:54:09AM +0200, Fiona Klute wrote:

> Specifying a file in an EXT4 or FAT partition on a virtio device as
> environment location failed because virtio hadn't been initialized by
> the time the environment was loaded. This patch mirrors commit
> 54ee5ae84191 ("Add SCSI scan for ENV in EXT4 or FAT") in issue and
> fix, just for a different kind of block device.
> 
> The additional include in include/virtio.h is needed so all functions
> called there are defined, the alternative would have been to include
> dm/device.h separately in the env/ sources.
> 
> Checkpatch suggests using "if (IS_ENABLED(CONFIG...))" instead of
> "#if defined(CONFIG_...)", I'm sticking to the style of the existing
> code here.
> 
> Signed-off-by: Fiona Klute <fiona.klute at gmx.de>
> CC: Joe Hershberger <joe.hershberger at ni.com>
> CC: Bin Meng <bmeng.cn at gmail.com>
> CC: Rogier Stam <rogier at unrailed.org>

As this problem was reported by another user:
https://stackoverflow.com/questions/78490686/custom-u-boot-writes-to-environment-file-but-cannot-read-from-it
I've decided it's worth pulling this in now rather than for a later
release via -next, so, 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/20240517/1882d617/attachment.sig>


More information about the U-Boot mailing list