Skip to content

Commit

Permalink
provisioner: Use helper functions instead of paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewey-rpi committed Aug 13, 2024
1 parent 88da441 commit 9b9962e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions device-provisioner/provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ case ${RPI_DEVICE_FAMILY} in
;;
esac

cp /var/lib/rpi-sb-provisioner/fastboot-gadget.img "${RPI_SB_WORKDIR}"/boot.img
cp "$(get_fastboot_gadget)" "${RPI_SB_WORKDIR}"/boot.img

cp /var/lib/rpi-sb-provisioner/boot_ramdisk_config.txt "${RPI_SB_WORKDIR}"/config.txt
cp "$(get_fastboot_config_file)" "${RPI_SB_WORKDIR}"/config.txt

#boot.sig generation
sha256sum "${RPI_SB_WORKDIR}"/boot.img | awk '{print $1}' > "${RPI_SB_WORKDIR}"/boot.sig
Expand Down Expand Up @@ -295,8 +295,8 @@ if [[ -z $(check_file_is_expected "${RPI_SB_WORKDIR}"/bootfs-temporary.img "img"
# We supply a pre-baked Raspberry Pi Pre-boot-authentication initramfs, which we insert here.
# This image is maintained by Raspberry Pi, with sources available on our GitHub pages.
announce_start "Insert pre-boot authentication initramfs"
cp /var/lib/rpi-sb-provisioner/cryptroot_initramfs "${TMP_DIR}"/rpi-boot-img-mount/initramfs8
cp /var/lib/rpi-sb-provisioner/cryptroot_initramfs "${TMP_DIR}"/rpi-boot-img-mount/initramfs_2712
cp "$(get_cryptroot)" "${TMP_DIR}"/rpi-boot-img-mount/initramfs8
cp "$(get_cryptroot)" "${TMP_DIR}"/rpi-boot-img-mount/initramfs_2712
announce_stop "Insert pre-boot authentication initramfs"

announce_start "Initramfs modification"
Expand Down

0 comments on commit 9b9962e

Please sign in to comment.