new base?
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
# ChillcraftOS Build System
|
||||
# VesperOS Build System
|
||||
|
||||
ChillcraftOS is a custom Raspberry Pi OS built using a system based on `pi-gen`. This build system is specifically designed to create **ChillcraftOS** images, not general Raspberry Pi OS images.
|
||||
|
||||
**Important Notes:**
|
||||
- The 32-bit versions of ChillcraftOS are based on Raspbian.
|
||||
- The 64-bit versions of ChillcraftOS are based on Debian.
|
||||
VesperOS is a custom Debian-based OS built using a system based on `pi-gen`.
|
||||
|
||||
## Dependencies
|
||||
|
||||
The ChillcraftOS Build System relies on `pi-gen` and is compatible with Debian-based operating systems released after 2017. We recommend using the latest OS versions for better security.
|
||||
The VesperOS Build System relies on `pi-gen` and is compatible with Debian-based operating systems released after 2017. We recommend using the latest OS versions for better security.
|
||||
|
||||
For other Linux distributions, you can use the Docker-based build method provided below.
|
||||
|
||||
To install the required dependencies for building ChillcraftOS, run the following command:
|
||||
To install the required dependencies for building VesperOS, run the following command:
|
||||
|
||||
```bash
|
||||
apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
|
||||
@@ -22,16 +18,16 @@ gpg pigz xxd arch-test bmap-tools kmod squashfs-tools xorriso mtools
|
||||
|
||||
The `depends` file in the repository lists all the necessary tools, formatted as `<tool>[:<debian-package>]`.
|
||||
|
||||
## Getting Started with Building ChillcraftOS
|
||||
## Getting Started with Building VesperOS
|
||||
|
||||
To start building ChillcraftOS, clone the ChillcraftOS Build System repository:
|
||||
To start building VesperOS, clone the os-builder repository:
|
||||
|
||||
```bash
|
||||
git clone https://git.oxmc.me/Chillcraft/ChillcraftOS.git
|
||||
git clone https://git.oxmc.me/VesperOS/os-builder.git
|
||||
```
|
||||
|
||||
For a shallow clone containing only the latest revision, you can add `--depth 1`. **However, avoid using this on your development machine**.
|
||||
|
||||
Make sure the repository is cloned to a directory **without spaces**, as spaces in the base path may cause `pi-gen` to fail.
|
||||
|
||||
Once cloned, you're ready to configure and start building ChillcraftOS.
|
||||
Once cloned, you're ready to configure and start building VesperOS.
|
||||
@@ -230,7 +230,7 @@ export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference}
|
||||
export ARCH="${ARCH:-arm64}"
|
||||
export PLATFORM="${PLATFORM:-}"
|
||||
export RELEASE=${RELEASE:-trixie}
|
||||
export IMG_NAME="${IMG_NAME:-chillcraftos-$RELEASE-$ARCH}"
|
||||
export IMG_NAME="${IMG_NAME:-vesperos-$RELEASE-$ARCH}"
|
||||
|
||||
export USE_QEMU="${USE_QEMU:-0}"
|
||||
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
|
||||
@@ -245,7 +245,7 @@ export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-xz}
|
||||
export COMPRESSION_LEVEL=${COMPRESSION_LEVEL:-6}
|
||||
export LOG_FILE="${WORK_DIR}/build.log"
|
||||
|
||||
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-chillcraftos}
|
||||
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-vesperos}
|
||||
export WPA_COUNTRY
|
||||
export ENABLE_SSH="${ENABLE_SSH:-0}"
|
||||
export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}"
|
||||
@@ -282,6 +282,8 @@ export QUILT_NO_DIFF_TIMESTAMPS=1
|
||||
export QUILT_REFRESH_ARGS="-p ab"
|
||||
|
||||
export ENABLE_CLOUD_INIT=${ENABLE_CLOUD_INIT:-1}
|
||||
export LIVEINSTALL=${LIVEINSTALL:-0}
|
||||
export LIVEBOOT=${LIVEBOOT:-0}
|
||||
|
||||
# shellcheck source=scripts/common
|
||||
source "${SCRIPT_DIR}/common"
|
||||
|
||||
+10
-1
@@ -1,2 +1,11 @@
|
||||
# This builds ChillcraftOS for amd64
|
||||
# This builds VesperOS for amd64
|
||||
ARCH=amd64
|
||||
|
||||
# Set LIVEINSTALL=1 to also produce a livefs.squashfs with Calamares installed
|
||||
# for use with gen-installmedia. Outputs deploy/livefs.{squashfs,vmlinuz,initrd.img}
|
||||
# alongside the clean deploy/rootfs.{squashfs,vmlinuz,initrd.img}
|
||||
LIVEINSTALL=1
|
||||
|
||||
# Set LIVEBOOT=1 to install live-boot packages and regenerate the initrd with
|
||||
# squashfs/overlay support — required for booting rootfs.squashfs from an ISO via live-boot.
|
||||
LIVEBOOT=1
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
# This builds ChillcraftOS for arm64
|
||||
# This builds VesperOS for arm64
|
||||
ARCH=arm64
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Raspberry Pi OS only targets arm64 since the rpi4.
|
||||
# So ChillcraftOs will also only target arm64 for the rpi4 and up.
|
||||
# So VesperOs will also only target arm64 for the rpi4 and up.
|
||||
ARCH=arm64
|
||||
PLATFORM=rpi
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ sudo ./build.sh -c build_amd64
|
||||
|
||||
### Core
|
||||
|
||||
* `IMG_NAME` (Default: `chillcraftos-$RELEASE-$ARCH`)
|
||||
* `IMG_NAME` (Default: `vesperos-$RELEASE-$ARCH`)
|
||||
|
||||
Base name for output files.
|
||||
|
||||
@@ -93,7 +93,7 @@ sudo ./build.sh -c build_amd64
|
||||
### amd64 live ISO
|
||||
|
||||
```bash
|
||||
IMG_NAME='chillcraftos'
|
||||
IMG_NAME='vesperos'
|
||||
RELEASE='trixie'
|
||||
ARCH='amd64'
|
||||
LOCALE_DEFAULT='en_US.UTF-8'
|
||||
@@ -106,7 +106,7 @@ ENABLE_SSH=1
|
||||
### Raspberry Pi (arm64)
|
||||
|
||||
```bash
|
||||
IMG_NAME='chillcraftos'
|
||||
IMG_NAME='vesperos'
|
||||
RELEASE='trixie'
|
||||
ARCH='arm64'
|
||||
LOCALE_DEFAULT='en_US.UTF-8'
|
||||
|
||||
@@ -24,7 +24,7 @@ CONTINUE=1 ./build-docker.sh
|
||||
## Inspecting the Container After a Failure
|
||||
|
||||
```bash
|
||||
sudo docker run -it --privileged --volumes-from=pigen_work chillcraftos-build /bin/bash
|
||||
sudo docker run -it --privileged --volumes-from=pigen_work vesperos-build /bin/bash
|
||||
```
|
||||
|
||||
## Preserving the Container Between Runs
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
# Getting Started
|
||||
|
||||
ChillcraftOS is a Debian Trixie-based OS for Raspberry Pi (arm64/armhf) and amd64, built using a modified pi-gen pipeline.
|
||||
VesperOS is a Debian Trixie-based OS for Raspberry Pi (arm64/armhf) and amd64, built using a modified pi-gen pipeline.
|
||||
|
||||
## Supported Architectures
|
||||
|
||||
@@ -27,8 +27,8 @@ The `depends` file in the repo root lists all required tools in `<tool>[:<debian
|
||||
## Cloning
|
||||
|
||||
```bash
|
||||
git clone https://github.com/oxmc/ChillcraftOS.git
|
||||
cd ChillcraftOS
|
||||
git clone https://github.com/oxmc/VesperOS.git
|
||||
cd VesperOS
|
||||
```
|
||||
|
||||
Do not clone to a path containing spaces — `debootstrap` does not support them.
|
||||
@@ -45,7 +45,7 @@ cp config.example config
|
||||
See [config.md](config.md) for all available options. At minimum set:
|
||||
|
||||
```bash
|
||||
IMG_NAME='chillcraftos'
|
||||
IMG_NAME='vesperos'
|
||||
RELEASE='trixie'
|
||||
ARCH='amd64' # or arm64 / armhf
|
||||
```
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Stage Anatomy
|
||||
|
||||
ChillcraftOS is built in stages. Each stage builds on the previous one.
|
||||
VesperOS is built in stages. Each stage builds on the previous one.
|
||||
|
||||
## Stages
|
||||
|
||||
### Stage 0 — Bootstrap
|
||||
|
||||
Bootstraps a minimal Debian Trixie filesystem using `debootstrap`. Configures apt sources (including the ChillcraftOS apt repo), installs firmware packages, and sets up the base package state. Does not produce a bootable system.
|
||||
Bootstraps a minimal Debian Trixie filesystem using `debootstrap`. Configures apt sources (including the VesperOS apt repo), installs firmware packages, and sets up the base package state. Does not produce a bootable system.
|
||||
|
||||
- RPi: installs `raspi-firmware`, `linux-image-rpi-v8`, `linux-image-rpi-2712`
|
||||
- amd64: installs `grub2`, `linux-image-amd64`
|
||||
|
||||
@@ -45,12 +45,12 @@ Note: `grub-efi-amd64-bin` and `grub-pc-bin` are data packages with no associate
|
||||
The work directory must be on a Linux filesystem (ext4, btrfs, xfs). NTFS and exFAT do not support the required file attributes. Set `WORK_DIR` to a path on a Linux filesystem:
|
||||
|
||||
```bash
|
||||
export WORK_DIR=/mnt/linux-disk/chillcraftos-work
|
||||
export WORK_DIR=/mnt/linux-disk/vesperos-work
|
||||
```
|
||||
|
||||
## Apt errors: "doesn't support architecture"
|
||||
|
||||
The ChillcraftOS apt repo (`cdn.oxmc.me/apt`) currently only supports `arm64`/`armhf`. On amd64 builds you will see:
|
||||
The VesperOS apt repo (`cdn.oxmc.me/apt`) currently only supports `arm64`/`armhf`. On amd64 builds you will see:
|
||||
|
||||
```
|
||||
Notice: Skipping ... doesn't support architecture 'amd64'
|
||||
|
||||
@@ -75,17 +75,17 @@ set timeout=5
|
||||
insmod all_video
|
||||
insmod gfxterm
|
||||
|
||||
menuentry "ChillcraftOS Live" {
|
||||
menuentry "VesperOS Live" {
|
||||
linux /boot/vmlinuz boot=live components splash
|
||||
initrd /boot/initrd.img
|
||||
}
|
||||
|
||||
menuentry "ChillcraftOS Live (safe mode)" {
|
||||
menuentry "VesperOS Live (safe mode)" {
|
||||
linux /boot/vmlinuz boot=live components nomodeset
|
||||
initrd /boot/initrd.img
|
||||
}
|
||||
|
||||
menuentry "ChillcraftOS Live (text mode)" {
|
||||
menuentry "VesperOS Live (text mode)" {
|
||||
linux /boot/vmlinuz boot=live components systemd.unit=multi-user.target
|
||||
initrd /boot/initrd.img
|
||||
}
|
||||
@@ -106,14 +106,14 @@ mksquashfs "${ROOTFS_DIR}" "${ISO_TEMP_DIR}/live/filesystem.squashfs" \
|
||||
# Write filesystem metadata used by installers and live tools
|
||||
du -sx --block-size=1 "${ROOTFS_DIR}" | cut -f1 > "${ISO_TEMP_DIR}/live/filesystem.size"
|
||||
mkdir -p "${ISO_TEMP_DIR}/.disk"
|
||||
echo "ChillcraftOS Trixie - $(date +%Y-%m-%d)" > "${ISO_TEMP_DIR}/.disk/info"
|
||||
echo "VesperOS Trixie - $(date +%Y-%m-%d)" > "${ISO_TEMP_DIR}/.disk/info"
|
||||
|
||||
# Step 6: Build the ISO with grub-mkrescue (handles BIOS + UEFI automatically)
|
||||
grub-mkrescue \
|
||||
--output="${ISO_FILE}" \
|
||||
"${ISO_TEMP_DIR}" \
|
||||
-- \
|
||||
-volid "ChillcraftOS"
|
||||
-volid "VesperOS"
|
||||
|
||||
rm -rf "${ISO_TEMP_DIR}"
|
||||
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
|
||||
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
|
||||
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
|
||||
fi
|
||||
fi
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
SQUASHFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.squashfs"
|
||||
FINAL_SQUASHFS_FILE="${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs"
|
||||
|
||||
mksquashfs "${ROOTFS_DIR}" "${SQUASHFS_FILE}" \
|
||||
-comp xz \
|
||||
-noappend \
|
||||
-e boot/efi \
|
||||
-e proc \
|
||||
-e sys \
|
||||
-e dev \
|
||||
-e tmp \
|
||||
-e run
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
rm -f "${FINAL_SQUASHFS_FILE}"
|
||||
cp "${SQUASHFS_FILE}" "${FINAL_SQUASHFS_FILE}"
|
||||
echo "Squashfs created at ${FINAL_SQUASHFS_FILE}"
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
apt-get -y dist-upgrade --auto-remove --purge
|
||||
apt-get clean
|
||||
EOF
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
install -m 644 files/resolv.conf "${ROOTFS_DIR}/etc/"
|
||||
@@ -0,0 +1 @@
|
||||
nameserver 8.8.8.8
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ "${LIVEBOOT}" != "1" ]; then
|
||||
echo "squashfs-export: LIVEBOOT not set — skipping live boot setup"
|
||||
else
|
||||
if [ "${ARCH}" != "amd64" ]; then
|
||||
echo "squashfs-export: skipping live boot setup for non-amd64 arch (${ARCH})"
|
||||
exit 0
|
||||
else
|
||||
on_chroot << EOF
|
||||
apt-get install -y \
|
||||
live-boot \
|
||||
live-boot-initramfs-tools \
|
||||
live-config \
|
||||
live-config-systemd
|
||||
EOF
|
||||
|
||||
# Rewrite fstab for the live environment.
|
||||
# live-boot manages root via overlayfs — build-time disk entries cause fsck failures at boot.
|
||||
cat > "${ROOTFS_DIR}/etc/fstab" << 'FSTABEOF'
|
||||
# Live system fstab — root is managed by live-boot via overlayfs, not this file.
|
||||
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
||||
FSTABEOF
|
||||
|
||||
# Remove first-boot trigger so GDM uses autologin in the live session.
|
||||
rm -f "${ROOTFS_DIR}/var/lib/gdm/run-initial-setup"
|
||||
|
||||
# Configure initramfs for live boot — squashfs and overlay are required
|
||||
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" ]; then
|
||||
sed -i 's/^MODULES=.*/MODULES=most/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf"
|
||||
fi
|
||||
|
||||
for mod in squashfs overlay; do
|
||||
grep -qx "${mod}" "${ROOTFS_DIR}/etc/initramfs-tools/modules" 2>/dev/null || \
|
||||
echo "${mod}" >> "${ROOTFS_DIR}/etc/initramfs-tools/modules"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure update-initramfs actually runs — it silently exits if update_initramfs=no/disabled,
|
||||
# which may have been set during the build to suppress apt-hook rebuilds.
|
||||
# This mirrors what exports/iso/04-finalise does before calling update-initramfs.
|
||||
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
|
||||
sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
|
||||
fi
|
||||
|
||||
on_chroot <<- EOF
|
||||
update-initramfs -k all -c
|
||||
if hash hardlink 2>/dev/null; then
|
||||
hardlink -t /usr/share/doc
|
||||
fi
|
||||
if [ -f /usr/lib/systemd/system/apt-listchanges.service ]; then
|
||||
python3 -m apt_listchanges.populate_database --profile apt
|
||||
systemctl disable apt-listchanges.timer
|
||||
fi
|
||||
install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync
|
||||
install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock
|
||||
EOF
|
||||
|
||||
rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static"
|
||||
|
||||
if [ "${USE_QEMU}" != "1" ]; then
|
||||
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then
|
||||
mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old"
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list~"
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~"
|
||||
rm -f "${ROOTFS_DIR}/etc/passwd-"
|
||||
rm -f "${ROOTFS_DIR}/etc/group-"
|
||||
rm -f "${ROOTFS_DIR}/etc/shadow-"
|
||||
rm -f "${ROOTFS_DIR}/etc/gshadow-"
|
||||
rm -f "${ROOTFS_DIR}/etc/subuid-"
|
||||
rm -f "${ROOTFS_DIR}/etc/subgid-"
|
||||
rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old
|
||||
rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old
|
||||
rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache
|
||||
rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id"
|
||||
|
||||
echo "uninitialized" > "${ROOTFS_DIR}/etc/machine-id"
|
||||
|
||||
ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab"
|
||||
|
||||
find "${ROOTFS_DIR}/var/log/" -type f -exec cp /dev/null {} \;
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
SQUASHFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.squashfs"
|
||||
|
||||
unmount "${ROOTFS_DIR}"
|
||||
|
||||
mksquashfs "${ROOTFS_DIR}" "${SQUASHFS_FILE}" \
|
||||
-comp xz \
|
||||
-noappend \
|
||||
-e boot/efi
|
||||
|
||||
# Locate kernel and initrd inside the rootfs
|
||||
VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" | sort | tail -1)
|
||||
INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" | sort | tail -1)
|
||||
|
||||
VMLINUZ_FILE=""
|
||||
INITRD_FILE=""
|
||||
|
||||
if [ -n "${VMLINUZ}" ]; then
|
||||
VMLINUZ_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.vmlinuz"
|
||||
cp "${VMLINUZ}" "${VMLINUZ_FILE}"
|
||||
fi
|
||||
|
||||
if [ -n "${INITRD}" ]; then
|
||||
INITRD_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.initrd"
|
||||
cp "${INITRD}" "${INITRD_FILE}"
|
||||
fi
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
rm -f "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}."*
|
||||
|
||||
case "${DEPLOY_COMPRESSION}" in
|
||||
zip)
|
||||
pushd "${STAGE_WORK_DIR}" > /dev/null
|
||||
ZIP_MEMBERS="$(basename "${SQUASHFS_FILE}")"
|
||||
[ -n "${VMLINUZ_FILE}" ] && ZIP_MEMBERS="${ZIP_MEMBERS} $(basename "${VMLINUZ_FILE}")"
|
||||
[ -n "${INITRD_FILE}" ] && ZIP_MEMBERS="${ZIP_MEMBERS} $(basename "${INITRD_FILE}")"
|
||||
# shellcheck disable=SC2086
|
||||
zip -"${COMPRESSION_LEVEL}" \
|
||||
"${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.zip" \
|
||||
${ZIP_MEMBERS}
|
||||
popd > /dev/null
|
||||
echo "Archive created at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.zip"
|
||||
;;
|
||||
gz)
|
||||
pigz --force -"${COMPRESSION_LEVEL}" "${SQUASHFS_FILE}" --stdout > \
|
||||
"${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.gz"
|
||||
[ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz"
|
||||
[ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd"
|
||||
echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.gz"
|
||||
;;
|
||||
xz)
|
||||
xz --compress --force --threads 0 --memlimit-compress=50% -"${COMPRESSION_LEVEL}" \
|
||||
--stdout "${SQUASHFS_FILE}" > "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.xz"
|
||||
[ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz"
|
||||
[ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd"
|
||||
echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.xz"
|
||||
;;
|
||||
none | *)
|
||||
cp "${SQUASHFS_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs"
|
||||
[ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz"
|
||||
[ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd"
|
||||
echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Copy fixed-name artifacts for gen-installmedia compatibility
|
||||
# rootfs.squashfs is always uncompressed regardless of DEPLOY_COMPRESSION
|
||||
cp "${SQUASHFS_FILE}" "${DEPLOY_DIR}/rootfs.squashfs"
|
||||
[ -n "${VMLINUZ}" ] && cp "${VMLINUZ}" "${DEPLOY_DIR}/rootfs.vmlinuz"
|
||||
[ -n "${INITRD}" ] && cp "${INITRD}" "${DEPLOY_DIR}/rootfs.initrd.img"
|
||||
echo "gen-installmedia artifacts written to ${DEPLOY_DIR}/rootfs.{squashfs,vmlinuz,initrd.img}"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
[ "${LIVEINSTALL}" != "1" ] && exit 0
|
||||
|
||||
on_chroot << EOF
|
||||
apt-get install -y calamares calamares-settings-debian
|
||||
EOF
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
[ "${LIVEINSTALL}" != "1" ] && exit 0
|
||||
|
||||
LIVEFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.livefs.squashfs"
|
||||
|
||||
unmount "${ROOTFS_DIR}"
|
||||
|
||||
mksquashfs "${ROOTFS_DIR}" "${LIVEFS_FILE}" \
|
||||
-comp xz \
|
||||
-noappend \
|
||||
-e boot/efi
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
|
||||
VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" | sort | tail -1)
|
||||
INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" | sort | tail -1)
|
||||
|
||||
cp "${LIVEFS_FILE}" "${DEPLOY_DIR}/livefs.squashfs"
|
||||
[ -n "${VMLINUZ}" ] && cp "${VMLINUZ}" "${DEPLOY_DIR}/livefs.vmlinuz"
|
||||
[ -n "${INITRD}" ] && cp "${INITRD}" "${DEPLOY_DIR}/livefs.initrd.img"
|
||||
|
||||
echo "gen-installmedia livefs artifacts written to ${DEPLOY_DIR}/livefs.{squashfs,vmlinuz,initrd.img}"
|
||||
@@ -39,8 +39,8 @@ else
|
||||
fi
|
||||
|
||||
# Configure apt preferences
|
||||
install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/preferences.d/apt-chillcraftos-prefs"
|
||||
install -m 644 files/apt-vesperos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/preferences.d/apt-vesperos-prefs"
|
||||
|
||||
# Add additional architectures if needed, update and upgrade and cache policy
|
||||
on_chroot <<- \EOF
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Types: deb
|
||||
URIs: https://apt.oxmc.me/chillcraftos
|
||||
URIs: https://apt.oxmc.me/vesperos
|
||||
Suites: RELEASE
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/oxmc.gpg
|
||||
@@ -3,6 +3,6 @@ URIs: http://raspbian.raspberrypi.com/raspbian/
|
||||
Architectures: armhf
|
||||
Suites: RELEASE
|
||||
Components: main contrib non-free rpi
|
||||
#Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp
|
||||
Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp
|
||||
# TODO: Remove Trusted once Raspbian reissues their key with SHA256+ (SHA1 rejected by sqv since 2026-02-01)
|
||||
Trusted: yes
|
||||
@@ -9,7 +9,7 @@ standard NoCloud datasource seed directory for non-RPi systems.
|
||||
|
||||
- files/user-data Example user-data configuration
|
||||
|
||||
- files/meta-data-amd64 Cloud-init instance config (instance_id: chillcraftos-image)
|
||||
- files/meta-data-amd64 Cloud-init instance config (instance_id: vesperos-image)
|
||||
|
||||
The NoCloud datasource is used so cloud-init picks up config from the local
|
||||
seed directory on first boot without requiring a network metadata service.
|
||||
|
||||
@@ -15,4 +15,4 @@ dsmode: local
|
||||
# Warning: changing this will cause cloud-init to assume it is running on a
|
||||
# "new" instance, and to go through first time setup again (the value is
|
||||
# compared to a cached copy).
|
||||
instance_id: chillcraftos-rpi-image
|
||||
instance_id: vesperos-rpi-image
|
||||
@@ -15,4 +15,4 @@ dsmode: local
|
||||
# Warning: changing this will cause cloud-init to assume it is running on a
|
||||
# "new" instance, and to go through first time setup again (the value is
|
||||
# compared to a cached copy).
|
||||
instance_id: chillcraftos-image
|
||||
instance_id: vesperos-image
|
||||
Reference in New Issue
Block a user