NixOS on ARM/Clockworkpi A06 uConsole: Difference between revisions
imported>Tarinaky No edit summary |
imported>Tarinaky No edit summary |
||
| Line 10: | Line 10: | ||
These patches can be applied using the following nix snippet: | These patches can be applied using the following nix snippet: | ||
boot.kernelPackages = pkgs.linuxPackages_6_5; | boot.kernelPackages = pkgs.linuxPackages_6_5; | ||
boot.kernelPatches = [ | boot.kernelPatches = [ | ||
| Line 46: | Line 45: | ||
} | } | ||
]; | ]; | ||
=== Bootloader === | === Bootloader === | ||
At present I am not sure where the bootloader images used by the official/vendor supplied distro can be obtained. The easiest way to make any generated image bootable is to copy them from the official image available here: [[http://dl.clockworkpi.com/uConsole_A06_v1.1e.img.7z]] | At present I am not sure where the bootloader images used by the official/vendor supplied distro can be obtained. The easiest way to make any generated image bootable is to copy them from the official image available here: [[http://dl.clockworkpi.com/uConsole_A06_v1.1e.img.7z]] | ||
$ dd if=uConsole_A06_v1.1e.img of=nixos_a06.img count=32768 | $ sfdisk --dump uConsole_A06_v1.1e.img | ||
$ dd if=your_nixos_image.img skip=32768 of=nixos_a06.img seek=77824 | <...> | ||
uConsoleA06_v1.1e.img1 : start = 32768, size = 14942208, type=83 | |||
$ sfdisk --dump your_nixos_image.img | |||
<...> | |||
your_nixos_image.img1 : start = 16384, size = 61440, type = b | |||
your_nixos_image.img2 : start = 77824, size = 15322384, type = 83, bootable | |||
$ dd if=uConsole_A06_v1.1e.img of=nixos_a06.img count=32768 | |||
$ dd if=your_nixos_image.img skip=32768 of=nixos_a06.img seek=77824 | |||
The partition table for the resulting image will then be wrong, but we can fix that with fdisk by deleting our partition, and then recreating it. | The partition table for the resulting image will then be wrong, but we can fix that with fdisk by deleting our partition, and then recreating it. | ||
$ sfdisk --dump nixos_a06.img | fdisk ./nixos_a06.img | ||
<...> | d | ||
nixos_a06.img1 start = 32768, size = 15322384, type=83 | n | ||
p | |||
1 | |||
32768 | |||
<Default should now be to end of file> | |||
Do you want to remove the signature? No | |||
w | |||
$ sfdisk --dump nixos_a06.img | |||
<...> | |||
nixos_a06.img1 start = 32768, size = 15322384, type=83 | |||
Your image should now be bootable. | Your image should now be bootable. | ||