Bake the git commit inside the uboot env file
This commit is contained in:
parent
2442bdf3f5
commit
7c25f76f8b
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, self, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -175,8 +175,12 @@
|
|||||||
uboot-env = let
|
uboot-env = let
|
||||||
init = "${config.system.build.toplevel}/init";
|
init = "${config.system.build.toplevel}/init";
|
||||||
initrd = "${config.system.build.initialRamdisk}/initrd";
|
initrd = "${config.system.build.initialRamdisk}/initrd";
|
||||||
|
rev = if self ? rev then self.rev
|
||||||
|
else throw ("Refusing to build from a dirty Git tree!");
|
||||||
in prev.runCommand "uboot.txt" {} ''
|
in prev.runCommand "uboot.txt" {} ''
|
||||||
cat > $out <<EOF
|
cat > $out <<EOF
|
||||||
|
# Git commit: ${rev}
|
||||||
|
|
||||||
# Create pmem of 3 GiB [0x140000000, 0x200000000)
|
# Create pmem of 3 GiB [0x140000000, 0x200000000)
|
||||||
fdt mknode / pmem@0x140000000
|
fdt mknode / pmem@0x140000000
|
||||||
fdt set /pmem@0x140000000 compatible "pmem-region"
|
fdt set /pmem@0x140000000 compatible "pmem-region"
|
||||||
|
Loading…
Reference in New Issue
Block a user