Skip to content

Commit

Permalink
Build and package header files.
Browse files Browse the repository at this point in the history
  • Loading branch information
WeirdTreeThing committed Sep 8, 2022
1 parent ff5a1d4 commit 42bc51a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ jobs:
files: |
bzImage
bzImage.signed
modules*
modules.tar.xz
headers.tar.xz
13 changes: 11 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ echo "mod" >> .gitignore
touch .scmversion

MODULES="modules.tar.xz"
HEADERS="headers.tar.xz"
VMLINUZ="bzImage"
SYSTEM_MAP="System.map-breath"
[[ -f .config ]] || cp ../.config .config || exit
Expand Down Expand Up @@ -88,6 +89,7 @@ echo "Signed bzImage created\!" # Shell expansion weirdness
rm -rf mod || true
mkdir mod
make -j$(nproc) modules_install INSTALL_MOD_PATH=mod
make -j$(nproc) headers_install INSTALL_HDR_PATH=hdr

# Creates an archive containing /lib/modules/...
cd mod
Expand All @@ -99,11 +101,18 @@ chmod +x fastxz
tar -cvI './fastxz' -f ../../$MODULES lib/
echo "modules.tar.xz created!"

# Compress headers
cd ..
cd hdr

echo "xz -9 -T0" > fastxz
chmod +x fastxz
tar -cvI './fastxz' -f ../../$HEADERS include/
echo "headers.tar.xz created!"

# Copy the vmlinuz, system.map, and kernel config to the kernel directory
cd ..
cp System.map ../$SYSTEM_MAP
cp .config ../$CONFIG

cd ..
echo "Command to extract modules to USB:"
echo "sudo rm -rf /mnt/lib/modules/* && sudo cp -Rv kernel/mod/lib/modules/* /mnt/lib/modules && sync"
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Enabled more device mapper targets.
Build and package headers.

0 comments on commit 42bc51a

Please sign in to comment.