Add condition in post script, fixed FAT offset.

This commit is contained in:
imi415 2021-06-21 01:38:19 +08:00
parent 757618595b
commit 70ce2f1053
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
3 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# CUSTOM_CONFIG DO NOT EDIT THIS LINE
# Enable spidev node
dtparam=spi=on

View File

@ -21,7 +21,7 @@ image sdcard.img {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
offset = 4K
offset = 4M
}
partition rootfs {

View File

@ -42,8 +42,10 @@ __EOF__
done
if [[ -f "${CONFIG_TEMPLATE}" ]]; then
echo "Config template file exists, append to config.txt"
cat "${CONFIG_TEMPLATE}" >> "${BINARIES_DIR}/rpi-firmware/config.txt"
if ! grep -qE '^# CUSTOM_CONFIG' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
echo "Config template file exists, append to config.txt"
cat "${CONFIG_TEMPLATE}" >> "${BINARIES_DIR}/rpi-firmware/config.txt"
fi
fi
# Pass an empty rootpath. genimage makes a full copy of the given rootpath to