Skip to content

Commit

Permalink
remove debugging message in kernel config
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-mcgann committed Oct 25, 2023
1 parent 178ae0d commit c4f47f7
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions specs/linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,76 @@ system: memory allocation, process allocation, device input and output, etc.

#---------------------------------------------------------------------------
%prep
%setup -q
%setup -q

#---------------------------------------------------------------------------
%build
%lfs_build_begin
%lfs_build_begin

%make mrproper

%if %{with lfs_stage1}
%make headers
find usr/include -type f ! -name '*.h' -delete

%else
%else
%make defconfig
%make

cat <<EOF >.config.sed
# This prevents debug messages like "... used greatest stack depth"
# https://forums.gentoo.org/viewtopic-t-1024636-start-0-postdays-0-postorder-asc-highlight-.html
s/CONFIG_DEBUG_STACK_USAGE=y/CONFIG_DEBUG_STACK_USAGE=n/
EOF
sed -i .config -f .config.sed

%make

%endif
%lfs_build_end
%lfs_build_end

#---------------------------------------------------------------------------
%install
%lfs_build_begin
%lfs_build_begin

%if %{with lfs_stage1}
mkdir -p %{buildroot}/%{lfs_dir}/usr
cp -rv usr/include %{buildroot}/%{lfs_dir}/usr

%else
%make INSTALL_MOD_PATH=%{buildroot}/usr modules_install
install -m 755 -d %{buildroot}/boot
%else
%make INSTALL_MOD_PATH=%{buildroot}/usr modules_install
install -m 755 -d %{buildroot}/boot
install -m 644 arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-%{version}%{dist}.%{lfs_arch}
install -m 644 System.map %{buildroot}/boot/System.map-%{version}
install -m 644 .config %{buildroot}/boot/config-%{version}

ln -s vmlinuz-%{version}%{dist}.%{lfs_arch} %{buildroot}/boot/vmlinuz
ln -s System.map-%{version} %{buildroot}/boot/System.map
ln -s config-%{version} %{buildroot}/boot/config
ln -s System.map-%{version} %{buildroot}/boot/System.map
ln -s config-%{version} %{buildroot}/boot/config

install -m755 -d %{buildroot}/etc/modprobe.d
install -m755 -d %{buildroot}/etc/modprobe.d
cat > %{buildroot}/etc/modprobe.d/usb.conf <<EOF
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
EOF

rm %{buildroot}/usr/lib/modules/%{version}/{build,source}

%endif
%lfs_build_end
%endif
%lfs_build_end

#---------------------------------------------------------------------------
%files
%if %{with lfs_stage1}
%{lfs_dir}/usr/include/*

%else
%else
/boot/System.map-%{version}
/boot/System.map
/boot/config-%{version}
/boot/config
/boot/vmlinuz-%{version}%{dist}.%{lfs_arch}
/boot/vmlinuz
/etc/modprobe.d
/etc/modprobe.d
/usr/lib/modules/%{version}

%endif
%endif

0 comments on commit c4f47f7

Please sign in to comment.