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 CLEAN
|
||||||
export APT_PROXY
|
export APT_PROXY
|
||||||
|
export TEMP_REPO
|
||||||
|
|
||||||
export STAGE
|
export STAGE
|
||||||
export STAGE_DIR
|
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
|
will not be included in the image, making it safe to use an `apt-cacher` or
|
||||||
similar package for development.
|
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`)
|
* `BASE_DIR` (Default: location of `build.sh`)
|
||||||
|
|
||||||
**CAUTION**: Currently, changing this value will probably break build.sh
|
**CAUTION**: Currently, changing this value will probably break build.sh
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
|
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
|
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
|
||||||
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
|
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
|
||||||
fi
|
fi
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
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
|
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
|
||||||
on_chroot << EOF
|
on_chroot << EOF
|
||||||
apt-get update
|
apt-get update
|
||||||
|
@@ -133,9 +133,9 @@ none | *)
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -f "${SBOM_FILE}" ]; then
|
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
|
fi
|
||||||
if [ -f "${BMAP_FILE}" ]; then
|
if [ -f "${BMAP_FILE}" ]; then
|
||||||
xz -c "${BMAP_FILE}" > "$DEPLOY_DIR/image_$(basename "${BMAP_FILE}").xz"
|
cp "$BMAP_FILE" "$DEPLOY_DIR/"
|
||||||
fi
|
fi
|
||||||
cp "$INFO_FILE" "$DEPLOY_DIR/"
|
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_START=$((ALIGN))
|
||||||
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
||||||
ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))
|
RECOVERY_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_SIZE=$(((RECOVERY_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
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 "Estimated sizes:"
|
||||||
echo " Boot partition: $((BOOT_PART_SIZE / 1024 / 1024))MB"
|
echo " Boot partition: $((BOOT_PART_SIZE / 1024 / 1024))MB"
|
||||||
|
@@ -20,6 +20,13 @@ else
|
|||||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||||
fi
|
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
|
# Configure apt preferences
|
||||||
install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
|
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
|
network-manager
|
||||||
net-tools
|
net-tools
|
||||||
|
@@ -2,5 +2,5 @@ xserver-xorg xinit
|
|||||||
menu-xdg
|
menu-xdg
|
||||||
yad zenity xdg-utils
|
yad zenity xdg-utils
|
||||||
gvfs-backends gvfs-fuse
|
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
|
gnome-keyring
|
||||||
|
Reference in New Issue
Block a user