Skip to content

Commit

Permalink
raspberrypi: use MACHINE variable
Browse files Browse the repository at this point in the history
Instead of hard-coding RaspberryPi4, use a MACHINE variable
in the update bundle and system.conf to support builds of
other RPi platforms and avoiding a mismatch of configs.

Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
  • Loading branch information
dwalkes authored and leon-anavi committed Apr 3, 2024
1 parent 4409a8c commit b9b5823
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DESCRIPTION = "RAUC bundle generator"

inherit bundle

RAUC_BUNDLE_COMPATIBLE = "RaspberryPi4"
RAUC_BUNDLE_COMPATIBLE = "${MACHINE}"
RAUC_BUNDLE_VERSION = "v20200703"
RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle"

Expand Down
2 changes: 1 addition & 1 deletion meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[system]
compatible=RaspberryPi4
compatible=@@MACHINE@@
bootloader=uboot
data-directory=/data/

Expand Down
4 changes: 4 additions & 0 deletions meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ PACKAGES += "rauc-grow-data-part"

RDEPENDS:${PN}-grow-data-part += "parted"

do_install:prepend() {
sed -i "s|@@MACHINE@@|${MACHINE}|g" ${WORKDIR}/system.conf
}

do_install:append() {
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/rauc-grow-data-partition.service ${D}${systemd_unitdir}/system/
Expand Down

0 comments on commit b9b5823

Please sign in to comment.