redhat: workaround CKI cross compilation for scripts

Bugzilla: INTERNAL
Upstream Status: RHEL only

I am only reapplying the kernel.spec.template change in
2c0c8979e9 ("redhat: workaround CKI cross compilation for scripts")
to avoid issues with the CKI BZ bot.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
This commit is contained in:
Prarit Bhargava 2022-08-29 15:54:00 -04:00
parent cb81583b40
commit 78ab4007c0
1 changed files with 9 additions and 0 deletions

View File

@ -2151,6 +2151,11 @@ BuildKernel() {
rm -f $RPM_BUILD_ROOT/mod-partner.list
%endif
%if %{with_cross}
make -C $RPM_BUILD_ROOT/lib/modules/$KernelVer/build M=scripts clean
sed -i 's/REBUILD_SCRIPTS_FOR_CROSS:=0/REBUILD_SCRIPTS_FOR_CROSS:=1/' $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile
%endif
# Move the devel headers out of the root file system
mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
@ -2734,6 +2739,10 @@ then\
/usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' -delete\
)\
fi\
%if %{with_cross}\
echo "Building scripts"\
env --unset=ARCH make -C /usr/src/kernels/%{KVERREL}%{?1:+%{1}} prepare_after_cross\
%endif\
%{nil}
#