Skip to content

Commit

Permalink
Update coreboot to 24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed May 25, 2024
1 parent 1bd7339 commit c08401a
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 121 deletions.
26 changes: 23 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
description = "A small linuxboot payload for coreboot";
inputs = {
coreboot.flake = false;
coreboot.url = "git+https://github.com/coreboot/coreboot?ref=refs/tags/24.05&submodules=1";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
zig.flake = false;
zig.url = "github:ziglang/zig/0.12.x";
Expand All @@ -15,6 +17,10 @@
final: prev:
(
{
buildCoreboot = import ./pkgs/coreboot {
corebootSrc = inputs.coreboot.outPath;
version = "24.05";
};
tinyboot = prev.callPackage ./pkgs/tinyboot.nix { zigSrc = inputs.zig.outPath; };
armTrustedFirmwareMT8183 = prev.callPackage ./pkgs/arm-trusted-firmware-cros.nix {
platform = "mt8183";
Expand Down
2 changes: 1 addition & 1 deletion options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ in
inherit (config.build) linux initrd;
inherit (config.linux) dtb dtbPattern;
};
coreboot = pkgs.callPackage ./pkgs/coreboot {
coreboot = pkgs.callPackage pkgs.buildCoreboot {
inherit board;
inherit (config.coreboot) kconfig;
};
Expand Down
12 changes: 0 additions & 12 deletions pkgs/coreboot/amd_blobs.json

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/coreboot/blobs.json

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/coreboot/cmocka.json

This file was deleted.

38 changes: 6 additions & 32 deletions pkgs/coreboot/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{ corebootSrc, version }:
{
board,
fetchgit,
Expand All @@ -24,29 +25,11 @@ let
.${stdenvNoCC.hostPlatform.linuxArch}
}.override
{ withAda = stdenvNoCC.hostPlatform.isx86_64; };
importJsonSource = source: {
inherit (lib.importJSON source)
url
rev
hash
fetchLFS
fetchSubmodules
deepClone
leaveDotGit
;
};
installSubmodule =
source: dest: ''rm -r ${dest} && ln -sf ${fetchgit (importJsonSource source)} ${dest}'';
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coreboot-${board}";
version = "24.02.01";
src = fetchgit {
url = "https://github.com/coreboot/coreboot";
rev = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-OV6OsnAAXU51IZYzAIZQu4qZqau8n/rVAc22Lfjt4iw=";
};
inherit version;
src = corebootSrc;
patches = [
./0001-Add-Kconfig-VBOOT_SIGN-option.patch
./0002-Fix-build-for-brya.patch
Expand All @@ -57,23 +40,14 @@ stdenvNoCC.mkDerivation (finalAttrs: {
pkg-config
openssl
nss
python3
];
nativeBuildInputs = [ python3 ];
buildInputs = [ ];
enableParallelBuilding = true;
# nixpkgs fetchgit fetcher does not fetch a submodule if the repo sets
# "update=none" on the submodule, so we must fetch them ourselves
inherit kconfig;
passAsFile = [ "kconfig" ];
postPatch = ''
patchShebangs util 3rdparty/vboot/scripts
${installSubmodule ./amd_blobs.json "3rdparty/amd_blobs"}
${installSubmodule ./blobs.json "3rdparty/blobs"}
${installSubmodule ./cmocka.json "3rdparty/cmocka"}
${installSubmodule ./fsp.json "3rdparty/fsp"}
${installSubmodule ./intel_microcode.json "3rdparty/intel-microcode"}
${installSubmodule ./qc_blobs.json "3rdparty/qc_blobs"}
'';
inherit kconfig;
passAsFile = [ "kconfig" ];
configurePhase = ''
runHook preConfigure
cat $kconfigPath > .config
Expand Down
12 changes: 0 additions & 12 deletions pkgs/coreboot/fsp.json

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/coreboot/intel_microcode.json

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/coreboot/qc_blobs.json

This file was deleted.

13 changes: 0 additions & 13 deletions pkgs/coreboot/update-submodules.bash

This file was deleted.

0 comments on commit c08401a

Please sign in to comment.