docs: qemu: add build instructions for QEMU_EFI.fd and rootfs.cpio.gz

This commit solves the limitation, "No build instructions for
QEMU_EFI.fd and rootfs-arm64.cpio.gz"

Document the steps to build them.

Change-Id: Ic6d895617cf71fe969f4aa9820dad25cc6182023
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada 2020-07-04 16:12:55 +09:00
parent 568a881728
commit a66f0309e5
1 changed files with 39 additions and 4 deletions

View File

@ -20,11 +20,46 @@ provided as it's generated by QEMU.
Current limitations:
- Only cold boot is supported
- No build instructions for QEMU\_EFI.fd and rootfs-arm64.cpio.gz
``QEMU_EFI.fd`` can be dowloaded from
Getting non-TF images
---------------------
``QEMU_EFI.fd`` can be downloaded from
http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/latest/QEMU-KERNEL-AARCH64/RELEASE_GCC5/QEMU_EFI.fd
or, can be built as follows:
.. code:: shell
git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init
make -C BaseTools
source edksetup.sh
export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
build -a AARCH64 -t GCC5 -p ArmVirtPkg/ArmVirtQemuKernel.dsc
````
Then, you will get ``Build/ArmVirtQemuKernel-AARCH64/DEBUG_GCC5/FV/QEMU_EFI.fd``
Please note you do not need to use GCC 5 in spite of the environment variable
``GCC5_AARCH64_PREFIX``
The rootfs can be built by using Buildroot as follows:
.. code:: shell
git clone git://git.buildroot.net/buildroot.git
cd buildroot
make qemu_aarch64_virt_defconfig
utils/config -e BR2_TARGET_ROOTFS_CPIO
utils/config -e BR2_TARGET_ROOTFS_CPIO_GZIP
make olddefconfig
make
Then, you will get ``output/images/rootfs.cpio.gz``.
Booting via semi-hosting option
-------------------------------
@ -50,7 +85,7 @@ To start (QEMU v4.1.0):
qemu-system-aarch64 -nographic -machine virt,secure=on -cpu cortex-a57 \
-kernel Image \
-append "console=ttyAMA0,38400 keep_bootcon root=/dev/vda2" \
-initrd rootfs-arm64.cpio.gz -smp 2 -m 1024 -bios bl1.bin \
-initrd rootfs.cpio.gz -smp 2 -m 1024 -bios bl1.bin \
-d unimp -semihosting-config enable,target=native
Booting via flash based firmwares
@ -99,5 +134,5 @@ To start (QEMU v2.6.0):
qemu-system-aarch64 -nographic -machine virt,secure=on -cpu cortex-a57 \
-kernel Image -no-acpi \
-append 'console=ttyAMA0,38400 keep_bootcon root=/dev/vda2' \
-initrd rootfs-arm64.cpio.gz -smp 2 -m 1024 -bios flash.bin \
-initrd rootfs.cpio.gz -smp 2 -m 1024 -bios flash.bin \
-d unimp