summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/netbase
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-contrib-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
openembedded-core-contrib-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.bz2
openembedded-core-contrib-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/netbase')
-rw-r--r--meta/recipes-core/netbase/netbase/colinux/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase/epia/interfaces10
-rw-r--r--meta/recipes-core/netbase/netbase/hosts2
-rw-r--r--meta/recipes-core/netbase/netbase/init52
-rw-r--r--meta/recipes-core/netbase/netbase/interfaces30
-rw-r--r--meta/recipes-core/netbase/netbase/mtx-1/interfaces29
-rw-r--r--meta/recipes-core/netbase/netbase/nfsroot39
-rw-r--r--meta/recipes-core/netbase/netbase/nokia800/interfaces5
-rw-r--r--meta/recipes-core/netbase/netbase/openmn/hosts2
-rw-r--r--meta/recipes-core/netbase/netbase/openmn/interfaces10
-rw-r--r--meta/recipes-core/netbase/netbase/qemuarm/interfaces13
-rw-r--r--meta/recipes-core/netbase/netbase/qemuarmv6/interfaces13
-rw-r--r--meta/recipes-core/netbase/netbase/qemuarmv7/interfaces13
-rw-r--r--meta/recipes-core/netbase/netbase/qemux86/interfaces15
-rw-r--r--meta/recipes-core/netbase/netbase/tosa/interfaces24
-rw-r--r--meta/recipes-core/netbase/netbase/wrt54/interfaces23
-rw-r--r--meta/recipes-core/netbase/netbase/xxs1500/interfaces15
-rw-r--r--meta/recipes-core/netbase/netbase_4.41.bb55
18 files changed, 358 insertions, 0 deletions
diff --git a/meta/recipes-core/netbase/netbase/colinux/interfaces b/meta/recipes-core/netbase/netbase/colinux/interfaces
new file mode 100644
index 0000000000..0e495e164e
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/colinux/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+iface eth0 inet dhcp
diff --git a/meta/recipes-core/netbase/netbase/epia/interfaces b/meta/recipes-core/netbase/netbase/epia/interfaces
new file mode 100644
index 0000000000..673618f636
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/epia/interfaces
@@ -0,0 +1,10 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet
+auto eth0
+iface eth0 inet dhcp
+
diff --git a/meta/recipes-core/netbase/netbase/hosts b/meta/recipes-core/netbase/netbase/hosts
new file mode 100644
index 0000000000..2f332451b5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/hosts
@@ -0,0 +1,2 @@
+127.0.0.1 localhost.localdomain localhost
+
diff --git a/meta/recipes-core/netbase/netbase/init b/meta/recipes-core/netbase/netbase/init
new file mode 100644
index 0000000000..8a67e1cef2
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/init
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: networking
+# Required-Start: $local_fs mountvirtfs
+# Required-Stop: $local_fs
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Raise network interfaces and configure them
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+if ! [ -x /sbin/ifup ]; then
+ exit 0
+fi
+
+case "$1" in
+ start)
+ echo -n "Configuring network interfaces... "
+ ifup -a
+ echo "done."
+ ;;
+ stop)
+ if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ nfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an NFS mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ smbfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an SMB mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
+ grep -qE '^(nfs|smbfs|ncp|coda)$'; then
+ echo "NOT deconfiguring network interfaces: network shares still mounted."
+ else
+ echo -n "Deconfiguring network interfaces... "
+ ifdown -a
+ echo "done."
+ fi
+ ;;
+ force-reload|restart)
+ echo -n "Reconfiguring network interfaces... "
+ ifdown -a
+ ifup -a
+ echo "done."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-core/netbase/netbase/interfaces b/meta/recipes-core/netbase/netbase/interfaces
new file mode 100644
index 0000000000..b06924fa94
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/interfaces
@@ -0,0 +1,30 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+ wireless_mode managed
+ wireless_essid any
+ wpa-driver wext
+ wpa-conf /etc/wpa_supplicant.conf
+
+iface atml0 inet dhcp
+
+# Wired or wireless interfaces
+iface eth0 inet dhcp
+iface eth1 inet dhcp
+
+# Ethernet/RNDIS gadget (g_ether)
+# ... or on host side, usbnet and random hwaddr
+iface usb0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
+
+# Bluetooth networking
+iface bnep0 inet dhcp
+
diff --git a/meta/recipes-core/netbase/netbase/mtx-1/interfaces b/meta/recipes-core/netbase/netbase/mtx-1/interfaces
new file mode 100644
index 0000000000..a7c6da5752
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/mtx-1/interfaces
@@ -0,0 +1,29 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet
+auto eth0
+iface eth0 inet dhcp
+
+# wlan interface 1 for clients
+auto wlan0
+iface wlan0 inet static
+ address 10.0.0.1
+ netmask 255.0.0.0
+ wireless_mode master
+ wireless_essid cube-ap
+ wireless_channel 1
+
+# wlan interface 2 for mesh
+auto wlan1
+iface wlan1 inet static
+ address 172.16.0.1
+ netmask 255.240.0.0
+ broadcast 172.31.255.255
+ wireless_mode ad-hoc
+ wireless_essid cube-mesh
+ wireless_channel 11
+ wireless_rts 250
diff --git a/meta/recipes-core/netbase/netbase/nfsroot b/meta/recipes-core/netbase/netbase/nfsroot
new file mode 100644
index 0000000000..fc384a8ea5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/nfsroot
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+# In case the interface is used as nfsroot, avoid ifup, otherwise
+# nfsroot may lose response
+
+nfsroot=0
+
+if test "x$IFACE" = xlo ; then
+ exit 0
+fi
+
+exec 9<&0 < /proc/mounts
+while read dev mtpt fstype rest; do
+ if test $mtpt = "/" ; then
+ case $fstype in
+ nfs | nfs4)
+ nfsroot=1
+ nfs_addr=`echo $rest | sed -e 's/^.*addr=\([0-9.]*\).*$/\1/'`
+ break
+ ;;
+ *)
+ ;;
+ esac
+ fi
+done
+exec 0<&9 9<&-
+
+test $nfsroot -eq 0 && exit 0
+
+if test -x /sbin/ip ; then
+ nfs_iface=`ip route get $nfs_addr | grep dev | sed -e 's/^.*dev \([-a-z0-9.]*\).*$/\1/'`
+fi
+
+if test "x$IFACE" = "x$nfs_iface" ; then
+ echo "ifup skipped for nfsroot interface $nfs_iface"
+ exit 1
+fi
+
+exit 0
diff --git a/meta/recipes-core/netbase/netbase/nokia800/interfaces b/meta/recipes-core/netbase/netbase/nokia800/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/nokia800/interfaces
@@ -0,0 +1,5 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/meta/recipes-core/netbase/netbase/openmn/hosts b/meta/recipes-core/netbase/netbase/openmn/hosts
new file mode 100644
index 0000000000..0205b98fc2
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/openmn/hosts
@@ -0,0 +1,2 @@
+127.0.0.1 localhost.localdomain localhost
+192.168.233.1 www.mn-solutions.de
diff --git a/meta/recipes-core/netbase/netbase/openmn/interfaces b/meta/recipes-core/netbase/netbase/openmn/interfaces
new file mode 100644
index 0000000000..9ebe9b8ff1
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/openmn/interfaces
@@ -0,0 +1,10 @@
+auto lo
+auto eth1
+
+iface lo inet loopback
+
+iface eth0 inet dhcp
+
+iface eth1 inet dhcp
+ wireless_mode managed
+ wireless_essid any
diff --git a/meta/recipes-core/netbase/netbase/qemuarm/interfaces b/meta/recipes-core/netbase/netbase/qemuarm/interfaces
new file mode 100644
index 0000000000..f657944f0f
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/qemuarm/interfaces
@@ -0,0 +1,13 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
diff --git a/meta/recipes-core/netbase/netbase/qemuarmv6/interfaces b/meta/recipes-core/netbase/netbase/qemuarmv6/interfaces
new file mode 100644
index 0000000000..f657944f0f
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/qemuarmv6/interfaces
@@ -0,0 +1,13 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
diff --git a/meta/recipes-core/netbase/netbase/qemuarmv7/interfaces b/meta/recipes-core/netbase/netbase/qemuarmv7/interfaces
new file mode 100644
index 0000000000..f657944f0f
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/qemuarmv7/interfaces
@@ -0,0 +1,13 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
diff --git a/meta/recipes-core/netbase/netbase/qemux86/interfaces b/meta/recipes-core/netbase/netbase/qemux86/interfaces
new file mode 100644
index 0000000000..9b442355fd
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/qemux86/interfaces
@@ -0,0 +1,15 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
+
+
diff --git a/meta/recipes-core/netbase/netbase/tosa/interfaces b/meta/recipes-core/netbase/netbase/tosa/interfaces
new file mode 100644
index 0000000000..0da7168535
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/tosa/interfaces
@@ -0,0 +1,24 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+ wireless_type wlan-ng
+ wireless_mode Managed
+ pre-up modprobe prism2_usb
+# pre-up /sbin/usbctl on 1
+# post-down /sbin/usbctl off 1
+ post-down rmmod prism2_usb
+
+# Wired or wireless interfaces
+iface eth0 inet dhcp
+iface eth1 inet dhcp
+
+# Zaurus usbnet
+iface usbd0 inet dhcp
+
+# usbnet from the other side
+iface usb0 inet dhcp
diff --git a/meta/recipes-core/netbase/netbase/wrt54/interfaces b/meta/recipes-core/netbase/netbase/wrt54/interfaces
new file mode 100644
index 0000000000..8b2852ac51
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/wrt54/interfaces
@@ -0,0 +1,23 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# loopback interface
+auto lo
+iface lo inet loopback
+
+# the 4 LAN ports
+auto vlan0
+iface vlan0 inet static
+ address 192.168.1.1
+ netmask 255.255.255.0
+
+# WAN port
+auto vlan1
+iface vlan1 inet dhcp
+
+# wireless interface
+auto eth1
+iface eth1 inet static
+ wireless_mode master
+ wireless_essid wrt
+ address 10.0.0.1
+ netmask 255.255.255.0
diff --git a/meta/recipes-core/netbase/netbase/xxs1500/interfaces b/meta/recipes-core/netbase/netbase/xxs1500/interfaces
new file mode 100644
index 0000000000..23ccccd2dd
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/xxs1500/interfaces
@@ -0,0 +1,15 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet
+auto eth0 eth1
+iface eth0 inet static
+ address 192.168.127.1
+ netmask 255.255.255.0
+
+iface eth1 inet static
+ address 192.168.128.1
+ netmask 255.255.255.0
diff --git a/meta/recipes-core/netbase/netbase_4.41.bb b/meta/recipes-core/netbase/netbase_4.41.bb
new file mode 100644
index 0000000000..88b524ffd2
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase_4.41.bb
@@ -0,0 +1,55 @@
+DESCRIPTION = "This package provides the necessary infrastructure for basic TCP/IP based networking"
+HOMEPAGE = "http://packages.debian.org/netbase"
+SECTION = "base"
+LICENSE = "GPLv2"
+PR = "r0"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "networking"
+INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
+# On MNCI etc, start very late so that our own apps come up faster
+INITSCRIPT_PARAMS_openmn = "start 85 1 2 3 4 5 . stop 85 0 6 1 ."
+# On SlugOS (NSLU2) delay the stop until after network apps have exited
+# Do not stop in single user - there's no way to sulogin!
+INITSCRIPT_PARAMS_slugos = "start 42 S 0 6 ."
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
+ file://init \
+ file://hosts \
+ file://interfaces \
+ file://nfsroot"
+
+do_install () {
+ install -d ${D}${sysconfdir}/init.d \
+ ${D}${sbindir} \
+ ${D}${mandir}/man8 \
+ ${D}${sysconfdir}/network/if-pre-up.d \
+ ${D}${sysconfdir}/network/if-up.d \
+ ${D}${sysconfdir}/network/if-down.d \
+ ${D}${sysconfdir}/network/if-post-down.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking
+ install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
+ install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
+ install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
+ install -m 0644 etc-services ${D}${sysconfdir}/services
+ install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
+ install -m 0755 ${WORKDIR}/nfsroot ${D}${sysconfdir}/network/if-pre-up.d
+
+ # Disable network manager on machines that commonly do NFS booting
+ case "${MACHINE}" in
+ "omap-3430sdp" | "omap-3430ldp" | "omap-2430sdp" | "qemuarm" | "qemux86" )
+ touch ${D}${sysconfdir}/network/nm-disabled-eth0
+ ;;
+ *)
+ ;;
+ esac
+}
+
+CONFFILES_${PN} = "${sysconfdir}/hosts ${sysconfdir}/network/interfaces"
+
+PACKAGE_ARCH_omap-3430sdp = "${MACHINE_ARCH}"
+PACKAGE_ARCH_omap-3430ldp = "${MACHINE_ARCH}"
+PACKAGE_ARCH_omap-2430sdp = "${MACHINE_ARCH}"
+PACKAGE_ARCH_qemuarm = "${MACHINE_ARCH}"
+PACKAGE_ARCH_qemux86 = "${MACHINE_ARCH}"