summaryrefslogtreecommitdiff
path: root/export-noobs
diff options
context:
space:
mode:
authorSerge Schneider <serge@raspberrypi.org>2019-06-07 15:55:54 +0100
committerSerge Schneider <serge@raspberrypi.org>2019-06-07 15:55:54 +0100
commitd7aa47e41875e5508aac2dd363e4f1218825939c (patch)
tree32d8b95ca54963aa591d44b961992a51fc2e2226 /export-noobs
parent0308e92705bc9a22b7574ab5acaa7623e9050b8f (diff)
os_list: add checksums for PINN
Diffstat (limited to 'export-noobs')
-rwxr-xr-xexport-noobs/00-release/00-run.sh6
-rw-r--r--export-noobs/00-release/files/partitions.json6
2 files changed, 10 insertions, 2 deletions
diff --git a/export-noobs/00-release/00-run.sh b/export-noobs/00-release/00-run.sh
index b5f1272..1d0b12f 100755
--- a/export-noobs/00-release/00-run.sh
+++ b/export-noobs/00-release/00-run.sh
@@ -10,6 +10,9 @@ install -v files/release_notes.txt "${NOOBS_DIR}/"
tar -v -c -C files/marketing -f "${NOOBS_DIR}/marketing.tar" .
+BOOT_SHASUM="$(sha256sum "${NOOBS_DIR}/boot.tar.xz" | cut -f1 -d' ')"
+ROOT_SHASUM="$(sha256sum "${NOOBS_DIR}/root.tar.xz" | cut -f1 -d' ')"
+
BOOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/boot.tar.xz" | grep totals | cut -f 5)"
ROOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/root.tar.xz" | grep totals | cut -f 5)"
@@ -21,6 +24,9 @@ ROOT_NOM="$(( ROOT_SIZE + 400 ))"
mv "${NOOBS_DIR}/OS.png" "${NOOBS_DIR}/${NOOBS_NAME// /_}.png"
+sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_SHASUM|${BOOT_SHASUM}|"
+sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_SHASUM|${ROOT_SHASUM}|"
+
sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_SIZE|${BOOT_SIZE}|"
sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_SIZE|${ROOT_SIZE}|"
diff --git a/export-noobs/00-release/files/partitions.json b/export-noobs/00-release/files/partitions.json
index c2e2bcb..3d06017 100644
--- a/export-noobs/00-release/files/partitions.json
+++ b/export-noobs/00-release/files/partitions.json
@@ -6,7 +6,8 @@
"mkfs_options": "-F 32",
"partition_size_nominal": BOOT_NOM,
"uncompressed_tarball_size": BOOT_SIZE,
- "want_maximised": false
+ "want_maximised": false,
+ "sha256sum": "BOOT_SHASUM"
},
{
"filesystem_type": "ext4",
@@ -14,7 +15,8 @@
"mkfs_options": "-O ^huge_file",
"partition_size_nominal": ROOT_NOM,
"uncompressed_tarball_size": ROOT_SIZE,
- "want_maximised": true
+ "want_maximised": true,
+ "sha256sum": "ROOT_SHASUM"
}
]
}