添加龙芯架构支持
Signed-off-by: herengui <herengui@kylinsec.com.cn> (cherry picked from commit 7a97f8a0aca57f0f484eab035ded80e5963c564b)
This commit is contained in:
parent
2eefb7719d
commit
635521c7f2
44
1000-add-loongarch64-support-not-upstream-modified.patch
Normal file
44
1000-add-loongarch64-support-not-upstream-modified.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From d9967378f9b0ba735550f917e4140dd99adc3155 Mon Sep 17 00:00:00 2001
|
||||
From: herengui <herengui@kylinsec.com.cn>
|
||||
Date: Sat, 13 May 2023 16:55:11 +0800
|
||||
Subject: [PATCH] add loongarch64 support
|
||||
|
||||
Signed-off-by: herengui <herengui@kylinsec.com.cn>
|
||||
---
|
||||
meson.build | 3 +++
|
||||
plugins/uefi-capsule/efi/generate_binary.py | 4 ++--
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 0c768a2..d6c88cc 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -374,6 +374,9 @@ if build_standalone and get_option('plugin_uefi_capsule')
|
||||
elif host_cpu == 'aarch64'
|
||||
EFI_MACHINE_TYPE_NAME = 'aa64'
|
||||
gnu_efi_arch = 'aarch64'
|
||||
+ elif host_cpu == 'loongarch64'
|
||||
+ EFI_MACHINE_TYPE_NAME = 'la464'
|
||||
+ gnu_efi_arch = 'loongarch64'
|
||||
else
|
||||
EFI_MACHINE_TYPE_NAME = ''
|
||||
gnu_efi_arch = ''
|
||||
diff --git a/plugins/uefi-capsule/efi/generate_binary.py b/plugins/uefi-capsule/efi/generate_binary.py
|
||||
index 3d1c44c..d263d38 100755
|
||||
--- a/plugins/uefi-capsule/efi/generate_binary.py
|
||||
+++ b/plugins/uefi-capsule/efi/generate_binary.py
|
||||
@@ -34,9 +34,9 @@ def _run_objcopy(args):
|
||||
args.outfile,
|
||||
]
|
||||
|
||||
- # aarch64 and arm32 don't have an EFI capable objcopy
|
||||
+ # aarch64, arm32 and loongarch64 don't have an EFI capable objcopy
|
||||
# Use 'binary' instead, and add required symbols manually
|
||||
- if args.arch in ["aarch64", "arm"]:
|
||||
+ if args.arch in ["aarch64", "arm", "loongarch64"]:
|
||||
argv.extend(["-O", "binary"])
|
||||
else:
|
||||
argv.extend(["--target", "efi-app-{}".format(args.arch)])
|
||||
--
|
||||
2.39.2
|
||||
|
||||
12
fwupd.spec
12
fwupd.spec
@ -7,13 +7,13 @@
|
||||
# of users do not need -- use this to avoid dragging python onto NestOS
|
||||
%global __requires_exclude ^/usr/bin/python3
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
%ifarch x86_64 aarch64 loongarch64
|
||||
%bcond_without uefi
|
||||
%endif
|
||||
|
||||
Name: fwupd
|
||||
Version: 1.5.8
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: Make updating firmware on Linux automatic, safe and reliable
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/fwupd/fwupd/releases
|
||||
@ -21,6 +21,8 @@ Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{vers
|
||||
#refer: https://github.com/fwupd/fwupd/commit/e74d38bfd3097471fe60dbe843a68c16516a78da
|
||||
Patch0001: 0001-Fix-compiling-with-new-versions-of-efivar.patch
|
||||
|
||||
Patch1000: 1000-add-loongarch64-support-not-upstream-modified.patch
|
||||
|
||||
BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel
|
||||
BuildRequires: gpgme-devel libgudev1-devel libgusb-devel libsoup-devel polkit-devel sqlite-devel libxslt
|
||||
BuildRequires: gobject-introspection-devel libarchive-devel systemd gcab elfutils-libelf-devel
|
||||
@ -100,6 +102,9 @@ sed -i '/DynamicUser=yes/d' data/motd/fwupd-refresh.service.in
|
||||
%ifarch aarch64
|
||||
%pesign -s -i %{buildroot}%{_libexecdir}/%{name}/efi/%{name}aa64.efi -o %{buildroot}%{_libexecdir}/%{name}/efi/%{name}aa64.efi.signed
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
%pesign -s -i %{buildroot}%{_libexecdir}/%{name}/efi/%{name}la464.efi -o %{buildroot}%{_libexecdir}/%{name}/efi/%{name}la464.efi.signed
|
||||
%endif
|
||||
%endif
|
||||
|
||||
mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg
|
||||
@ -182,6 +187,9 @@ mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg
|
||||
%{_datadir}/man/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 21 2023 herengui <herengui@kylinsec.com.cn> - 1.5.8-6
|
||||
- add support for loongarch64
|
||||
|
||||
* Thu Dec 01 2022 yaoxin <yaoxin30@h-partners.com> - 1.5.8-5
|
||||
- Resolve fwupd upgrade and downgrade error
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user