You've already forked ps5-linux-image
mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-04-29 16:42:45 -07:00
29 lines
906 B
Bash
29 lines
906 B
Bash
#!/bin/bash
|
|
# Compiles the kernel and stages all artifacts into /out/staging.
|
|
# Runs inside Docker; kernel source is bind-mounted at /src.
|
|
set -e
|
|
|
|
# Clean host-built tool artifacts that may reference wrong include paths
|
|
make -C tools/objtool clean 2>/dev/null || true
|
|
|
|
make olddefconfig
|
|
make -j"$(nproc)" bzImage modules
|
|
|
|
# Stage all artifacts so downstream packagers don't need to run make
|
|
echo "=== Staging build artifacts ==="
|
|
rm -rf /out/staging
|
|
mkdir -p /out/staging/boot
|
|
|
|
cp arch/x86/boot/bzImage /out/staging/boot/
|
|
cp System.map /out/staging/
|
|
cp .config /out/staging/
|
|
|
|
make modules_install INSTALL_MOD_PATH=/out/staging INSTALL_MOD_STRIP=1
|
|
|
|
# Remove dangling symlinks back into the source tree
|
|
KVER=$(make -s kernelrelease)
|
|
rm -f "/out/staging/lib/modules/$KVER/build" \
|
|
"/out/staging/lib/modules/$KVER/source"
|
|
|
|
echo "=== Build artifacts staged in /out/staging ==="
|