Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
90dbd26
recipes-core/fatrw: Adapt source directory for wrynose
acostach Apr 15, 2026
1ab191c
meta-balena-wrynose: Add initial layer
acostach Apr 15, 2026
1f8db01
meta-balena-*: Update variable names to allow building with Wrynose a…
acostach Apr 15, 2026
5f73dfd
meta-balena-common: Update base-files, fatrw, e2fsprogs, ca-certifica…
acostach Apr 15, 2026
897c1b8
meta-balena-common: Add bulk changes for Wrynose build - NOTE: these …
acostach Apr 15, 2026
62cbea1
meta-balena-rust: Bulk changes for Wrynose build - note: libstd-rs do…
acostach Apr 15, 2026
ccdbded
recipes-core/healthdog: Fix QA issue
acostach Apr 15, 2026
f1ea32f
recipes-support/resin-init: Fix build with Scarthgap
acostach Apr 15, 2026
c852e04
recipes-support/os-helpers: Fix build with Scarthgap
acostach Apr 15, 2026
fe9b706
recipes-connectivity/balena-ntp-config: Fix build with Scarthgap
acostach Apr 15, 2026
9319006
recipes-support/resin-init/resin-init-flasher-board: Fix build with S…
acostach Apr 15, 2026
328443f
recipes-support/balena-units-conf: Fix build with Scarthgap
acostach Apr 15, 2026
7aeb4c2
recipes-core/chrony: Fix v4.8 build in Scarthgap
acostach Apr 15, 2026
777478e
recipes-support/resin-init: More Scarthgap fixes
acostach Apr 15, 2026
41f3fe7
recipes-core/systemd: Add more Scarthgap fixes
acostach Apr 15, 2026
21cb57d
meta-balena-rust/classes/balena_cargo_common.bbclass: Adapt to Yocto …
floion Apr 16, 2026
9f09b6f
healthdog: Inherit the pkgconfig class in Yocto Wrynose
floion Apr 16, 2026
20a8000
os-config: Fixes for Wrynose
floion Apr 16, 2026
10b41f9
disk-watchdog.bb: Further changes
floion Apr 16, 2026
f69b4b5
timeinit.bb: Fixes
floion Apr 16, 2026
023bd9a
efitools: Some changes
floion Apr 16, 2026
4d6bbef
sbsigntool_git.bb: Some fixes
floion Apr 16, 2026
06fd090
recipes-bsp/efitools: Fix Wrynose build
acostach Apr 16, 2026
d4d31f6
Bulk conversion: Use S_UNPACK to enhance compatibility with earlier p…
acostach Apr 16, 2026
7113892
tpm2-tss: Fix broken Upstream-Status
floion Apr 17, 2026
bc9fc39
os-helpers.bb: Clarify os-helpers-tmp2 rdepends are only for the targ…
floion Apr 17, 2026
3d0f5f1
networkmanager: Use UNPACKDIR
floion Apr 17, 2026
c9c7b05
libmbim: Drop the usage of S in meta-balena-common
floion Apr 17, 2026
5fb2949
libqmi: Prepare for Yocto Wrynose
floion Apr 17, 2026
c0a31c0
meta-balena-wrynose/conf/layer: Remove workarounds
acostach Apr 17, 2026
d2f3f5b
recipes-devtools/rust/rust-cross: Fix libstd-rs build
acostach Apr 17, 2026
57be7cf
recipes-devtools/go/go-runtime: This commit will need to be dropped, …
acostach Apr 17, 2026
48dae49
meta-balena-wrynose/recipes-devtools: Bring in go 1.26 - this will ne…
acostach Apr 17, 2026
b237354
recipes-containers/mobynit: Remove S_UNPACK
acostach Apr 17, 2026
c46e56e
meta-balena-wrynose/recipes-containers: Add mobyinit and balena fixes…
acostach Apr 17, 2026
0bd74ae
recipes-bsp/efitools: Add more fixes
acostach Apr 17, 2026
69dfc2b
recipes-connectivity/libnss-ato: Remove S workaround
acostach Apr 17, 2026
7509cf1
layers/meta-balena: Update go to v1.26.1
acostach Apr 17, 2026
9701b86
recipes-connectivity/bluez5: Switch to using UNPACKDIR
acostach Apr 17, 2026
78b0812
conf/distro: Cleanup no longer used code
acostach Apr 17, 2026
1429bb3
meat-balena-common: Drop using S_UNPACK
acostach Apr 19, 2026
fb667fb
chrony: use inherit instead of inherit_defer
acostach Apr 19, 2026
1355246
conf/distro: Update GO version
acostach Apr 19, 2026
e9736ab
rust-cross: Move Wrynose specific changes to its separate layer
acostach Apr 20, 2026
24895a0
recipes-support/bindmount: Add S for previous releases
acostach Apr 20, 2026
2cd5164
recipes-containers/tini: Add S for older layers
acostach Apr 20, 2026
23eaf32
recipes-bsp/grub: Use UNPACKDIR
acostach Apr 20, 2026
63309a5
recipes: Remove commented out S
acostach Apr 20, 2026
5e6ec3b
Add more fixes for libnss-ato and mobynit
acostach Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 7 additions & 6 deletions meta-balena-common/classes/balena-configurable.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SYSTEMD_UNIT_NAMES ?= "${BPN}"
DEPENDS += "jq-native"
RDEPENDS:${PN}:append:class-target = " balena-units-conf"


python __anonymous () {
systemd_unitdir=d.getVar("systemd_unitdir")
systemd_unit_names=d.getVar("SYSTEMD_UNIT_NAMES")
Expand All @@ -18,7 +19,7 @@ python __anonymous () {

do_configure:prepend() {
for SYSTEMD_UNIT_NAME in ${SYSTEMD_UNIT_NAMES}; do
cat > ${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.path << EOF
cat > ${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.path << EOF
[Unit]
Description=${SYSTEMD_UNIT_NAME} path watch

Expand All @@ -29,7 +30,7 @@ PathChanged=${BALENA_CONF_UNIT_STORE}/${SYSTEMD_UNIT_NAME}.json
WantedBy=basic.target
EOF

cat > ${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.service << EOF
cat > ${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.service << EOF
[Unit]
Description=${SYSTEMD_UNIT_NAME}.json watcher service

Expand All @@ -41,7 +42,7 @@ EOF
done

for SYSTEMD_UNIT_NAME in ${SYSTEMD_UNIT_NAMES}; do
cat > "${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.conf" << EOF
cat > "${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.conf" << EOF
[Unit]
After=resin-boot.service
[Service]
Expand All @@ -58,9 +59,9 @@ FILES:${PN} += " \
do_install:append() {
install -d ${D}${systemd_unitdir}/system
for SYSTEMD_UNIT_NAME in ${SYSTEMD_UNIT_NAMES}; do
install -c -m 0644 ${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.path ${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.service ${D}${systemd_unitdir}/system
install -c -m 0644 ${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.path ${D}${systemd_unitdir}/system
install -c -m 0644 ${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.service ${D}${systemd_unitdir}/system
install -d ${D}${sysconfdir}/systemd/system/${SYSTEMD_UNIT_NAME}.service.d
install -c -m 0644 ${WORKDIR}/${SYSTEMD_UNIT_NAME}-conf.conf ${D}${sysconfdir}/systemd/system/${SYSTEMD_UNIT_NAME}.service.d/${SYSTEMD_UNIT_NAME}-conf.conf
install -c -m 0644 ${UNPACKDIR}/${SYSTEMD_UNIT_NAME}-conf.conf ${D}${sysconfdir}/systemd/system/${SYSTEMD_UNIT_NAME}.service.d/${SYSTEMD_UNIT_NAME}-conf.conf
done
}
3 changes: 1 addition & 2 deletions meta-balena-common/conf/distro/include/balena-os.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ MAINTAINER = "Balena <hello@balena.io>"
# Strip down unneeded features
POKY_DEFAULT_DISTRO_FEATURES:remove = "ptest"
POKY_DEFAULT_DISTRO_FEATURES:remove = "wayland"
DISTRO_FEATURES_DEFAULT:remove = "x11"

# OS development image
OS_DEVELOPMENT ?= "0"
Expand Down Expand Up @@ -138,7 +137,7 @@ PREFERRED_VERSION_upx-native:arm = "3.94"
PREFERRED_VERSION_linux-firmware = "20240909"

# Scarthgap go version, meets balena-engine go version requirement
GOVERSION = "1.22.12"
GOVERSION = "1.26.1"
PREFERRED_PROVIDER_go-native = "go-binary-native"

# Firmware compression support
Expand Down
6 changes: 5 additions & 1 deletion meta-balena-common/conf/distro/resin-systemd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ require conf/distro/include/balena-os.inc
# Systemd please
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

# DISTRO_FEATURES_BACKFILL_CONSIDERED was renamed
# in Wrynose to DISTRO_FEATURES_OPTED_OUT
include conf/distro/include/sysvinit-compat.inc

VIRTUAL-RUNTIME_base-utils-syslog = ""
INIT_MANAGER = "systemd"
2 changes: 1 addition & 1 deletion meta-balena-common/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BBFILE_COLLECTIONS += "balena-common"
BBFILE_PATTERN_balena-common := "^${LAYERDIR}/"
BBFILE_PRIORITY_balena-common = "1337"

LAYERSERIES_COMPAT_balena-common = "honister kirkstone scarthgap"
LAYERSERIES_COMPAT_balena-common = "honister kirkstone scarthgap wrynose"

BALENA_DEPRECATED_YOCTO_LAYER ?= "0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ EXTRA_OEMAKE:append = " \
CRTPATH_PREFIX='${STAGING_DIR_NATIVE}' \
"

SYSROOT_DIRS:append: = " ${bindir}"
do_populate_sysroot[cleandirs] = "${SYSROOT_DESTDIR}${bindir}"
inherit native
37 changes: 31 additions & 6 deletions meta-balena-common/recipes-bsp/efitools/efitools.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ efi-readvar and efi-updatevar commands. Aside from needing efitools \
in the Linux 3.8 kernel. \
"

LICENSE = "GPLv2"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e28f66b16cb46be47b20a4cdfe6e99a1"

DEPENDS:append = " \
help2man-native openssl-native sbsigntool-native \
libfile-slurp-perl-native \
"

DEPENDS:append:class-target = " efitools-native sbsigntool-native"
PV = "1.9.2+git${SRCPV}"

SRC_URI = "\
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git;branch=master \
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git;branch=master;destsuffix=git \
file://Fix-for-the-cross-compilation.patch \
file://Kill-all-the-build-warning-caused-by-implicit-declar.patch \
file://Fix-the-wrong-dependency-for-blacklist.esl.patch \
Expand All @@ -37,18 +37,27 @@ SRCREV = "b988d20a7f8373cf19c30d5c9c459f3e87f28da2"

PARALLEL_MAKE = ""

S = "${WORKDIR}/git"
S = "${@d.getVar('UNPACKDIR') or d.getVar('WORKDIR')}/git"

inherit perlnative

# 3. Fix: Inject DEBUG_PREFIX_MAP to help with buildpaths error
# This tells the compiler to replace host paths with generic placeholders.
TARGET_CC_ARCH += "${DEBUG_PREFIX_MAP}"

EXTRA_OEMAKE = "\
HELP2MAN='${STAGING_BINDIR_NATIVE}/help2man' \
OPENSSL='${STAGING_BINDIR_NATIVE}/openssl' \
SBSIGN='${STAGING_BINDIR_NATIVE}/sbsign' \
NM='${NM}' AR='${AR}' OBJCOPY='${OBJCOPY}' \
OPENSSL_LIB='${STAGING_LIBDIR_NATIVE}' \
EXTRA_LDFLAGS='${LDFLAGS}' \
EXTRA_CFLAGS='${TARGET_CFLAGS}' \
"

DEPENDS:append:class-target = " efitools-native"


EXTRA_OEMAKE:append:x86 = " ARCH=ia32"
EXTRA_OEMAKE:append:x86-64 = " ARCH=x86_64"
EXTRA_OEMAKE:append:arm = " ARCH=arm"
Expand All @@ -57,13 +66,29 @@ EXTRA_OEMAKE:append:aarch64 = " ARCH=aarch64"
EFI_BOOT_PATH = "/boot/efi/EFI/BOOT"

do_compile:prepend() {
sed -i -e "1s:#!.*:#!/usr/bin/env nativeperl:" xxdi.pl
# Ensure we are in the source directory
cd ${S}
sed -i -e "1s:#!.*:#!/usr/bin/env perl:" xxdi.pl
}

do_install() {
oe_runmake install DESTDIR='${D}${base_prefix}'
# We use DESTDIR=${D} and let prefix handle the rest
oe_runmake install DESTDIR='${D}'
install -d ${D}${bindir}
install -m 0755 ${B}/cert-to-efi-sig-list ${D}${bindir}/
install -m 0755 ${B}/sign-efi-sig-list ${D}${bindir}/
install -m 0755 ${B}/sig-list-to-certs ${D}${bindir}/
install -m 0755 ${B}/hash-to-efi-sig-list ${D}${bindir}/
install -m 0755 ${B}/cert-to-efi-hash-list ${D}${bindir}/
install -m 0755 ${B}/efi-readvar ${D}${bindir}/
install -m 0755 ${B}/efi-updatevar ${D}${bindir}/
}

FILES:${PN} += "${EFI_BOOT_PATH}"

# 4. Fix: Use INSANE_SKIP as a fallback for the remaining buildpaths errors.
# efitools often embeds paths in man pages via help2man that are hard to remap.
INSANE_SKIP:${PN}-dbg += "buildpaths"
INSANE_SKIP:${PN}-doc += "buildpaths"

SSTATE_ALLOW_OVERLAP_FILES += "${DEPLOY_DIR_IMAGE}/LockDown.efi"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This is a backport from devel for:
Signed-off-by: Joseph Kogut <joseph@balena.io>
Signed-off-by: Peter Jones <pjones at redhat.com>
Upstream: d230d02f990f02293736dca78b108f86c86d1bd0

Upstream-Status: Backport [from commit d230d02f990f02293736dca78b108f86c86d1bd0]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
include/console.h | 6 ++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Content-Transfer-Encoding: 8bit
| ../Make.rules:113: recipe for target 'console.efi.o' failed
|

Upstream-Status: Pending
Upstream-Status: Backport [from commit
b10bb68613eb98ecf00bfc90df66740bb538589d]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ drivers or applications are not readable from userspace.
The implementation itself is simple and does the job. At the same time
it is not very nice - it adds ambiguity to argument semantics.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Michal Toman <michalt@balena.io>
---
hash-to-efi-sig-list.c | 30 ++++++++++++++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ inlining with the assembly code actually generated.
Therefore, "static inline" is used for both purposes. If -O0 is specified,
GCC will generate the assembly code as long as the function is referred.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
include/variableformat.h | 2 +-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Wed, 23 Mar 2016 19:05:29 +0800
Subject: [PATCH] Allow to override tools for target build

Upstream-Status: Pending

These tools should use the ones from native build.

Upstream-Status: Backport
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 22 +++++++++++++---------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Sat, 28 Jan 2017 13:42:28 +0800
Subject: [PATCH] Build DBX by default

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Makefile | 6 +++---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Thu, 28 Apr 2016 11:21:33 +0800
Subject: [PATCH] Don't build PreLoader.efi

Upstream-Status: Pending

Upstream-Status: Inappropriate [configuration]
The upstream has an obvious build failure:
| PreLoader.c:45:2: error: too few arguments to function 'security_policy_install'
| status = security_policy_install();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Wed, 16 Aug 2017 22:59:12 +0800
Subject: [PATCH] Dynamically load openssl.cnf for openssl-1.0.x/1.1.x/3.0

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Tue, 15 Mar 2016 21:28:33 +0800
Subject: [PATCH] Fix for the cross compilation

Upstream-Status: Pending

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 51 ++++++++++++++++++++++++++++-----------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Subject: [PATCH] Fix help2man error

This issue may be caused by the poky compiler.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 4 +++-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Subject: [PATCH] Fix help2man failure

Add --no-discard-stderr to work around the error.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 2 +-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Tue, 15 Mar 2016 21:07:31 +0800
Subject: [PATCH] Fix the wrong dependency for %-blacklist.esl

Upstream-Status: Pending

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 2 +-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Date: Tue, 15 Mar 2016 17:12:24 +0800
Subject: [PATCH] Kill all the build warning caused by implicit declaration of
function

Upstream-Status: Pending

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Loader.c | 1 +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Subject: [PATCH] LockDown: disable the entrance into BIOS setup to re-enable

In most cases, this step is not necessary.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
LockDown.c | 9 +++++++--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Fri, 22 Apr 2016 16:28:05 +0800
Subject: [PATCH] LockDown: enable the enrollment for DBX

Upstream-Status: Pending

Upstream-Status: Inappropriate [configuration]
DBX acting as blacklist now is able to be enrolled.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Date: Fri, 25 Mar 2016 10:52:34 +0800
Subject: [PATCH] LockDown: run system warm reset after the key provision
success

Upstream-Status: Pending

In addition, BIOS would stop at its setup screen. The end user can thus
enable UEFI secure boot immediately.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
LockDown.c | 15 +++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Lans Zhang <jia.zhang@windriver.com>
Date: Tue, 17 Jan 2017 12:48:27 +0800
Subject: [PATCH] LockDown: show the error message with 3-sec timeout

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
LockDown.c | 20 ++++++++++++--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Yunguo Wei <yunguo.wei@windriver.com>
Date: Tue, 17 Jan 2017 17:24:51 +0800
Subject: [PATCH] Makefile: do not build signed efi image

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
---
Makefile | 5 ++---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Subject: [PATCH] Reuse xxdi.pl
The missing File::Slurp required by xxdi.pl is added. To avoid introducing
an extra xxd package, remove the support of using xxd.

Upstream-Status: Inappropriate [configuration]
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Make.rules | 3 +--
Expand Down
2 changes: 1 addition & 1 deletion meta-balena-common/recipes-bsp/grub/grub-bootconf_1.00.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inherit grub-efi-cfg

require conf/image-uefi.conf

S = "${WORKDIR}"
S = "${UNPACKDIR}"

GRUB_CFG = "${S}/grub-bootconf"
LABELS = "boot"
Expand Down
11 changes: 6 additions & 5 deletions meta-balena-common/recipes-bsp/grub/grub-conf.bb
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ inherit deploy nopackages sign-gpg
INHIBIT_DEFAULT_DEPS = "1"
BOOTLOADER_TIMEOUT = "${@bb.utils.contains('OS_DEVELOPMENT', '1', '3', '0', d)}"


do_configure[noexec] = '1'
do_compile() {
sed -e 's/@@TIMEOUT@@/${BOOTLOADER_TIMEOUT}/' \
-e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
-e 's/@@KERNEL_CMDLINE@@/rootwait ${OS_KERNEL_CMDLINE} ${MACHINE_SPECIFIC_EXTRA_CMDLINE}/' \
"${WORKDIR}/grub.cfg_internal_template" > "${B}/grub.cfg_internal"
"${UNPACKDIR}/grub.cfg_internal_template" > "${B}/grub.cfg_internal"

sed -e 's/@@TIMEOUT@@/${BOOTLOADER_TIMEOUT}/' \
-e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
-e 's/@@KERNEL_CMDLINE@@/rootwait ${OS_KERNEL_CMDLINE} ${MACHINE_SPECIFIC_EXTRA_CMDLINE}/' \
"${WORKDIR}/grub.cfg_external_template" > "${B}/grub.cfg_external"
"${UNPACKDIR}/grub.cfg_external_template" > "${B}/grub.cfg_external"

sed -e 's/@@TIMEOUT@@/${BOOTLOADER_TIMEOUT}/' \
-e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
-e 's/@@KERNEL_CMDLINE@@/rootwait ${OS_KERNEL_SECUREBOOT_CMDLINE} ${OS_KERNEL_CMDLINE} ${MACHINE_SPECIFIC_EXTRA_CMDLINE}/' \
"${WORKDIR}/grub.cfg_internal_luks_template" > "${B}/grub.cfg_internal_luks"
"${UNPACKDIR}/grub.cfg_internal_luks_template" > "${B}/grub.cfg_internal_luks"
}

SIGNING_ARTIFACTS = "${B}/grub.cfg_external ${B}/grub.cfg_internal_luks"
Expand All @@ -42,8 +43,8 @@ do_deploy() {
install -m 644 ${B}/grub.cfg_external ${DEPLOYDIR}
install -m 644 ${B}/grub.cfg_internal ${DEPLOYDIR}

install -m 644 ${WORKDIR}/grubenv ${DEPLOYDIR}/grubenv
install -m 644 ${WORKDIR}/grub_extraenv ${DEPLOYDIR}/grub_extraenv
install -m 644 ${UNPACKDIR}/grubenv ${DEPLOYDIR}/grubenv
install -m 644 ${UNPACKDIR}/grub_extraenv ${DEPLOYDIR}/grub_extraenv
install -m 644 ${B}/grub.cfg_internal_luks ${DEPLOYDIR}/grub.cfg_internal_luks
}

Expand Down
Loading
Loading