[Buildroot] [PATCH 5/8] board/raspberrypi: post-image --file option
Robert J. Heywood
robert.heywood at codethink.co.uk
Tue Jan 29 13:23:06 UTC 2019
Add a mechanism for adding files to the boot partition.
Usage: --file=example.txt
Signed-off-by: Robert J. Heywood <robert.heywood at codethink.co.uk>
---
board/raspberrypi/post-image.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index c082dada3c..7e39399187 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -55,6 +55,9 @@ __EOF__
gpu_mem="${arg:2}"
sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt"
;;
+ --file=*)
+ FILES+=("${arg:7}")
+ ;;
esac
done
@@ -81,7 +84,7 @@ fi
for i in ${!FILES[*]}
do
- FILES[$i]="\"${FILES[$i]}\","
+ FILES[$i]=$(echo "\"${FILES[$i]}\"," | sed -e 's/[\/&]/\\&/g')
done
SEDCMD_BOOTFILES=" -e 's/{BOOT_FILES}/${FILES[*]}/' "
--
2.11.0
More information about the buildroot
mailing list