diff options
author | Crabtux <crabtux@mail.ustc.edu.cn> | 2024-02-20 17:37:12 +0800 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2024-03-14 18:15:51 +0000 |
commit | b94022525da632127d22ebd66afc84ed9a2335a6 (patch) | |
tree | 7b774dcf771bd1dfdb33d53616c50e12ae241591 /util/nixshell | |
parent | 78b634a7665049682cab549c6e0a08e62fddb580 (diff) |
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>
Diffstat (limited to 'util/nixshell')
-rw-r--r-- | util/nixshell/devshell-i386.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/util/nixshell/devshell-i386.nix b/util/nixshell/devshell-i386.nix new file mode 100644 index 0000000000..88a67dcef4 --- /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 + ''; +} |