From 14a7e99b6deb373739aeb97f38f962bf10d28c6b Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Tue, 25 Feb 2025 11:09:11 +0100 Subject: [PATCH] board/mender/x86_64/post-build.sh: fix device_type location Currently, the post-build.sh script adds device_type to /var/lib/mender, however, this doesn't work for two reasons: 1) /data/ mounts to /var/lib/mender 2) The device_type location in mender.conf points to /etc/mender/device_type. This leads to an error during the bootstrap process because mender reads the default device_type file installed by mender.mk in /etc/mender, leading to the following error: ``` Error while handling bootstrap Artifact, continuing: invalid bootstrap Artifact: readHeaderV3: handleHeaderReads: image (device types [buildroot-x86_64]) not compatible with device BUILDROOT_DEVICE ``` Set the creation of the device_type file in board/mender/x86_64/post-build.sh to /etc/mender/device_type to fix the error. Signed-off-by: Adam Duskett Signed-off-by: Julien Olivain --- board/mender/x86_64/post-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/mender/x86_64/post-build.sh b/board/mender/x86_64/post-build.sh index 5e6967ebd1..9e909e9281 100755 --- a/board/mender/x86_64/post-build.sh +++ b/board/mender/x86_64/post-build.sh @@ -42,7 +42,7 @@ mender_fixup() { main() { parse_args "${@}" mender_fixup - echo "device_type=${DEVICE_TYPE}" > "${TARGET_DIR}/var/lib/mender/device_type" + echo "device_type=${DEVICE_TYPE}" > "${TARGET_DIR}/etc/mender/device_type" } main "${@}"