View Single Post
  #7  
Old 1st September 2009, 20:45
kaza kaza is offline
Junior Member
 
Join Date: Jul 2009
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Is kernel-firmware mentioned somewhere in the .spec file of the kernel package?
Yes. Searching for "firmware" in the kernel.spec brought me to these
groups of lines:


# kernel-firmware
%define with_firmware %{?_with_firmware: 1} %{?!_with_firmware: 0}



# don't build noarch kernels or headers (duh)
%ifarch noarch
%define with_up 0
%define with_headers 0
%define all_arch_configs kernel-%{version}-*.config
%define with_firmware %{?_without_firmware: 0} %{?!_without_firmware: 1}
%endif



#
# Then a series of requirements that are distribution specific, either
# because we add patches for something, or the older versions have
# problems with the newer kernel or lack certain things that make
# integration in the distro harder than needed.
#
%define package_conflicts initscripts < 7.23, udev < 063-6, iptables < 1.3.2-1, ipw2200-firmware < 2.4, iwl4965-firmware < 228.57.2, selinux-policy-targeted < 1.25.3-14, squashfs-tools < 4.0, wireless-tools < 29-3



#
# Packages that need to be installed before the kernel is, because the %post
# scripts use them.
#
%define kernel_prereq fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.61-1, kernel-firmware >= %{rpmversion}-%{pkg_release}, /sbin/new-kernel-pkg



%package firmware
Summary: Firmware files used by the Linux kernel
Group: Development/System
# This is... complicated.
# Look at the WHENCE file.
License: GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted
%if "x%{?variant}" != "x"
Provides: kernel-firmware = %{rpmversion}-%{pkg_release}
%endif
%description firmware
Kernel-firmware includes firmware files required for some devices to
operate.



mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
# Override $(mod-fw) because we don't want it to install any firmware
# We'll do that ourselves with 'make firmware_install'
make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
%ifarch %{vdso_arches}



%if %{with_firmware}
make INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware firmware_install
%endif



%if %{with_firmware}
%files firmware
%defattr(-,root,root)
/lib/firmware/*
%doc linux-%{kversion}.%{_target_cpu}/firmware/WHENCE
%endif


================================================== =======
I didn't use the "--with firmware" switch, maybe it was the error?
The webpage from which I took the kernel build steps says
that "--with" will build ONLY the option after "--with" so I wasn't
sure I won't ruin something...

TIA,
kaza
Reply With Quote