mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
Rationale: previously we had archs on toplevel, e.g. out/x86_64 However, host tools like QEMU and gem5 can reuse a lot of the common build files across archs. Therefore, we save space and time by putting them into a single directory. Therefore, the toplevel out/x86_64 was inconsistent, better put arch inside guest tools that need separate build trees instead, e.g. out/buildroot/x86_64/ Also common was pretty obscure as a name to say the best.
23 lines
380 B
Bash
Executable File
23 lines
380 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eu
|
|
archs='x86_64 arm aarch64'
|
|
gem5=true
|
|
while getopts A:G OPT; do
|
|
case "$OPT" in
|
|
A)
|
|
archs="$OPTARG"
|
|
;;
|
|
G)
|
|
gem5=false
|
|
;;
|
|
esac
|
|
done
|
|
shift "$(($OPTIND - 1))"
|
|
for arch in $archs; do
|
|
./build-qemu --arch "$arch"
|
|
./build --arch "$arch" --kernel-modules -l "$@"
|
|
if "$gem5"; then
|
|
./build-gem5 --arch "$arch"
|
|
fi
|
|
done
|