Buildroot External template generator
- Tweak the configuration file br-external.conf
- Run
make
to quickly setup a layout of a br2-external tree as document
- Run
make build-container
to config buildroot - Run the following cmds in sequence to tweak buildroot/kernel/busybox config
make menuconfig
make kernalconfig
make busyboxconfig
- Run
make
to generate a QEMU disk image - Run
make boot-img
to launch QEMU
Note:
you can find all buildroot configs inbr2_external/configs
and extra packages tarball inbr2_external/dl
Highly recommend to track them with git, especially using git-lfs to store the files inbr2_external/dl
- Use git lfs to store packages in $(BASEDIR)/dl
- Enable CCACHE
Press ctrl+a+c
to qemu cli, and run info network
(or info pci
), we can find the default net device model is e1000.
(qemu) info network
hub 0
\ hub0port1: user.0: index=0,type=user,net=10.0.2.0,restrict=off
\ hub0port0: e1000.0: index=0,type=nic,model=e1000,macaddr=52:54:00:12:34:56
so there are two ways to solve this.
- Enable e1000 driver and ensure
CONFIG_E1000=y
in linux.config
make linux-menuconfig
Device drivers —>
Network device support —>
Ethernet driver support—>
<*> Intel(R) PRO/1000 Gigabit Ethernet support
<*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support
- Run qemu with
-net nic,model=virtio -net user
options, refer to this and you might need to know why Qemu user mode networking doesn't work
Use qemu_x86_defconfig for qemu-system-i386. Change tty1 to ttyS0 for using QEMU nographic option, refer to Build buildroot and run QEMU
Enable Install kernel image to /boot in target
in the kernel menu to populate a /boot directory with bzImage, refer to Notes on using Grub2 for ARM u-boot-based platforms