diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 0bb6ab5..c58f4c7 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: run build - run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} quiet=1 + run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} compress_img=1 quiet=1 - name: upload img uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 455aae8..fa22df1 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,10 @@ Driver support depends on the device you are using shimboot on. The `patch_rootf This table is incomplete. If you want to contribute a device compatibility report please create a new issue on the Github repository. +On all devices, expect the following features to work: +- Zram (compressed memory) +- Disk compression with squashfs + On all devices, the following features will not work: - Suspend (disabled by the kernel) - Swap (disabled by the kernel) @@ -67,7 +71,8 @@ PRs and contributions are welcome to help implement these features. ### Prerequisites: - A separate Linux PC for the build process (preferably something Debian-based) -- A USB that is at least 8GB in size + - WSL2 is supported if you are on Windows +- A USB drive that is at least 8GB in size - At least 20GB of free disk space - An x86-based Chromebook diff --git a/patch_rootfs.sh b/patch_rootfs.sh index 4cd5518..be12f50 100755 --- a/patch_rootfs.sh +++ b/patch_rootfs.sh @@ -2,11 +2,6 @@ #patch the target rootfs to add any needed drivers -set -e -if [ "$DEBUG" ]; then - set -x -fi - . ./common.sh . ./image_utils.sh @@ -18,11 +13,6 @@ assert_root assert_deps "git gunzip" assert_args "$3" -if [ -z "$3" ]; then - print_help - exit 1 -fi - copy_modules() { local shim_rootfs=$(realpath -m $1) local reco_rootfs=$(realpath -m $2) @@ -41,7 +31,10 @@ copy_modules() { cp -r "${reco_rootfs}/etc/modprobe.d/"* "${target_rootfs}/etc/modprobe.d/" #decompress kernel modules if necessary - debian won't recognize these otherwise - find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip + local compressed_files="$(find "${target_rootfs}/lib/modules" -name '*.gz')" + if [ "$compressed_files" ]; then + find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip -k + fi } copy_firmware() {