Hi,
For a firewall recipe using nftables we need to make some kernel configuration changes.
At first we added the needed CONFIG_ lines to a bbappend in the recipes-kernel directory of our own layer, but I think it would be neater to include the CONFIG_ changes in the recipe that needs them, if possible.
So I tried:
SRC_URI = " \
file://nftables.service \
file://nftables.conf \
"
RDEPENDS_${PN} += " \
nftables \
"
inherit systemd
SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_SERVICE_${PN} = "nftables.service"
do_install_append() {
install -d ${D}/${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/nftables.service ${D}/${systemd_unitdir}/system
install -d ${D}/${sysconfdir}/nftables
install -m 0644 ${WORKDIR}/nftables.conf ${D}/${sysconfdir}/nftables
}
FILES_${PN} += "${systemd_unitdir}/system/nftables.service"
FILES_${PN} += "${sysconfdir}/nftables/nftables.conf"
# Make the required changes to the kernel configuration
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI += " \
file://nftables-kernel.cfg \
"
But unfortunately, the CONFIG_ changes in the nftables-kernel.cfg are not being applied..
Any hints? Thanks!
Kind regards,
Maik Vermeulen
Embedded Software Engineer — Lightyear
+31 6 16 82 73 79