linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 44b38b7cc37e6e39fcff7f1023658ad095c17334 parent bf8b7fb5479d5e905668958874f7b4881e635977 Author: Jul <jul@9o.is> Date: Tue, 25 Nov 2025 00:25:58 -0500 run xen mkheader as a ninja build Diffstat:
| M | pkg/xen/gen.sh | | | 20 | ++++++++++++++++++++ |
| A | pkg/xen/patch/0001-handle-outfile-path-in-mkheader.py.patch | | | 34 | ++++++++++++++++++++++++++++++++++ |
| M | pkg/xen/tools_headers.sh | | | 24 | ------------------------ |
3 files changed, 54 insertions(+), 24 deletions(-)
diff --git a/pkg/xen/gen.sh b/pkg/xen/gen.sh @@ -12,6 +12,7 @@ cflags " -D_LARGEFILE64_SOURCE -include $dir/config.h -I$srcdir/tools/include + -I$outdir/internal -Wno-pedantic -Wno-unused-parameter -Wno-sign-compare @@ -19,13 +20,32 @@ cflags " dep " $outdir/prepare_include + $outdir/internal/xen/foreign/x86_32.h + $outdir/internal/xen/foreign/x86_64.h zlib/headers " rule tools_headers 'sh $dir/tools_headers.sh $srcdir && touch $out' bind description 'XEN HEADERS $out' +rule mkheader 'python $srcdir/tools/include/xen-foreign/mkheader.py $arch $out $in' +bind description 'MKHEADER $out' + +mkx86header() { + mkheader $1.h.tmp " + $srcdir/xen/include/public/arch-x86/xen-$1.h + $srcdir/xen/include/public/arch-x86/xen.h + $srcdir/xen/include/public/xen.h + " + bind arch $1 + + sed internal/xen/foreign/$1.h $outdir/$1.h.tmp + bind expr "\"s/(__align8__ \(uint64_t\))/(\1)/g\"" +} + tools_headers prepare_include '||' $outdir/fetched +mkx86header x86_32 +mkx86header x86_64 lib libxentoolcore.a --src-prefix tools/libs/toolcore " handlereg.c diff --git a/pkg/xen/patch/0001-handle-outfile-path-in-mkheader.py.patch b/pkg/xen/patch/0001-handle-outfile-path-in-mkheader.py.patch @@ -0,0 +1,34 @@ +From 01ad13e04b323d2c815d14961ef36d94127c8e3a Mon Sep 17 00:00:00 2001 +From: Jul <jul@qh.is> +Date: Tue, 25 Nov 2025 00:22:03 -0500 +Subject: [PATCH] handle outfile path in mkheader.py + +--- + tools/include/xen-foreign/mkheader.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py +index 128b0f3014..7b14a3a9d3 100644 +--- a/tools/include/xen-foreign/mkheader.py ++++ b/tools/include/xen-foreign/mkheader.py +@@ -2,7 +2,7 @@ + + from __future__ import print_function + +-import sys, re ++import sys, re, os + from structs import unions, structs, defines + + # command line arguments +@@ -114,7 +114,7 @@ footer["x86_64"] = """ + + input = "" + output = "" +-fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper()) ++fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % os.path.basename(outfile).upper()) + + for name in infiles: + f = open(name, "r") +-- +2.51.0 + diff --git a/pkg/xen/tools_headers.sh b/pkg/xen/tools_headers.sh @@ -25,27 +25,3 @@ for hdr in ../../../../../xen/include/xen/lib/x86/*.h; do ln -s $hdr . done python3 ../../../../../xen/tools/gen-cpuid.py -i ../../../../../xen/include/public/arch-x86/cpufeatureset.h -o cpuid-autogen.h -cd ../.. - -cd ../xen-foreign - -mkheader() { - arch=$1 - - python3 mkheader.py $arch $arch.h.tmp \ - ../../../xen/include/public/arch-x86/xen-$arch.h \ - ../../../xen/include/public/arch-x86/xen.h \ - ../../../xen/include/public/xen.h - - sed 's/(__align8__ \(uint64_t\))/(\1)/g' < $arch.h.tmp > $arch.h.tmp2 - rm $arch.h.tmp - - if ! cmp -s $arch.h.tmp2 $arch.h; then - mv -f $arch.h.tmp2 $arch.h - else - rm -f $arch.h.tmp2 - fi -} - -mkheader x86_32 -mkheader x86_64