diff options
author | Xianglai Li <lixianglai@loongson.cn> | 2024-07-24 10:22:45 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2024-09-17 10:26:26 +0200 |
commit | b883fb93dba24ce3c53551a5abf6b2f477312535 (patch) | |
tree | a7472a95c3b4ca439090848cc8b75c8b98dc18b0 /pc-bios | |
parent | 065e2ecf79cdf7da94542caab2b847de57035d8c (diff) |
roms: Support compile the efi bios for loongarch
Added loongarch UEFI BIOS support to compiled scripts.
UEFI code images require 16M alignment, flash images require
16M alignment, under the loongarch architecture.This is agreed
upon when the firmware is loaded in QEMU under Loongarch.
The naming of UEFI under loongarch refers to the x86 and arm naming methods,
and the UEFI image names in x86 and arm are:
edk2-i386-code.fd
edk2-i386-vars.fd
edk2-arm-code.fd
edk2-arm-vars.fd
So on loongarch, we named it:
edk2-loongarch64-code.fd
edk2-loongarch64-vars.fd
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Message-ID: <20240724022245.1317884-1-lixianglai@loongson.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'pc-bios')
-rw-r--r-- | pc-bios/descriptors/60-edk2-loongarch64.json | 31 | ||||
-rw-r--r-- | pc-bios/descriptors/meson.build | 3 | ||||
-rw-r--r-- | pc-bios/meson.build | 2 |
3 files changed, 35 insertions, 1 deletions
diff --git a/pc-bios/descriptors/60-edk2-loongarch64.json b/pc-bios/descriptors/60-edk2-loongarch64.json new file mode 100644 index 0000000000..f174a1fc9b --- /dev/null +++ b/pc-bios/descriptors/60-edk2-loongarch64.json @@ -0,0 +1,31 @@ +{ + "description": "UEFI firmware for loongarch64", + "interface-types": [ + "uefi" + ], + "mapping": { + "device": "flash", + "executable": { + "filename": "@DATADIR@/edk2-loongarch64-code.fd", + "format": "raw" + }, + "nvram-template": { + "filename": "@DATADIR@/edk2-loongarch64-vars.fd", + "format": "raw" + } + }, + "targets": [ + { + "architecture": "loongarch64", + "machines": [ + "virt*" + ] + } + ], + "features": [ + + ], + "tags": [ + + ] +} diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build index 66f85d01c4..afb5a959cc 100644 --- a/pc-bios/descriptors/meson.build +++ b/pc-bios/descriptors/meson.build @@ -5,7 +5,8 @@ if unpack_edk2_blobs and get_option('install_blobs') '60-edk2-aarch64.json', '60-edk2-arm.json', '60-edk2-i386.json', - '60-edk2-x86_64.json' + '60-edk2-x86_64.json', + '60-edk2-loongarch64.json' ] configure_file(input: files(f), output: f, diff --git a/pc-bios/meson.build b/pc-bios/meson.build index 8602b45b9b..090379763e 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -11,6 +11,8 @@ if unpack_edk2_blobs 'edk2-i386-vars.fd', 'edk2-x86_64-code.fd', 'edk2-x86_64-secure-code.fd', + 'edk2-loongarch64-code.fd', + 'edk2-loongarch64-vars.fd', ] foreach f : fds |