mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
sd-image-riscv64-qemu: init
This commit is contained in:
parent
16a907b00b
commit
823acb25dd
1 changed files with 32 additions and 0 deletions
32
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix
Normal file
32
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
# To build, use:
|
||||
# nix-build nixos -I nixos-config=nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix -A config.system.build.sdImage
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../profiles/base.nix
|
||||
./sd-image.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible = {
|
||||
enable = true;
|
||||
|
||||
# Don't even specify FDTDIR - We do not have the correct DT
|
||||
# The DTB is generated by QEMU at runtime
|
||||
useGenerationDeviceTree = false;
|
||||
};
|
||||
};
|
||||
|
||||
boot.consoleLogLevel = lib.mkDefault 7;
|
||||
boot.kernelParams = ["console=tty0" "console=ttyS0,115200n8"];
|
||||
|
||||
sdImage = {
|
||||
populateFirmwareCommands = "";
|
||||
populateRootCommands = ''
|
||||
mkdir -p ./files/boot
|
||||
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue