diff options
Diffstat (limited to 'busybox')
-rw-r--r-- | busybox/busybox-1.00/openslug/defconfig | 1 | ||||
-rw-r--r-- | busybox/busybox-1.00/readlink.patch | 0 | ||||
-rw-r--r-- | busybox/busybox_1.00.bb | 76 | ||||
-rw-r--r-- | busybox/slingbox-1.00/defconfig | 4 | ||||
-rw-r--r-- | busybox/slingbox_1.00.bb | 45 | ||||
-rw-r--r-- | busybox/switchbox-1.00/defconfig | 36 | ||||
-rw-r--r-- | busybox/switchbox-1.00/linuxrc | 15 | ||||
-rw-r--r-- | busybox/switchbox-1.00/telnetd-autologin.patch | 0 | ||||
-rw-r--r-- | busybox/switchbox_1.00.bb | 51 |
9 files changed, 212 insertions, 16 deletions
diff --git a/busybox/busybox-1.00/openslug/defconfig b/busybox/busybox-1.00/openslug/defconfig index 881184593b..750d67f6aa 100644 --- a/busybox/busybox-1.00/openslug/defconfig +++ b/busybox/busybox-1.00/openslug/defconfig @@ -193,6 +193,7 @@ CONFIG_RESET=y CONFIG_MKTEMP=y # CONFIG_PIPE_PROGRESS is not set CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y CONFIG_RUN_PARTS=y CONFIG_START_STOP_DAEMON=y CONFIG_WHICH=y diff --git a/busybox/busybox-1.00/readlink.patch b/busybox/busybox-1.00/readlink.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/busybox/busybox-1.00/readlink.patch diff --git a/busybox/busybox_1.00.bb b/busybox/busybox_1.00.bb index e69de29bb2..e13aa6b8ad 100644 --- a/busybox/busybox_1.00.bb +++ b/busybox/busybox_1.00.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "BusyBox version ${PV}. \ +BusyBox combines tiny versions of many common UNIX utilities into a single \ +small executable. It provides minimalist replacements for most of the \ +utilities you usually find in GNU fileutils, shellutils, etc. The utilities \ +in BusyBox generally have fewer options than their full-featured GNU \ +cousins; however, the options that are included provide the expected \ +functionality and behave very much like their GNU counterparts. BusyBox \ +provides a fairly complete POSIX environment for any small or embedded \ +system." +HOMEPAGE = "http://www.busybox.net" +LICENSE = "GPL" +SECTION = "base" +PRIORITY = "required" +PR = "r10" + +SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ + file://add-getkey-applet.patch;patch=1 \ + file://udhcpscript.patch;patch=1 \ + file://dhcpretrytime.patch;patch=1 \ + file://hdparm_M.patch;patch=1 \ + file://udhcppidfile.patch;patch=1 \ + file://udhcppidfile-breakage.patch;patch=1 \ + file://readlink.patch;patch=1 \ + file://iproute-flush-cache.patch;patch=1;pnum=0 \ + file://defconfig \ + file://busybox-cron \ + file://busybox-httpd \ + file://busybox-udhcpd \ + file://syslog \ + file://hwclock.sh \ + file://default.script" + +S = "${WORKDIR}/busybox-${PV}" + +export EXTRA_CFLAGS = "${CFLAGS}" +EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" +FILES_${PN} += " ${datadir}/udhcpc" + +inherit cml1 update-rc.d + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "defaults" + +do_configure () { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + cml1_do_configure +} + +do_compile () { + unset CFLAGS + base_do_compile +} + +do_install () { + install -d ${D}/etc/init.d + oe_runmake 'PREFIX=${D}' install + install -m 0755 ${WORKDIR}/syslog ${D}/etc/init.d/ + if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + install -m 0755 ${WORKDIR}/busybox-cron ${D}/etc/init.d/ + fi + if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + install -m 0755 ${WORKDIR}/busybox-httpd ${D}/etc/init.d/ + fi + if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}/etc/init.d/ + fi + if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + install -m 0755 ${WORKDIR}/hwclock.sh ${D}/etc/init.d/hwclock.sh + fi + if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + install -d ${D}/etc/udhcpc.d + install -d ${D}${datadir}/udhcpc + install -m 0755 ${S}/examples/udhcp/simple.script ${D}/etc/udhcpc.d/50default + install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script + fi +} diff --git a/busybox/slingbox-1.00/defconfig b/busybox/slingbox-1.00/defconfig index 62adadad6a..04a88327b7 100644 --- a/busybox/slingbox-1.00/defconfig +++ b/busybox/slingbox-1.00/defconfig @@ -80,7 +80,7 @@ CONFIG_CHROOT=y # CONFIG_DATE is not set # CONFIG_DD is not set # CONFIG_DF is not set -# CONFIG_DIRNAME is not set +CONFIG_DIRNAME=y # CONFIG_DOS2UNIX is not set # CONFIG_DU is not set # CONFIG_ECHO is not set @@ -164,7 +164,7 @@ CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y # # Editors # -# CONFIG_AWK is not set +CONFIG_AWK=y # CONFIG_PATCH is not set CONFIG_SED=y # CONFIG_VI is not set diff --git a/busybox/slingbox_1.00.bb b/busybox/slingbox_1.00.bb index e69de29bb2..d9849b59d5 100644 --- a/busybox/slingbox_1.00.bb +++ b/busybox/slingbox_1.00.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "SlingBox version ${PV}. \ +SlingBox is a minimal version of BusyBox with just enough functionality \ +to enable ipkg to run on an Unslung NSLU2 device." +HOMEPAGE = "http://www.busybox.net" +LICENSE = "GPL" +SECTION = "base" +PRIORITY = "required" +PR = "r3" + +SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ + file://defconfig \ + file://slingbox.patch;patch=1" + +S = "${WORKDIR}/busybox-${PV}" + +python () { + # Don't build slingbox unless we're targeting an nslu2 + if oe.data.getVar("MACHINE", d, 1) != "nslu2": + raise oe.parse.SkipPackage("switchbox only builds for the Linksys NSLU2") +} + +export EXTRA_CFLAGS = "${CFLAGS}" +EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" + +PACKAGES = "${PN}" +FILES_${PN} = "/bin /sbin" +FILES_${PN}-doc = "" +FILES_${PN}-dev = "" +FILES_${PN}-locale = "" + +inherit cml1 + +do_configure () { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + cml1_do_configure +} + +do_compile () { + unset CFLAGS + base_do_compile +} + +do_install () { + oe_runmake 'PREFIX=${D}' install +} diff --git a/busybox/switchbox-1.00/defconfig b/busybox/switchbox-1.00/defconfig index 5a702fea5f..5a101e7d62 100644 --- a/busybox/switchbox-1.00/defconfig +++ b/busybox/switchbox-1.00/defconfig @@ -46,7 +46,8 @@ PREFIX="/" # CONFIG_GZIP is not set # CONFIG_RPM2CPIO is not set # CONFIG_RPM is not set -# CONFIG_TAR is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_GZIP=y # CONFIG_UNCOMPRESS is not set # CONFIG_UNZIP is not set @@ -90,7 +91,7 @@ CONFIG_FEATURE_LS_TIMESTAMPS=y CONFIG_FEATURE_LS_USERNAME=y CONFIG_FEATURE_LS_COLOR=y CONFIG_MD5SUM=y -# CONFIG_MKDIR is not set +CONFIG_MKDIR=y # CONFIG_MKFIFO is not set # CONFIG_MKNOD is not set # CONFIG_MV is not set @@ -157,8 +158,10 @@ CONFIG_TEST=y # # CONFIG_AWK is not set # CONFIG_PATCH is not set -# CONFIG_SED is not set -# CONFIG_VI is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y # # Finding Utilities @@ -207,7 +210,7 @@ CONFIG_REBOOT=y # CONFIG_HDPARM is not set # CONFIG_MAKEDEVS is not set # CONFIG_MT is not set -# CONFIG_RX is not set +CONFIG_RX=y # CONFIG_STRINGS is not set # CONFIG_TIME is not set # CONFIG_WATCHDOG is not set @@ -215,7 +218,9 @@ CONFIG_REBOOT=y # # Linux Module Utilities # -# CONFIG_INSMOD is not set +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y # CONFIG_LSMOD is not set # CONFIG_MODPROBE is not set # CONFIG_RMMOD is not set @@ -229,7 +234,9 @@ CONFIG_REBOOT=y # CONFIG_FTPPUT is not set # CONFIG_HOSTNAME is not set # CONFIG_HTTPD is not set -# CONFIG_IFCONFIG is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_HW=y # CONFIG_IFUPDOWN is not set # CONFIG_INETD is not set # CONFIG_IP is not set @@ -242,11 +249,12 @@ CONFIG_REBOOT=y # CONFIG_NC is not set # CONFIG_NETSTAT is not set # CONFIG_NSLOOKUP is not set -# CONFIG_PING is not set -# CONFIG_ROUTE is not set +CONFIG_PING=y +CONFIG_ROUTE=y # CONFIG_TELNET is not set -# CONFIG_TELNETD is not set -# CONFIG_TFTP is not set +CONFIG_TELNETD=y +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y # CONFIG_TRACEROUTE is not set # CONFIG_VCONFIG is not set CONFIG_WGET=y @@ -300,7 +308,9 @@ CONFIG_ASH_OPTIMIZE_FOR_SIZE=y # # CONFIG_FEATURE_SH_EXTRA_QUIET is not set # CONFIG_FEATURE_SH_STANDALONE_SHELL is not set -# CONFIG_FEATURE_COMMAND_EDITING is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y # # System Logging Utilities @@ -321,7 +331,7 @@ CONFIG_ASH_OPTIMIZE_FOR_SIZE=y # CONFIG_FSCK_MINIX is not set # CONFIG_MKFS_MINIX is not set # CONFIG_GETOPT is not set -# CONFIG_HEXDUMP is not set +CONFIG_HEXDUMP=y # CONFIG_HWCLOCK is not set # CONFIG_LOSETUP is not set # CONFIG_MKSWAP is not set diff --git a/busybox/switchbox-1.00/linuxrc b/busybox/switchbox-1.00/linuxrc index 858bac7258..746b988d13 100644 --- a/busybox/switchbox-1.00/linuxrc +++ b/busybox/switchbox-1.00/linuxrc @@ -27,7 +27,20 @@ fi if [ -z "$mounted" ] ; then /bin/echo "Root filesystem cannot be found - dropping into shell ..." - echo "5" > /proc/sys/kernel/panic + + /bin/echo "5" > /proc/sys/kernel/panic + + device=/dev/`/bin/sed -n -e 's/^\(mtd[0-9]*\): .* "FIS directory"/\1/p' /proc/mtd` + length=`/bin/dd if=$device bs=2 skip=2048 | /bin/hexdump -n 4 -e '4/1 "%02X"' $device` + + if ( [ "$length" != "FFFFFFFF" ] ); then + /bin/dd if=$device bs=2 skip=2056 | /bin/tar zxvf - + /sbin/insmod ixp400 + /sbin/insmod ixp425_eth + /sbin/ifconfig ixp0 up 192.168.1.77 netmask 255.255.0.0 + /sbin/telnetd + fi + exec /bin/sh fi diff --git a/busybox/switchbox-1.00/telnetd-autologin.patch b/busybox/switchbox-1.00/telnetd-autologin.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/busybox/switchbox-1.00/telnetd-autologin.patch diff --git a/busybox/switchbox_1.00.bb b/busybox/switchbox_1.00.bb index e69de29bb2..b9e4fb0648 100644 --- a/busybox/switchbox_1.00.bb +++ b/busybox/switchbox_1.00.bb @@ -0,0 +1,51 @@ +DESCRIPTION = "SwitchBox version ${PV}. \ +SwitchBox is a minimal version of BusyBox with just enough functionality \ +to switch between different root filesystem options on an Unslung NSLU2 device." +HOMEPAGE = "http://www.busybox.net" +LICENSE = "GPL" +SECTION = "base" +PRIORITY = "required" +PR = "r2" + +SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ + file://defconfig \ + file://linuxrc \ + file://switchbox.patch;patch=1 \ + file://telnetd-autologin.patch;patch=1" + +S = "${WORKDIR}/busybox-${PV}" + +python () { + # Don't build switchbox unless we're targeting an nslu2 + if oe.data.getVar("MACHINE", d, 1) != "nslu2": + raise oe.parse.SkipPackage("switchbox only builds for the Linksys NSLU2") +} + +LDFLAGS =+ "-static" + +export EXTRA_CFLAGS = "${CFLAGS}" +EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" + +PACKAGES = "${PN}" +FILES_${PN} = "/" +FILES_${PN}-doc = "" +FILES_${PN}-dev = "" +FILES_${PN}-locale = "" + +inherit cml1 + +do_configure () { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + cml1_do_configure +} + +do_compile () { + unset CFLAGS + base_do_compile +} + +do_install () { + oe_runmake 'PREFIX=${D}' install + install -m 0755 ${WORKDIR}/linuxrc ${D}/ + mkdir -p ${D}/proc ${D}/mnt/tmpmnt +} |