diff --git a/board/myna-player-odyssey/scripts/rootfs_postbuild.sh b/board/myna-player-odyssey/scripts/rootfs_postbuild.sh index 50a5be6..ec92637 100755 --- a/board/myna-player-odyssey/scripts/rootfs_postbuild.sh +++ b/board/myna-player-odyssey/scripts/rootfs_postbuild.sh @@ -4,9 +4,6 @@ set -e -# set up rauc certificate links - -"${BR2_EXTERNAL_MynaPlayer_PATH}"/scripts/rauc_fixups.sh . "${BR2_EXTERNAL_MynaPlayer_PATH}"/scripts/certs.sh # copy machine-id into the target diff --git a/external.mk b/external.mk index 7822e24..8ee8019 100644 --- a/external.mk +++ b/external.mk @@ -8,3 +8,8 @@ pre-clean: rm -rf $(MAGIC_PLACE) rm -rf $(KERNEL_PLACE) + +rauc-fixups: + $(BR2_EXTERNAL_MynaPlayer_PATH)/scripts/rauc_fixups.sh + +world: rauc-fixups diff --git a/scripts/rauc_fixups.sh b/scripts/rauc_fixups.sh index 87da29f..0f1c639 100755 --- a/scripts/rauc_fixups.sh +++ b/scripts/rauc_fixups.sh @@ -6,15 +6,14 @@ . "${BR2_EXTERNAL_MynaPlayer_PATH}"/scripts/certs.sh -# creating directory to store symlinks in +# creating a clean directory to store copies of files in -mkdir -p "${BR2_EXTERNAL_MynaPlayer_PATH}"/certs +CERTS_DIR="${BR2_EXTERNAL_MynaPlayer_PATH}"/certs +test -d "${CERTS_DIR}" && rm -r "${CERTS_DIR}" +mkdir -p "${CERTS_DIR}" -# lets create the appropriate symlinks to use later with genimage as well as in rootfs_postbuild.sh +# lets copy the appropriate files to use later with genimage as well as in rootfs_postbuild.sh -ln -sf "${RAUC_CERTIFICATE_AUTHORITY}" \ - "${BR2_EXTERNAL_MynaPlayer_PATH}"/certs/keyring.pem -ln -sf "${RAUC_PRIVATE_KEY}" \ - "${BR2_EXTERNAL_MynaPlayer_PATH}"/certs/signing.key -ln -sf "${RAUC_PUBLIC_KEY}" \ - "${BR2_EXTERNAL_MynaPlayer_PATH}"/certs/signing.crt +cp "${RAUC_CERTIFICATE_AUTHORITY}" "${CERTS_DIR}"/keyring.pem +cp "${RAUC_PRIVATE_KEY}" "${CERTS_DIR}"/signing.key +cp "${RAUC_PUBLIC_KEY}" "${CERTS_DIR}"/signing.crt