Pinetab-v: rope in config
This commit is contained in:
19
machines/ptv/pkgs-cross/fwupd-efi/default.nix
Normal file
19
machines/ptv/pkgs-cross/fwupd-efi/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
(final: prev:
|
||||
prev.fwupd-efi.overrideAttrs (old: {
|
||||
mesonFlags = old.mesonFlags ++ [
|
||||
# Use this instead of patch, however it points to proper binary
|
||||
"-Defi-cc=${prev.stdenv.cc.targetPrefix}cc"
|
||||
];
|
||||
preBuild = ''
|
||||
cp ${prev.gnu-efi}/lib/*.lds ../efi/lds
|
||||
'';
|
||||
patches = [
|
||||
(prev.fetchurl {
|
||||
url = "https://github.com/fwupd/fwupd-efi/commit/986a6e3beee6b951ca3622f47ed991e0e11c065c.diff";
|
||||
hash = "sha256-UKerVzSn28QSoca6m2igVM6ai8i3B2jyB52B6e/HV5A=";
|
||||
})
|
||||
# ./efi-meson.patch
|
||||
];
|
||||
})
|
||||
)
|
||||
|
||||
13
machines/ptv/pkgs-cross/fwupd-efi/efi-meson.patch
Normal file
13
machines/ptv/pkgs-cross/fwupd-efi/efi-meson.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/efi/meson.build b/efi/meson.build
|
||||
index 936ba3c..53687b1 100644
|
||||
--- a/efi/meson.build
|
||||
+++ b/efi/meson.build
|
||||
@@ -1,7 +1,7 @@
|
||||
generate_sbat = find_program('generate_sbat.py', native: true)
|
||||
generate_binary = find_program('generate_binary.py', native: true)
|
||||
|
||||
-efi_cc = get_option('efi-cc')
|
||||
+efi_cc = run_command('sh', '-c', 'echo $CC')
|
||||
efi_ld = get_option('efi-ld')
|
||||
efi_ldsdir = get_option('efi-ldsdir')
|
||||
efi_incdir = get_option('efi-includedir')
|
||||
14
machines/ptv/pkgs-cross/fwupd-efi/meson-rv64.patch
Normal file
14
machines/ptv/pkgs-cross/fwupd-efi/meson-rv64.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 7d59695..b82bcdf 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -31,6 +31,9 @@ elif host_cpu == 'arm'
|
||||
elif host_cpu == 'aarch64'
|
||||
EFI_MACHINE_TYPE_NAME = 'aa64'
|
||||
gnu_efi_arch = 'aarch64'
|
||||
+elif host_cpu == 'riscv64'
|
||||
+ EFI_MACHINE_TYPE_NAME = '.'
|
||||
+ gnu_efi_arch = 'riscv64'
|
||||
else
|
||||
error('Unknown host_cpu ' + host_cpu)
|
||||
endif
|
||||
Reference in New Issue
Block a user