diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 02:06:17 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 02:06:17 +0200 |
commit | 54eecdabe0cdfdc47d77b3e182fda5899702ded7 (patch) | |
tree | 8e28d750773f0aa38f0d2de83109b190faf0b425 /recipes-core | |
download | meta-fsl-arm-extra-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-core')
6 files changed, 90 insertions, 0 deletions
diff --git a/recipes-core/init-ifupdown/init-ifupdown/imx233-olinuxino-maxi/interfaces b/recipes-core/init-ifupdown/init-ifupdown/imx233-olinuxino-maxi/interfaces new file mode 100644 index 0000000..c7c17cc --- /dev/null +++ b/recipes-core/init-ifupdown/init-ifupdown/imx233-olinuxino-maxi/interfaces | |||
@@ -0,0 +1,22 @@ | |||
1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
2 | |||
3 | # The loopback interface | ||
4 | auto lo | ||
5 | iface lo inet loopback | ||
6 | |||
7 | # Wireless interfaces | ||
8 | iface wlan0 inet dhcp | ||
9 | wireless_mode managed | ||
10 | wireless_essid any | ||
11 | wpa-driver wext | ||
12 | wpa-conf /etc/wpa_supplicant.conf | ||
13 | |||
14 | auto usb0 | ||
15 | iface usb0 inet static | ||
16 | address 192.168.7.2 | ||
17 | netmask 255.255.255.0 | ||
18 | network 192.168.7.0 | ||
19 | gateway 192.168.7.1 | ||
20 | |||
21 | |||
22 | |||
diff --git a/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend new file mode 100644 index 0000000..a276059 --- /dev/null +++ b/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend | |||
@@ -0,0 +1 @@ | |||
FILESEXTRAPATHS_prepend := "${THISDIR}/init-ifupdown:" | |||
diff --git a/recipes-core/net-persistent-mac/net-persistent-mac.bb b/recipes-core/net-persistent-mac/net-persistent-mac.bb new file mode 100644 index 0000000..17111c0 --- /dev/null +++ b/recipes-core/net-persistent-mac/net-persistent-mac.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Network device MAC persistency" | ||
2 | DESCRIPTION = "Provides support to store/restore the MAC of a specific network device" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
6 | |||
7 | inherit update-rc.d | ||
8 | |||
9 | INITSCRIPT_NAME = "net-persistent-mac" | ||
10 | INITSCRIPT_PARAMS = "start 39 S ." | ||
11 | |||
12 | SRC_URI = "file://init \ | ||
13 | file://default" | ||
14 | |||
15 | do_install () { | ||
16 | install -d ${D}${sysconfdir}/init.d | ||
17 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${PN} | ||
18 | |||
19 | install -d ${D}${sysconfdir}/default | ||
20 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/${PN} | ||
21 | } | ||
22 | |||
23 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-core/net-persistent-mac/net-persistent-mac/default b/recipes-core/net-persistent-mac/net-persistent-mac/default new file mode 100644 index 0000000..9086f7b --- /dev/null +++ b/recipes-core/net-persistent-mac/net-persistent-mac/default | |||
@@ -0,0 +1 @@ | |||
INTERFACES="" \ No newline at end of file | |||
diff --git a/recipes-core/net-persistent-mac/net-persistent-mac/imx233-olinuxino-maxi/default b/recipes-core/net-persistent-mac/net-persistent-mac/imx233-olinuxino-maxi/default new file mode 100644 index 0000000..fe4a054 --- /dev/null +++ b/recipes-core/net-persistent-mac/net-persistent-mac/imx233-olinuxino-maxi/default | |||
@@ -0,0 +1 @@ | |||
INTERFACES="usb0" | |||
diff --git a/recipes-core/net-persistent-mac/net-persistent-mac/init b/recipes-core/net-persistent-mac/net-persistent-mac/init new file mode 100644 index 0000000..a2e2863 --- /dev/null +++ b/recipes-core/net-persistent-mac/net-persistent-mac/init | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: net-persistent-mac | ||
5 | # Required-Start: $local_fs | ||
6 | # Required-Stop: | ||
7 | # Default-Start: S | ||
8 | # Default-Stop: | ||
9 | # X-Start-Before: networking | ||
10 | # Short-Description: restore MAC during boot process | ||
11 | ### END INIT INFO | ||
12 | |||
13 | set -e | ||
14 | |||
15 | [ -f /etc/default/net-persistent-mac ] && . /etc/default/net-persistent-mac | ||
16 | |||
17 | MAC_DIR="/var/lib/net-persistent-mac" | ||
18 | |||
19 | for if in $INTERFACES; do | ||
20 | mkdir -p "$MAC_DIR" | ||
21 | IF_FILE="$MAC_DIR/$if.mac" | ||
22 | IF_MAC="/sys/class/net/$if/address" | ||
23 | |||
24 | # Store MAC for reuse | ||
25 | if [ ! -r "$IF_FILE" ]; then | ||
26 | if [ -e "$IF_MAC" ]; then | ||
27 | echo "Storing MAC for $if for future use." > /dev/stderr | ||
28 | cat "$IF_MAC" > "$IF_FILE" | ||
29 | else | ||
30 | echo "Failed to read MAC for $if; skiping device." | ||
31 | fi | ||
32 | fi | ||
33 | |||
34 | if [ -r "$IF_FILE" ]; then | ||
35 | # Restore MAC setting | ||
36 | WANTED_MAC=`cat $IF_FILE` | ||
37 | if [ "$WANTED_MAC" != "`cat $IF_MAC`" ]; then | ||
38 | echo "Setting MAC of $if to $WANTED_MAC." | ||
39 | ifconfig $if hw ether "$WANTED_MAC" | ||
40 | fi | ||
41 | fi | ||
42 | done | ||