From 6a01a9db3b6bcf23e13e02a69ced21931e00d651 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Wed, 26 Jun 2019 21:56:54 +0200 Subject: [PATCH 1/5] scripts/image: copy config.txt and distroconfig.txt from INSTALL Signed-off-by: Matthias Reichl --- scripts/image | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/image b/scripts/image index 5cfb2f8f86..29a6223b57 100755 --- a/scripts/image +++ b/scripts/image @@ -383,12 +383,9 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then # Create System dir mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}/System - BOOTLOADER_DIR="$(get_pkg_directory "${BOOTLOADER}")" - if [ -d ${BOOTLOADER_DIR}/files/3rdparty/bootloader/ ]; then - cp -PR ${BOOTLOADER_DIR}/files/3rdparty/bootloader/* ${RELEASE_DIR}/${NOOBS_DISTRO}/System - fi - # Copy Bootloader + cp -PR ${INSTALL}/usr/share/bootloader/config.txt ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ + cp -PR ${INSTALL}/usr/share/bootloader/distroconfig.txt ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ cp -PR ${INSTALL}/usr/share/bootloader/LICENCE* ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ cp -PR ${INSTALL}/usr/share/bootloader/bootcode.bin ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ cp -PR ${INSTALL}/usr/share/bootloader/fixup.dat ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ From e7e91da91cf219736742ec9af0d031305ddd0012 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 27 Jun 2019 00:06:04 +0200 Subject: [PATCH 2/5] scripts/image: create NOOBS tarballs with fakeroot Otherwise builder user ID will leak in and storage partition will be owned by that instead of root and lots of services will fail to start. Signed-off-by: Matthias Reichl --- scripts/image | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/image b/scripts/image index 29a6223b57..e73e41eb49 100755 --- a/scripts/image +++ b/scripts/image @@ -427,8 +427,8 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage.tar.xz # Create filesystem tarballs - tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/System.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ . - tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage/ . + ${TOOLCHAIN}/bin/fakeroot tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/System.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ . + ${TOOLCHAIN}/bin/fakeroot tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage/ . # Remove filesystem dirs rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/System From 8f3af234a2c65c07f530be7ef3b1b68654a9bbd7 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 27 Jun 2019 01:36:55 +0200 Subject: [PATCH 3/5] config/noobs/os.json: move legacy hex revisions before models This makes it easier to drop the property if it's not set. Signed-off-by: Matthias Reichl --- config/noobs/os.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/noobs/os.json b/config/noobs/os.json index fe3ebd04ac..2fb08c7f63 100644 --- a/config/noobs/os.json +++ b/config/noobs/os.json @@ -6,6 +6,6 @@ "description": "@DESCRIPTION@", "username": "root", "password": "@ROOT_PASSWORD@", - "supported_models": [@NOOBS_SUPPORTED_MODELS@], - "supported_hex_revisions": "@NOOBS_HEX@" + "supported_hex_revisions": "@NOOBS_HEX@", + "supported_models": [@NOOBS_SUPPORTED_MODELS@] } From a5bdc03af197c9b61ad51f88978d5d4dc5912f38 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 27 Jun 2019 01:37:29 +0200 Subject: [PATCH 4/5] scripts/image: only include hex version in noobs os.json if NOOBS_HEX is set Signed-off-by: Matthias Reichl --- scripts/image | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/image b/scripts/image index e73e41eb49..3067a0b68a 100755 --- a/scripts/image +++ b/scripts/image @@ -364,6 +364,14 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then cp ${ROOT}/README* ${RELEASE_DIR}/${NOOBS_DISTRO} cp ${ROOT}/CHANGELOG ${RELEASE_DIR}/${NOOBS_DISTRO}/release_notes.txt + if [ -n "${NOOBS_HEX}" ]; then + sed -e "s%@NOOBS_HEX@%${NOOBS_HEX}%g" \ + -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json + else + sed -e "/@NOOBS_HEX@/d" \ + -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json + fi + sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \ -e "s%@PROJECT@%${DEVICE:-${PROJECT}}%g" \ -e "s%@LIBREELEC_VERSION@%${LIBREELEC_VERSION}%g" \ @@ -372,7 +380,6 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then -e "s%@DESCRIPTION@%${DESCRIPTION}%g" \ -e "s%@ROOT_PASSWORD@%${ROOT_PASSWORD}%g" \ -e "s%@NOOBS_SUPPORTED_MODELS@%${NOOBS_SUPPORTED_MODELS}%g" \ - -e "s%@NOOBS_HEX@%${NOOBS_HEX}%g" \ -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \ From 92e234cb70a898f6581d0c03738544bce3ccfa3d Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 27 Jun 2019 01:37:40 +0200 Subject: [PATCH 5/5] RPi4: don't set legacy NOOBS_HEX version Signed-off-by: Matthias Reichl --- projects/RPi/devices/RPi4/options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/RPi/devices/RPi4/options b/projects/RPi/devices/RPi4/options index 6ddbf5a871..5e419d350a 100644 --- a/projects/RPi/devices/RPi4/options +++ b/projects/RPi/devices/RPi4/options @@ -2,8 +2,8 @@ # Device defaults ################################################################################ - # NOOBS supported hex versions (legacy) - NOOBS_HEX="1040,1041,2082" + # NOOBS supported hex versions (legacy) is not relevant for RPi4 + unset NOOBS_HEX # NOOBS supported model versions NOOBS_SUPPORTED_MODELS='"Pi 4"'