Coreboot 24.08 updates (#338819)
This commit is contained in:
commit
64f89cfb98
@ -1,81 +1,108 @@
|
||||
{ stdenv, lib, callPackage }:
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
callPackage,
|
||||
}:
|
||||
let
|
||||
common = arch: callPackage (
|
||||
{ bison
|
||||
, callPackage
|
||||
, curl
|
||||
, fetchgit
|
||||
, flex
|
||||
, getopt
|
||||
, git
|
||||
, gnat
|
||||
, gcc
|
||||
, lib
|
||||
, perl
|
||||
, stdenvNoCC
|
||||
, zlib
|
||||
, withAda ? true
|
||||
}:
|
||||
common =
|
||||
arch:
|
||||
callPackage (
|
||||
{
|
||||
bison,
|
||||
callPackage,
|
||||
curl,
|
||||
fetchgit,
|
||||
flex,
|
||||
getopt,
|
||||
git,
|
||||
gnat,
|
||||
gcc,
|
||||
lib,
|
||||
perl,
|
||||
stdenvNoCC,
|
||||
zlib,
|
||||
withAda ? true,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "coreboot-toolchain-${arch}";
|
||||
version = "24.05";
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "coreboot-toolchain-${arch}";
|
||||
version = "24.08";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://review.coreboot.org/coreboot";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-jTfMFvl3sG3BIVVkpZ81BQ20Bs+2ESE6RMh0fW86rKE=";
|
||||
fetchSubmodules = false;
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
|
||||
rm -rf $out/.git
|
||||
src = fetchgit {
|
||||
url = "https://review.coreboot.org/coreboot";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-G/O8wN7moawiG4nAWsYSfiU3gpYxMvPtyvkgkrTL62E=";
|
||||
fetchSubmodules = false;
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
|
||||
rm -rf $out/.git
|
||||
'';
|
||||
allowedRequisites = [ ];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
curl
|
||||
git
|
||||
perl
|
||||
];
|
||||
buildInputs = [
|
||||
flex
|
||||
zlib
|
||||
(if withAda then gnat else gcc)
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontConfigure = true;
|
||||
dontInstall = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs util/crossgcc/buildgcc
|
||||
|
||||
mkdir -p util/crossgcc/tarballs
|
||||
|
||||
${lib.concatMapStringsSep "\n" (file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}") (
|
||||
callPackage ./stable.nix { }
|
||||
)}
|
||||
|
||||
patchShebangs util/genbuild_h/genbuild_h.sh
|
||||
'';
|
||||
allowedRequisites = [ ];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison curl git perl ];
|
||||
buildInputs = [ flex zlib (if withAda then gnat else gcc) ];
|
||||
buildPhase = ''
|
||||
export CROSSGCC_VERSION=$(cat .crossgcc_version)
|
||||
make crossgcc-${arch} CPUS=$NIX_BUILD_CORES DEST=$out
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontConfigure = true;
|
||||
dontInstall = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs util/crossgcc/buildgcc
|
||||
|
||||
mkdir -p util/crossgcc/tarballs
|
||||
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}"
|
||||
) (callPackage ./stable.nix { })
|
||||
}
|
||||
|
||||
patchShebangs util/genbuild_h/genbuild_h.sh
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export CROSSGCC_VERSION=$(cat .crossgcc_version)
|
||||
make crossgcc-${arch} CPUS=$NIX_BUILD_CORES DEST=$out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.coreboot.org";
|
||||
description = "coreboot toolchain for ${arch} targets";
|
||||
license = with licenses; [ bsd2 bsd3 gpl2 lgpl2Plus gpl3Plus ];
|
||||
maintainers = with maintainers; [ felixsinger jmbaur ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
);
|
||||
meta = with lib; {
|
||||
homepage = "https://www.coreboot.org";
|
||||
description = "coreboot toolchain for ${arch} targets";
|
||||
license = with licenses; [
|
||||
bsd2
|
||||
bsd3
|
||||
gpl2
|
||||
lgpl2Plus
|
||||
gpl3Plus
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
felixsinger
|
||||
jmbaur
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
);
|
||||
in
|
||||
|
||||
lib.listToAttrs (map (arch: lib.nameValuePair arch (common arch { })) [
|
||||
"i386"
|
||||
"x64"
|
||||
"arm"
|
||||
"aarch64"
|
||||
"riscv"
|
||||
"ppc64"
|
||||
"nds32le"
|
||||
])
|
||||
lib.listToAttrs (
|
||||
map (arch: lib.nameValuePair arch (common arch { })) [
|
||||
"i386"
|
||||
"x64"
|
||||
"arm"
|
||||
"aarch64"
|
||||
"riscv"
|
||||
"ppc64"
|
||||
"nds32le"
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ fetchurl }: [
|
||||
{ fetchurl }:
|
||||
[
|
||||
{
|
||||
name = "gmp-6.3.0.tar.xz";
|
||||
archive = fetchurl {
|
||||
@ -21,10 +22,10 @@
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "gcc-13.2.0.tar.xz";
|
||||
name = "gcc-14.1.0.tar.xz";
|
||||
archive = fetchurl {
|
||||
sha256 = "1nj3qyswcgc650sl3h0480a171ixp33ca13zl90p61m689jffxg2";
|
||||
url = "mirror://gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz";
|
||||
sha256 = "0h3889kkfp9bzw8km9w1ssh5qjskg6yw02q8v3lkvzksk1acd0z2";
|
||||
url = "mirror://gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.xz";
|
||||
};
|
||||
}
|
||||
{
|
||||
@ -42,10 +43,10 @@
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nasm-2.16.01.tar.bz2";
|
||||
name = "nasm-2.16.03.tar.bz2";
|
||||
archive = fetchurl {
|
||||
sha256 = "0bmv8xbzck7jim7fzm6jnwiahqkprbpz6wzhg53irm28w0pavdim";
|
||||
url = "https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.bz2";
|
||||
sha256 = "0mwynbnn7c4ay4rpcsyp99j49sa6j3p8gk5pigwssqfdkcaxxwxy";
|
||||
url = "https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2";
|
||||
};
|
||||
}
|
||||
]
|
||||
|
@ -1,47 +1,83 @@
|
||||
{ lib, stdenv, fetchgit, pkg-config, zlib, pciutils, openssl, coreutils, acpica-tools, makeWrapper, gnugrep, gnused, file, buildEnv }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchgit,
|
||||
pkg-config,
|
||||
zlib,
|
||||
pciutils,
|
||||
openssl,
|
||||
coreutils,
|
||||
acpica-tools,
|
||||
makeWrapper,
|
||||
gnugrep,
|
||||
gnused,
|
||||
file,
|
||||
buildEnv,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "24.05";
|
||||
version = "24.08";
|
||||
|
||||
commonMeta = {
|
||||
description = "Various coreboot-related tools";
|
||||
homepage = "https://www.coreboot.org";
|
||||
license = with lib.licenses; [ gpl2Only gpl2Plus ];
|
||||
maintainers = with lib.maintainers; [ felixsinger jmbaur ];
|
||||
license = with lib.licenses; [
|
||||
gpl2Only
|
||||
gpl2Plus
|
||||
];
|
||||
maintainers = with lib.maintainers; [
|
||||
felixsinger
|
||||
jmbaur
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
|
||||
generic = { pname, path ? "util/${pname}", ... }@args: stdenv.mkDerivation ({
|
||||
inherit pname version;
|
||||
generic =
|
||||
{
|
||||
pname,
|
||||
path ? "util/${pname}",
|
||||
...
|
||||
}@args:
|
||||
stdenv.mkDerivation (
|
||||
{
|
||||
inherit pname version;
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://review.coreboot.org/coreboot";
|
||||
rev = version;
|
||||
hash = "sha256-Fq3tZje6QoMskxqWd61OstgI9Sj25yijf8S3LiTJuYc=";
|
||||
};
|
||||
src = fetchgit {
|
||||
url = "https://review.coreboot.org/coreboot";
|
||||
rev = version;
|
||||
hash = "sha256-BwuoBuWKHTnSwV8ubm5NqcddgxP5OMXuTl3zmwwKEsg=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace 3rdparty/vboot/Makefile --replace 'ar qc ' '$$AR qc '
|
||||
cd ${path}
|
||||
patchShebangs .
|
||||
'';
|
||||
postPatch = ''
|
||||
substituteInPlace 3rdparty/vboot/Makefile --replace 'ar qc ' '$$AR qc '
|
||||
cd ${path}
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"INSTALL=install"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
makeFlags = [
|
||||
"INSTALL=install"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = commonMeta // args.meta;
|
||||
} // (removeAttrs args [ "meta" ]));
|
||||
meta = commonMeta // args.meta;
|
||||
}
|
||||
// (removeAttrs args [ "meta" ])
|
||||
);
|
||||
|
||||
utils = {
|
||||
msrtool = generic {
|
||||
pname = "msrtool";
|
||||
meta.description = "Dump chipset-specific MSR registers";
|
||||
meta.platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
buildInputs = [ pciutils zlib ];
|
||||
meta.platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
buildInputs = [
|
||||
pciutils
|
||||
zlib
|
||||
];
|
||||
preConfigure = "export INSTALL=install";
|
||||
};
|
||||
cbmem = generic {
|
||||
@ -55,8 +91,14 @@ let
|
||||
intelmetool = generic {
|
||||
pname = "intelmetool";
|
||||
meta.description = "Dump interesting things about Management Engine";
|
||||
meta.platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
buildInputs = [ pciutils zlib ];
|
||||
meta.platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
buildInputs = [
|
||||
pciutils
|
||||
zlib
|
||||
];
|
||||
};
|
||||
cbfstool = generic {
|
||||
pname = "cbfstool";
|
||||
@ -70,20 +112,35 @@ let
|
||||
superiotool = generic {
|
||||
pname = "superiotool";
|
||||
meta.description = "User-space utility to detect Super I/O of a mainboard and provide detailed information about the register contents of the Super I/O";
|
||||
meta.platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
buildInputs = [ pciutils zlib ];
|
||||
meta.platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
buildInputs = [
|
||||
pciutils
|
||||
zlib
|
||||
];
|
||||
};
|
||||
ectool = generic {
|
||||
pname = "ectool";
|
||||
meta.description = "Dump the RAM of a laptop's Embedded/Environmental Controller (EC)";
|
||||
meta.platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
meta.platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
preInstall = "mkdir -p $out/sbin";
|
||||
};
|
||||
inteltool = generic {
|
||||
pname = "inteltool";
|
||||
meta.description = "Provides information about Intel CPU/chipset hardware configuration (register contents, MSRs, etc)";
|
||||
meta.platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
buildInputs = [ pciutils zlib ];
|
||||
meta.platforms = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
];
|
||||
buildInputs = [
|
||||
pciutils
|
||||
zlib
|
||||
];
|
||||
};
|
||||
amdfwtool = generic {
|
||||
pname = "amdfwtool";
|
||||
@ -113,19 +170,30 @@ let
|
||||
'';
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/acpidump-all \
|
||||
--set PATH ${lib.makeBinPath [ coreutils acpica-tools gnugrep gnused file ]}
|
||||
--set PATH ${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
acpica-tools
|
||||
gnugrep
|
||||
gnused
|
||||
file
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
utils // {
|
||||
coreboot-utils = (buildEnv {
|
||||
name = "coreboot-utils-${version}";
|
||||
paths = lib.filter (lib.meta.availableOn stdenv.hostPlatform) (lib.attrValues utils);
|
||||
postBuild = "rm -rf $out/sbin";
|
||||
}) // {
|
||||
inherit version;
|
||||
meta = commonMeta;
|
||||
};
|
||||
utils
|
||||
// {
|
||||
coreboot-utils =
|
||||
(buildEnv {
|
||||
name = "coreboot-utils-${version}";
|
||||
paths = lib.filter (lib.meta.availableOn stdenv.hostPlatform) (lib.attrValues utils);
|
||||
postBuild = "rm -rf $out/sbin";
|
||||
})
|
||||
// {
|
||||
inherit version;
|
||||
meta = commonMeta;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user