diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b53e3dc5c6a..bb08a3bae2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends debootstrap + sudo apt-get install -y --no-install-recommends debootstrap erofs-utils [ ${{ inputs.compat-distro }} != devuan ] || curl https://git.devuan.org/devuan/debootstrap/raw/branch/master/scripts/ceres | sudo tee /usr/share/debootstrap/scripts/`echo ${{ inputs.compat-distro-version }} | sed s/64$//` - name: 1download timeout-minutes: 120 diff --git a/.github/workflows/dpup-kernel.yml b/.github/workflows/dpup-kernel.yml index 20cfd723e9b..ec9d3019235 100644 --- a/.github/workflows/dpup-kernel.yml +++ b/.github/workflows/dpup-kernel.yml @@ -22,7 +22,7 @@ jobs: - name: Free space run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet # increase free space, we don't need these - name: Install dependencies - run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends debootstrap + run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends debootstrap erofs-utils - name: merge2out timeout-minutes: 5 run: sudo -E ./merge2out woof-distro/${{ matrix.arch }}/debian/${{ matrix.release }}64 diff --git a/initrd-progs/0initrd/init b/initrd-progs/0initrd/init index bd34f9b66e6..76ed3af9a6d 100755 --- a/initrd-progs/0initrd/init +++ b/initrd-progs/0initrd/init @@ -222,7 +222,7 @@ do_stack_onepupdrv() { losetup -r $ONE_LOOP $ONE_SFS SFS_MP="/pup_${ONE_SFX}" mkdir -p $SFS_MP - mount -r -t squashfs -o noatime $ONE_LOOP $SFS_MP > /dev/console 2>&1 + mount -r -t erofs,squashfs -o noatime $ONE_LOOP $SFS_MP > /dev/console 2>&1 STATUS=$? ; check_status $STATUS [ $STATUS -eq 0 ] && ONE_LAYER="$SFS_MP=rr" # ======= end of load_sfs_file() diff --git a/kernel-kit/README b/kernel-kit/README index 354478fcfb4..525c40cc381 100644 --- a/kernel-kit/README +++ b/kernel-kit/README @@ -36,7 +36,7 @@ distro which is compatible with the target distro. REQUIRED: gcc - for compilation -mksquashfs - for compressing the kernel source sfs, will build without +erofs-utils - for compressing the kernel source sfs CREDIT ------ diff --git a/kernel-kit/build.sh b/kernel-kit/build.sh index ecc1f44e35b..9a92d66ca5c 100755 --- a/kernel-kit/build.sh +++ b/kernel-kit/build.sh @@ -60,11 +60,11 @@ mkdir -p ${KBUILD_DIR}/usr/src/${KBUILD_DIR} mkdir -p ${KBUILD_DIR}/usr/lib/modules/${kernel_version} ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/build ln -s ../../../src/${KBUILD_DIR} ${KBUILD_DIR}/usr/lib/modules/${kernel_version}/source -mksquashfs ${KBUILD_DIR} output/${KBUILD_DIR}.sfs ${SFSCOMP} || exit 1 +mkfs.erofs ${SFSCOMP} output/${KBUILD_DIR}.sfs ${KBUILD_DIR} || exit 1 rm -rf ${KBUILD_DIR} KERNEL_MODULES_SFS_NAME="kernel-modules-${kernel_version}.sfs" -mksquashfs output/linux_kernel-${kernel_version} output/${KERNEL_MODULES_SFS_NAME} ${SFSCOMP} || exit 1 +mkfs.erofs ${SFSCOMP} output/${KERNEL_MODULES_SFS_NAME} output/linux_kernel-${kernel_version} || exit 1 rm -rf output/linux_kernel-${kernel_version} echo "Done!" diff --git a/kernel-kit/debian-diffconfigs/trixie b/kernel-kit/debian-diffconfigs/trixie index e7d5b9f41bd..d9b2eb277dc 100644 --- a/kernel-kit/debian-diffconfigs/trixie +++ b/kernel-kit/debian-diffconfigs/trixie @@ -12,6 +12,7 @@ CONFIG_CROS_EC_LPC=m CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_XTS=y +CONFIG_EROFS_FS=y CONFIG_EXFAT_FS=y CONFIG_EXT4_FS=y CONFIG_F2FS_FS=y diff --git a/woof-code/3builddistro b/woof-code/3builddistro index 5be72e49944..62980d49699 100755 --- a/woof-code/3builddistro +++ b/woof-code/3builddistro @@ -213,10 +213,10 @@ cp -f ../kernel-kit/output/vmlinuz-* build/vmlinuz cp -f ../kernel-kit/output/kbuild-*.sfs build/ cp -f ../kernel-kit/output/kernel-modules-*.sfs build/${ZDRVSFS} -mksquashfs fdrv build/${FDRVSFS} ${SFSCOMP} -mksquashfs nlsx build/${NLSXSFS} ${SFSCOMP} -mksquashfs docx build/${DOCXSFS} ${SFSCOMP} -mksquashfs rootfs-complete build/${PUPPYSFS} ${SFSCOMP} +mkfs.erofs ${SFSCOMP} build/${FDRVSFS} fdrv +mkfs.erofs ${SFSCOMP} build/${NLSXSFS} nlsx +mkfs.erofs ${SFSCOMP} build/${DOCXSFS} docx +mkfs.erofs ${SFSCOMP} build/${PUPPYSFS} rootfs-complete WOOF_OUTPUT="woof-output-${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}" mkdir -p ../${WOOF_OUTPUT} diff --git a/woof-code/rootfs-skeleton/usr/local/sbin/sfs_load.overlay b/woof-code/rootfs-skeleton/usr/local/sbin/sfs_load.overlay index dedef4d4444..2336492321e 100755 --- a/woof-code/rootfs-skeleton/usr/local/sbin/sfs_load.overlay +++ b/woof-code/rootfs-skeleton/usr/local/sbin/sfs_load.overlay @@ -139,7 +139,7 @@ if [ $# -ne 0 ]; then [ $FOUND -eq 0 ] && exit 1 mkdir -p "$MNT" || continue - mount -r -t squashfs -o loop,noatime "$SFS" "$MNT" + mount -r -t erofs,squashfs -o loop,noatime "$SFS" "$MNT" if [ $? -ne 0 ]; then rmdir "$MNT" continue @@ -220,7 +220,7 @@ if [ $# -ne 0 ]; then mkdir -p "$MNT" mountpoint -q "$MNT" if [ $? -ne 0 ]; then - mount -r -t squashfs -o loop,noatime "$SFS" "$MNT" || continue + mount -r -t erofs,squashfs -o loop,noatime "$SFS" "$MNT" || continue fi defaultfilemanager "$MNT" & diff --git a/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/sfs_load.md b/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/sfs_load.md index 45f14162e13..4957801f1a6 100644 --- a/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/sfs_load.md +++ b/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/sfs_load.md @@ -1,6 +1,6 @@ # SFS Modules -SFS modules are [Squashfs](https://docs.kernel.org/filesystems/squashfs.html) images containing a read-only directory hierarchy. DISTRO_NAME uses [overlayfs](https://docs.kernel.org/filesystems/overlayfs.html) to stack SFSs on top of each other and present their contents as a unified directory hierarchy. +SFS modules are [EROFS](https://docs.kernel.org/filesystems/erofs.html) or [Squashfs](https://docs.kernel.org/filesystems/squashfs.html) images containing a read-only directory hierarchy. DISTRO_NAME uses [overlayfs](https://docs.kernel.org/filesystems/overlayfs.html) to stack SFSs on top of each other and present their contents as a unified directory hierarchy. ## Loading @@ -39,10 +39,10 @@ Therefore, to control the stacking order of these SFSs, prefix their names with To create /tmp/app.sfs from /tmp/app: - mksquashfs /tmp/app /tmp/app.sfs -comp zstd -Xcompression-level 19 -b 256K -no-exports -no-xattrs + mkfs.erofs -x0 -zlz4hc,12 -C262144 /tmp/app.sfs /tmp/app To load app.sfs on startup, place it under the root (or `psubdir`, if set) of the save partition or boot partition. Once app.sfs is loaded, /tmp/app/usr/bin/a can be accessed through /usr/bin/a. -See `man mksquashfs` for more SFS creation options. +See `man mkfs.erofs` for more SFS creation options. diff --git a/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/woof-CE.md b/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/woof-CE.md index 8e237970687..ba010244021 100644 --- a/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/woof-CE.md +++ b/woof-code/rootfs-skeleton/usr/local/share/doc/puppy/woof-CE.md @@ -55,6 +55,7 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i ### Speed * The init script (/etc/rc.d/rc.sysinit) and the shutdown script (/etc/rc.d/rc.shutdown) are shorter and much faster. +* SFSs can use [EROFS](https://docs.kernel.org/filesystems/erofs.html) instead of [Squashfs](https://docs.kernel.org/filesystems/squashfs.html) and all built-in SFSs use the former. * Caching of SFSs in RAM (`pfix=ram|copy` or automatic) happens in the background while the boot process continues. * 1download and 3builddistro are reimplemented using [debootstrap](https://wiki.debian.org/Debootstrap) and chroot environments. Build times are much shorter than upstream's and woof-CE itself is more portable. * `save2flash` is much faster because it preallocates space when files grow and only copies appended or modified blocks when files change. @@ -122,7 +123,7 @@ The goal is to build something similar to [DebianDog](https://debiandog.github.i ## Usage - sudo apt-get install -y --no-install-recommends debootstrap squashfs-tools + sudo apt-get install -y --no-install-recommends debootstrap erofs-utils Then: diff --git a/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie b/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie index 6aff363ee11..90457d4261c 100644 --- a/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie +++ b/woof-distro/x86_64/debian/trixie64/DISTRO_PKGS_SPECS-debian-trixie @@ -41,6 +41,7 @@ yes|desktop-file-utils|desktop-file-utils|exe,dev,doc,nls||deps:yes yes|dialog|dialog|exe,dev>null,doc,nls||deps:yes no|dkms|dkms|exe,dev>exe,doc,nls||deps:yes yes|dosfstools|dosfstools|exe,dev>null,doc,nls||deps:yes +yes|erofs-utils|erofs-utils|exe,dev,doc,nls||deps:yes yes|exfatprogs|exfatprogs|exe,dev,doc,nls||deps:yes yes|f2fs-tools|f2fs-tools|exe,dev,doc,nls||deps:yes yes|gettext-base|gettext-base|exe,dev,doc,nls||deps:yes @@ -67,7 +68,6 @@ yes|pipewire|pipewire-pulse,pipewire-alsa,libspa-0.2-bluetooth,libpipewire-0.3-d yes|pigz|pigz|exe,dev,doc,nls||deps:yes yes|procps|procps|exe,dev,doc,nls||deps:yes yes|psmisc|psmisc|exe,dev>null,doc,nls||deps:yes -yes|squashfs-tools|squashfs-tools|exe,dev,doc,nls||deps:yes yes|udev|udev|exe,dev,doc,nls||deps:yes yes|wireless-regdb|wireless-regdb|exe,dev,doc,nls||deps:yes yes|wireplumber|wireplumber|exe,dev,doc,nls||deps:yes diff --git a/woof-distro/x86_64/debian/trixie64/_00build.conf b/woof-distro/x86_64/debian/trixie64/_00build.conf index d2ef5902199..a6e24b46109 100644 --- a/woof-distro/x86_64/debian/trixie64/_00build.conf +++ b/woof-distro/x86_64/debian/trixie64/_00build.conf @@ -18,8 +18,4 @@ fi [ "$DISTRO_VARIANT" != "barebones" ] && PETBUILDS="$PETBUILDS notification-daemon-stub mtpaint epdfview deadbeef gmeasures fpm2 xpad ExpenseTracker hardinfo gfnrename fsearch wly-colpick gplaces" ## compression method to be used (SFS files) -#SFSCOMP='-comp xz -Xbcj x86 -b 512K' -#SFSCOMP='-comp xz -Xbcj arm,armthumb -b 512K' -#SFSCOMP='-comp gzip' -#SFSCOMP='-noI -noD -noF -noX' -SFSCOMP='-comp zstd -Xcompression-level 19 -b 256K -no-exports -no-xattrs' +SFSCOMP='-x0 -zlz4hc,12 -C262144'