blob: d1dff35ec5f8d65d9c22db5493ac7fc8e91f1b29 [file] [log] [blame]
Thang Q. Nguyenff389792021-10-15 14:04:44 +00001SUMMARY = "Enable USB ethernet"
2PR = "r1"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6DEPENDS += "systemd"
7RDEPENDS:${PN} += "libsystemd bash"
8
9inherit allarch systemd
10
11SRC_URI += "file://ampere-usbnet.service \
12 file://ampere_usbnet.sh \
13 file://00-bmc-usb0.network"
14
15do_install() {
16 install -d ${D}${systemd_unitdir}/system/
17 install -m 0644 ${WORKDIR}/ampere-usbnet.service ${D}${systemd_unitdir}/system
18
19 install -d ${D}${sysconfdir_native}/systemd/network/
20 install -m 0644 ${WORKDIR}/00-bmc-usb0.network ${D}${sysconfdir_native}/systemd/network
21
22 install -d ${D}/${sbindir}
23 install -m 755 ${WORKDIR}/ampere_usbnet.sh ${D}/${sbindir}
24}
25
26NATIVE_SYSTEMD_SUPPORT = "1"
27SYSTEMD_PACKAGES = "${PN}"
28SYSTEMD_SERVICE:${PN} = "ampere-usbnet.service"