lynolzx.blogg.se

Qemu linux tutorial
Qemu linux tutorial







Since we will not handle flash, SD card interface or network intferace in this post, we will use the ‘loader’ feature of the QEMU to place the Linux kernel image and Device Tree file at the appropriate addresses in memory, as if the U-Boot code had already copied them from some of the possible bootable locations. The idea is to use U-Boot to start the Linux kernel, the same way it would have been done on the real board. # Environment file PROJ_DIR =/home/user/qemu_develĮxport PATH = $PROJ_DIR/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin: $PROJ_DIR/qemu/bin/arm/arm-softmmu: $PROJ_DIR/qemu/bin/arm: $PATH export UBOOT = $PROJ_DIR/u-boot/build_vexpress/u-bootĮxport ZIMAGE = $PROJ_DIR/linux/build_vexpress/arch/arm/boot/zImageĮxport DTB = $PROJ_DIR/linux/build_vexpress/arch/arm/boot/dts/vexpress-v2p-ca9.dtb

qemu linux tutorial

If archive is used, then QEMU can be downloaded and prepared using The QEMU emulator source code can be obtained as an archive from here or as a git repository from github. The latest stable version at the time of writing is 6.1.0. The development will be done in the /home/user/qemu_devel directory, and that directory will be refered to as $PROJ_DIR. Nfs-kernel-server swig ninja-build libusb-1.0-0-dev

qemu linux tutorial

Libncurses5-dev lzop make tftpd-hpa uml-utilities \ Libgmp3-dev libmpc-dev device-tree-compiler u-boot-tools bc git \ Net-tools python3-sphinx libsdl2-image-dev flex bison \ Libxen-dev liblzo2-dev valgrind xfslibs-dev kpartx libssl-dev \ Libsnappy-dev libssh2-1-dev libvde-dev libvdeplug-dev \ Librdmacm-dev libsasl2-dev libsdl2-dev libseccomp-dev \ Libjpeg8-dev libncurses5-dev libnuma-dev librbd-dev \ Libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev libibverbs-dev \ Libbluetooth-dev libbrlapi-dev libbz2-dev libcap-dev \ Zlib1g-dev libnfs-dev libiscsi-dev git-email libaio-dev \ # Installing prerequisites $ sudo apt -y install git libglib2.0-dev libfdt-dev libpixman-1-dev \ I am using Ubuntu 20.04 as the host system, so if different system is used it is possible that some additional packages from prerequisites need to be installed. The Versatile Express V2P-CA9 will be used as the target board.īefore we start with the development, prerequisites need to be installed. In the next post a real root filesystem will be used. A simple init ramdsik will be used instead of root filesystem, so the Linux kernel does not panic on boot.

qemu linux tutorial

In this post I will cover the following thingsĪt the end of this post we will have a working QEMU, and starting point for U-Boot and Linux kernel which can be used for further work. In the previous post I presented some of the goals for doing this work with QEMU. This is part 1 of the QEMU Board Emulation post series.

qemu linux tutorial

Preparing U-Boot and Linux kernel for QEMU Board emulation









Qemu linux tutorial