pi4 edk2 builds

This commit is contained in:
mjallen18
2026-01-13 14:54:55 -06:00
parent 1dc075f405
commit a7c25fe70d
4 changed files with 70 additions and 63 deletions

View File

@@ -1,11 +1,7 @@
{ stdenv
, fetchFromGitHub
, lib
, applyPatches
, fetchpatch
, MODEL ? "5"
, RELEASE_TYPE ? "RELEASE"
, EDK2_FLAGS ? ""
, src
, version ? "stable202511"
, python3
, git
, libuuid
@@ -15,20 +11,9 @@
let
pythonEnv = python3.withPackages (ps: [ ps.tkinter ]);
pname = "edk2-basetools";
version = "stable202511";
in
stdenv.mkDerivation rec {
inherit pname version;
edk2Src = fetchFromGitHub rec {
owner = "mjallen18";
repo = "edk2";
name = repo;
#tag = "edk2-${version}";
rev = "9765be56f1f816ef737153f5588b3294fcc69a63";
hash = "sha256-oqfJbNeOj2BVJqWE+snD6ri3lUO1aNcmPg+eJpjyr5E=";
fetchSubmodules = true;
};
inherit src pname version;
env = {
NIX_CFLAGS_COMPILE =
@@ -54,7 +39,7 @@ stdenv.mkDerivation rec {
unpackPhase = ''
runHook preUnpack
unpackFile "$edk2Src"
unpackFile "$src"
chmod -R u+w .
@@ -69,10 +54,12 @@ stdenv.mkDerivation rec {
postPatch = ''
# enable compilation using Clang
# https://bugzilla.tianocore.org/show_bug.cgi?id=4620
ls -alh
substituteInPlace edk2/BaseTools/Conf/tools_def.template --replace-fail \
'DEFINE CLANGPDB_WARNING_OVERRIDES = ' \
'DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-unneeded-internal-declaration '
substituteInPlace edk2/BaseTools/Conf/tools_def.template \
--replace "-Werror" "-Werror -Wno-error=format-security"
'';
buildPhase = ''