# U-boot EFI on intel-corei7-64

**URL:** <https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216>\
**Category:** General Discussions\
**Tags:** yocto, intel, u-boot\
**Created:** [March 24, 2026, 6:45pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216 "2026-03-24T18:45:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnebrich](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dnebrich](https://hub.mender.io/u/dnebrich)\
**Post date:** [March 24, 2026, 6:45pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216/1 "2026-03-24T18:45:09Z")

</div>

Hi,

I’ve got mender working with grub on intel-corei7-64 (scarthgap 5.0.16). As it’s a commercial product, I’m trying to replace grub with u-boot due to gplv3.

I’ve created a few u-boot build attempts, but don’t have it working yet. I’m new to UEFI so hoping for some guidance/direction.

My builds are currently using mender-full.yml. With the mender-grub based build, I’ve mounted the .bootimg on my dev PC and it shows:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/a/abd6669e5cb76349f6d079325406cd19ca490ef9.png)

This works on the device. For u-boot try #1, I replaced mender-grub with mender-u-boot. This builds and creates a uefiimg, but UEFI on the device doesn’t see anything. So I mounted .bootimg on my PC and it just shows:

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/4/4da9b1f5be973120be7894bef18d3780e823817f.png)

I then tried to set EFI\_PROVIDER to “u-boot”, results were the same. I do have UBOOT\_MACHINE set to “efi-x86\_app64\_defconfig”. So the u-boot workdir has both `u-boot.bin` and `u-boot-app.efi`. Do I need to explicitly add one to `IMS_BOOT_FILES`?

For uboot try #2, I followed the steps here: [Explicit WKS Partitioning for Mender A/B Updates](https://hub.mender.io/t/explicit-wks-partitioning-for-mender-a-b-updates/8162)

Is that the direction I need to go in? I’ve got a build with a wks file with uboot.env in 1st partition, and then the 2nd partition setup for `--source bootimg-partition`, but I’m not sure what files/structure I should add to the bootimg.

The device has a SATA SSD drive.

Thanks, Daryl

---

<div class="post-metadata">

**Author:** ![dnebrich](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dnebrich](https://hub.mender.io/u/dnebrich)\
**Post date:** [March 31, 2026, 12:30pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216/2 "2026-03-31T12:30:20Z")

</div>

Ok, I’ve got u-boot working as an EFI payload. I used the Explicit WKS Partitioning approach. The u-boot environment is stored in ESP and `/etc/fw_env.config` points to it.

```auto
# Configuration file for fw_printenv/fw_setenv
# Device name Offset Size Erase block size Number of erase blocks
# For FAT-based environment storage, we need to specify the files
# Primary environment file
/uboot/uboot.env 0x0 0x20000
# Redundant environment file

```

And the u-boot environment is mounted to /uboot and the environment files are there. And I can view them with fw\_printenv.

However, `mender-update show-artifact` returns `unknown`. I’m using the [mender-explicit-wic.bbclass](https://github.com/mendersoftware/meta-mender-community/blob/scarthgap/kas/demos/meta-mender-explicit-wic/classes/mender-explicit-wic.bbclass) from the demo layer, only change is how WKS\_FILE gets set.

The kernel comes up, and the `/data/mender` folder is present. However, there aren’t any mender.conf or device-type files. Those are in `/var/lib/mender` -

```auto
root@ims-linux-default:/var/lib/mender# ll /var/lib/mender
total 32K
drwxr-xr-x 2 root root 4.0K Mar 31 12:09 ./
drwxr-xr-x 12 root root 4.0K Mar 31 12:03 ../
-r--r--r-- 1 root root 35 Mar 9 2018 device_type
-rw------- 1 root root 12K Mar 31 12:09 mender-store
-rw------- 1 root root 8.0K Mar 31 12:09 mender-store-lock
-rw------- 1 root root 66 Mar 9 2018 mender.conf

```

For my previous working image with grub, there’s a link in /var/lib/mender pointing to /data/mender. I can fix that, but `mender-update -h` shows default datastore path is /var/lib/mender so I’d imagine it sees them. And the data in the files looks correct.

```auto
device_type=intel-corei7-64-custom

```

```auto
{
    "RootfsPartA": "/dev/sda2",
    "RootfsPartB": "/dev/sda3"
}

```

Any thoughts on what to try? Looking in `mender-dataimg.bbclass` I see it using `mender-bootstrap-artifact`. Do I need that with this approach?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [March 31, 2026, 4:02pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216/3 "2026-03-31T16:02:23Z")

</div>

Hi @dnebrich,

Nice, yeah that’s a possible use case for the explicit `wks` approach: you can create advanced integrations while avoiding the intricacies of the `mender-grub` and `mender-uboot` features.

For the “unknown” software at the beginning, you’re right, you need to look into the `mender-bootstrap-artifact`. The probably best example to base your integration off is [meta-mender/meta-mender-core/classes/mender-dataimg.bbclass at master · mendersoftware/meta-mender · GitHub](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/classes/mender-dataimg.bbclass)

Did you need complex integration logic, or was it mostly a case of properly crafting the `wks`?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![dnebrich](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dnebrich](https://hub.mender.io/u/dnebrich)\
**Post date:** [March 31, 2026, 5:08pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216/4 "2026-03-31T17:08:43Z")

</div>

Hi @TheYoctoJester

Thanks for response. I just added code to mender-explicit-wic.bbclass to create the link and install the artifact. Showing below in case it helps someone else.

```auto
# Add mender symlink to rootfs during rootfs creation
ROOTFS_POSTPROCESS_COMMAND += "create_mender_symlink; "

create_mender_symlink() {
    # Create symlink /var/lib/mender
    bbnote "Creating /var/lib/mender -> /data/mender symlink"
    
    # Remove existing /var/lib/mender directory if it exists
    if [-d "${IMAGE_ROOTFS}${localstatedir}/lib/mender"]; then
        bbnote "Removing existing /var/lib/mender directory"
        rm -rf ${IMAGE_ROOTFS}${localstatedir}/lib/mender
    fi
    
    install -d ${IMAGE_ROOTFS}${localstatedir}/lib
    ln -sf /data/mender ${IMAGE_ROOTFS}${localstatedir}/lib/mender
    install -d ${IMAGE_ROOTFS}/data/mender
}

# Install bootstrap artifact directly into the rootfs after it's created
install_bootstrap_to_rootfs() {
    if [-e "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.bootstrap-artifact"]; then
        bbnote "Installing bootstrap.mender to rootfs /data/mender/"
        install -d ${IMAGE_ROOTFS}/data/mender
        install -m 0400 "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.bootstrap-artifact" \
            "${IMAGE_ROOTFS}/data/mender/bootstrap.mender"
        bbnote "Bootstrap artifact installed successfully"
    else
        bbwarn "Bootstrap artifact not found at ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.bootstrap-artifact"
        bbwarn "This may cause 'mender show-artifact' to return 'unknown' on first boot"
        bbwarn "Available files in IMGDEPLOYDIR:"
        ls -la "${IMGDEPLOYDIR}/" | grep -E "(bootstrap|mender)" || bbwarn "No bootstrap/mender files found"
    fi
}

# Install bootstrap artifact after bootstrap-artifact image is created but before WIC
do_image_wic[prefuncs] += "install_bootstrap_to_rootfs"

# Ensure bootstrap artifact is available before WIC processing
do_image_wic[depends] += "${PN}:do_image_bootstrap_artifact"

```

On first startup, `bootstrap.mender` is in /data/mender and the first time I ran `mender-update show-artifact` gives -

```auto
record_id=1 severity=info time="2026-Mar-31 16:53:00.340639" name="Global" msg="Installing the bootstrap Artifact"
local_2026-03-31_16:38:45

```

A few seconds later the expected MENDER\_ARTIFACT\_NAME was displayed. I’ll try updates next.

Honestly, I may not have needed to take this approach. When I first tried using mender-uboot, I wasn’t familiar with the UEFI shell and the ESP folder structure. Perhaps I could have just patched u-boot config and set the various MENDER\_UBOOT\_ options. I first tried EFI app, but had to switch to EFI payload. Not sure if the wks I ended up with requires this approach, but below is what I have.

And now that it’s working, I don’t want to change it. 🙂

```auto
# EFI boot partition
part /boot/efi --source bootimg-partition --label boot --ondisk "sda" --align 8192 --fixed-size 16 --active --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B

# Root filesystem A (active)
part --source rawcopy --sourceparams="file=.../file.ext4" --ondisk "sda" --align 8192 --fixed-size 3000000k --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4

# Root filesystem B (not active)
part --ondisk "sda" --fstype=ext4 --align 8192 --fixed-size 3000000k --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4

# Data partition
part /data --source rootfs --label data --fstype=ext4 --align=8192 --fixed-size=1024 --change-directory=data --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4

part --ondisk "sda" --size 1024 --align 8192 --label=more_data --fstype=ext4

bootloader --ptable gpt

```

Thanks,

Daryl

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [March 31, 2026, 5:15pm UTC](https://hub.mender.io/t/u-boot-efi-on-intel-corei7-64/8216/5 "2026-03-31T17:15:03Z")

</div>

Hi @dnebrich,

Great, thanks for sharing! As you are about to try updates, there is a somewhat simplistic script available to run the integration checklist: [meta-mender-community/meta-mender-validation/recipes-mender/bootloader-validation/bootloader-validation\_0.1.bb at scarthgap · mendersoftware/meta-mender-community · GitHub](https://github.com/mendersoftware/meta-mender-community/blob/scarthgap/meta-mender-validation/recipes-mender/bootloader-validation/bootloader-validation_0.1.bb)

As you are using `u-boot`, the canonical way should be fine and exercised.

If I find time I’ll try to boil down the information into an example in `meta-mender-community` so it hopefully helps the next one just like the `explicit-wks` one did for you.

Greetz,  
Josef
