Skip to content

Commit

Permalink
Add ootb RPi SD "support"
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arnold committed Jan 10, 2021
1 parent d0fe508 commit 4caec6c
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 2 deletions.
File renamed without changes.
17 changes: 17 additions & 0 deletions hosts/nixSD.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ lib, pkgs, config, unstableModulesPath, ... }:
{
imports = [
# passwd is nixos by default
../users/nixos
# passwd is empty by default
../users/root
(unstableModulesPath + "/installer/cd-dvd/sd-image-aarch64.nix")
];

hardware.enableRedistributableFirmware.enable = lib.mkDefault true;
hardware.pulseaudio.enable = lib.mkDefault true;
sound.enable = lib.mkDefault true;

documentation.enable = false;
networking.wireless.enable = true;
}
3 changes: 3 additions & 0 deletions overlays/uboot-patched.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
final: prev: {
uboot = prev.uboot.overrideAttrs (o: { patches = [ ../pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch ]; });
}
30 changes: 30 additions & 0 deletions pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 3c6b7c0922370e9d0c1705706e7c47dcd234e6c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <milan@petabyte.dev>
Date: Wed, 30 Dec 2020 11:49:16 +0100
Subject: [PATCH] configs/rpi: allow for bigger kernels

---
include/configs/rpi.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 834f1cd2..b63ee96f 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -163,10 +163,10 @@
"fdt_high=" FDT_HIGH "\0" \
"initrd_high=" INITRD_HIGH "\0" \
"kernel_addr_r=0x00080000\0" \
- "scriptaddr=0x02400000\0" \
- "pxefile_addr_r=0x02500000\0" \
- "fdt_addr_r=0x02600000\0" \
- "ramdisk_addr_r=0x02700000\0"
+ "scriptaddr=0x02c00000\0" \
+ "pxefile_addr_r=0x02d00000\0" \
+ "fdt_addr_r=0x02e00000\0" \
+ "ramdisk_addr_r=0x02f00000\0"

#if CONFIG_IS_ENABLED(CMD_MMC)
#define BOOT_TARGET_MMC(func) \
--
2.29.2
6 changes: 4 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ let

flk = pkgs.writeShellScriptBin "flk" ''
if [[ -z "$1" ]]; then
echo "Usage: $(basename "$0") [ iso | install {host} | {host} [switch|boot|test] ]"
echo "Usage: $(basename "$0") [ iso | sd | install {host} | {host} [switch|boot|test] ]"
elif [[ "$1" == "iso" ]]; then
nix build ${configs}.niximg.${build}.isoImage
nix build ${configs}.nixISO.${build}.isoImage
elif [[ "$1" == "sd" ]]; then
nix build ${configs}.nixSD.${build}.sdImage
elif [[ "$1" == "install" ]]; then
sudo nixos-install --flake ".#$2" "${"\${@:3}"}"
else
Expand Down

0 comments on commit 4caec6c

Please sign in to comment.