38.15.2. buildroot_packages directory
Source: buildroot_packages/.
Every directory inside it is a Buildroot package.
Those packages get automatically added to Buildroot’s BR2_EXTERNAL
, so all you need to do is to turn them on during build, e.g.:
./build-buildroot --config 'BR2_PACKAGE_SAMPLE_PACKAGE=y'
then test it out with:
./run --eval-after '/sample_package.out'
and you should see:
hello sample_package
You can force a rebuild with:
./build-buildroot --config 'BR2_PACKAGE_SAMPLE_PACKAGE=y' -- sample_package-reconfigure
Buildroot packages are convenient, but in general, if a package if very important to you, but not really mergeable back to Buildroot, you might want to just use a custom build script for it, and point it to the Buildroot toolchain, and then use BR2_ROOTFS_OVERLAY
, much like we do for Userland setup.
A custom build script can give you more flexibility: e.g. the package can be made work with other root filesystems more easily, have better 9P support, and rebuild faster as it evades some Buildroot boilerplate.