Skip to content

Commit

Permalink
run depmod after decompressing modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Apr 29, 2024
1 parent d6e1791 commit adf8546
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 1024
root-reserve-mb: 4096
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'

- name: download repo
uses: actions/checkout@v4
Expand All @@ -31,7 +33,7 @@ jobs:
with:
name: shimboot_${{ matrix.board }}
path: data/shimboot_${{ matrix.board }}.bin
compression-level: 9
compression-level: 7

- name: create release
uses: softprops/action-gh-release@v1
Expand Down
8 changes: 6 additions & 2 deletions patch_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ print_help() {
}

assert_root
assert_deps "git gunzip"
assert_deps "git gunzip depmod"
assert_args "$3"

copy_modules() {
Expand All @@ -33,7 +33,11 @@ copy_modules() {
#decompress kernel modules if necessary - debian won't recognize these otherwise
local compressed_files="$(find "${target_rootfs}/lib/modules" -name '*.gz')"
if [ "$compressed_files" ]; then
find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip -k
echo "$compressed_files" | xargs gunzip
for kernel_dir in "$target_rootfs/lib/modules/"*; do
local version="$(basename "$kernel_dir")"
depmod -b "$target_rootfs" "$version"
done
fi
}

Expand Down
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
6. Run `sudo ./build.sh image.bin path_to_shim data/rootfs` to generate a disk image at `image.bin`.

<b id="usage">Booting the Image:</b>
1. Obtain a shimboot image by downloading a <a href="https://github.com/ading2210/shimboot/actions?query=branch%3Amain">prebuilt one</a> or building it yourself.
1. Obtain a shimboot image by downloading a <a href="https://github.com/ading2210/shimboot/releases">prebuilt one</a> or building it yourself.
2. Flash the shimboot image to a USB drive or SD card. Use the <a href="https://chrome.google.com/webstore/detail/chromebook-recovery-utili/pocpnlppkickgojjlmhdmidojbmbodfm">Chromebook Recovery Utility</a> or <a href="https://linux.die.net/man/1/dd">dd</a> if you're on Linux.
3. Enable developer mode on your Chromebook. If the Chromebook is enrolled, follow the instructions on the <a href="https://sh1mmer.me">sh1mmer website</a> (see the "Executing on Chromebook" section).
4. Plug the USB into your Chromebook and enter recovery mode. It should detect the USB and run the shimboot bootloader.
Expand Down

0 comments on commit adf8546

Please sign in to comment.