From nobody Fri Oct 18 06:15:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114563+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114563+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1706250692; cv=none; d=zohomail.com; s=zohoarc; b=OJF5Ien/yEbgzY/krrIMO+HMNsnKwDc62TStB3PDg2sZAKEXlH/jrCv/Nv4cC9+HjYrJQaouvWH+m2wFB26DQ8K+2d/c/7tpUDTCfJeXEfYGX6qE01AOoorD9g/52xZZcm7Ou6K8pwRYnMJTOy5GFQjP9oWG/u7Uh1shjT3tltU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706250692; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=B5kidCIG4VR8lumkc7T5JDLwbOwexJOkLe7qAL6xmCs=; b=B9jygMms8fuehYq+VQzBTi9Re12l2l9ukqx/UqLJR37/IseL6walDs1ZwB5uw6Geuc71YrI5dWQyNX9uwsgBromXL0B0nEWrHKYr84FHrkK6TVU11Y0twoe0VDwJxcn+ZbURmUAob0wcQVl5zLekDGEig/C5inuoA2MF4m4Op0I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114563+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706250692929756.3003139893978; Thu, 25 Jan 2024 22:31:32 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Rlf8xQLiSiwRV/U1hG+x4ef6uXQiNE0WcCNGtetZ53g=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706250692; v=1; b=UcRbIF56QldIf1AmDY5N7DYt0QP0aVMEgsmNgH6u1IHOiCSYDV/npLil6gF2YyGCLc59gLWb nVW6Y+IxYvI5Vs+oKtj6x4n3Km8xhecy3WW2c2udPiu/OG2B0X2U5OgGAfWs8r4MotkwRRsVBv6 vfCeunuTWQYA62Y3u069sGJE= X-Received: by 127.0.0.2 with SMTP id fnoLYY1788612xvW43D6hjwz; Thu, 25 Jan 2024 22:31:32 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.10178.1706250691126847771 for ; Thu, 25 Jan 2024 22:31:31 -0800 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8CxifDAUbNlIB8GAA--.21859S3; Fri, 26 Jan 2024 14:31:28 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx8OS9UbNl2nMbAA--.53207S2; Fri, 26 Jan 2024 14:31:25 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Bibo Mao , Dongyan Qian Subject: [edk2-devel] [PATCH v8 37/37] OvmfPkg/LoongArchVirt: Add self introduction file Date: Fri, 26 Jan 2024 14:31:21 +0800 Message-Id: <20240126063121.3103167-1-lichao@loongson.cn> In-Reply-To: <20240126062715.3099433-1-lichao@loongson.cn> References: <20240126062715.3099433-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Bx8OS9UbNl2nMbAA--.53207S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAICGWyG+AOvAALsU X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: FcEJHmGSocOPFXED9f8nEftvx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706250694530100003 Content-Type: text/plain; charset="utf-8" Add self introduction file for LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4584 Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Bibo Mao Cc: Dongyan Qian Signed-off-by: Chao Li Reviewed-by: Bibo Mao --- OvmfPkg/LoongArchVirt/Readme.md | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 OvmfPkg/LoongArchVirt/Readme.md diff --git a/OvmfPkg/LoongArchVirt/Readme.md b/OvmfPkg/LoongArchVirt/Readme= .md new file mode 100644 index 0000000000..57fc74c296 --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Readme.md @@ -0,0 +1,67 @@ +# LoongArch QEMU virt platform + +## Overview + + LoongArch QEMU virt is a generic platform that dose not require any actu= al hardware. + The minimum required QEMU version is [8.1](https://gitlab.com/qemu-proje= ct/qemu/-/tags), the minimum required GCC version is [GCC13](https://gcc.gn= u.org/gcc-13/), the minimum required Binutils version is [2.40](https://ftp= .gnu.org/gnu/binutils/). + +## Prepare (X86 Linux Environment) + +### Fedora39 +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.x= z -C /opt/loongarch64_cross-toolchain/ + export PATH=3D/opt/loongarch64_cross-toolchain/cross-tools/bin:$PATH + +Note: Please obtain [the latest cross-compilation](https://github.com/loon= gson/build-tools) toolchains. + +#### Build QEMU + + git clone https://gitlab.com/qemu-project/qemu.git + +Note: Please refer to QEMU compilation rules, located in qemu/doc/system/l= oongarch/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=3D`pwd` + export GCC5_LOONGARCH64_PREFIX=3Dloongarch64-unknown-linux-gnu- + export PACKAGES_PATH=3D$WORKSPACE/edk2 + export EDK_TOOLS_PATH=3D$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/Loong= ArchVirtQemu.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 + +## Test LoongArch QEMU virtual machine OS + +* Download ArchLinux QCOW [images](https://mirrors.pku.edu.cn/loongarch/ar= chlinux/images) for LoongArch. + +* [Running LoongArch ArchLinux on virtual machine](https://mirrors.pku.edu= .cn/loongarch/archlinux/images/README.html). --=20 2.27.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114563): https://edk2.groups.io/g/devel/message/114563 Mute This Topic: https://groups.io/mt/103971689/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-