diff options
4 files changed, 30 insertions, 1 deletions
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass index 4a1f628..8dae0c5 100644 --- a/classes/sota_qemux86-64.bbclass +++ b/classes/sota_qemux86-64.bbclass | |||
| @@ -13,4 +13,4 @@ IMAGE_ROOTFS_EXTRA_SPACE = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '655 | |||
| 13 | # fix for u-boot/swig build issue | 13 | # fix for u-boot/swig build issue |
| 14 | HOSTTOOLS_NONFATAL += "x86_64-linux-gnu-gcc" | 14 | HOSTTOOLS_NONFATAL += "x86_64-linux-gnu-gcc" |
| 15 | 15 | ||
| 16 | IMAGE_INSTALL_append_sota = " connman connman-client" | 16 | IMAGE_INSTALL_append_sota = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'networkd-dhcp-conf', '', d)} " |
diff --git a/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network b/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network new file mode 100644 index 0000000..aec1849 --- /dev/null +++ b/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | [Match] | ||
| 2 | Name=en* | ||
| 3 | |||
| 4 | [Network] | ||
| 5 | DHCP=yes | ||
diff --git a/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb new file mode 100644 index 0000000..60eae44 --- /dev/null +++ b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | SUMMARY = "systemd-networkd config to setup wired interface with dhcp" | ||
| 2 | DESCRIPTION = "Provides automatic dhcp network configuration for wired \ | ||
| 3 | interfaces through systemd-networkd" | ||
| 4 | LICENSE = "MPL-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
| 6 | |||
| 7 | inherit systemd | ||
| 8 | |||
| 9 | SRC_URI_append = " file://20-wired-dhcp.network" | ||
| 10 | PR = "r1" | ||
| 11 | |||
| 12 | RDEPENDS_${PN} = "systemd" | ||
| 13 | |||
| 14 | S = "${WORKDIR}" | ||
| 15 | |||
| 16 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 17 | |||
| 18 | FILES_${PN} = "${systemd_unitdir}/network/*" | ||
| 19 | |||
| 20 | do_install() { | ||
| 21 | install -d ${D}/${systemd_unitdir}/network | ||
| 22 | install -m 0644 ${WORKDIR}/20-wired-dhcp.network ${D}/${systemd_unitdir}/network | ||
| 23 | } | ||
diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index 1a41169..371d517 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb | |||
| @@ -17,6 +17,7 @@ IMAGE_INSTALL_remove = " \ | |||
| 17 | aktualizr-uboot-env-rollback \ | 17 | aktualizr-uboot-env-rollback \ |
| 18 | connman \ | 18 | connman \ |
| 19 | connman-client \ | 19 | connman-client \ |
| 20 | networkd-dhcp-conf \ | ||
| 20 | " | 21 | " |
| 21 | 22 | ||
| 22 | IMAGE_INSTALL_append = " \ | 23 | IMAGE_INSTALL_append = " \ |
