mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-18 15:49:45 +01:00
star64: add mmc firmware updater
And make the sd one actually write to the sd
This commit is contained in:
parent
3ccd87fcda
commit
16b8c06fd3
2 changed files with 28 additions and 2 deletions
|
@ -83,6 +83,24 @@ hardware.deviceTree.overlays = [{
|
||||||
|
|
||||||
# Updating the bootloader
|
# Updating the bootloader
|
||||||
|
|
||||||
|
## eMMC
|
||||||
|
|
||||||
|
Install the firmware update script
|
||||||
|
|
||||||
|
``` nix
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.callPackage
|
||||||
|
"${nixos-hardware}/pine64/star64/firmware.nix"
|
||||||
|
{ }).updater-mmc
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run as root
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
star64-firmware-update-mmc
|
||||||
|
```
|
||||||
|
|
||||||
## SD-Card
|
## SD-Card
|
||||||
|
|
||||||
Install the firmware update script
|
Install the firmware update script
|
||||||
|
|
|
@ -67,12 +67,20 @@ in rec {
|
||||||
flashcp -v ${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img /dev/mtd1
|
flashcp -v ${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img /dev/mtd1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
updater-sd = writeShellApplication {
|
updater-mmc = writeShellApplication {
|
||||||
name = "star64-firmware-update-sd";
|
name = "star64-firmware-update-mmc";
|
||||||
runtimeInputs = [ ];
|
runtimeInputs = [ ];
|
||||||
text = ''
|
text = ''
|
||||||
dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk0p1 conv=fsync
|
dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk0p1 conv=fsync
|
||||||
dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk0p2 conv=fsync
|
dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk0p2 conv=fsync
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
updater-sd = writeShellApplication {
|
||||||
|
name = "star64-firmware-update-sd";
|
||||||
|
runtimeInputs = [ ];
|
||||||
|
text = ''
|
||||||
|
dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk1p1 conv=fsync
|
||||||
|
dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk1p2 conv=fsync
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue