Skip to content

Commit

Permalink
fix build script oversight, improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Apr 29, 2024
1 parent 88a7d10 commit d6e1791
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down
15 changes: 4 additions & 11 deletions patch_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -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() {
Expand Down

0 comments on commit d6e1791

Please sign in to comment.