xianglai li 8148af7dd5 Platform/Loongson: Add Readme. hace 1 año
..
Drivers 1e5af5e68c Platform/Loongson: Add timer Dxe driver. hace 1 año
Include 6154c1c609 Platform/Loongson: Add StableTimerLib. hace 1 año
Library f43fc19a94 Platform/Loongson: Add Hob Dxe Lib. hace 1 año
PlatformPei 9d8b829d12 Platform/Loongson: Support PEI phase. hace 1 año
Sec b3a436f61a Platform/Loongson: Support SEC hace 1 año
Loongson.dec 7f56a1f90a Platform/Loongson: Support Dxe hace 1 año
Loongson.dsc 7f56a1f90a Platform/Loongson: Support Dxe hace 1 año
Loongson.fdf 7f56a1f90a Platform/Loongson: Support Dxe hace 1 año
Loongson.fdf.inc 7f56a1f90a Platform/Loongson: Support Dxe hace 1 año
Readme.md 8148af7dd5 Platform/Loongson: Add Readme. hace 1 año

Readme.md

Introduction

This document provides the guideline to build UEFI firmware for Qemu of LoongArch.

LoongArch is the general processor architecture of Loongson.

We can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/.

How to build (X86 Linux Environment)

  1. Install LoongArch cross-tools on X86 machines. Download cross-tools from https://github.com/loongson/build-tools ,Then config cross-tools env. For Example:

    $ wget https://github.com/loongson/build-tools/releases/download/2022.09.06/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz $ tar -vxf loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz -C /opt $ export PATH=/opt/cross-tools/bin:$PATH

    Note: Please obtain the latest cross-compilation tools from https://github.com/loongson/build-tools .

  2. Follow edk2-platforms/Readme.md to obtaining source code,And config build env. For Example:

    $ export WORKSPACE=/work/git/tianocore $ mkdir -p $WORKSPACE $ cd $WORKSPACE $ git clone https://github.com/tianocore/edk2.git $ git submodule update –init $ git clone https://github.com/tianocore/edk2-platforms.git $ git submodule update –init $ git clone https://github.com/tianocore/edk2-non-osi.git $ export PACKAGES_PATH=$PWD/edk2:$PWD/edk2-platforms:$PWD/edk2-non-osi

  3. Config cross compiler prefix. For Example:

    $ export GCC5_LOONGARCH64_PREFIX=loongarch64-unknown-linux-gnu-

4.Set up the build environment And build BaseTool.

For Example:

$. edk2/edksetup.sh
$make -C edk2/BaseTools

5.Build platform.

For Exmaple:

$build --buildtarget=DEBUG --tagname=GCC5 --arch=LOONGARCH64  --platform=Platform/Loongson/LoongArchQemuPkg/Loongson.dsc

After a successful build, the resulting images can be found in Build/{Platform Name}/{TARGET}_{TOOL_CHAIN_TAG}/FV/QEMU_EFI.fd.

A compile script is provided here:

#!/bin/bash
export WORKSPACE=/work/git/tianocore
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms
export GCC5_LOONGARCH64_PREFIX=loongarch64-unknown-linux-gnu-
. edk2/edksetup.sh
make -C edk2/BaseTools
build --buildtarget=DEBUG --tagname=GCC5 --arch=LOONGARCH64  --platform=Platform/Loongson/LoongArchQemuPkg/Loongson.dsc