Jump to content

NixOS on ARM/PINE64 Pinebook: Difference between revisions

m
Fix ref to moved page
imported>Samueldr
m (Samueldr moved page NixOS on ARM/PINE Pinebook-a64 to NixOS on ARM/PINE64 Pinebook: Better follow the guidelines for board pages)
m (Fix ref to moved page)
(6 intermediate revisions by one other user not shown)
Line 33: Line 33:
U-boot support [https://github.com/NixOS/nixpkgs/pull/61652 has been added 2019-05-18]. The bootloader has not been built for now.
U-boot support [https://github.com/NixOS/nixpkgs/pull/61652 has been added 2019-05-18]. The bootloader has not been built for now.


== Board-specific installation notes ==
== Installation instructions ==


First follow the [[NixOS_on_ARM#Installation|generic installation steps]] to get the installer image on an SD card. Copying to the eMMC directly should work, but requires disassembly of the computer.
{{ARM/installation allwinner|variant=aarch64}}


U-Boot needs to be copied to specific sectors on the microSD card with <code>dd</code>. Download U-Boot for the board (<code>sopine-u-boot-sunxi-with-spl.bin</code>), and copy it to the correct location with (again, replace <code>/dev/sdX</code> with the correct path to the SD card device):
=== Partitioning ===


<syntaxhighlight lang="bash" style="clear:both">sudo dd if=sopine-u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8</syntaxhighlight>
The internal storage needs to be partitioned in a way that that the bootloader will not interfere with nor be interfered by a partition.
 
Then, continue installation using the [[NixOS_on_ARM#NixOS_installation_.26_configuration|installation and configuration steps]].
 
==== By copying the sd image internally ====
 
This is an easy solution, that also allows booting and installing as one would from an SD card on a generic Allwinner platform. Simply <code>dd</code> the SD image to the internal storage. The internal storage is likely to be <code>/dev/mmcblk2</code>.
 
==== MBR partition scheme ====


{{expansion|Installation instructions need to be written up to keep space for embedding the bootloader to the SPL.}}
{{expansion|Installation instructions need to be written up to keep space for embedding the bootloader to the SPL.}}
==== GPT partition scheme ====
The [[NixOS_on_ARM/Allwinner/GPT_Installation|Allwinner/GPT Installation]] page explains how to create a GPT partition table while allowing the isntallation of u-boot at the required offset.


== Serial console==
== Serial console==
Line 53: Line 65:
{| class="table arm-compatibility"
{| class="table arm-compatibility"
!colspan="2" style="background: #fafafa"| Mainline kernel
!colspan="2" style="background: #fafafa"| Mainline kernel
|-
! Display
|
* Does not work yet with the upstream kernel as of 5.1.
|-
|-
! HDMI
! HDMI
Line 68: Line 76:


{{expansion|Find and document use of a kernel with the added capabilities.}}
{{expansion|Find and document use of a kernel with the added capabilities.}}
== USB booting with u-boot ==
You will need to either have mainline U-Boot installed to the eMMC or to an SD card.
Stop the boot process when prompted (by pressing a key). Then, do the following:
<pre>
Hit any key to stop autoboot:  0
=> setenv boot_targets usb0
=> boot
</pre>
This sets the boot order for this boot only. U-Boot can boot (among others) either of the NixOS sd-image or EFI iso from USB.


== Resources ==
== Resources ==


* [https://www.pine64.org/pinebook/ Official product page]
* [https://www.pine64.org/pinebook/ Official product page]
* [linux-sunxi.org/Pine_Pinebook linux-sunxi wiki page]
* [https://linux-sunxi.org/Pine_Pinebook linux-sunxi wiki page]