Support a build without u2mfn module
In R4.1 u2mfn module isn't needed anymore.
QubesOS/qubes-issues#4280
(cherry picked from commit a5a4ae6735
)
This commit is contained in:
parent
8b4d479798
commit
734ee7c248
@ -164,9 +164,11 @@ make clean $MAKE_ARGS
|
||||
|
||||
rm -f source
|
||||
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
|
||||
u2mfn_ver=`dkms status u2mfn|tail -n 1|cut -f 2 -d ' '|tr -d ':,:'`
|
||||
rm -rf %_builddir/u2mfn
|
||||
u2mfn_ver=`dkms status u2mfn|tail -n 1|cut -f 2 -d ' '|tr -d ':,:'`
|
||||
if [ -n "$u2mfn_ver" ]; then
|
||||
cp -r /usr/src/u2mfn-$u2mfn_ver %_builddir/u2mfn
|
||||
fi
|
||||
|
||||
%build
|
||||
|
||||
@ -185,7 +187,9 @@ export AFTER_LINK=\
|
||||
make %{?_smp_mflags} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
|
||||
|
||||
# Build u2mfn module
|
||||
if [ -d "%_builddir/u2mfn" ]; then
|
||||
make -C %kernel_build_dir M=%_builddir/u2mfn modules
|
||||
fi
|
||||
|
||||
%install
|
||||
|
||||
@ -220,7 +224,9 @@ dd if=/dev/zero of=%buildroot/boot/initramfs-%kernelrelease.img \
|
||||
gzip -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease.gz
|
||||
|
||||
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
||||
if [ -d "%_builddir/u2mfn" ]; then
|
||||
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/u2mfn
|
||||
fi
|
||||
|
||||
mkdir -p %buildroot/%src_install_dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user