linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit a40c1947ef53951ddf1e9bc59a4dd656b8c206fc
parent 44b38b7cc37e6e39fcff7f1023658ad095c17334
Author: Jul <jul@9o.is>
Date:   Tue, 25 Nov 2025 00:47:11 -0500

build xen cpuid-autogen.h with ninja

Diffstat:
Mpkg/xen/gen.sh | 15++++++++++-----
Apkg/xen/linkheaders.sh | 26++++++++++++++++++++++++++
Dpkg/xen/tools_headers.sh | 27---------------------------
3 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/pkg/xen/gen.sh b/pkg/xen/gen.sh @@ -19,17 +19,21 @@ cflags " " dep " - $outdir/prepare_include + $outdir/headerslinked $outdir/internal/xen/foreign/x86_32.h $outdir/internal/xen/foreign/x86_64.h + $outdir/internal/xen/lib/x86/cpuid-autogen.h zlib/headers " -rule tools_headers 'sh $dir/tools_headers.sh $srcdir && touch $out' -bind description 'XEN HEADERS $out' +rule linkheaders 'sh $dir/linkheaders.sh $srcdir && touch $out' +bind description 'XEN $out' rule mkheader 'python $srcdir/tools/include/xen-foreign/mkheader.py $arch $out $in' -bind description 'MKHEADER $out' +bind description 'XEN $out' + +rule gen_cpuid '$srcdir/xen/tools/gen-cpuid.py -i $in -o $out' +bind description 'XEN $out' mkx86header() { mkheader $1.h.tmp " @@ -43,9 +47,10 @@ mkx86header() { bind expr "\"s/(__align8__ \(uint64_t\))/(\1)/g\"" } -tools_headers prepare_include '||' $outdir/fetched +linkheaders headerslinked '||' $outdir/fetched mkx86header x86_32 mkx86header x86_64 +gen_cpuid internal/xen/lib/x86/cpuid-autogen.h xen/include/public/arch-x86/cpufeatureset.h lib libxentoolcore.a --src-prefix tools/libs/toolcore " handlereg.c diff --git a/pkg/xen/linkheaders.sh b/pkg/xen/linkheaders.sh @@ -0,0 +1,26 @@ +set -eu + +cd $1/tools/include + +rm -rf xen +mkdir -p xen + +cd xen +ln -s ../../../xen/include/public/*.h . +ln -s ../../../xen/include/public/*/ . +ln -s ../xen-sys/Linux sys +ln -s ../xen-foreign foreign + +mkdir -p libelf +cd libelf +ln -s ../../../../xen/include/xen/libelf.h . +ln -s ../../../../xen/include/xen/elfstructs.h . +cd .. + +# x86 +ln -s ../../../xen/arch/x86/include/asm asm +mkdir -p lib/x86 +cd lib/x86 +for hdr in ../../../../../xen/include/xen/lib/x86/*.h; do + ln -s $hdr . +done diff --git a/pkg/xen/tools_headers.sh b/pkg/xen/tools_headers.sh @@ -1,27 +0,0 @@ -set -eu - -cd $1/tools/include - -mkdir -p xen -find xen/ -type l -exec rm '{}' + - -cd xen -ln -s ../../../xen/include/public/*.h . -ln -s ../../../xen/include/public/*/ . -ln -s ../xen-sys/Linux sys -ln -s ../xen-foreign foreign - -mkdir -p libelf -cd libelf -ln -s ../../../../xen/include/xen/libelf.h . -ln -s ../../../../xen/include/xen/elfstructs.h . -cd .. - -# x86 -ln -s ../../../xen/arch/x86/include/asm asm -mkdir -p lib/x86 -cd lib/x86 -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