Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/80644?usp=email )
Change subject: util/nixshell: Add a dev shell for i386 arch ......................................................................
util/nixshell: Add a dev shell for i386 arch
Add a Nix shell file to provide a simple environment for coreboot development of i386 architecture. Currently, this environment is capable of completing Tutorial Part 1 in https://doc.coreboot.org.
The Nix shell can be used by running the following command:
$ nix-shell --pure util/nixshell/devshell-i386.nix
The `--pure` parameter is optional.
In Nixpkgs, there is a package called 'coreboot-toolchain'. It fetches the source code of coreboot, build crossgcc, and export it as output. With the binary cache mechanism of Nix, crossgcc can be directly downloaded and used without compiling on user's machine.
This Nix shell has been tested on a NixOS laptop and a Debian 12 server, and they both work fine.
Change-Id: Idcfe10be214e9bca590a62b8a207267493a4861f Signed-off-by: Crabtux crabtux@mail.ustc.edu.cn Reviewed-on: https://review.coreboot.org/c/coreboot/+/80644 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de --- A util/nixshell/devshell-i386.nix 1 file changed, 29 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved
diff --git a/util/nixshell/devshell-i386.nix b/util/nixshell/devshell-i386.nix new file mode 100644 index 0000000..88a67dc --- /dev/null +++ b/util/nixshell/devshell-i386.nix @@ -0,0 +1,29 @@ +with import <nixpkgs> {}; + +pkgs.mkShell { + name = "coreboot-devshell-i386"; + + packages = [ + cacert + gdb + git + qemu + ]; + + buildInputs = [ + ncurses + openssl + ]; + + nativeBuildInputs = [ + coreboot-toolchain.i386 + pkg-config + openssh + ]; + + shellHook = '' + # In Nix, stdenv sets a STRIP environment variable, which has conflict + # with libpayload/Makefile.payload. Unset the variable. + unset STRIP + ''; +}