summaryrefslogtreecommitdiff
path: root/recipes-core/usb-rndis/usb-rndis-systemd.bb
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2012-11-26 13:17:50 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2012-11-26 13:17:50 +0100
commitbba3ade18292cec012a006a332ab7a2c1918f404 (patch)
tree2a6d05f849e39540bea0e003a8536473206af92f /recipes-core/usb-rndis/usb-rndis-systemd.bb
parent1ba41eb2d7ae9bf114130d0e6bec8ee9e10d363d (diff)
usb-rndis:
- add recipe which configures RNDIS and dhcp on the new NIC requires kernel commit b7e977a36ee2b1ab1a55238761fe8d63df9bc638 see also http://permalink.gmane.org/gmane.linux.usb.general/56244
Diffstat (limited to 'recipes-core/usb-rndis/usb-rndis-systemd.bb')
-rw-r--r--recipes-core/usb-rndis/usb-rndis-systemd.bb30
1 files changed, 30 insertions, 0 deletions
diff --git a/recipes-core/usb-rndis/usb-rndis-systemd.bb b/recipes-core/usb-rndis/usb-rndis-systemd.bb
new file mode 100644
index 0000000..47bf921
--- /dev/null
+++ b/recipes-core/usb-rndis/usb-rndis-systemd.bb
@@ -0,0 +1,30 @@
+SECTION = "network"
+DESCRIPTION = "RNDIS usb client configuration and startup"
+RDEPENDS_${PN} = ""
+# The license is meant for this recipe and the files it installes.
+# RNDIS is part of the kernel, udhcpd is part of busybox
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+# The kernel provides with CONFIG_USB_G_ANDROID a composite gadget driver among other with RNDIS functionality.
+# This package contains systemd files to configure RNDIS at startup, configures a fix IP localy and provides a dhcp server on the new interface.
+# Local IP is 192.168.11.2, remote IP is 192.168.11.1
+
+inherit allarch systemd
+
+SRC_URI = " \
+ file://start-rndis.sh \
+ file://usb-rndis.service \
+ file://busybox-dhcpd.service \
+ file://udhcpd.conf "
+
+do_install() {
+ install -d ${D}/${sysconfdir} ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/start-rndis.sh ${D}/${bindir}
+ install -m 0644 ${WORKDIR}/udhcpd.conf ${D}/${sysconfdir}/
+}
+
+NATIVE_SYSTEMD_SUPPORT = "1"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "usb-rndis.service busybox-dhcpd.service "
+