Skip to content

Commit d6e1791

Browse files
committed
fix build script oversight, improve documentation
1 parent 88a7d10 commit d6e1791

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/build-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@v4
2525

2626
- name: run build
27-
run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} quiet=1
27+
run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} compress_img=1 quiet=1
2828

2929
- name: upload img
3030
uses: actions/upload-artifact@v4

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Driver support depends on the device you are using shimboot on. The `patch_rootf
4747

4848
This table is incomplete. If you want to contribute a device compatibility report please create a new issue on the Github repository.
4949

50+
On all devices, expect the following features to work:
51+
- Zram (compressed memory)
52+
- Disk compression with squashfs
53+
5054
On all devices, the following features will not work:
5155
- Suspend (disabled by the kernel)
5256
- Swap (disabled by the kernel)
@@ -67,7 +71,8 @@ PRs and contributions are welcome to help implement these features.
6771

6872
### Prerequisites:
6973
- A separate Linux PC for the build process (preferably something Debian-based)
70-
- A USB that is at least 8GB in size
74+
- WSL2 is supported if you are on Windows
75+
- A USB drive that is at least 8GB in size
7176
- At least 20GB of free disk space
7277
- An x86-based Chromebook
7378

patch_rootfs.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
#patch the target rootfs to add any needed drivers
44

5-
set -e
6-
if [ "$DEBUG" ]; then
7-
set -x
8-
fi
9-
105
. ./common.sh
116
. ./image_utils.sh
127

@@ -18,11 +13,6 @@ assert_root
1813
assert_deps "git gunzip"
1914
assert_args "$3"
2015

21-
if [ -z "$3" ]; then
22-
print_help
23-
exit 1
24-
fi
25-
2616
copy_modules() {
2717
local shim_rootfs=$(realpath -m $1)
2818
local reco_rootfs=$(realpath -m $2)
@@ -41,7 +31,10 @@ copy_modules() {
4131
cp -r "${reco_rootfs}/etc/modprobe.d/"* "${target_rootfs}/etc/modprobe.d/"
4232

4333
#decompress kernel modules if necessary - debian won't recognize these otherwise
44-
find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip
34+
local compressed_files="$(find "${target_rootfs}/lib/modules" -name '*.gz')"
35+
if [ "$compressed_files" ]; then
36+
find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip -k
37+
fi
4538
}
4639

4740
copy_firmware() {

0 commit comments

Comments
 (0)