Flake-based coreboot+edk2 build

I have a working coreboot+edk2 build at mateidibu/coreboot-flake: Build coreboot via a nix flake - Codeberg.org

but I ran into this issue: Bad variable interpolation in UefiPayloadPkg.dsc · Issue #6135 · tianocore/edk2 · GitHub

seems that somehow one instance of variable substitution doesn’t happen, and it ends up creating a directory named UefiPayloadPkg$(BUILD_ARCH) instead of UefiPayloadPkgX64

I fixed that with a

substituteInPlace \
    payloads/external/edk2/workspace/tianocore/UefiPayloadPkg/UefiPayloadPkg.dsc \
    --replace-fail \
    'Build/UefiPayloadPkg$(BUILD_ARCH)' \
    'Build/UefiPayloadPkgX64'

is there something about the shell used when building derivations that could lead to that?

1 Like

I had the same problem, I change the directory name directly in de *.dsc file as a workaround

In the meantime, I’ve also opened an issue at Bad variable interpolation in UefiPayloadPkg.dsc · Issue #6135 · tianocore/edk2 · GitHub

@mateidibu nice work! I’m working on getting a nix-shell for building coreboot but I’ve been told to go the flake route as we have mixed results in testing the nix-shell. Could you suggest changes to this PR?