# Building image with mender-systemd-boot fails at patching systemd-boot

**URL:** https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477
**Category:** General Discussions
**Tags:** yocto, systemd-boot, kirkstone
**Created:** [January 15, 2024, 5:59pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477 "2024-01-15T17:59:50Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 15, 2024, 5:59pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/1 "2024-01-15T17:59:50Z")

</div>

Hi everyone,

i am switching our existing yocto image from grub to systemd-boot, mainly to take advantage of meta-intel’s uefi-comboapp and uefi-sign classes.

In doing so, the build fails whenever i enable the mender-systemd-boot feature, and i can’t for the life of me figure out why:

> **Error message**
>
> ## ERROR: systemd-boot-250.5-r0 do\_patch: Applying patch ‘systemd-boot-slotconfig.patch’ on target directory ‘/opt/yocto/build/tmp/work/core2-64-poky-linux/systemd-boot/250.5-r0/git’ CmdError(‘quilt --quiltrc /opt/yocto/build/tmp/work/core2-64-poky-linux/systemd-boot/250.5-r0/recipe-sysroot-native/etc/quiltrc push’, 0, "stdout: Applying patch systemd-boot-slotconfig.patch can’t find file to patch at input line 23 Perhaps you used the wrong -p or --strip option? The text leading up to this was:
> 
> |From d9398201627b0dee2ca78c78113862e324a4f8b1 Mon Sep 17 00:00:00 2001 |From: Liam White McShane [liam.white@timesys.com](mailto:liam.white@timesys.com) |Date: Fri, 23 Jul 2021 13:53:17 -0400 |Subject: [PATCH] systemd-boot: add A/B RFS support  
> |  
> |commit 9859c61858d6a55dc648bafef46c554a93d87285  
> |  
> | Add slot config  
> |  
> |—  
> | src/boot/efi/boot.c | 46 ++++++++++  
> | src/boot/efi/meson.build | 2 +  
> | src/boot/efi/slot.c | 175 +++++++++++++++++++++++++++++++++++++++  
> | src/boot/efi/slot.h | 25 ++++++  
> | 4 files changed, 248 insertions(+)  
> | create mode 100644 src/boot/efi/slot.c  
> | create mode 100644 src/boot/efi/slot.h  
> |  
> |diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c  
> |index b4f3b9605a..2dc8a3bbb1 100644  
> |— a/src/boot/efi/boot.c
> 
> | +++ b/src/boot/efi/boot.c |
> | --- |
> | No file to patch. Skipping patch. |
> | 4 out of 4 hunks ignored |
> | can’t find file to patch at input line 101 |
> | Perhaps you used the wrong -p or --strip option? |
> | The text leading up to this was: |
> 
> * * *
> 
> |diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build  
> |index afdf739d9b..200cf38fc0 100644  
> |— a/src/boot/efi/meson.build
> 
> | +++ b/src/boot/efi/meson.build |
> | --- |
> | No file to patch. Skipping patch. |
> | 2 out of 2 hunks ignored |
> | patching file src/boot/efi/slot.c |
> | patching file src/boot/efi/slot.h |
> | Patch systemd-boot-slotconfig.patch does not apply (enforce with -f) |
> 
> stderr: ")  
> ERROR: Logfile of failure stored in: /opt/yocto/build/tmp/work/core2-64-poky-linux/systemd-boot/250.5-r0/temp/log.do\_patch.2270288  
> ERROR: Task (/opt/yocto/meta/recipes-core/systemd/systemd-boot\_250.5.bb:do\_patch) failed with exit code ‘1’

Excluding the patch file via `SRC_URI:remove = "file://systemd-boot-slotconfig.patch"` results in a meson build failure and some licence checksum issues:

> **Different error output**
>
> ERROR: mc:pa5:systemd-boot-250.5-r0 do\_populate\_lic: QA Issue: systemd-boot: LIC\_FILES\_CHKSUM points to an invalid file: /opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/git/LICENSE.GPL2 [license-checksum]  
> ERROR: mc:pa5:systemd-boot-250.5-r0 do\_populate\_lic: QA Issue: systemd-boot: LIC\_FILES\_CHKSUM points to an invalid file: /opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/git/LICENSE.LGPL2.1 [license-checksum]  
> ERROR: mc:pa5:systemd-boot-250.5-r0 do\_populate\_lic: Fatal QA errors were found, failing task.  
> ERROR: Logfile of failure stored in: /opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/temp/log.do\_populate\_lic.2188912 ERROR: Task (mc:pa5:/opt/yocto/meta/recipes-core/systemd/systemd-boot\_250.5.bb:do\_populate\_lic) failed with exit code ‘1’  
> ERROR: mc:pa5:systemd-boot-250.5-r0 do\_configure: meson failed ERROR: mc:pa5:systemd-boot-250.5-r0 do\_configure: ExecutionError(‘/opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/temp/run.do\_configure.2188883’, 1, None, None) ERROR: Logfile of failure stored in: /opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/temp/log.do\_configure.2188883  
> Log data follows:  
> | DEBUG: Executing python function extend\_recipe\_sysroot | NOTE: Direct dependencies are [‘mc:pa5:/opt/yocto/meta/recipes-bsp/gnu-efi/gnu-efi\_3.0.14.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-core/glibc/glibc\_2.35.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-core/util-linux/util-linux\_2.37.4.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-devtools/gcc/gcc-cross\_11.4.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-devtools/gcc/gcc-runtime\_11.4.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-devtools/qemu/qemu-native\_6.2.0.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-devtools/quilt/quilt-native\_0.67.bb:do\_populate\_sysroot’, ‘mc:pa5:/opt/yocto/meta/recipes-support/libcap/libcap\_2.66.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-core/gettext/gettext\_0.21.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/intltool/intltool\_0.51.0.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/meson/meson\_0.61.3.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/ninja/ninja\_1.10.2.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/patch/patch\_2.7.6.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/pkgconfig/pkgconfig\_git.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/pseudo/pseudo\_git.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/python/python3-jinja2\_3.1.1.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-devtools/python/python3\_3.10.13.bb:do\_populate\_sysroot’, ‘mc:pa5:virtual:native:/opt/yocto/meta/recipes-extended/gperf/gperf\_3.1.bb:do\_populate\_sysroot’]  
> | NOTE: Installed into sysroot:   
> | NOTE: Skipping as already exists in sysroot: [‘gnu-efi’, ‘glibc’, ‘util-linux’, ‘gcc-cross-x86\_64’, ‘gcc-runtime’, ‘qemu-native’, ‘quilt-native’, ‘libcap’, ‘gettext-native’, ‘intltool-native’, ‘meson-native’, ‘ninja-native’, ‘patch-native’, ‘pkgconfig-native’, ‘pseudo-native’, ‘python3-jinja2-native’, ‘python3-native’, ‘gperf-native’, ‘libcap-ng’, ‘util-linux-libuuid’, ‘libxcrypt’, ‘bash-completion’, ‘zlib’, ‘opkg-utils’, ‘ncurses’, ‘zlib-native’, ‘gdbm-native’, ‘libffi-native’, ‘xz-native’, ‘openssl-native’, ‘util-linux-libuuid-native’, ‘bzip2-native’, ‘libtool-native’, ‘readline-native’, ‘libtirpc-native’, ‘ncurses-native’, ‘libnsl2-native’, ‘sqlite3-native’, ‘zstd-native’, ‘mpfr-native’, ‘flex-native’, ‘linux-libc-headers’, ‘texinfo-dummy-native’, ‘gmp-native’, ‘binutils-cross-x86\_64’, ‘libmpc-native’, ‘gnu-config-native’, ‘re2c-native’, ‘libxml-parser-perl-native’, ‘gettext-minimal-native’, ‘python3-installer-native’, ‘python3-wheel-native’, ‘python3-markupsafe-native’, ‘python3-setuptools-native’, ‘libgcc’, ‘attr-native’, ‘glib-2.0-native’, ‘perl-native’, ‘m4-native’, ‘expat-native’, ‘unzip-native’, ‘python3-flit-core-native’, ‘util-linux-native’, ‘libpcre-native’, ‘make-native’, ‘cmake-native’, ‘systemd-systemctl-native’, ‘libcap-ng-native’, ‘libpcre2-native’, ‘curl-native’]  
> | DEBUG: Python function extend\_recipe\_sysroot finished  
> | DEBUG: Executing shell function do\_configure  
> | NOTE: Executing meson -Defi=true -Dgnu-efi=true -Defi-includedir=/opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/recipe-sysroot/usr/include/efi -Defi-libdir=/opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/recipe-sysroot/usr/lib -Defi-ld=bfd -Dman=false --cross-file /opt/yocto/build/tmp/work/corei7-64-poky-linux/systemd-boot/250.5-r0/meson-systemd-boot.cross …  
> |  
> | ERROR: Neither directory contains a build file meson.build.  
> | ERROR: meson failed  
> | WARNING: exit code 1 from a shell command.  
> ERROR: Task (mc:pa5:/opt/yocto/meta/recipes-core/systemd/systemd-boot\_250.5.bb:do\_configure) failed with exit code ‘1’

> **bblayers.conf:**
>
> # POKY\_BBLAYERS\_CONF\_VERSION is increased each time build/conf/bblayers.conf  
> # changes incompatibly  
> POKY\_BBLAYERS\_CONF\_VERSION = “2”
> 
> BBPATH = “${TOPDIR}”  
> BBFILES ?= “”
> 
> BBLAYERS ?= "   
> /opt/yocto/meta   
> /opt/yocto/meta-poky   
> /opt/yocto/meta-intel   
> /opt/yocto/meta-mender/meta-mender-core   
> /opt/yocto/meta-openembedded/meta-oe"

> **And a minimal example local.conf (excluding lines unchanged from the default file):**
>
> MACHINE\_FEATURES:remove = “pcbios”  
> MACHINE\_FEATURES:append = " efi"  
> MACHINE\_FEATURES\_NATIVE:append = " efi"  
> EFI\_PROVIDER = “systemd-boot”
> 
> DISTRO\_FEATURES:append = " keyboard nfs smbfs systemd usbhost opengl"
> 
> INIT\_MANAGER = “systemd”
> 
> INHERIT += “mender-full”  
> INHERIT += “mender-image-systemd-boot”  
> ARTIFACTIMG\_FSTYPE = “ext4”  
> MENDER\_SERVER\_URL = “[https://hosted.mender.io](https://hosted.mender.io)”  
> MENDER\_TENANT\_TOKEN = “\*\*\*\*\*”  
> MENDER\_UPDATE\_POLL\_INTERVAL\_SECONDS = “1800”  
> MENDER\_INVENTORY\_POLL\_INTERVAL\_SECONDS = “28800”  
> MENDER\_CONNECT\_USER = “root”  
> MENDER\_FEATURES\_ENABLE:append = " mender-systemd-boot"  
> MENDER\_ARTIFACT\_NAME = “sometest”  
> COPY\_LIC\_MANIFEST = “1”  
> COPY\_LIC\_DIRS = “1”  
> LICENSE\_CREATE\_PACKAGE = “1”  
> INITRD\_IMAGE = “” # i disable the INITRD image here for simplicity, adding a initramfs did not change the behaviour

The code i provide here is a minimal reproducible example, the actual target image is of course a lot more involved, including a custom distro and targeting a Congatec board.

I would appreciate any pointers on this, i am aware the systemd-boot integration is not officially maintained, but also fairly recent and explicitly updated for kirkstone, so i see no reason for it to have broken in this manner.  
I rather suspect either a tiny mistake, or major misconception in my configuration to be the issue

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 15, 2024, 6:07pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/2 "2024-01-15T18:07:25Z")

</div>

Also, i don’t know why the first couple of lines of the first error message are being displayed in bold, sorry about that 😕

---

<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: [January 16, 2024, 4:15pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/3 "2024-01-16T16:15:27Z")

</div>

Hi @adrian,

Had a look at this and I can replicate the situation. However the `systemd-boot` patch has not been updated for `kirkstone` specifically - looking at its history just mentions `honister`. Given the experimental marker, it just didn’t get exercised in the meantime it seems.  
Taking a look at the involved sources, it seems that some parts have changed noticeably, so the patch needs manual forward porting.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 16, 2024, 4:39pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/4 "2024-01-16T16:39:29Z")

</div>

Hi @TheYoctoJester ,

Oh, yeah, looking at the code i see the same thing. I thought it was updated as it was specifically mentioned in [this announcement](https://hub.mender.io/t/meta-mender-kirkstone-branch-released/5249#support-for-systemd-boot-4) for Meta-mender’s kirkstone release.

Do you think the people originally involved in building and porting this will be interested in updating it for kirkstone? I will certainly take a crack at doing it myself, but most of what i know about bootloaders and the intricacies of yocto in general, i have learned in the last few weeks, so i would most likely at least some assistance by someone knowledgeable in the topic.

Given the upcoming release of yocto 5.0 Scarthgap, if now one does this port now, mender-systemd-boot would be two LTS releases behind, if it gets included in meta-menders Scarthgap release at all.

Greetings and thanks for your time  
Martin

---

<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: [January 16, 2024, 5:01pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/5 "2024-01-16T17:01:16Z")

</div>

Hi @Adrian,

Unfortunately I don’t have neither a matching setup nor experience with systemd-boot, otherwise I would offer helping myself. I can try to ping the original author though, maybe he can give a few pointers. Agree that getting it polished for `scarthgap` would be nice!

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 16, 2024, 5:20pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/6 "2024-01-16T17:20:00Z")

</div>

Hi @TheYoctoJester ,

that would be great, thanks. I’ll start looking into this port then, if I get anywhere,  
I’ll submit a PR early to get input.  
Might have to do it on my own time (my employer is fine with me contributing, but this rework needs to get finished sometime soon)

Greetings  
Martin

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 18, 2024, 11:47am UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/7 "2024-01-18T11:47:16Z")

</div>

Alright. the issue turned out to be two-fold:

`meta-mender-core/recipes-core/systemd/systemd-boot_%.bbappend` was adding the patch file to SRC\_URi incorrectly, overwriting the fetch url for systemd-boot’s code.

Secondly, the patch file itself had become incompatible with systemd. Version 249.7 (included in honnister) was working, but 250.5 (included by kirkstone) had seen some major rewrites to systemd-boot. I’m just about ready to submit a PR, but I have some questions regarding procedure I hope you can help me with @TheYoctoJester :

- I built the patch on meta-mender’s `kirkstone` branch for now, as that is what I need for our project. I may run a test build on master, but I don’t think we know which systemd version `scarthgape` will include, so this patch will probably just have to be revisited when mender ports over. For now, should I submit the PR against `kirkstone`, or rebase it onto master and let someone else cherrypick that into kirkstone?
- I adjusted the patch file manually, and while i did update the commit hashes for the `a` files, since I did not regenerate the patch, I don’t have any new hashes for the `b` side, and left those untouched. Is that acceptable?

---

<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: [January 18, 2024, 12:06pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/8 "2024-01-18T12:06:59Z")

</div>

Hi @adrian,

Submitting against `kirkstone` is perfectly fine, and the patch hashes are definitely not a blocker. If things are spotted then we can still regenerate the patches if needed. Given the complexity I guess that the PR will take a bit to review and test anyways, just make sure early that your `signed-off-by` is added properly.

One thing that was brought up last night, is that `systemd-boot` should have A/B support of its own by now. So are you using that one?

Greets,  
Josef

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [January 18, 2024, 12:15pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/9 "2024-01-18T12:15:55Z")

</div>

Hi @TheYoctoJester ,

thanks, will do.  
No, I didn’t know about that. I just updated the existing A/B support patch to work with the newer systemd-version. I’ll take a look at that, but I’m going on holiday next week, so depending on how involved that is, it might have to wait until mid-febuary.

Alternatively, I could submit what i have for now, and I (or someone else with more knowledge of how systemd-boot actually works) could switch over to the native a/b support in a separate PR.

Greetings,  
Martin

---

<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: [January 18, 2024, 12:47pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/10 "2024-01-18T12:47:28Z")

</div>

Hi @adrian,

I personally would try to be resource efficient and open - means, get a draft PR out early for people to see, without spending a lot of energy upfront.

Greets,  
Josef

---

<div class="post-metadata">

### Author: ![skinny](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skinny/32/1606_2.png) [@skinny](https://hub.mender.io/u/skinny)
#### Post date: [May 30, 2024, 9:36pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/11 "2024-05-30T21:36:14Z")

</div>

@adrian did you manage to get this to work and/or is there a PR available ? I’m trying to get systemd-boot integrated into our build but running into the same issue regarding the patch being obsolete for the current systemd version(s)

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [May 31, 2024, 12:32pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/12 "2024-05-31T12:32:32Z")

</div>

Hi @skinny

i got as far as a buildable version that did boot successfully, but when i performed a mender upgrade, it failed to switch between the A and B partitions (it would think it did, but would not switch over properly). We had some other projects that took priority, and i have since moved away from using systemd-boot and switched back to grub, but i could look into cleaning up what i have and push it to the PR, that might save you some work.

Greetings,  
Martin

---

<div class="post-metadata">

### Author: ![skinny](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/skinny/32/1606_2.png) [@skinny](https://hub.mender.io/u/skinny)
#### Post date: [May 31, 2024, 12:42pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/13 "2024-05-31T12:42:45Z")

</div>

I’m in the same boat and on the crossroads of deciding whether to pursuit systemd-boot or stick with grub for now. Project pressure indeed is a major factor and might keep with with grub for now as there is no “proven” solution yet. However I’d really like to take a look at your work on a new version of the patch and maybe find some time to fiddle with it.

Regards,  
Mark

---

<div class="post-metadata">

### Author: ![adrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/adrian/32/2688_2.png) [@adrian](https://hub.mender.io/u/adrian)
#### Post date: [May 31, 2024, 2:59pm UTC](https://hub.mender.io/t/building-image-with-mender-systemd-boot-fails-at-patching-systemd-boot/6477/14 "2024-05-31T14:59:08Z")

</div>

Hey Mark,

i packed the changes i made into a temporary commit and pushed them to my fork [here](https://github.com/AdrianDeWinter/meta-mender/tree/kirkstone). I did the work before Scarthgap came out, so it’s based on kirkstone and the patch file ([meta-mender-core/recipes-core/systemd/files/systemd-boot-slotconfig.patch](https://github.com/AdrianDeWinter/meta-mender/blob/kirkstone/meta-mender-core/recipes-core/systemd/files/systemd-boot-slotconfig.patch)) is updated for the systemd version included in that (250.5 i think).

There is no PR open on the mender side right now, i’ll leave it up to you whether we do that from my fork, or you can fork from upstream and grab my changes.

I would suggest completing the update for kirkstone and getting that merged (so any kirkstone users can also benefit from it), and then moving to scarthgap from there

Greetings  
Martin
