![]() Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) PID hash table entries: 512 (order: -1, 2048 bytes)ĭentry cache hash table entries: 16384 (order: 4, 65536 bytes) Kernel command line: root=/dev/sda console=ttyAMA0,115200 Linux version 4.9.6 (gcc version 5.4.0 (Buildroot 2017.03-g4d1c2c82e) ) #1 Sat May 20 00:42:18 CEST 2017ĬPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00093177ĬPU: VIVT data cache, VIVT instruction cacheīuilt 1 zonelists in Zone order, mobility grouping on. This was inspired by buildroot/board/qemu/arm-versatile/readme.txt.Īnd there it is! pulseaudio: set_sink_input_volume() failed All we need to do is to run one command right after the compilation ends: $ qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -drive file=output/images/rootfs.ext2,if=scsi -append "root=/dev/sda console=ttyAMA0,115200" -nographic Because of that, we do not have to configure any bootloader (like U-Boot for instance). This is one of the development platforms supported both by Linux and QEMU out of the box. This configuration file along with buildroot/board/qemu/arm-versatile/linux-4.9.config tells Buildroot to set kernel configuration to suit ARM Versatile boards template. There is nothing to change within the kernel thanks to this. Second shortcut is configuring Buildroot with qemu_arm_versatile_defconfig. What it produces in the end are the Linux kernel and the image of root filesystem. But we have taken three huge shortcuts.įirst, by using Buildroot which is a big set of Makefiles that configures and compiles GCC, C library and whole OS ecosystem (BusyBox). ![]() Ever heard that making Linux for embedded devices is hard? Well, it is. So, what we have just done is we run a massive process of downloading core packages and compiling them into toolchain, kernel and root filesystem that will became our own, small Linux OS. Now type this and get some coffee: $ make In Build options check Enable compiler cache which will save compiler output files and make consequent compilations faster. Be sure to have all tools from Build options -> Commands menu installed in your host system. Since we preconfigured it with the defconfig file, there is almost nothing to change here. Next: $ make menuconfigĪnd menu similar to Linux kernel menuconfig shows up. Where qemu_arm_versatile_defconfig is file & defconfig name from buildroot/configs directory. Did I say quickest? Let’s start then: $ git clone git:///buildroot I will show the quickest way of running your own-built Linux system in QEMU emulator. ![]() In this case I'm using an Ubuntu rootfs which can be downloaded from here.Buildroot and QEMU – the quickest recipe for your own Linux This sets up the selected path to be mountable by the guest. aarch64-softmmu/qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel -append "console=ttyAMA0" -fsdev local,id=r,path=/home/alex/lsrc/qemu/rootfs/trusty-core,security_model=none -device virtio-9p-device,fsdev=r,mount_tag=r Use the following extended QEMU command line: Thanks to VIRT FS we can achieve this without too much hassle. It will be a lot more useful if you could access your host file-system to test other binaries. ![]() This is all very well but the test image only has a fairly limited root file-system attached to it. QEMU 2.0.50 monitor - type 'help' for more information Once you are done type C-a c to enter QEMU's monitor mode and then quit to exit. Login as root (no password) and play in the new sandbox. If all went well you should see the familiar Linux boot sequence and eventually get a login prompt. aarch64-softmmu/qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel -append "console=ttyAMA0" I go into more details on how to create this later on.īe aware the command line is quite long so make sure you copy it all -) The image is a kernel that has been combined with an initial RAM disk (initrd) with a basic root file-system. Grab a pre-built image from here and we'll check it works. aarch64-softmmu/qemu-system-aarch64 in your build directory. configure -target-list=aarch64-softmmuĪssuming the build ran without any problems you should now have an executable.
0 Comments
Leave a Reply. |