foundation-v8.dtb missing from EFI System Partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro OpenEmbedded |
Invalid
|
Undecided
|
Unassigned |
Bug Description
- Release: linaro-
- Architecture: Aarch64
- Image file: vexpress64-
The image file has two partitions:
- /dev/vda1: FAT32 partition
- /dev/vda2: Ext4 partition
/dev/vda1 contains a copy of the kernel image called "Image", and a series of binary device tree files (DTBs):
- fvp-base-
- fvp-base-
- fvp-base-
The "foundation-v8.dtb" file is missing, even though it is available on /dev/vda2, as "/lib/firmware/
This is a problem because the image cannot be very easily booted on the Foundation Model *with manually built UEFI firmware*.
According to
https:/
the Foundation Model is the only Fast Model from ARM that is free (as in price) and requires no additional licensing. Hence it is useful to make the image to work with the Foundation Model.
I'm now providing two "failure modes" in which the bug is annoying.
I. Semi-hosted mode.
(1) install the gcc-linaro 4.8 (Aarch64, GNU/Linux) toolchain
(2) download the image in question
(3) clone the central EDK2 repository: git clone https:/
(4) Build it for the Foundation Model:
source edksetup.sh
make -C "$EDK_TOOLS_PATH"
build --arch=AARCH64 \
-
-
-n 4
The output file (UEFI binary) is
Build/
(5) A bootstrap file is needed too:
cd ArmPlatformPkg/
make clean
CROSS_
The relevant output file is
uefi-
(6) Boot the Foundation Model:
Foundation_v8 --cores=4 \
-
-
-
This starts the bootstrap image first, which loads the UEFI binary. The UEFI binary then tries to load the kernel image (called "Image") and the Device Tree Binary (called "foundation-
The "Image" file is easy enough to copy out from /dev/vda1 (for example, using libguestfs), but the DTB file is not there (even though DTB files are there for Fast Models that require licensing). The DTB file has to be fished out from /dev/vda2, "/lib/firmware/
II. Full virtio-blk boot mode.
In this mode we're not relying on semi-hosting at all, we want the Foundation Model to load all files from the Linaro OpenEmbedded image file. For this we need some changes in the build process:
Steps (1)-(3) are identical.
In step (4), before building the UEFI binary called "RTSM_VE_
(a) patches 04/11 to 11/11, from http://
This series from Olivier Martin @ARM implements virtio-mmio support in edk2. Consequently, the virtio-blk driver in the UEFI binary is able to access the FAT32 EFI System Partition (/dev/vda1) in the Linaro OpenEmbedded image.
(Pathes 01-03 have already been applied and pushed to git.)
(b) For convenience, the default UEFI boot option should be re-pointed from SemiHosted to VirtioBlk, so that the UEFI binary finds the kernel image and the device tree binary without manual intervention. I'm attaching the patch that does this.
With these patches in place the UEFI binary can be built just like in step I/(4).
Steps (5)-(6) are identical to those under I., including the Foundation Model command line.
However, the same command line works differently this time:
Again, the bootstrap image is started first. It loads the UEFI binary. The UEFI binary then tries to load the kernel image (called "Image") and the Device Tree Binary (called "foundation-
Therefore I'm requesting / proposing that the "foundation-v8.dtb" file be added to the EFI System Partition.
----------------
Small note: currently, if the user copies the DTB to the ESP (which is of course doable, either inside the guest or from the host using libguestfs / guestfish), then the kernel starts fine, but very soon it panicks -- it can't switch the root fs to /dev/vda2.
The reason for this is a Foundation Model bug, which prevents Linux from using the virtio-blk device after the UEFI driver has used it. See
http://
for more.
But, that's an independent issue -- can you please add the Foundation Model DTB to the ESP? Thank you.
This bug report is extremely obsolete at this point. Closing.