mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 17:38:41 +08:00
nxp: document flash procedure and expose images in flake
This commit is contained in:
@@ -38,3 +38,41 @@ Code snippet example that enables 'imx8mp-evk/imx8mq-evk/imx93-evk' configuratio
|
||||
}
|
||||
```
|
||||
|
||||
### 2.3 Building Boot Images
|
||||
|
||||
Boot images for flashing to SD cards can be built directly from the flake:
|
||||
|
||||
```bash
|
||||
# Build boot image for i.MX8MP EVK
|
||||
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mp-boot
|
||||
|
||||
# Build boot image for i.MX8MQ EVK
|
||||
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mq-boot
|
||||
|
||||
# Build boot image for i.MX93 EVK
|
||||
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx93-boot
|
||||
|
||||
# Or from a local checkout
|
||||
nix build .#packages.aarch64-linux.imx8mp-boot
|
||||
```
|
||||
|
||||
The boot image will be available at `./result/image/flash.bin`.
|
||||
|
||||
**Note:** These packages target `aarch64-linux`. If you're on a different architecture (e.g., x86_64-linux), you'll need remote builders configured for aarch64-linux.
|
||||
|
||||
### 2.4 Flashing to SD Card
|
||||
|
||||
Once built, you can flash the boot image to an SD card:
|
||||
|
||||
```bash
|
||||
# For i.MX8MP and i.MX93 (32KB offset):
|
||||
sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync
|
||||
|
||||
# For i.MX8MQ (33KB offset):
|
||||
sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=33 conv=fsync
|
||||
```
|
||||
|
||||
**Note:** Different i.MX processors require different offsets. i.MX8MP and i.MX93 use 32KB (seek=32), while i.MX8MQ uses 33KB (seek=33).
|
||||
|
||||
**Warning:** Double-check the device path to avoid overwriting the wrong disk!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user