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 # Enable spidev node
dtparam=spi=on dtparam=spi=on

View File

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

View File

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