Qemu + buildroot 101

Compile arm kernel and execute it via qemu

sudo apt-get install qemu-system-arm
tar -xvzf buildroot-2020.02.3.tar.gz
sudo apt-get install libncurses5-dev libncursesw5-dev

make menuconfig
make list-defconfigs
make qemu_arm_versatile_defconfig

export PATH=$PATH:/home/embeddedcraft/buildroot-2020.02.3/output/host/bin
arm-buildroot-linux-uclibcgnueabi-gcc hello.c -o hello
sudo mount -t ext2 -o rw,loop rootfs.ext2 /mnt/try
sudo cp hello /mnt/try/root/

qemu-system-arm -M versatilepb -kernel vmlinuz-3.2.0-4-versatile -initrd initrd.img-3.2.0-4-versatile -hda debian_wheezy_armel_standard.qcow2 -append "root=/dev/sda1"  -net nic -net user,hostfwd=tcp::7777-:22

tar zcf squashfs-root.tar.gz squashfs-root 
scp -P 7777 ./squashfs-root.tar.gz [email protected]:/root

Buildroot and QEMU – the quickest recipe for your own Linux

buildroot essential commands that will safe your life

qemu essential commands that will safe you

Qemu + virtual tap

Another option is portforwarding:

Last updated

Was this helpful?