Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
docs: nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Mar 24, 2024
1 parent 9bfab74 commit fac3eb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions U-Boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ Build an sdImage by `nix build`, and then flash it to a SD card using `dd`(pleas
# 1. Build using the qemu-emulated aarch64 environment or on Orange Pi 5 Plus itself.
# In this way, we can take advantage of the official build cache on NixOS to greatly speed up the build
# it takes about 40 minutes to build the image(mainly the kernel) on my Orange Pi 5 Plus.
nix build .#sdImage-opi5plus
nix build github:ryan4yin/nixos-rk3588/2024032400#sdImage-opi5plus
# 2. Build using the cross-compilation environment
# NOTE: This will take a long time to build, as the official build cache is not available for the cross-compilation environment,
# you have to build everything from scratch.
nix build .#sdImage-opi5plus-cross
nix build github:ryan4yin/nixos-rk3588/2024032400#sdImage-opi5plus-cross

zstdcat result/sd-image/orangepi5plus-sd-image-*.img.zst | sudo dd status=progress bs=8M of=/dev/sdX

# ==================================
# For Orange PI 5
# ==================================
nix build .#sdImage-opi5
nix build github:ryan4yin/nixos-rk3588/2024032400#sdImage-opi5
# nix build .#sdImage-opi5-cross # fully cross-compiled
stdcat result/sd-image/orangepi5-sd-image-*.img.zst | sudo dd status=progress bs=8M of=/dev/sdX
```
Expand Down
6 changes: 3 additions & 3 deletions UEFI.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ First, build the raw efi image:
# In this way, we can take advantage of the official build cache on NixOS to greatly speed up the build
# it takes about 40 minutes to build the image(mainly the kernel) on my Orange Pi 5 Plus.
# for orange pi 5 plus
nix build .#rawEfiImage-opi5plus --show-trace -L --verbose
nix build github:ryan4yin/nixos-rk3588/2024032400#rawEfiImage-opi5plus --show-trace -L --verbose

# for orange pi 5
nix build .#rawEfiImage-opi5 --show-trace -L --verbose
nix build github:ryan4yin/nixos-rk3588/2024032400#rawEfiImage-opi5 --show-trace -L --verbose

# for rock 5a
nix build .#rawEfiImage-rock5a --show-trace -L --verbose
nix build github:ryan4yin/nixos-rk3588/2024032400#rawEfiImage-rock5a --show-trace -L --verbose
```

If you encounter issues like [`cannot allocate memory` despite free reporting "available"](https://stackoverflow.com/questions/46464785/cannot-allocate-memory-despite-free-reporting-available) when building the raw efi image, check your `dmesg`, and try to fix it via:
Expand Down

0 comments on commit fac3eb8

Please sign in to comment.