Add verbose option
There may be cases when it's useful to see the full kernel build output. Add an option to allow rebuilding with full logs. From Jaroslav Škarvada
This commit is contained in:
parent
825a0e7a9c
commit
2fb3e72238
23
kernel.spec
23
kernel.spec
@ -118,11 +118,20 @@ Summary: The Linux kernel
|
||||
# build a release kernel on rawhide
|
||||
%define with_release %{?_with_release: 1} %{?!_with_release: 0}
|
||||
|
||||
# verbose build, i.e. no silent rules and V=1
|
||||
%define with_verbose %{?_with_verbose: 1} %{?!_with_verbose: 0}
|
||||
|
||||
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
|
||||
# and 0 for rawhide (all kernels are debug kernels).
|
||||
# See also 'make debug' and 'make release'.
|
||||
%define debugbuildsenabled 1
|
||||
|
||||
%if %{with_verbose}
|
||||
%define make_opts V=1
|
||||
%else
|
||||
%define make_opts -s
|
||||
%endif
|
||||
|
||||
# Want to build a vanilla kernel build without any non-upstream patches?
|
||||
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
|
||||
|
||||
@ -1250,7 +1259,7 @@ BuildKernel() {
|
||||
|
||||
# and now to start the build process
|
||||
|
||||
make -s mrproper
|
||||
make %{?make_opts} mrproper
|
||||
cp configs/$Config .config
|
||||
|
||||
%if %{signkernel}%{signmodules}
|
||||
@ -1260,9 +1269,9 @@ BuildKernel() {
|
||||
Arch=`head -1 .config | cut -b 3-`
|
||||
echo USING ARCH=$Arch
|
||||
|
||||
make -s ARCH=$Arch oldnoconfig >/dev/null
|
||||
%{make} -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags} %{?kernel_mflags}
|
||||
%{make} -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
|
||||
make %{?make_opts} ARCH=$Arch oldnoconfig >/dev/null
|
||||
%{make} %{?make_opts} ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags} %{?kernel_mflags}
|
||||
%{make} %{?make_opts} ARCH=$Arch %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
|
||||
@ -1271,7 +1280,7 @@ BuildKernel() {
|
||||
%endif
|
||||
|
||||
%ifarch %{arm} aarch64
|
||||
%{make} -s ARCH=$Arch V=1 dtbs dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||
%{make} %{?make_opts} ARCH=$Arch dtbs dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||
cp -r $RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/dtb
|
||||
find arch/$Arch/boot/dts -name '*.dtb' -type f | xargs rm -f
|
||||
%endif
|
||||
@ -1312,10 +1321,10 @@ BuildKernel() {
|
||||
|
||||
# Override $(mod-fw) because we don't want it to install any firmware
|
||||
# we'll get it from the linux-firmware package and we don't want conflicts
|
||||
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
|
||||
%{make} %{?make_opts} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
|
||||
|
||||
if [ $DoVDSO -ne 0 ]; then
|
||||
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
|
||||
%{make} %{?make_opts} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
|
||||
if [ ! -s ldconfig-kernel.conf ]; then
|
||||
echo > ldconfig-kernel.conf "\
|
||||
# Placeholder file, no vDSO hwcap entries used in this kernel."
|
||||
|
Loading…
Reference in New Issue
Block a user