diff --git a/board/recalbox/copy-recalbox-archives.sh b/board/recalbox/copy-recalbox-archives.sh index 08e11e77266fc56ecc2a84126d599088dc79e8a8..3745c686a11f51ebe23b767085335e606c5e5720 100755 --- a/board/recalbox/copy-recalbox-archives.sh +++ b/board/recalbox/copy-recalbox-archives.sh @@ -119,9 +119,9 @@ case "${RECALBOX_TARGET}" in generate_boot_file_list "${BINARIES_DIR}/rpi-firmware/" | \ grep -v -E '^(boot.lst|config.txt|recalbox-boot.conf)$' >"${BINARIES_DIR}/rpi-firmware/boot.lst" - # boot.tar.xz - tar -C "${BINARIES_DIR}/rpi-firmware" -cJf "${RECALBOX_BINARIES_DIR}/boot.tar.xz" . || - { echo "ERROR : unable to create boot.tar.xz" && exit 1 ; } + # recalbox.tar.xz (formerly boot.tar.xz) + tar -C "${BINARIES_DIR}/rpi-firmware" -cJf "${RECALBOX_BINARIES_DIR}/recalbox.tar.xz" . || + { echo "ERROR : unable to create recalbox.tar.xz" && exit 1 ; } #recalbox.img GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" diff --git a/scripts/release/README.md b/scripts/release/README.md index d191dc6ddb3c729e365e189c6433c4175af2f8cc..7daf74fd55ce083abceeb5feac0d89aeea11f1c5 100644 --- a/scripts/release/README.md +++ b/scripts/release/README.md @@ -21,9 +21,6 @@ "Pi Model", "Pi Compute Module Rev", "Pi Zero" - ], - "tarballs": [ - "https://upgrade.recalbox.com/latest/rpi1/boot.tar.xz" ] }, { @@ -37,9 +34,6 @@ "os_info": "https://upgrade.recalbox.com/latest/noobs/os.json", "supported_models": [ "Pi 2" - ], - "tarballs": [ - "https://upgrade.recalbox.com/latest/rpi2/boot.tar.xz" ] }, { @@ -54,9 +48,6 @@ "supported_models": [ "Pi 3", "Pi Compute Module 3" - ], - "tarballs": [ - "https://upgrade.recalbox.com/latest/rpi3/boot.tar.xz" ] }, { @@ -70,9 +61,6 @@ "os_info": "https://upgrade.recalbox.com/latest/noobs/os.json", "supported_models": [ "Pi 4" - ], - "tarballs": [ - "https://upgrade.recalbox.com/latest/rpi4/boot.tar.xz" ] } ] @@ -96,6 +84,7 @@ * `description` * `icon` * `feature_level` ⇒ ??? +* `tarballs` ⇒ array of tarball URLs to be uncompressed in created partitions (they are assigned to partitions defined in `partitions.json` in the same order : 1st tarball in `tarballs` is assigned to 1st partition in `partitions.json`, 2nd tarball in `tarballs` is assigned to 2nd partition in `partitions.json`, etc… and they override any `tarball` directive defined in `partitions.json`!) * `supported_models` ⇒ array of strings which at least one must be present in `/proc/device-tree/model` for the OS to be considered compatible with the hardware * `Pi Zero` matches all Pi Zero models (Zero, Zero W, Zero WH) * `Pi Model` matches all Pi1 models (A, B, A+, B+) diff --git a/scripts/release/generate_external_installer_assets.sh b/scripts/release/generate_external_installer_assets.sh index 52f323024aa168ff0b5ec0938fcb01f4dd6fdc00..369a94a001f99f12729b76b1e7562001bcdb4d63 100755 --- a/scripts/release/generate_external_installer_assets.sh +++ b/scripts/release/generate_external_installer_assets.sh @@ -47,6 +47,7 @@ function generateNoobsAssets { for arch in rpi1 rpi2 rpi3 rpi4; do local tarball="${params[imagesDir]}/${arch}/boot.tar.xz" local uncompressedTarballSizeInBytes=$(xz --robot --list "${tarball}" | tail -1 | cut -f 5) + metadata["${arch}TarballUrl"]="https://upgrade.recalbox.com/latest/${arch}/recalbox.tar.xz" metadata["${arch}UncompressedTarballSize"]=$((${uncompressedTarballSizeInBytes} / 1024 / 1024)) done @@ -66,6 +67,7 @@ function generateNoobsAssets { mkdir -p "${destinationDir}/${arch}" cat "${templateDir}/partitions.json" \ | sed -e "s|{{uncompressedTarballSize}}|${metadata["${arch}UncompressedTarballSize"]}|" \ + -e "s|{{tarballUrl}}|${metadata["${arch}TarballUrl"]}|" \ > "${destinationDir}/${arch}/partitions.json" done } diff --git a/scripts/release/templates/noobs/partition_setup.sh b/scripts/release/templates/noobs/partition_setup.sh index d9d32684ee4962f7d38e252c42ab7615aceb4883..1ca045dfb36f8d61a7b4ad21e39438b2e412b2a5 100644 --- a/scripts/release/templates/noobs/partition_setup.sh +++ b/scripts/release/templates/noobs/partition_setup.sh @@ -6,13 +6,10 @@ set -ex [ -z "${part2}" ] && echo "Error: missing environment variable \${part2}" 1>&2 && exit 1 [ -z "${part3}" ] && echo "Error: missing environment variable \${part3}" 1>&2 && exit 1 -bootPartition="${part1}" # already mounted by NOOBS as `/mnt2` (best name ever!) +bootPartition="${part1}" # already mounted by NOOBS as `/mnt2` (best name ever!) when this script is executed sharePartition="${part2}" overlayPartition="${part3}" -# Since NOOBS does not create partitions like our downloadable image, we have to -# modify our kernel parameters to use a different partition to boot from. This -# is defined in `/cmdline.txt` (from the `rpi-firmware` package in Buildroot, -# that we patch in `custom`) and we set it to the value of the first partition, -# as given by NOOBS as ${part1}. -sed "/mnt2/cmdline.txt" -i -e "s|dev=/dev/[^ ]*|dev=${bootPartition}|" +# We can do any change on any partition here (only the first one is already mounted, though). +# For example, we used to modify `dev=` kernel parameter from `cmdline.txt` on `boot` partition +# (but we don't anymore since we now use `label=`). diff --git a/scripts/release/templates/noobs/partitions.json b/scripts/release/templates/noobs/partitions.json index 7e8e16827e6a64d0d805de1247c6c3538507782f..d6a8c5bb9435974e9f99e8e8a7be72273c8e3088 100644 --- a/scripts/release/templates/noobs/partitions.json +++ b/scripts/release/templates/noobs/partitions.json @@ -1,14 +1,15 @@ { "partitions": [ { - "label": "boot", + "label": "RECALBOX", "partition_size_nominal": 3072, "filesystem_type": "fat", "mkfs_options": "-F 32", + "tarball": "{{tarballUrl}}", "uncompressed_tarball_size": {{uncompressedTarballSize}} }, { - "label": "share", + "label": "SHARE", "partition_size_nominal": 4096, "want_maximised": true, "partition_type": "07", @@ -16,7 +17,7 @@ "empty_fs": true }, { - "label": "overlay", + "label": "OVERLAY", "partition_size_nominal": 1024, "filesystem_type": "ext4", "empty_fs": true