Building Directly In Tree with Buildroot
Joakim Tallinger
joakim at tallinger.se
Sun May 22 11:15:11 UTC 2022
Hi,
I’m using Buildroot to build a custom linux kernel (4.14.185) for an embedded system, for which I now want to add Wireguard to. I have one config for initrd and another one for rootfs.
I added “BR2_PACKAGE_WIREGUARD_LINUX_COMPAT” to initrd and “BR2_PACKAGE_WIREGUARD_TOOLS” to rootfs. It downloads the source and builds it accordingly. I can see the module is there before initrd image is created, but since system is booted with initrd, and then rootfs is mounted I can’t access the module with modprobe. To my understanding I need to solve this by building Wireguard in tree (i.e where module is always active)?
Which brings me to the question on how to apply the kernel tree script “create-patch.sh”. I can manually navigate to the linux src directory and run it, but that won’t work as part of the Buildroot process.
I guess I need to add a pre-build step to run the script to patch the linux src, then add CONFIG_WIREGUARD=y to my custom kernel config. Would this be the correct way to do it? Or is there some easier way to manage it?
Br, Joakim
More information about the WireGuard
mailing list