Rework demo image naming
[AGL/meta-agl-demo.git] / recipes-config / qemu-config / qemu-config-vmnet0.bb
1 SUMMARY     = "Setting files for QEMU networking for guest VMs"
2 LICENSE     = "MIT"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5 inherit systemd allarch
6
7 SRC_URI = "file://vmnet0.netdev \
8            file://vmnet0.network \
9            file://bridge.conf \
10            file://dnsmasq-qemu.conf \
11            file://connman-nodnsproxy.conf \
12 "
13
14 do_configure[noexec] = "1"
15 do_compile[noexec] = "1"
16
17 do_install() {
18     # Install systemd-networkd vmnet0 configuration
19     install -d ${D}${systemd_unitdir}/network
20     install -m 0644 ${WORKDIR}/vmnet0.netdev ${D}${systemd_unitdir}/network/
21     install -m 0644 ${WORKDIR}/vmnet0.network ${D}${systemd_unitdir}/network/
22
23     # Install QEMU bridge configuration
24     install -d ${D}${sysconfdir}/qemu
25     install -m 0644 ${WORKDIR}/bridge.conf ${D}${sysconfdir}/qemu/
26
27     # Configure dnsmasq to serve DHCP to the guests
28     install -d ${D}${sysconfdir}/dnsmasq.d
29     install -m 0644 ${WORKDIR}/dnsmasq-qemu.conf ${D}${sysconfdir}/dnsmasq.d/
30
31     # Disable ConnMan's local DNS proxy to not conflict with dnsmasq
32     install -d ${D}${systemd_system_unitdir}/connman.service.d/
33     install -m 0644 ${WORKDIR}/connman-nodnsproxy.conf ${D}${systemd_system_unitdir}/connman.service.d/    
34 }
35
36 FILES:${PN} += "${systemd_unitdir}/network ${systemd_system_unitdir}"
37
38 RDEPENDS:${PN} += "agl-qemu-runner dnsmasq connman"