From 66fecd2adf8810747627ae5df02ba3408b1acd11 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 9 Apr 2023 21:42:33 -0700 Subject: [PATCH] src/coreboot: cherry-pick python2->python3 patch --- src/coreboot/default.nix | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/coreboot/default.nix b/src/coreboot/default.nix index e6f5af9..8dad1d2 100644 --- a/src/coreboot/default.nix +++ b/src/coreboot/default.nix @@ -26,10 +26,6 @@ stdenv.mkDerivation { passthru = { inherit src; }; inherit src; - prePatch = '' - patchShebangs . - ''; - patches = let inherit (nixpkgsOnBuildForBuild) fetchpatch; in [ (fetchpatch { # Makefile.inc: Use `define` for cbfs-files-processor-defconfig @@ -67,8 +63,32 @@ stdenv.mkDerivation { ./patches/0020-use_fallback-kgpe-d16-implement-using-nvram-with-cmo.patch ./patches/0021-am1i-omit-amdfw.rom-completely-it-has-broken-address.patch ./patches/0022-kgpe-d16-disable-sanitize_cmos-it-causes-too-many-pr.patch + + # the next two patches are required in order for the third patch to apply properly + (fetchpatch { + # AUTHORS, util/: Drop individual copyright notices + url = "https://github.com/coreboot/coreboot/commit/ea063cb9750030d7e5c8f62ed2acfa58c60dd807.patch"; + hash = "sha256-wd3QUFSDS66k2TRJcYpCvvi++yeg4E0/lbrj09mx1Kk="; + includes = [ "util/rockchip/make_idb.py" ]; + }) + (fetchpatch { + # util: Add SPDX header, replacing boiler plate where applicable + url = "https://github.com/coreboot/coreboot/commit/1afe286367857471482660583fd784d9b8a7211c.patch"; + hash = "sha256-qhkC3nOLl7T8m6T9Ning0hOg8rnhIxMun8Xts4xXqHA="; + includes = [ "util/rockchip/make_idb.py" ]; + }) + (fetchpatch { + # util/rockchip: Port make_idb.py to python3 + url = "https://github.com/coreboot/coreboot/commit/46eaa5a1bac3c1fbd7c84bd2f609736eb6aa50fb.patch"; + hash = "sha256-sjw6X6UjOV00S3uRfnTLEPjAvvMxSn1RdNdNtwRXYjE="; + includes = [ "util/rockchip/make_idb.py" ]; + }) ]; + postPatch = '' + patchShebangs . + ''; + nativeBuildInputs = [ git python3