From f872d7748f503af66ed577aaf9b621c69235f40c Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Sun, 3 Nov 2024 20:20:01 -0500 Subject: [PATCH] shuffle kernel params --- rpi/default.nix | 10 ++-------- sd-image/default.nix | 11 ++++++++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/rpi/default.nix b/rpi/default.nix index 8a15a9b..3d9bb64 100644 --- a/rpi/default.nix +++ b/rpi/default.nix @@ -315,14 +315,8 @@ in kernelParams = if cfg.uboot.enable then [ ] else [ - # This is ugly and fragile, but the sdImage image has an msdos - # table, so the partition table id is a 1-indexed hex - # number. So, we drop the hex prefix and stick on a "02" to - # refer to the root partition. - # "root=PARTUUID=${lib.strings.removePrefix "0x" config.sdImage.firmwarePartitionID}-02" - # "rootfstype=ext4" - "fsck.repair=yes" - "rootwait" + "console=tty1" + "console=serial0,115200n8" "init=/sbin/init" ]; initrd = { diff --git a/sd-image/default.nix b/sd-image/default.nix index fb9c684..a9b3f68 100644 --- a/sd-image/default.nix +++ b/sd-image/default.nix @@ -9,7 +9,16 @@ boot.consoleLogLevel = lib.mkDefault 7; # https://github.com/raspberrypi/firmware/issues/1539#issuecomment-784498108 - boot.kernelParams = [ "console=serial0,115200n8" "console=tty1" ]; + boot.kernelParams = [ + # This is ugly and fragile, but the sdImage image has an msdos + # table, so the partition table id is a 1-indexed hex + # number. So, we drop the hex prefix and stick on a "02" to + # refer to the root partition. + "root=PARTUUID=${lib.strings.removePrefix "0x" config.sdImage.firmwarePartitionID}-02" + "rootfstype=ext4" + "fsck.repair=yes" + "rootwait" + ]; sdImage = let