summaryrefslogtreecommitdiff
path: root/recipes-core/usb-rndis/usb-rndis-systemd.bb
blob: 5cc65219475516a93a3a296efa3d0ca6f5b93bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SECTION = "network"
SUMMARY = "RNDIS usb client configuration and startup"
# The license is meant for this recipe and the files it installs.
# RNDIS is part of the kernel, systemd-networkd is part of systemd
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PR = "r1"

# Tegra Kernels:
# The kernel provides with CONFIG_USB_G_ANDROID a composite gadget driver
# among other with RNDIS functionality.
# i.MX6 Kernels:
# The kernel provides with CONFIG_USB_ETH_RNDIS an USB gadget driver which
# provides RNDIS functionality.
# Vybrid Kernels:
# The kernel provides with CONFIG_USB_CONFIGFS_RNDIS an USB gadget driver
# which provides RNDIS functionality. RNDIS needs to be configured and
# enabled through configfs, which is done by libusbg (usbg.service)

# This package contains systemd files to configure RNDIS at startup (Tegra
# and i.MX6), configures a fix IP locally and provides a DHCP server using
# systemd-networkd
# Local IP is 192.168.11.1, remote IP is 192.168.11.2

inherit allarch systemd

SRC_URI = " \
    file://start-rndis.sh \
    file://usb-rndis.service \
"

do_install() {
    install -d ${D}/${bindir}
    install -m 0755 ${WORKDIR}/start-rndis.sh ${D}/${bindir}/

    install -d ${D}${systemd_unitdir}/system/
    install -m 0644 ${WORKDIR}/usb-rndis.service ${D}${systemd_unitdir}/system
}

SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "usb-rndis.service"
SYSTEMD_AUTO_ENABLE_mx6 = "disable"