mirror of https://github.com/acidanthera/audk.git
While fixing https://github.com/tianocore/edk2/pull/6092 (the fact that some OvmfPkg and ArmVirtPkg platforms included residual NetworkPkg components even when compiled with -D NETWORK_ENABLE=0), it was noted that OvmfPkg/Include/*/Shell*.inc files which apply the required fix logic are available and already used in some OvmfPkg platforms. This commit applies these files consistently within OvmfPkg. This has the side effect that some platforms now include one or more of HttpDynamicCommand, VariablePolicyDynamicCommand and LinuxInitrdDynamicShellCommand when they previously did not. This fixes unintentional drift between platforms, and provides additional shell commands which may be useful in some cases. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com> |
||
---|---|---|
.. | ||
Drivers/StableTimerDxe | ||
Library | ||
PlatformPei | ||
Sec | ||
LoongArchVirt.fdf.inc | ||
LoongArchVirtQemu.dsc | ||
LoongArchVirtQemu.fdf | ||
Readme.md | ||
VarStore.fdf.inc |
Readme.md
LoongArch QEMU virt platform
Overview
LoongArch QEMU virt is a generic platform that does not require any actual hardware. The minimum required QEMU version is 8.1, the minimum required GCC version is GCC13, the minimum required Binutils version is 2.40.
Prepare (X86 Linux Environment)
Fedora39 and higher
Install LoongArch64 cross compiler, LoongArch system QEMU.
yum install gcc-loongarch64-linux-gnu
yum install qemu-system-loongarch64
Others X86 OS ENV
Configure cross-tools
Download:
wget https://github.com/loongson/build-tools/releases/download/2023.08.08/x86_64-cross-tools-loongarch64-binutils_2.41-gcc_13.2.0.tar.xz
Configure the cross-tools environment:
mkdir /opt/loongarch64_cross-toolchain/
tar -vxf x86_64-cross-tools-loongarch64-binutils_2.41-gcc_13.2.0.tar.xz -C /opt/loongarch64_cross-toolchain/
export PATH=/opt/loongarch64_cross-toolchain/cross-tools/bin:$PATH
Note: Please obtain the latest cross-compilation toolchains.
Build QEMU
git clone https://gitlab.com/qemu-project/qemu.git
Note: Please refer to QEMU compilation rules, located in qemu/doc/system/loongarch/virt.rst.
Build LoongArch QEMU virtual machine firmware
Get edk2 resouces
git clone --recurse-submodule https://github.com/tianocore/edk2.git
Building LoongArch QEMU virt FW with GCC
export WORKSPACE=`pwd`
export GCC5_LOONGARCH64_PREFIX=loongarch64-unknown-linux-gnu-
export PACKAGES_PATH=$WORKSPACE/edk2
export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
source edk2/edksetup.sh --reconfig
make -C edk2/BaseTools
source edk2/edksetup.sh BaseTools
build -b RELEASE -t GCC5 -a LOONGARCH64 -p OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc
Test LoongArch QEMU virtual machine firmware
qemu-system-loongarch64 \
-m 4G \
-M virt \
-smp 2 \
-cpu la464 \
-bios Build/LoongArchVirtQemu/RELEASE_GCC5/FV/QEMU_EFI.fd \
-serial stdio