mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-02-21 17:07:18 +07:00
build: add mkosi hooks
Right now there's support for building on Archlinux only.
This commit is contained in:
parent
bb83f6ac68
commit
cc71e0a589
@ -498,3 +498,11 @@ tar: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
|
||||
|
||||
tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
|
||||
kup put kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign /pub/linux/utils/kernel/kmod/
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# mkosi
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
mkosi:
|
||||
-mkdir $(top_srcdir)/testsuite/mkosi/mkosi.cache
|
||||
mkosi -C $(top_srcdir)/testsuite/mkosi --build-sources ../../ -fi
|
||||
|
4
testsuite/mkosi/.gitignore
vendored
Normal file
4
testsuite/mkosi/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/image.raw*
|
||||
/.mkosi-*
|
||||
/mkosi.cache
|
||||
/rootfs
|
22
testsuite/mkosi/mkosi.arch
Normal file
22
testsuite/mkosi/mkosi.arch
Normal file
@ -0,0 +1,22 @@
|
||||
[Distribution]
|
||||
Distribution=arch
|
||||
Release=(rolling)
|
||||
|
||||
[Packages]
|
||||
Packages = valgrind
|
||||
BuildPackages =
|
||||
automake
|
||||
gcc
|
||||
git
|
||||
make
|
||||
pkg-config
|
||||
python2
|
||||
python2-future
|
||||
autoconf
|
||||
gtk-doc
|
||||
docbook-xml
|
||||
docbook-xsl
|
||||
linux-headers
|
||||
|
||||
[Partitions]
|
||||
RootSize = 4G
|
23
testsuite/mkosi/mkosi.build
Executable file
23
testsuite/mkosi/mkosi.build
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
if [ -f configure ]; then
|
||||
make distclean
|
||||
fi
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
kdirs=(/usr/lib/modules/*/build/Makefile)
|
||||
if [[ ! -f ${kdirs[0]} ]]; then
|
||||
printf '==> Unable to find kernel headers to build modules for tests\n' >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
kdir=${kdirs[0]%/Makefile}
|
||||
IFS=/ read _ _ _ kver _ <<<"$kdir"
|
||||
|
||||
../autogen.sh c
|
||||
make -j
|
||||
make check KDIR="$kdir" KVER="$kver"
|
||||
make install
|
1
testsuite/mkosi/mkosi.default
Symbolic link
1
testsuite/mkosi/mkosi.default
Symbolic link
@ -0,0 +1 @@
|
||||
mkosi.arch
|
Loading…
Reference in New Issue
Block a user