git.iko.soy/typeable/nixpkgs
on master help sign in
sd-image-riscv64-qemu: init
commit823acb25dd40392c1fc9f4bc5b7f5a369a6dd6eb authorZhaofeng Li <hello@zhaofeng.li> dateSat 16 Oct 2021, 08:58 (5 years ago) parent16a907b
1 file changed+32
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix+32
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nixnew file+32
@@ -0,0 +1,32 @@
1+# To build, use:
2+# nix-build nixos -I nixos-config=nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix -A config.system.build.sdImage
3+{ config, lib, pkgs, ... }:
4+
5+{
6+ imports = [
7+ ../../profiles/base.nix
8+ ./sd-image.nix
9+ ];
10+
11+ boot.loader = {
12+ grub.enable = false;
13+ generic-extlinux-compatible = {
14+ enable = true;
15+
16+ # Don't even specify FDTDIR - We do not have the correct DT
17+ # The DTB is generated by QEMU at runtime
18+ useGenerationDeviceTree = false;
19+ };
20+ };
21+
22+ boot.consoleLogLevel = lib.mkDefault 7;
23+ boot.kernelParams = ["console=tty0" "console=ttyS0,115200n8"];
24+
25+ sdImage = {
26+ populateFirmwareCommands = "";
27+ populateRootCommands = ''
28+ mkdir -p ./files/boot
29+ ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
30+ '';
31+ };
32+}