mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
This reverts commit 5f94c31db1.
fixes #6
ttyAMA0 controls uart0, which can be used for bluetooth. If it is used
for bluetooth then we don't want to write a bunch of garbage to it.
27 lines
914 B
Nix
27 lines
914 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [ ./sd-image.nix ];
|
|
|
|
config = {
|
|
boot.loader.grub.enable = false;
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
|
|
boot.consoleLogLevel = lib.mkDefault 7;
|
|
|
|
# https://github.com/raspberrypi/firmware/issues/1539#issuecomment-784498108
|
|
boot.kernelParams = [ "console=serial0,115200n8" "console=tty1" ];
|
|
|
|
sdImage = {
|
|
populateFirmwareCommands = ''
|
|
cp ${pkgs.uboot_rpi_arm64}/u-boot.bin firmware/u-boot-rpi-arm64.bin
|
|
cp -r ${pkgs.raspberrypifw}/share/raspberrypi/boot/{start*.elf,*.dtb,bootcode.bin,fixup*.dat,overlays} firmware
|
|
cp ${config.hardware.raspberry-pi.config-output} firmware/config.txt
|
|
'';
|
|
populateRootCommands = ''
|
|
mkdir -p ./files/boot
|
|
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
|
|
'';
|
|
};
|
|
};
|
|
}
|