diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2014-07-18 22:22:08 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2014-08-04 11:12:26 +0200 |
commit | a079ff0d364c91e8555c916075ca0149c29c212a (patch) | |
tree | f610d76abcd96f5c1eef07b6aeece6725118f9d8 /recipes-core/usb-rndis/usb-rndis-systemd.bb | |
parent | 18e8f438ded6606a149d6caaa75567e0602eb950 (diff) |
usb-rndis: add config for g_ether.ko solution
i.MX6 and Vybrid modules use the g_ether driver for RNDIS functionality.
This commit uses a systemd service to load the kernel module, configures the new
usb0 NIC and starts a dhcp server to serve an IP address to a USB host.
The Tegras use the android gadget driver. The configuration remains unchanged.
Diffstat (limited to 'recipes-core/usb-rndis/usb-rndis-systemd.bb')
-rw-r--r-- | recipes-core/usb-rndis/usb-rndis-systemd.bb | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/recipes-core/usb-rndis/usb-rndis-systemd.bb b/recipes-core/usb-rndis/usb-rndis-systemd.bb index 5e9c741..63cc675 100644 --- a/recipes-core/usb-rndis/usb-rndis-systemd.bb +++ b/recipes-core/usb-rndis/usb-rndis-systemd.bb @@ -8,28 +8,45 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d PR = "r1" +# Tegra Kernels: # The kernel provides with CONFIG_USB_G_ANDROID a composite gadget driver among other with RNDIS functionality. +# Others: +# The kernel provides with CONFIG_USB_ETH_RNDIS a USB gadget driver which provides 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 = " \ +SRC_URI_COMMON = " \ file://start-rndis.sh \ file://usb-rndis.service \ + file://udhcpd-usb-rndis.conf \ +" + +SRC_URI = " \ + ${SRC_URI_COMMON} \ +" + +SRC_URI_tegra = " \ + ${SRC_URI_COMMON} \ file://usb-rndis.rules \ - file://udhcpd-usb-rndis.conf " +" do_install() { - install -d ${D}/${sysconfdir}/udev/rules.d ${D}/${bindir} + install -d ${D}/${sysconfdir} ${D}/${bindir} install -m 0755 ${WORKDIR}/start-rndis.sh ${D}/${bindir}/ - install -m 0644 ${WORKDIR}/usb-rndis.rules ${D}/${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/udhcpd-usb-rndis.conf ${D}/${sysconfdir}/ install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/usb-rndis.service ${D}${systemd_unitdir}/system } +do_install_append_tegra() { + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/usb-rndis.rules ${D}/${sysconfdir}/udev/rules.d +} + NATIVE_SYSTEMD_SUPPORT = "1" SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE_${PN} = "usb-rndis.service" |