os.json: Update kernel version automatically
This commit is contained in:
parent
397884c2e5
commit
989e1dd466
3 changed files with 5 additions and 1 deletions
|
@ -38,6 +38,7 @@ sed "${NOOBS_DIR}/os.json" -i -e "s|UNRELEASED|${IMG_DATE}|"
|
|||
sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_NAME|${NOOBS_NAME}|"
|
||||
sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_DESCRIPTION|${NOOBS_DESCRIPTION}|"
|
||||
sed "${NOOBS_DIR}/os.json" -i -e "s|RELEASE|${RELEASE}|"
|
||||
sed "${NOOBS_DIR}/os.json" -i -e "s|KERNEL|$(cat "${STAGE_WORK_DIR}/kernel_version")|"
|
||||
|
||||
sed "${NOOBS_DIR}/release_notes.txt" -i -e "s|UNRELEASED|${IMG_DATE}|"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"description": "NOOBS_DESCRIPTION",
|
||||
"feature_level": 35120124,
|
||||
"kernel": "4.19",
|
||||
"kernel": "KERNEL",
|
||||
"name": "NOOBS_NAME",
|
||||
"password": "raspberry",
|
||||
"release_date": "UNRELEASED",
|
||||
|
|
|
@ -54,6 +54,9 @@ mount "$BOOT_DEV" "${STAGE_WORK_DIR}/rootfs/boot"
|
|||
|
||||
ln -sv "/lib/systemd/system/apply_noobs_os_config.service" "$ROOTFS_DIR/etc/systemd/system/multi-user.target.wants/apply_noobs_os_config.service"
|
||||
|
||||
KERNEL_VER="$(zgrep -oPm 1 "Linux version \K(.*)$" "${STAGE_WORK_DIR}/rootfs/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | cut -f-2 -d.)"
|
||||
echo "$KERNEL_VER" > "${STAGE_WORK_DIR}/kernel_version"
|
||||
|
||||
bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs/boot" -cpf - . | xz -T0 > "${NOOBS_DIR}/boot.tar.xz"
|
||||
umount "${STAGE_WORK_DIR}/rootfs/boot"
|
||||
bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs" --one-file-system -cpf - . | xz -T0 > "${NOOBS_DIR}/root.tar.xz"
|
||||
|
|
Loading…
Reference in a new issue