Commit Graph

32 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
pennae
258b935d70 nixos/filesystems: make supportedFilesystems an attrset
this lets us *dis*able filesystem explicitly, as is required by e.g. the
zfs-less installer images. currently that specifically is only easily
possible by adding an overlay that stubs out `zfs`, with the obvious
side-effect of also removing tooling that could run without the kernel
module loaded.
2024-02-19 11:46:52 +01:00
Adam Joseph
f99e8bafe6 nixos/installer: add sd-image-powerpc64le.nix
This builds on top of nixpkgs mainline 00d8347180
with the following two PRs cherry-picked:

- https://github.com/NixOS/nixpkgs/pull/192670
- https://github.com/NixOS/nixpkgs/pull/192668

using the following command:

```
nix build -f nixos -L \
  -I nixos-config=nixos/modules/installer/sd-card/sd-image-powerpc64le.nix \
  config.system.build.sdImage
```

I was able to successfully boot the image, although it boots to a login prompt
rather than a shell, and won't accept the empty password for `root`.  I guess
I'll have to figure out why that is.

To boot the image: `zstd`-decompress the it, mount it, and use `kexec`:

```
cd boot/nixos
kexec -l \
  *-vmlinux \
  --initrd *-initrd \
  --dt-no-old-root \
  --command-line="$(grep APPEND ../extlinux/extlinux.conf | sed 's_^ *APPEND *__')"
```

The machine I used for testing has only one storage device which is completely
allocated to LVM.  It appears that the NixOS ISO loader doesn't look for
partition tables within LVM volumes.  To work aroundn this, I had to extract the
`ext4` image within the partition table within the `sd-card` image and put that
in its own LVM volume.  This likely won't be an obstacle for users who write the
image to a USB stick or similar.
2023-02-23 06:18:52 +02:00
Samuel Dionne-Riel
d91e1f98fa nixos: Add sd_image_minimal_new_kernel_no_zfs
Support for ZFS, while desirable, is problematic with newer kernel
releases. The stable ZFS release seldom supports the current newest
kernel version, and this makes the new_kernel image basically useless as
it cannot be published, and is not often built with new kernel releases.

This uses a dirty workaround to work around the fact it is impossible to
remove a list item from a modules system list type. Since ZFS support is
conditional to being supported on the current platform, we can fake ZFS
not being supported *for the no-zfs build only*. This overlay is only
added when evaluating the image, nothing else.
2022-12-22 23:07:19 -05:00
Martin Schwaighofer
0c67f190b1 sd-image: remove unnecessary subshell
replace the subshell surrounding this block with cd before and after

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-10-22 12:11:30 +02:00
Martin Schwaighofer
a1d6fd3702 sd-image: replace faketime with --invariant for mkfs.vfat
This is done for sd-images only here, but should probably also be done
for dvd-images.

The --invariant arg should be a better way of making mkfs.vfat deterministic.
The previous version of invoking faketime was building fine and reproducible
when I was compiling an sdimage for aarch64 under emulation.
It was however still logging errors:
ERROR: ld.so: object '/nix/store/1c2cp2709kmvby8ql2n9946v7l52nn50-libfaketime-0.9.9/lib/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/nix/store/1c2cp2709kmvby8ql2n9946v7l52nn50-libfaketime-0.9.9/lib/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
The logged errors were presumably inaccurate somehow as calling
faketime was required for reproducibility, even though the log makes it
looks like it failed.
2022-10-22 12:11:30 +02:00
Martin Schwaighofer
f6ee247a1f sd-image: make firmware partition deterministic
Based on how it works for the EFI partition of an iso-image at
nixos/modules/installer/cd-dvd/iso-image.nix.
2022-10-22 12:11:30 +02:00
pennae
1013069f52 nixos/*: convert more partially-md option descriptions
this mostly means marking options that use markdown already
appropriately and making a few adjustments so they still render
correctly. notable for nftables we have to transform the md links
because the manpage would not render them correctly otherwise.
2022-08-31 16:32:14 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
Lassulus
773cbfbd28
Merge pull request #151633 from wucke13/sd-image-experiment
honor `sdImage.compressImage` also in the build process
2022-06-22 14:48:21 +02:00
Bernardo Meurer
80d4480778
sd-image-aarch64: deduplicate cm4 section 2022-04-26 20:23:50 -07:00
Bernardo Meurer
11c1152e0f
sd-image-aarch64: add dtbs for rpi-400 and cm4s 2022-04-26 19:05:24 -07:00
Bernardo Meurer
b30105b7c2
ubootRaspberryCM4_64bit: merge with ubootRaspberryPi4_64bit 2022-04-26 19:05:23 -07:00
Bernardo Meurer
faf42ffbd0
ubootRaspberryCM4_64bit: init 2022-04-26 15:22:25 -07:00
Bernardo Meurer
d1fef1e7c3
sd-image-aarch64: add support for the RaspberryPi CM4 2022-04-26 15:22:24 -07:00
Zhaofeng Li
1781d283f3 sd-image-aarch64: Enable arm_boost for Pi 4
This is effective on the Pi 400 and on newer board revisions of the
Pi 4B. From the official documentation:

> New Raspberry Pi OS images from Bullseye onwards come with
> this setting by default.

<https://www.raspberrypi.com/documentation/computers/config_txt.html>
2022-02-12 00:04:48 -08:00
Zhaofeng Li
963f011f16 sd-image-aarch64.nix: Add config for Pi Zero 2 W 2022-02-12 00:04:48 -08:00
Zhaofeng Li
ccd4dc3b98 sd-image-riscv64: Add an -installer variant like others 2022-01-10 17:30:02 -08:00
Zhaofeng Li
2cb7743e9c sd-image-x86_64: init 2022-01-06 17:31:17 -08:00
Zhaofeng Li
b70c23ea61 sd-image: Propagate imageName to derivation 2022-01-06 17:31:17 -08:00
Zhaofeng Li
823acb25dd sd-image-riscv64-qemu: init 2022-01-06 17:23:10 -08:00
wucke13
121e2f7e15 honor sdImage.compressImage in intermediate build steps 2021-12-21 21:31:44 +01:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Dominik Xaver Hörl
c62f911507 top-level: move linux kernels, packages and related functions to linux-kernels.nix 2021-08-12 12:22:03 +02:00
Florian Klink
1db54a5522 nixos/sdcard: make firmware partition offset configurable
Different boards using u-boot SPL require to write to different
locations. Sometimes, the 8MiB gap isn't sufficient - rk3399 boards
write to 0x16384 for example, which is at 8MiB, thus overriding the
fat32 partition with the SPL.
2021-06-25 22:33:42 +02:00
Samuel Dionne-Riel
79752e2310
Merge pull request #121834 from samueldr/feature/raspberrypi4-image-cleanup
sd_image_raspberrypi4: Remove, as planned initially
2021-05-10 14:05:02 -04:00
Samuel Dionne-Riel
6cb46a3897 sd_image_raspberrypi4: Remove, as planned initially
The replacement is the generic AArch64 image.

From there, you can customize an image that works better for your
needs, if need be.
2021-05-05 16:19:13 -04:00
Samuel Dionne-Riel
1cb977c858 sd-image: Rely on profiles/all-hardware.nix
This ensures that SD images and UEFI installers don't drift in
compatibility with regards to early initrd.
2021-05-04 19:42:13 -04:00
Colin L Rice
bef4bda8dd sd-image: Add option to control sd image expansion on boot.
This is supeer useful to allow the normal sd-image code to be used by
someone who wants to setup multiple partitions with a sd-image.

Currently I'm manually copying the sd-image file and modifying it
instead.
2021-04-30 22:12:07 -04:00
David Arnold
6bfaed9b2c
installer: fixup sd-card folder move from #110827 2021-02-21 16:12:54 -05:00
David Arnold
3c744bf68d installer: split sd-card into installer & base for bespoke image 2021-02-19 19:00:19 -05:00
David Arnold
3323b0ff0d
installer: move ./cd-dvd/sd-card* -> ./sd-card/ 2021-02-19 18:56:23 -05:00