summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@digia.com>2013-08-12 10:34:52 +0300
committerSamuli Piippo <samuli.piippo@digia.com>2013-08-29 09:02:33 +0300
commit637fd8348a768335a8fde685f9d49da7f548e8fc (patch)
tree994dde5706d4f3a382996463b445ef659fa4bc07
parentd585732d86d074552706870d348543b5ed295282 (diff)
downloadmeta-boot2qt-637fd8348a768335a8fde685f9d49da7f548e8fc.tar.gz
init-ifupdown: use different interfaces configs for devices
beagleboard: sets fixed mac address on first boot emulator: eth0 is for simulator connection and eth1 for network rest: use hostname for dns registration Change-Id: I8acca677fcf7c6b85bb03ae0a29011c85b7ffbf3 Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
-rw-r--r--recipes/init-ifupdown/init-ifupdown/beagleboard/interfaces33
-rw-r--r--recipes/init-ifupdown/init-ifupdown/emulator/interfaces33
-rw-r--r--recipes/init-ifupdown/init-ifupdown/interfaces1
-rw-r--r--recipes/init-ifupdown/init-ifupdown_1.0.bbappend4
4 files changed, 68 insertions, 3 deletions
diff --git a/recipes/init-ifupdown/init-ifupdown/beagleboard/interfaces b/recipes/init-ifupdown/init-ifupdown/beagleboard/interfaces
new file mode 100644
index 0000000..e315b94
--- /dev/null
+++ b/recipes/init-ifupdown/init-ifupdown/beagleboard/interfaces
@@ -0,0 +1,33 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wireless interfaces
8iface wlan0 inet dhcp
9 wireless_mode managed
10 wireless_essid any
11 wpa-driver wext
12 wpa-conf /etc/wpa_supplicant.conf
13
14iface atml0 inet dhcp
15
16# Wired or wireless interfaces
17auto eth0
18iface eth0 inet dhcp
19 hostname `/bin/hostname`
20# hwaddress ether 00:00:00:00:00:00
21iface eth1 inet dhcp
22
23# Ethernet/RNDIS gadget (g_ether)
24# ... or on host side, usbnet and random hwaddr
25iface usb0 inet static
26 address 192.168.7.2
27 netmask 255.255.255.0
28 network 192.168.7.0
29 gateway 192.168.7.1
30
31# Bluetooth networking
32iface bnep0 inet dhcp
33
diff --git a/recipes/init-ifupdown/init-ifupdown/emulator/interfaces b/recipes/init-ifupdown/init-ifupdown/emulator/interfaces
new file mode 100644
index 0000000..06adafb
--- /dev/null
+++ b/recipes/init-ifupdown/init-ifupdown/emulator/interfaces
@@ -0,0 +1,33 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wireless interfaces
8iface wlan0 inet dhcp
9 wireless_mode managed
10 wireless_essid any
11 wpa-driver wext
12 wpa-conf /etc/wpa_supplicant.conf
13
14iface atml0 inet dhcp
15
16# Wired or wireless interfaces
17auto eth0
18iface eth0 inet dhcp
19auto eth1
20iface eth1 inet dhcp
21 hostname `/bin/hostname`
22
23# Ethernet/RNDIS gadget (g_ether)
24# ... or on host side, usbnet and random hwaddr
25iface usb0 inet static
26 address 192.168.7.2
27 netmask 255.255.255.0
28 network 192.168.7.0
29 gateway 192.168.7.1
30
31# Bluetooth networking
32iface bnep0 inet dhcp
33
diff --git a/recipes/init-ifupdown/init-ifupdown/interfaces b/recipes/init-ifupdown/init-ifupdown/interfaces
index e315b94..5c1ec07 100644
--- a/recipes/init-ifupdown/init-ifupdown/interfaces
+++ b/recipes/init-ifupdown/init-ifupdown/interfaces
@@ -17,7 +17,6 @@ iface atml0 inet dhcp
17auto eth0 17auto eth0
18iface eth0 inet dhcp 18iface eth0 inet dhcp
19 hostname `/bin/hostname` 19 hostname `/bin/hostname`
20# hwaddress ether 00:00:00:00:00:00
21iface eth1 inet dhcp 20iface eth1 inet dhcp
22 21
23# Ethernet/RNDIS gadget (g_ether) 22# Ethernet/RNDIS gadget (g_ether)
diff --git a/recipes/init-ifupdown/init-ifupdown_1.0.bbappend b/recipes/init-ifupdown/init-ifupdown_1.0.bbappend
index c2ed1b8..31c189d 100644
--- a/recipes/init-ifupdown/init-ifupdown_1.0.bbappend
+++ b/recipes/init-ifupdown/init-ifupdown_1.0.bbappend
@@ -1,8 +1,8 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2 2
3SRC_URI += "file://fixed_mac_address" 3SRC_URI_append_beagleboard = " file://fixed_mac_address"
4 4
5do_install_append() { 5do_install_append_beagleboard() {
6 install -d ${D}${sysconfdir}/init.d 6 install -d ${D}${sysconfdir}/init.d
7 install -m 0755 ${WORKDIR}/fixed_mac_address ${D}${sysconfdir}/network/if-pre-up.d/ 7 install -m 0755 ${WORKDIR}/fixed_mac_address ${D}${sysconfdir}/network/if-pre-up.d/
8} 8}