Add udhcp, cleanup a few other loose ends.

-Erik
This commit is contained in:
Eric Andersen 2002-11-15 02:55:17 +00:00
parent cad581084a
commit 7843196520
7 changed files with 72 additions and 26 deletions

View File

@ -33,6 +33,7 @@ $(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured
$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(BASH_DIR) install
mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/
(cd $(TARGET_DIR)/bin; ln -fs bash sh)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY)

View File

@ -137,7 +137,8 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
PATH=$$PATH:$(STAGING_DIR)/bin $(MAKE) DESTDIR=$(TARGET_DIR) prefix=$(TARGET_DIR)/usr \
-C $(GCC_BUILD_DIR3) install;
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
$(TARGET_DIR)/usr/share/locale
-$(STRIP) $(TARGET_DIR)/bin/*
-$(STRIP) $(TARGET_DIR)/usr/bin/*

View File

@ -34,7 +34,7 @@ $(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured
$(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
make CC=$(TARGET_CC1) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
rm -rf $(TARGET_DIR)/usr/share/doc/openssh
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
openssh: $(TARGET_DIR)/usr/bin/ssh

View File

@ -20,37 +20,37 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
UDHCP_DIR:=$(BUILD_DIR)/udhcp
#UDHCP_SOURCE:=udhcp-0.9.6.tar.gz
#UDHCP_SITE:=http://udhcp.busybox.net/downloads/
#$(DL_DIR)/$(UDHCP_SOURCE):
# wget -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
UDHCP_SOURCE:=udhcp-0.9.8.tar.gz
UDHCP_SITE:=http://udhcp.busybox.net/downloads/
UDHCP_DIR:=$(BUILD_DIR)/udhcp-0.9.8
#udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
$(DL_DIR)/$(UDHCP_SOURCE):
wget -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
#$(UDHCP_DIR)/Makefile: $(DL_DIR)/$(UDHCP_SOURCE)
# zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# touch $(UDHCP_DIR)/Makefile
udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
$(UDHCP_DIR)/Makefile:
(cd $(BUILD_DIR); \
cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
$(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE)
zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(UDHCP_DIR)/.unpacked
$(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/Makefile
make CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
#$(UDHCP_DIR)/.unpacked:
# (cd $(BUILD_DIR); \
# CVS_PASSFILE=$(CVS_PASSFILE) \
# cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
# touch $(UDHCP_DIR)/.unpacked
$(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked
$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
$(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
perl -i -p -e 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network*
perl -i -p -e 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
perl -i -p -e 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
udhcp: uclibc pcmcia $(TARGET_DIR)/sbin/udhcpc
udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc
udhcp-clean:
rm -f $(TARGET_DIR)/sbin/udhcpc
-make -C $(UDHCP_DIR) clean
-$(MAKE) -C $(UDHCP_DIR) clean
udhcp-dirclean:
rm -rf $(UDHCP_DIR)

View File

@ -0,0 +1 @@
MST7MDT

View File

@ -17,20 +17,24 @@
::sysinit:/etc/init.d/rcS
# Set up a couple of getty's
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty1::respawn:/sbin/getty 38400 tty2
tty2::respawn:/sbin/getty 38400 tty3
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
# Logging junk
tty3::once:/bin/touch /var/log/messages
tty3::respawn:/usr/bin/tail -f /var/log/messages
::respawn:/sbin/klogd -n
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
tty4::respawn:/usr/bin/tail -f /var/log/messages
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a

View File

@ -0,0 +1,39 @@
#!/bin/sh
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
case "$1" in
deconfig)
/sbin/ifconfig $interface 0.0.0.0
;;
renew|bound)
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ] ; then
echo "deleting routers"
while route del default gw 0.0.0.0 dev $interface ; do
:
done
for i in $router ; do
route add default gw $i dev $interface
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo adding dns $i
echo nameserver $i >> $RESOLV_CONF
done
;;
esac
exit 0