about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2019-06-01 22:54:52 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2019-06-16 17:47:31 -0400
commit1843e00146439b226d842a370da63e4a3a04d336 (patch)
tree0271477b2cdedf88f6aa74db5486e7b74e721c99 /nixos/modules/installer
parent8634d5700d34b7ef2cd2b25f1cd5af549c76858c (diff)
downloadnixlib-1843e00146439b226d842a370da63e4a3a04d336.tar
nixlib-1843e00146439b226d842a370da63e4a3a04d336.tar.gz
nixlib-1843e00146439b226d842a370da63e4a3a04d336.tar.bz2
nixlib-1843e00146439b226d842a370da63e4a3a04d336.tar.lz
nixlib-1843e00146439b226d842a370da63e4a3a04d336.tar.xz
nixlib-1843e00146439b226d842a370da63e4a3a04d336.tar.zst
nixlib-1843e00146439b226d842a370da63e4a3a04d336.zip
sd-image: Updates comments
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/cd-dvd/sd-image.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix
index ec889786de8f..1faa657885b9 100644
--- a/nixos/modules/installer/cd-dvd/sd-image.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image.nix
@@ -1,8 +1,12 @@
 # This module creates a bootable SD card image containing the given NixOS
-# configuration. The generated image is MBR partitioned, with a FAT /boot
-# partition, and ext4 root partition. The generated image is sized to fit
-# its contents, and a boot script automatically resizes the root partition
-# to fit the device on the first boot.
+# configuration. The generated image is MBR partitioned, with a FAT
+# /boot/firmware partition, and ext4 root partition. The generated image
+# is sized to fit its contents, and a boot script automatically resizes
+# the root partition to fit the device on the first boot.
+#
+# The firmware partition is built with expectation to hold the Raspberry
+# Pi firmware and bootloader, and be removed and replaced with a firmware
+# build for the target SoC for other board families.
 #
 # The derivation for the SD image will be placed in
 # config.system.build.sdImage
@@ -96,6 +100,9 @@ in
       "/boot/firmware" = {
         device = "/dev/disk/by-label/FIRMWARE";
         fsType = "vfat";
+        # Alternatively, this could be removed from the configuration.
+        # The filesystem is not needed at runtime, it could be treated
+        # as an opaque blob instead of a discrete FAT32 filesystem.
         options = [ "nofail" "noauto" ];
       };
       "/" = {
@@ -125,6 +132,8 @@ in
         truncate -s $imageSize $img
 
         # type=b is 'W95 FAT32', type=83 is 'Linux'.
+        # The "bootable" partition is where u-boot will look file for the bootloader
+        # information (dtbs, extlinux.conf file).
         sfdisk $img <<EOF
             label: dos
             label-id: ${config.sdImage.firmwarePartitionID}