Stable OS release with recovery partition
This commit is contained in:
1
build.sh
1
build.sh
@@ -262,6 +262,7 @@ export PUBKEY_SSH_FIRST_USER
|
||||
|
||||
export CLEAN
|
||||
export APT_PROXY
|
||||
export TEMP_REPO
|
||||
|
||||
export STAGE
|
||||
export STAGE_DIR
|
||||
|
@@ -31,6 +31,13 @@ The following environment variables are supported:
|
||||
will not be included in the image, making it safe to use an `apt-cacher` or
|
||||
similar package for development.
|
||||
|
||||
* `TEMP_REPO` (Default: unset)
|
||||
|
||||
An additional temporary apt repo to be used during the build process. This
|
||||
could be useful if you require pre-release software to be included in the
|
||||
image. The variable should contain sources in [one-line-style format](https://manpages.debian.org/stable/apt/sources.list.5.en.html#ONE-LINE-STYLE_FORMAT).
|
||||
"RELEASE" will be replaced with the RELEASE variable.
|
||||
|
||||
* `BASE_DIR` (Default: location of `build.sh`)
|
||||
|
||||
**CAUTION**: Currently, changing this value will probably break build.sh
|
||||
|
@@ -1,10 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
|
||||
if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then
|
||||
cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/"
|
||||
fi
|
||||
|
||||
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
|
||||
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
|
||||
fi
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
|
||||
on_chroot << EOF
|
||||
apt-get update
|
||||
|
@@ -133,9 +133,9 @@ none | *)
|
||||
esac
|
||||
|
||||
if [ -f "${SBOM_FILE}" ]; then
|
||||
xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/image_$(basename "${SBOM_FILE}").xz"
|
||||
xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/$(basename "${SBOM_FILE}").xz"
|
||||
fi
|
||||
if [ -f "${BMAP_FILE}" ]; then
|
||||
xz -c "${BMAP_FILE}" > "$DEPLOY_DIR/image_$(basename "${BMAP_FILE}").xz"
|
||||
cp "$BMAP_FILE" "$DEPLOY_DIR/"
|
||||
fi
|
||||
cp "$INFO_FILE" "$DEPLOY_DIR/"
|
||||
|
@@ -19,11 +19,11 @@ ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 400 * 1024 * 1024) / 1" | bc)"
|
||||
|
||||
BOOT_PART_START=$((ALIGN))
|
||||
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
||||
ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
|
||||
ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))
|
||||
RECOVERY_PART_START=$((ROOT_PART_START + ROOT_PART_SIZE))
|
||||
RECOVERY_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
|
||||
RECOVERY_PART_SIZE=$(((RECOVERY_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
||||
IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE + RECOVERY_PART_SIZE))
|
||||
ROOT_PART_START=$((RECOVERY_PART_START + RECOVERY_PART_SIZE))
|
||||
ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))
|
||||
IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + RECOVERY_PART_SIZE + ROOT_PART_SIZE))
|
||||
|
||||
echo "Estimated sizes:"
|
||||
echo " Boot partition: $((BOOT_PART_SIZE / 1024 / 1024))MB"
|
||||
|
@@ -20,6 +20,13 @@ else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
fi
|
||||
|
||||
if [ -n "$TEMP_REPO" ]; then
|
||||
install -m 644 /dev/null "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
echo "$TEMP_REPO" | sed "s/RELEASE/$RELEASE/g" > "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
fi
|
||||
|
||||
# Configure apt preferences
|
||||
install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
|
||||
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-realtek firmware-mediatek firmware-marvell-prestera-
|
||||
network-manager
|
||||
net-tools
|
||||
|
@@ -2,5 +2,5 @@ xserver-xorg xinit
|
||||
menu-xdg
|
||||
yad zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
gdm3 gnome-themes-extra-data gnome-icon-theme papirus-icon-theme
|
||||
gdm3 gnome-themes-extra-data gnome-icon-theme
|
||||
gnome-keyring
|
||||
|
Reference in New Issue
Block a user