Browse Source

Merge pull request #320 from lluiscampos/MEN-4117-headless-configuration-rpi-service-files

MEN-4117: Support headless configuration on Raspberry Pi
2.4.x
Lluis Campos 4 years ago
committed by GitHub
parent
commit
870590643e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      configs/raspberrypi_config
  2. 2
      docker-mender-convert

7
configs/raspberrypi_config

@ -91,6 +91,13 @@ function platform_modify() {
run_and_log_cmd "sudo ln -fs /uboot/overlays work/rootfs/boot/overlays"
run_and_log_cmd "sudo ln -fs /uboot/$CMDLINE work/rootfs/boot/$CMDLINE"
# Raspberry Pi headless configuration expects boot partition to be mounted
# at /boot, so replace these services with /uboot
run_and_log_cmd "find work/rootfs/lib/ -type f -name *.service | xargs sed -i.bak 's|/boot/|/uboot/|g'"
log_debug "Diff from modified service files:\n$(find work/rootfs/lib/ -type f -name '*.service' | xargs -I@ bash -c 'diff -u @.bak @')"
run_and_log_cmd "find work/rootfs/lib/ -type f -name *.service.bak | xargs rm"
log_info "Certain service files have been changed to align with our /uboot boot partition mount point. See convert.log for more information"
run_and_log_cmd "sudo install -m 755 work/rpi/binaries/fw_printenv work/rootfs/sbin/fw_printenv"
run_and_log_cmd "sudo ln -fs /sbin/fw_printenv work/rootfs/sbin/fw_setenv"

2
docker-mender-convert

@ -45,3 +45,5 @@ docker run \
$IMAGE_NAME "$@"
[ $? -eq 0 ] && rmdir ${WORK_DIR}
echo "Log file available at: logs/${LOG_FILE}"

Loading…
Cancel
Save