The `system-update` and `install-update` scripts are the same as from Aimee OS v1, with references to Gentoo replaced, of course. We need some additional kernel features in order to mount the firmware partition and update the GRUB environment file, and of course the `grub-editenv` tool itself. We also need `wget` for now, since that's how the tool downloads the specified update file from the network. Eventually, `system-update` will be replaced by a much more robust tool, with package URL discovery, signature verification, etc. The shell script will do for now while development is still proceeding rapidly.
18 lines
451 B
Bash
Executable File
18 lines
451 B
Bash
Executable File
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
UPDATE_PACKAGE=update.tar.zstd
|
|
SRCDIR=$(realpath "${0%/*}")
|
|
|
|
cd "${BINARIES_DIR}"
|
|
printf 'Creating %s/%s\n' "${BINARIES_DIR}" "${UPDATE_PACKAGE}" >&2
|
|
sha256sum firmware.img > digests || exit
|
|
sha256sum rootfs.squashfs >> digests || exit
|
|
cp -u "${SRCDIR}"/install-update.sh install || exit
|
|
tar -c --zstd -f "${UPDATE_PACKAGE}" \
|
|
digests \
|
|
firmware.img \
|
|
rootfs.squashfs \
|
|
install \
|
|
|| exit
|