%define name mkinitrd-net %define version 1.10 %define release 22mdk %define uclibcver 0.9.26 %define busyboxver 1.00-rc3 Summary: Network-booting initrd builder Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.bz2 Source1: http://belnet.dl.sourceforge.net/sourceforge/etherboot/mknbi-1.4.3.tar.bz2 Source2: http://www.busybox.net/downloads/busybox-%{busyboxver}.tar.bz2 Source3: http://www.uclibc.org/downloads/uClibc-%{uclibcver}.tar.bz2 Source4: ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-0.1.13.tar.bz2 Source5: uClibc-%{uclibcver}.config Source6: busybox-%{busyboxver}.config Patch0: mkinitrd-net_ppc_build.patch.bz2 Patch1: mkinitrd-net_integrated_nfs.patch.bz2 Patch2: mkinitrd-net_uclibc_0.9.26.patch.bz2 Patch3: mkinitrd-net-new-etherboot-include.patch.bz2 Patch4: mkinitrd-net-boot-devfs.patch.bz2 Patch5: mkinitrd-net-2.6-support.patch.bz2 Patch6: mkinitrd-net-stubborn-nic.patch.bz2 Patch8: mkinitrd-net-gcc34.patch.bz2 Patch9: mknitrd-net_udev.patch.bz2 Patch10: mkinitrd-net-uclibc-toolchain.patch.bz2 Patch11: mkinitrd-net-drop-udhcp.patch.bz2 Patch12: mkinitrd-net-optional-wlanctl.patch.bz2 Patch13: mkinitrd-net-mknbi.patch.bz2 Patch14: mknbi-1.4.3-memcmp.patch.bz2 Patch15: mkinitrd-net-modprobe-fix.patch.bz2 License: GPL/LGPL/MPL Group: System/Kernel and hardware URL: http://www.fensystems.co.uk/SRPMS.fensys BuildRoot: %{_tmppath}/%{name}-buildroot Requires: tftp-server binutils BuildRequires: kernel-source BuildRequires: glibc-static-devel Obsoletes: mknbi Provides: mknbi ExclusiveArch: %{ix86} ppc %description mkinitrd-net allows you to build initial ramdisk images (initrds) suitable for use with Etherboot and other network-booting software. This package contains two main utilities: mkinitrd-net (to build an initrd containing a specified set of network-card modules) and mknbi (to generate Etherboot-usable NBI images from a given kernel and initrd). It also contains a helper script mknbi-set which will maintain sets of initrds to match all your currently-installed kernels. mkinitrd-net uses code from the uClibc, busybox, and Etherboot projects. %prep %setup -q -n initrd -a1 -a2 -a3 -a4 %patch1 -p1 -b .nfs %patch2 -p1 -b .uclibc %patch3 -p1 -b .old %patch4 -p1 -b .devfs %patch5 -p1 -b .26 %patch6 -p1 -b .nic %patch8 -p1 -b .gcc34 %patch9 -p1 -b .udev %patch10 -p1 -b .toolchain %patch11 -p1 -b .udhcp %patch12 -p1 -b .wlan %patch13 -p1 -b .mknbi %patch14 -p1 -b .memcmp %patch15 -p1 -b .modprobe cp %{SOURCE5} uClibc-%{uclibcver}/.config cp %{SOURCE6} busybox-%{busyboxver}/.config %ifarch ppc %patch0 -p1 -b .ppc %endif perl -pi -e "s|fill_from_spec_file_with_perl|$RPM_BUILD_DIR/initrd/uClibc|" uClibc-%{uclibcver}/.config %build make LIBDIR=%{_libdir}/mknbi %install rm -rf $RPM_BUILD_ROOT %makeinstall tftpbootdir=$RPM_BUILD_ROOT%{_localstatedir}/tftpboot touch $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf.etherboot-pcimap.include %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/mknbi-set.conf %config(noreplace) %{_sysconfdir}/dhcpd.conf.etherboot.include %ghost %{_sysconfdir}/dhcpd.conf.etherboot-pcimap.include %{_bindir}/mknbi-* %{_bindir}/mkelf-* %{_bindir}/nbitoelf %{_bindir}/dis* %{_bindir}/mkinitrd-net %{_bindir}/include-modules %{_libdir}/mknbi %{_libdir}/mkinitrd-net %{_mandir}/man*/* %{_localstatedir}/tftpboot %doc README %doc AUTHORS.busybox LICENSE.busybox %doc COPYING.wlanctl LICENSE.wlanctl THANKS.wlanctl %doc COPYING.uClibc %docdir %{_docdir}/mknbi* %{_docdir}/mknbi* %changelog * Mon Mar 21 2005 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-22mdk - replace modprobe -nva with modprobe --show-depends - for kernel > 2.4 (Bugzilla #14149, P15) * Thu Mar 10 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.10-21mdk - remove hardcoded path in patch0 * Fri Jan 21 2005 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-20mdk - handle strange "modprobe -nva foo" output (redo P5) * Mon Sep 13 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-19mdk - redo ppc patch (patch0) * Thu Sep 2 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-18mdk - try Jean-Michel's big rework again: - update to mknbi-1.4.3 (patch13, use JM's memcmp patch14) - patch back uClibc gcc wrapper from 0.9.21 (patch10) - update busybox to 1.00-rc3, drop some uneeded options rework patch8, - drop udhcp for busybox's version (shrink initrd, patch11) - really build busybox with uClibc (shrink initrd, patch10, 11) - only include wlanctl in initrd if required (shrink initrd, patch12) - busybox handles both 2.4 and 2.6 modules, don't need to add static insmod (shrink initrd, redo/merge patch5,7) - modprobe -nva nfs comes back empty if server has nfs loaded add correct modules to initrd (redo patch3) * Tue Aug 31 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-17mdk - redo patch5 (insmod-2.5-DIET is gone) * Fri Aug 20 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-16mdk - mods to work with udev or devfs (patch9) * Wed Jul 28 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-15dk - upgrade uClibc to 0.9.26, rework patch0,2 (fix ppc build) - add patch8 to busybox, uClibc for gcc * Mon May 17 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-14mdk - remove debugging "print" statement left in patch7 * Tue Feb 24 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-13mdk - rework patch7, still some issues, get rid of --keep arg to - mknbi-set that got added accidentally (fills up /root/tmp) * Mon Feb 23 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-12mdk - another pass at getting mknbi-set to work to build 2.4 or 2.6 - images, regardless of which kernel is booted (#8216, patch7) * Fri Feb 6 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-11mdk - af_packet patch was borken - redo (patch1) - some nics seem to need an additional try to get the IP in linuxrc - (Venantius Kumar) - patch6 * Tue Feb 3 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-10mdk - 2.6 kernel support (patch5) - handle integrated af_packet (added to patch1) (Francisco Javier Felix) * Mon Feb 2 2004 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-9mdk - pass devfs=mount as default argument when making nbi, since - client isn't picking up etherboot kernel-cmdline * Mon Dec 22 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.10-8mdk - revert changes, will try to integrate my modifications with the original author's work. * Sun Dec 21 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.10-7mdk - use mknbi 1.4.3 so we're compatible with latest etherboot and rom-o-matic images. This release also fixes a serious bug in mkelf-linux where initrds larger than 1 MB do not work. - add memcmp patch since this function is missing from gcc 3.3.2 (weird!) - add nfsroot override to udhcp to be able to specify an argument to the kernel to boot from a different nfs server. This is mandatory in case there's a central dhcp server that we don't control, like most big organizations. This will also enable booting off a FAT32 partition or DiscOnChip, with "loadlin vmlinuz initrd=initrd.img nfsroot=whatever". - update to busybox 1.00-pre4, with integrated udhcp (fixes the extra space in variables problem) - use uClibc from contribs to build instead of the bundled one that doesn't work. busybox+udhcp should be about 200K, *not* over 1 meg! - move wlanctl to its own package so we save ramdisk space, since most installations do not use Xterminals over wireless links * Fri Dec 19 2003 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-6mdk - remove old /tftpboot link - new dhcpd.conf.etherboot.include - keeps new etherboot - from crashing dhcpd server - patch3 * Thu Jul 24 2003 Götz Waschk <waschk@linux-mandrake.com> 1.10-5mdk - fix buildrequires * Mon Mar 28 2003 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-4mdk - BuildRequires, distriblint * Mon Mar 10 2003 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-3mdk - seems nfs is integrated into kernel now - deal with this scenario - [BUG 3003] - patch1, update uCLibc so it builds - patch2 * Mon Oct 21 2002 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-2mdk - patch for ppc build, don't build the nbi's by default * Tue Aug 6 2002 Stew Benedict <sbenedict@mandrakesoft.com> 1.10-1mdk - changes from Michael Brown (drop patch0 now): - Support for new binary etherboot.nic-dev-id structure - Added --kernel option patch from Stew Benedict at MandrakeSoft - Only try to use sudo if we are not already root * Sun Jul 28 2002 Stew Benedict <sbenedict@mandrakesoft.com> 1.9-2mdk - requires binutils * Fri Jun 20 2002 Stew Benedict <sbenedict@mandrakesoft.com> 1.9-1mdk - first Mandrake release - use make rather than %%make (-j2 triggers error) - patch mknbi-set to do optional single kernel/module - thanks to Michael Brown <mbrown@fensystems.co.uk> * Wed Jun 05 2002 Michael Brown <mbrown@fensystems.co.uk> 1.9-1fs - Modifications to allow DHCP, TFTP and NFS servers to be separate machines. * Thu May 30 2002 Michael Brown <mbrown@fensystems.co.uk> 1.8-1fs - /tftpboot symlinked to /var/lib/tftpboot - Has ability to be quiet if "quiet" specified on kernel cmdline * Sun May 26 2002 Michael Brown <mbrown@fensystems.co.uk> 1.7-1fs - PCI-ID auto-mapping via dhcpd.conf.etherboot-pcimap.include * Fri May 24 2002 Michael Brown <mbrown@fensystems.co.uk> 1.6-1fs - Bugfixes, migrated /tftpboot to /var/lib/tftpboot * Thu May 23 2002 Michael Brown <mbrown@fensystems.co.uk> 1.5-1fs - Now includes dhcpd.conf.etherboot.include - Automatically scans for all network modules in the pcimap file * Wed May 08 2002 Michael Brown <mbrown@fensystems.co.uk> 1.4-1fs - Bugfixes: tmpdir selection, linuxrc typos, ifconfig peculiarities * Sat May 04 2002 Michael Brown <mbrown@fensystems.co.uk> 1.3-1fs - During %make, LIBDIR must be set for mknbi - Added %post scriptlet since %trigger seems not to be being triggered... * Sat May 04 2002 Michael Brown <mbrown@fensystems.co.uk> 1.2-1fs - Added extra sources instead of requiring "make" to download them * Sat May 04 2002 Michael Brown <mbrown@fensystems.co.uk> 1.1-1fs - First attempt at an RPM package