efivar soc root parsing

Ard Biesheuvel ard.biesheuvel at linaro.org
Thu May 30 14:48:51 BST 2019


Hi all,

Looking at efivar-37 sources in debian today, I noticed the following:


/*
 * support for soc platforms
 *
 * various devices /sys/dev/block/$major:$minor start with:
 * maj:min ->  ../../devices/platform/soc/$DEVICETREE_NODE/$BLOCKDEV_STUFF/block/$DISK/$PART
 * i.e.:
soc/1a400000.sata/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1
 *                                        ^ dt node     ^ blockdev
stuff                     ^ disk
 * I don't *think* the devicetree nodes stack.
 */


which assumes that the root of a DT hierarchy is always called soc/

This appears to be based on some APM platform, which happens to
organize its DT hierarchy that way. However, in the general case,
block devices could reside anywhere in the DT hierarchy, and so this
code is highly non-portable.

This seems to have broken the Debian installer for 32-bit ARM (and
most likely DT based 64-bit ARM as well), since it no longer uses
efibootmgr but uses efivar to manipulate boot entries directly.

I am not exactly sure what this code does or how to fix it, so
suggestions welcome.

-- 
Ard.



More information about the Efi mailing list