Hello,
I’m using Yocto to create a custom image for an x86-64 embedded system. The image is working fine and Mender too. However, I’m having trouble adding state scripts to the artifact.
I use the following recipes in a custom layer:
recipes-mender
├── hello-mender
│ └── hello-mender.bb
├── mender-client
│ ├── files
│ │ ├── artifact-verify-key.pem
│ │ └── private.key
│ └── mender_%.bbappend
└── state-scripts
├── files
│ ├── ArtifactCommit_Enter_00.sh
│ └── LICENSE
└── state-scripts_1.0.bb
The recipe state-scripts_1.0.bb is not adding the ArtifactCommit_Enter scripts in the mender artifact after the generation. The script is copied from the examples you provide in the demo layer:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "file://ArtifactCommit_Enter_00.sh;subdir=${PN}-${PV} \
file://LICENSE;subdir=${PN}-${PV} \
"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
inherit mender-state-scripts
do_compile() {
install -m 755 ${DEV}../scripts/* ${MENDER_STATE_SCRIPTS_DIR}
cp ArtifactCommit_Enter_00.sh ${MENDER_STATE_SCRIPTS_DIR}/ArtifactCommit_Enter_00.sh
}
When I read the content of the artifact, the script is not appearing:
Mender artifact:
Name: release-1.0.0
Format: mender
Version: 3
Signature: no signature
Compatible devices: '[up-squared]'
Provides group:
Depends on one of artifact(s): []
Depends on one of group(s): []
State scripts:
Updates:
0:
Type: rootfs-image
All other recipes work normally. Does someone have an idea ? Thanks.