From ead70c56506b0f1bb178d780f311735cb2b3a353 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 22 Jul 2021 05:16:51 +0200 Subject: Refine boot process of build target and allow config of /boot fstype and mount-options - Add env-vars BOOT_FSTYPE and BOOT_FSOPTIONS, supporting customizing the boot filesystem type and options - FAT_CODEPAGE (if using BOOT_FSTYPE vfat, default) is hardcoded '437' - Add 'lsof', allowing to check open listening ports (besides netstat) - On Raspi: Use plymouth splash screen for all configurations, theme 'pix' - Add systemd resize2fs_once.service to have it start very early to resize the rootfs partition for RW rootfs - No kernel argument 'rootwait' for initramfs/grub root=file boot loop_rootfs (initram): - kill spawn-off pipe copy process (LOOP_ROOTFS_LOG_PIDS) - Use BOOT_FSTYPE, BOOT_FSOPTIONS (incl mounting /boot).. - Use dedicated fsck.BOOT_FSTYPE if possible (and quiet) - Log fsck and mount attempts, failure and success - Stage2 01-sys-tweaks fixes: - Only disable systemd-remount-fs for ROOTFS_RO - Only generate /boot/loop_rootfs.id for ROOTFS_RO - Kernel Modules: Add codepage 437 and 850, drm and vc4 (raspi only) - Use TARGET_ARCH in all situations - On RW rootfs, grub-install with ext2 module - --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index bcac7f0..9ebe515 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,12 @@ #!/bin/bash -e export DEBIAN_FRONTEND=noninteractive -export APT_GET_INSTALL_OPTS='-o APT::Acquire::Retries=3 -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"' # shellcheck disable=SC2119 run_sub_stage() { + local APT_GET_INSTALL_OPTS='-o APT::Acquire::Retries=3 -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"' + local packfile; local PACKAGES; log "Begin ${SUB_STAGE_DIR}" @@ -339,6 +340,14 @@ export BASE_QCOW2_SIZE=${BASE_QCOW2_SIZE:-15200M} source "${SCRIPT_DIR}/qcow2_handling" export ROOTFS_RO_OVERLAY_TMPFS_SIZE=${ROOTFS_RO_OVERLAY_TMPFS_SIZE:-128M} +# vfat, ext2, ext4 or xfs +export BOOT_FSTYPE=${BOOT_FSTYPE:-vfat} +# codepage is hardcoded in 'loop_rootfs' and scripts, as well as required by pi-gen build +if [ -z ${FAT_CODEPAGE+x} ]; then + readonly FAT_CODEPAGE="437" + export FAT_CODEPAGE +fi +export BOOT_FSOPTIONS=${BOOT_FSOPTIONS:-rw,noatime,fmask=0022,dmask=0022,codepage=${FAT_CODEPAGE},iocharset=ascii,shortname=mixed,errors=remount-ro} dependencies_check "${BASE_DIR}/depends" -- cgit v1.2.3