apt-get install gcc-arm-linux-gnueabihf qemumkdir qemu-arm-sandbox && cd qemu-arm-sandboxwget <link_to_kernel_tar_file> && tar xvf <linux_tar_file>wget <link_to_busybox_tar_file> && tar xvf <busybox_tar_file>cd <linux_dir>
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- defconfigadd all 9p virtio related configs
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfigmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8cd <busybox_dir>
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- defconfingBusybox Settings ==> Build Options SELECT Build BusyBox as a static binary(no shared libs)
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfigmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- installcd _install
mkdir proc sys dev etc etc/init.dCreate etc/init.d/rcS file and enter the following shell code
#!/bin/sh
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -schmod +x etc/init.d/rcS find . | cpio -o --format=newc > ../rootfs.imgcd back to qemu-arm-sandbox
qemu-system-arm -m 256 -M virt -kernel <linux_dir>/arch/arm/boot/zImage -initrd <busybox_dir>/rootfs.img -nographic -append "console=ttyAMA0 root=/dev/ram rdinit=/sbin/init" -virtfs local,path=<host_path_to_share>,security_model=passthrough,mount_tag=host_sharemkdir -p /mnt/host_share && mount -t 9p -o trans=virtio host_share /mnt/host_share -oversion=9p2000.L