sd-image: Updates comments
This commit is contained in:
parent
8634d5700d
commit
1843e00146
@ -1,8 +1,12 @@
|
|||||||
# This module creates a bootable SD card image containing the given NixOS
|
# This module creates a bootable SD card image containing the given NixOS
|
||||||
# configuration. The generated image is MBR partitioned, with a FAT /boot
|
# configuration. The generated image is MBR partitioned, with a FAT
|
||||||
# partition, and ext4 root partition. The generated image is sized to fit
|
# /boot/firmware partition, and ext4 root partition. The generated image
|
||||||
# its contents, and a boot script automatically resizes the root partition
|
# is sized to fit its contents, and a boot script automatically resizes
|
||||||
# to fit the device on the first boot.
|
# 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
|
# The derivation for the SD image will be placed in
|
||||||
# config.system.build.sdImage
|
# config.system.build.sdImage
|
||||||
@ -96,6 +100,9 @@ in
|
|||||||
"/boot/firmware" = {
|
"/boot/firmware" = {
|
||||||
device = "/dev/disk/by-label/FIRMWARE";
|
device = "/dev/disk/by-label/FIRMWARE";
|
||||||
fsType = "vfat";
|
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" ];
|
options = [ "nofail" "noauto" ];
|
||||||
};
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
@ -125,6 +132,8 @@ in
|
|||||||
truncate -s $imageSize $img
|
truncate -s $imageSize $img
|
||||||
|
|
||||||
# type=b is 'W95 FAT32', type=83 is 'Linux'.
|
# 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
|
sfdisk $img <<EOF
|
||||||
label: dos
|
label: dos
|
||||||
label-id: ${config.sdImage.firmwarePartitionID}
|
label-id: ${config.sdImage.firmwarePartitionID}
|
||||||
|
Loading…
Reference in New Issue
Block a user