|
|
|
@ -10,12 +10,13 @@
|
|
|
|
|
|
|
|
|
|
# use google's out-of-tree flashrom which can manipulate the
|
|
|
|
|
# write-protection registers of the chromebooks' on-board flash
|
|
|
|
|
# chips
|
|
|
|
|
# chips and can also write to the embedded controller (EC) flash,
|
|
|
|
|
# which is a separate chip
|
|
|
|
|
, forChromebook ? false
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
pname = "flashrom";
|
|
|
|
|
pname = "flashrom${lib.optionalString forChromebook "-chromebook"}";
|
|
|
|
|
version = if !forChromebook then "1.2+wp" else "0.9.9+d2da98-google";
|
|
|
|
|
|
|
|
|
|
src =
|
|
|
|
@ -46,9 +47,13 @@ stdenv.mkDerivation {
|
|
|
|
|
makeFlags = if !forChromebook then [
|
|
|
|
|
"PREFIX=$(out)" "libinstall"
|
|
|
|
|
] else [
|
|
|
|
|
"PREFIX=$(out)" "install"
|
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
postInstall = lib.optionalString forChromebook ''
|
|
|
|
|
mv $out/sbin/flashrom $out/sbin/flashrom-chromebook
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
homepage = "https://www.flashrom.org";
|
|
|
|
|
description = "Utility for reading, writing, erasing and verifying flash ROM chips";
|
|
|
|
|