- pfk.h: BSD types/ioctl encoding (OpenBSD bit layout), locks (NET_LOCK=rwsem), pools, timeouts, mbuf shim over sk_buff, ifnet registry, toeplitz/siphash - pfk_mod/pfk_hooks: misc /dev/pf (0600), IPv4 netfilter hook skeleton, DIOCGETSTATUS answered (M1 skeleton; engine ioctls land with pf_ioctl.c) - vendorize/stage-port scripts: deterministic upstream staging with seds (struct renames, IFF_*->PFIFF_*, sa_len drops) logged to docs/porting-notes - fixes: modules_prepare+Module.symvers for out-of-tree builds
22 lines
980 B
Bash
Executable File
22 lines
980 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build Linux 7.3.4 (VM-lab config) + collect boot artifacts into out/.
|
|
set -euo pipefail
|
|
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
|
K="${KERNELDIR:-$(cd "$REPO/../linux-7.3.4" && pwd)}"
|
|
cd "$K"
|
|
"$REPO/scripts/kernel-config.sh" "${1:-}"
|
|
JOBS="${JOBS:-$(($(nproc)-2))}"
|
|
make -j"$JOBS" -s bzImage modules_prepare
|
|
# External module builds need Module.symvers (kbuild only writes
|
|
# vmlinux.symvers) and scripts/module.lds (from modules_prepare above).
|
|
[ -f Module.symvers ] || cp vmlinux.symvers Module.symvers
|
|
[ -f scripts/module.lds ] || { echo "FATAL: scripts/module.lds missing" >&2; exit 1; }
|
|
mkdir -p "$REPO/out"
|
|
KVER="$(make -s kernelversion)"
|
|
cp -f arch/x86/boot/bzImage "$REPO/out/linux-${KVER}-bzImage"
|
|
cp -f System.map "$REPO/out/System.map"
|
|
cp -f .config "$REPO/out/.config"
|
|
make -s kernelrelease > "$REPO/out/kernelversion"
|
|
sha256sum "$REPO/out/linux-${KVER}-bzImage" > "$REPO/out/bzImage.sha256"
|
|
echo "KERNEL_BUILD_OK $(cat "$REPO/out/kernelversion")"
|