From: Chris Gianelloni Date: Fri, 13 Oct 2006 20:22:57 +0000 (+0000) Subject: Added patch for udhcp support. Patch by Stefan Nickl and... X-Git-Tag: v3.4.10.902~302 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=57097c87f65b52d18704b1ba7c7525a5091cdc35;p=genkernel.git Added patch for udhcp support. Patch by Stefan Nickl and submitted to bug #145115. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@450 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/ChangeLog b/ChangeLog index e38affe..83def01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,12 @@ # Copyright 2006-2006 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 13 Oct 2006; Chris Gianelloni gen_initramfs.sh, + generic/initrd.defaults, generic/initrd.scripts, +generic/udhcpc.scripts, + x86/busy-config, x86/modules_load: + Added patch for udhcp support. Patch by Stefan Nickl + and submitted to bug #145115. + 13 Oct 2006; Chris Gianelloni generic/linuxrc: Allow root= for initramfs, instead of only real_root= to specify the root volume. Patch by Salah Coronya from bug #142606. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 210e155..c8c7b0e 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -45,6 +45,9 @@ create_busybox_cpio() { rm -rf "${TEMP}/initramfs-busybox-temp" > /dev/null fi mkdir -p "${TEMP}/initramfs-busybox-temp/bin/" + + cp "${GK_SHARE}/generic/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/ + chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts" cp "${BUSYBOX_BINCACHE}" "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" || gen_die 'Could not copy busybox from bincache!' bunzip2 "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" || diff --git a/generic/initrd.defaults b/generic/initrd.defaults index b6e8367..6453c37 100644 --- a/generic/initrd.defaults +++ b/generic/initrd.defaults @@ -79,4 +79,4 @@ CONSOLE="/dev/console" # Only sections that are in by default or those that # are not module groups need to be defined here... HWOPTS='usb firewire keymap cache evms2 sata lvm2 dmraid slowusb fs' -MY_HWOPTS='usb firewire sata dmraid fs' +MY_HWOPTS='usb firewire sata dmraid fs net' diff --git a/generic/initrd.scripts b/generic/initrd.scripts index ca331c5..4a609bc 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -155,8 +155,11 @@ union_insert_dir() { } findnfsmount() { - if [ "${IP}" != '' ] + + if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts then + [ -e /rootpath ] && NFSROOT=`cat /rootpath` + if [ "${NFSROOT}" = '' ] then # Obtain NFSIP diff --git a/generic/udhcpc.scripts b/generic/udhcpc.scripts new file mode 100644 index 0000000..a108a8b --- /dev/null +++ b/generic/udhcpc.scripts @@ -0,0 +1,17 @@ +#!/bin/sh + +case ${1} in + bound) + [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" + [ -n "$subnet" ] && NETMASK="netmask $subnet" + [ -n "$rootpath" ] && echo "$rootpath" > /rootpath + #[ -n "$router" ] && echo "$router" > /router + #[ -n "$dns" ] && echo "$dns" > /dns + + busybox ifconfig $interface $ip $BROADCAST $NETMASK + ;; + deconfig) + busybox ifconfig $interface 0.0.0.0 + ;; +esac + diff --git a/x86/busy-config b/x86/busy-config index 6459a7e..e4f9b28 100644 --- a/x86/busy-config +++ b/x86/busy-config @@ -275,7 +275,7 @@ CONFIG_FEATURE_CHECK_TAINTED_MODULE=y # CONFIG_FTPPUT is not set # CONFIG_HOSTNAME is not set # CONFIG_HTTPD is not set -# CONFIG_IFCONFIG is not set +CONFIG_IFCONFIG=yes # CONFIG_IFUPDOWN is not set # CONFIG_INETD is not set # CONFIG_IP is not set @@ -288,7 +288,7 @@ CONFIG_FEATURE_CHECK_TAINTED_MODULE=y # CONFIG_NC is not set # CONFIG_NETSTAT is not set # CONFIG_NSLOOKUP is not set -# CONFIG_PING is not set +CONFIG_PING=y # CONFIG_ROUTE is not set # CONFIG_TELNET is not set # CONFIG_TELNETD is not set @@ -301,7 +301,7 @@ CONFIG_FEATURE_CHECK_TAINTED_MODULE=y # udhcp Server/Client # # CONFIG_UDHCPD is not set -# CONFIG_UDHCPC is not set +CONFIG_UDHCPC=y # # Process Utilities diff --git a/x86/modules_load b/x86/modules_load index 51286d8..06d359a 100644 --- a/x86/modules_load +++ b/x86/modules_load @@ -11,6 +11,7 @@ mptspi mptfc 3w-xxxx 3w-9xxx cpqarray cciss DAC960 \ sx8 aacraid megaraid_mbox megaraid_mm megaraid_sas \ lpfc scsi_transport_fc" +MODULES_NET="e1000" MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_PCMCIA="pcmcia_core yenta_socket i82365 \