diff --git a/VERSION b/VERSION index c9731ff..1f1cd63 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.24.7 +0.24.8 diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..7fc94df --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +export SCRIPT_NAME=`realpath "$0"` +export SCRIPT_DIR=`dirname "$SCRIPT_NAME"` + +make -C "$SCRIPT_DIR" sync-packages + diff --git a/fwup.conf b/fwup.conf index 359e113..d04fbdf 100644 --- a/fwup.conf +++ b/fwup.conf @@ -28,12 +28,16 @@ define(OLD_NERVES_FW_PARTITION_SCHEME, "141MB root") define(NERVES_PROVISIONING, "${NERVES_SYSTEM}/images/fwup_include/provisioning.conf") # Allow override of cmdline.txt and config.txt -define(CONFIG_TXT_NAME,${CONFIG_TXT:-config.txt}) -define(CMDLINE_TXT_NAME,${CMDLINE_TXT:-cmdline.txt}) +define(CONFIG_TXT, "${NERVES_SYSTEM}/images/config.txt" ) +define(CMDLINE_TXT, "${NERVES_SYSTEM}/images/cmdline.txt") +define(BOOT_EXTRAS_DEFINE,"${NERVES_SYSTEM}/images/fwup_include/boot_extras_define.conf") +define(BOOT_EXTRAS_A,"${NERVES_SYSTEM}/images/fwup_include/boot_extras_a.conf") +define(BOOT_EXTRAS_B,"${NERVES_SYSTEM}/images/fwup_include/boot_extras_b.conf") # Default paths if not specified via the commandline define(ROOTFS, "${NERVES_SYSTEM}/images/rootfs.squashfs") +include("${BOOT_EXTRAS_DEFINE}") # This configuration file will create an image that has an MBR and the # following 3 partitions: @@ -107,16 +111,6 @@ meta-misc = ${NERVES_FW_MISC} # File resources are listed in the order that they are included in the .fw file # This is important, since this is the order that they're written on a firmware # update due to the event driven nature of the update system. -file-resource recovery.bin { - host-path = "${NERVES_APP}/bootfs_overlay/recovery.bin" -} -file-resource pieeprom.upd { - host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.upd" -} -file-resource pieeprom.sig { - host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.sig" -} - file-resource fixup.dat { host-path = "${NERVES_SYSTEM}/images/rpi-firmware/fixup4x.dat" } @@ -124,10 +118,10 @@ file-resource start.elf { host-path = "${NERVES_SYSTEM}/images/rpi-firmware/start4x.elf" } file-resource config.txt { - host-path = "${NERVES_APP}/config/${CONFIG_TXT_NAME}" + host-path = "${CONFIG_TXT}" } file-resource cmdline.txt { - host-path = "${NERVES_APP}/config/${CMDLINE_TXT_NAME}" + host-path = "${CMDLINE_TXT}" } file-resource kernel8.img { host-path = "${NERVES_SYSTEM}/images/Image" @@ -268,9 +262,7 @@ task complete { uboot_setenv(uboot-env, "a.nerves_fw_partition_scheme", ${NERVES_FW_PARTITION_SCHEME}) } - on-resource recovery.bin { fat_write(${BOOT_A_PART_OFFSET}, "recovery.bin") } - on-resource pieeprom.upd { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.upd") } - on-resource pieeprom.sig { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.sig") } + include("${BOOT_EXTRAS_A}") on-resource config.txt { fat_write(${BOOT_A_PART_OFFSET}, "config.txt") } on-resource cmdline.txt { fat_write(${BOOT_A_PART_OFFSET}, "cmdline.txt") } on-resource start.elf { fat_write(${BOOT_A_PART_OFFSET}, "start.elf") } @@ -342,9 +334,7 @@ task upgrade.a { # Write the new boot partition files and rootfs. The MBR still points # to the B partition, so an error or power failure during this part # won't hurt anything. - on-resource recovery.bin { fat_write(${BOOT_A_PART_OFFSET}, "recovery.bin") } - on-resource pieeprom.upd { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.upd") } - on-resource pieeprom.sig { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.sig") } + include("${BOOT_EXTRAS_A}") on-resource config.txt { fat_write(${BOOT_A_PART_OFFSET}, "config.txt") } on-resource cmdline.txt { fat_write(${BOOT_A_PART_OFFSET}, "cmdline.txt") } on-resource start.elf { fat_write(${BOOT_A_PART_OFFSET}, "start.elf") } @@ -430,9 +420,7 @@ task upgrade.a-old { # Write the new boot partition files and rootfs. The MBR still points # to the B partition, so an error or power failure during this part # won't hurt anything. - on-resource recovery.bin { fat_write(${BOOT_A_PART_OFFSET}, "recovery.bin") } - on-resource pieeprom.upd { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.upd") } - on-resource pieeprom.sig { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.sig") } + include("${BOOT_EXTRAS_A}") on-resource config.txt { fat_write(${BOOT_A_PART_OFFSET}, "config.txt") } on-resource cmdline.txt { fat_write(${BOOT_A_PART_OFFSET}, "cmdline.txt") } on-resource start.elf { fat_write(${BOOT_A_PART_OFFSET}, "start.elf") } @@ -516,9 +504,7 @@ task upgrade.b { # Write the new boot partition files and rootfs. The MBR still points # to the A partition, so an error or power failure during this part # won't hurt anything. - on-resource recovery.bin { fat_write(${BOOT_B_PART_OFFSET}, "recovery.bin") } - on-resource pieeprom.upd { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.upd") } - on-resource pieeprom.sig { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.sig") } + include("${BOOT_EXTRAS_B}") on-resource config.txt { fat_write(${BOOT_B_PART_OFFSET}, "config.txt") } on-resource cmdline.txt { fat_write(${BOOT_B_PART_OFFSET}, "cmdline.txt") } on-resource start.elf { fat_write(${BOOT_B_PART_OFFSET}, "start.elf") } @@ -602,9 +588,7 @@ task upgrade.b-old { # Write the new boot partition files and rootfs. The MBR still points # to the A partition, so an error or power failure during this part # won't hurt anything. - on-resource recovery.bin { fat_write(${BOOT_B_PART_OFFSET}, "recovery.bin") } - on-resource pieeprom.upd { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.upd") } - on-resource pieeprom.sig { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.sig") } + include("${BOOT_EXTRAS_B}") on-resource config.txt { fat_write(${BOOT_B_PART_OFFSET}, "config.txt") } on-resource cmdline.txt { fat_write(${BOOT_B_PART_OFFSET}, "cmdline.txt") } on-resource start.elf { fat_write(${BOOT_B_PART_OFFSET}, "start.elf") } diff --git a/fwup_include/boot_extras_a.conf b/fwup_include/boot_extras_a.conf new file mode 100644 index 0000000..0b2f9a5 --- /dev/null +++ b/fwup_include/boot_extras_a.conf @@ -0,0 +1,6 @@ +# Support for defing extra files for inclusion in Nerves firmware image +# +# For example: +# on-resource recovery.bin { fat_write(${BOOT_A_PART_OFFSET}, "recovery.bin") } +# on-resource pieeprom.upd { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.upd") } +# on-resource pieeprom.sig { fat_write(${BOOT_A_PART_OFFSET}, "pieeprom.sig") } diff --git a/fwup_include/boot_extras_b.conf b/fwup_include/boot_extras_b.conf new file mode 100644 index 0000000..a753e1e --- /dev/null +++ b/fwup_include/boot_extras_b.conf @@ -0,0 +1,6 @@ +# Support for defing extra files for inclusion in Nerves firmware image +# +# For example: +# on-resource recovery.bin { fat_write(${BOOT_B_PART_OFFSET}, "recovery.bin") } +# on-resource pieeprom.upd { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.upd") } +# on-resource pieeprom.sig { fat_write(${BOOT_B_PART_OFFSET}, "pieeprom.sig") } diff --git a/fwup_include/boot_extras_define.conf b/fwup_include/boot_extras_define.conf new file mode 100644 index 0000000..97db08d --- /dev/null +++ b/fwup_include/boot_extras_define.conf @@ -0,0 +1,13 @@ +# Support for defing extra files for inclusion in Nerves firmware image +# +# For example: +# +#file-resource recovery.bin { +# host-path = "${NERVES_APP}/bootfs_overlay/recovery.bin" +#} +#file-resource pieeprom.upd { +# host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.upd" +#} +#file-resource pieeprom.sig { +# host-path = "${NERVES_APP}/bootfs_overlay/pieeprom.sig" +#}