Thang Q. Nguyen | ff38979 | 2021-10-15 14:04:44 +0000 | [diff] [blame] | 1 | SUMMARY = "Enable USB ethernet" |
| 2 | PR = "r1" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 5 | |
| 6 | DEPENDS += "systemd" |
| 7 | RDEPENDS:${PN} += "libsystemd bash" |
| 8 | |
| 9 | inherit allarch systemd |
| 10 | |
| 11 | SRC_URI += "file://ampere-usbnet.service \ |
| 12 | file://ampere_usbnet.sh \ |
| 13 | file://00-bmc-usb0.network" |
| 14 | |
| 15 | do_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 | |
| 26 | NATIVE_SYSTEMD_SUPPORT = "1" |
| 27 | SYSTEMD_PACKAGES = "${PN}" |
| 28 | SYSTEMD_SERVICE:${PN} = "ampere-usbnet.service" |