linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 4b357625bb4ca8a7211fa2817c34ca710830a61c parent 00d24bb1361334869bf9a1406e8d62c52388a188 Author: Jul <jul@9o.is> Date: Thu, 6 Nov 2025 23:23:15 -0500 remove ninja function headers_exist Diffstat:
| M | ninja/functions.sh | | | 7 | ------- |
| M | pkg/linux-headers/gen.sh | | | 17 | ++++++++--------- |
| A | pkg/linux-headers/mandatory | | | 14 | ++++++++++++++ |
3 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/ninja/functions.sh b/ninja/functions.sh @@ -211,13 +211,6 @@ gen() { fi } -headers_exist() { - if _ninja_has $1 $_ninja_buffer_headers; then - return 0 - fi - return 1 -} - template() { if [ $# -lt 3 ]; then _ninja_template="$1 $2" diff --git a/pkg/linux-headers/gen.sh b/pkg/linux-headers/gen.sh @@ -34,15 +34,13 @@ uapi_headers() { done <$DIR/$1 } -wrap_mandatory() { - for src in $*; do +asm_headers() { + while read -r src; do outfile=$outdir/include/asm/$src - if ! headers_exist $outfile; then - build wrapper $outfile - bind file $src - headers $outfile - fi - done + build wrapper $outfile + bind file $src + headers $outfile + done <$DIR/$1 } unistd_header() { @@ -56,14 +54,15 @@ unistd_header() { # base gen: find $SRCDIR/include/uapi/* -name '*.h' | sed "s|^$SRCDIR||" | LC_COLLATE=C sort # x86 gen: find $SRCDIR/arch/x86/include/uapi/* -name '*.h' | sed "s|^$SRCDIR||" | LC_COLLATE=C sort +# mandatory gen: cat $SRCDIR/include/uapi/asm-generic/Kbuild | grep -E '^mandatory-y' | sed 's|^mandatory-y += ||' uapi_headers base uapi_headers $linux_headers_arch +asm_headers mandatory build awk $outdir/include/linux/version.h $srcdir/Makefile '|' $dir/version.awk bind expr '-f $dir/version.awk' add_header $srcdir/Makefile $outdir/include/linux/version.h -wrap_mandatory "$(cat $SRCDIR/include/uapi/asm-generic/Kbuild | grep -E '^mandatory-y' | sed 's|^mandatory-y += ||')" if [ $linux_headers_arch = x86 ]; then unistd_header unistd_32.h arch/x86/entry/syscalls/syscall_32.tbl i386 diff --git a/pkg/linux-headers/mandatory b/pkg/linux-headers/mandatory @@ -0,0 +1,14 @@ +bpf_perf_event.h +errno.h +fcntl.h +ioctl.h +ioctls.h +ipcbuf.h +param.h +poll.h +resource.h +socket.h +sockios.h +termbits.h +termios.h +types.h