How to run Linux on a QEMU ARM Versatile machine?
I downloaded qemu and linux from github.
(qemu : https://github.com/qemu/qemu.git,
linux : https://github.com/torvalds/linux.git)
I think these two repositorys are the main project of them.
Anyway, I compiled linux with 2 steps.
- make ARCH=arm versatile_defconfig
- make all ARCH=arm CROSS_COMPILE=arm-none-eabi-
Also compiled qemu with 3 steps.
- ./configure
- make
- sudo make install
To mount the root filesystem, I downloaded busybox. (I'm not sure, but this busybox is the mostly used filesystem to develper when they want to make simple enviroment)
I downloaded busybox and i followed some steps.
- wget http://www.busybox.net/downloads/busybox-1.24.1.tar.bz2
- tar -xvf busybox-1.24.1.tar.bz2
- cd busybox-1.24.1/
- make defconfig
- make menuconfig (to make binary as static not shared)
- make -j8
- make install
- cd _install
- find . | cpio -o --format=newc > ../rootfs.img
- cd ..
- gzip -c rootfs.img > rootfs.img.gz
So, my final command is
../qemu/arm-softmmu/qemu-system-arm -M versatilepb -kernel ./arch/arm/boot/zImage -nographic -dtb arch/arm/boot/dts/versatile-pb.dtb -initrd ../rootfs.img.gz -append "root=/dev/ram0 initrd=/bin/sh"
I ran linux on qemu especially versatile version
here is my current status of file with 'ls' command
To run the upper command, the linux, qemu and filesystem images should be located like this (except other projects like FreeRTOS it's only for my situation)
How to modify the source of Buildroot packages for package development?
Please read the Buildroot manual about the <pkg>_OVERRIDE_SRCDIR
functionality. It does exactly what you are looking for.
Related Topics
Loading Linux Text File into Excel Using Vba
How to Use Awk to Convert All the Lower-Case Letters into Upper-Case
Shell Function to Tail a Log File for a Specific String for a Specific Time
How to Receive the Wrong Ethernet Frames and Disable the Crc/Fcs Calcul
Is There Any Shortcut to Reference the Path of the First Argument in a Mv Command
Linux - Watch a Directory for New Files, Then Run a Script
Error: Could Not Locate the Bindings File. Tried: #56
How Are Threads/Processes Parked and Woken in Linux, Prior to Futex
Sorting Numbers with Multiple Decimals in Bash
How to Disable or Change the Timeout Limit for the Gpu Under Linux
What's the Practical Limit on the Size of Single Packet Transmitted Over Domain Socket
Postgresql on Elastic Beanstalk (Amazon Linux 2)