فهرست منبع

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 <adam.duskett@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Adam Duskett 5 ماه پیش
والد
کامیت
14a7e99b6d
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      board/mender/x86_64/post-build.sh

+ 1 - 1
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 "${@}"