I\'ve been using buildroot in order to build a toolchain using uclibc. Now, buildroot downloads all the packages, extract
Minimal git submodule + *_OVERRIDE_SRCDIR
example
Docs explain it, but here is a faster to parse version.
Directory structure:
buildroot/
: git submodule with buildroot 2017.02
linux/
: git submodule with Linux kernel pointing to your fork at https://github.com/you/linux
buildroot_override
: contains:
LINUX_OVERRIDE_SRCDIR = ../linux
Build and run:
cd buildroot
make qemu_x86_64_defconfig
echo 'BR2_PACKAGE_OVERRIDE_FILE=../buildroot_override' >> .config
make
qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
Here is an example project using it.
Please read the Buildroot manual about the <pkg>_OVERRIDE_SRCDIR
functionality. It does exactly what you are looking for.