Difference between revisions of "NixOS on ARM/Orange Pi One"

From NixOS Wiki
Jump to: navigation, search
(Add note about content being out-of-date)
m (rollback unauthorized mass edits)
Tag: Rollback
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ARM/breadcrumb}}
+
This page has been moved to the official NixOS Wiki:
<div class="infobox">
 
{|class="table"
 
!colspan="2" class="title"|Orange Pi One
 
|-
 
|colspan="2"|[[File:orange_pi_one.jpg|frameless|256px|Orange Pi One.]]
 
|-
 
!Manufacturer
 
|Xunlong / Orange Pi
 
|-
 
!Architecture
 
|ARMv7
 
|-
 
!Bootloader
 
|Upstream u-boot
 
|-
 
!Maintainer
 
|[[User:makefu|makefu]]
 
|-
 
!URL
 
|[http://linux-sunxi.org/Xunlong_Orange_Pi_One_%26_Lite Sunxi Wiki]
 
|}
 
</div>
 
  
The Orange Pi One is an Xunlong SoC based on the Allwinner H3. As the board is on the market for quite some time and the device is relatively cheap, the community effort resulted in a better than average mainline support with the current kernel (5.0). Refer to the H3 column in the [http://linux-sunxi.org/Mainlining_Effort#Status_Matrix SunXI Mainline Status Matrix].
+
    ⇒ '''[https://wiki.nixos.org/wiki/NixOS_on_ARM/Orange_Pi_One NixOS on ARM/Orange Pi One]'''
  
== Status ==
+
''— samueldr, Lead of NixOS on ARM.''
 
 
{{outdated|Section refers to old user-provided images. Should be reviewed with cross-compilation, or native compilation through userspace emulation.}}
 
 
 
'''@dezgeg''''s porting efforts to ARMv7 works on the Orange Pi One, using the proper upstream u-boot.
 
 
 
Even though the upstream uboot does support the Orange Pi One, it is not part of nixpkgs. However with the new cross-compiler toolchain added with nixpkgs-18.09 it is straight forward to build the bootloader yourself.
 
 
 
== Board-specific installation notes ==
 
 
 
First follow the [[NixOS_on_ARM#Installation|generic installation steps]] to get the installer image on an SD card.
 
 
 
U-Boot needs to be copied to specific sectors on the microSD card with <code>dd</code>. At first, build the u-boot for the device, then  copy it to the correct location with (again, replace <code>/dev/sdX</code> with the correct path to the SD card device):
 
 
 
<syntaxhighlight lang="bash">
 
nix-build -E 'let plat = ((import <nixpkgs> ){}).pkgsCross.armv7l-hf-multiplatform; in plat.buildUBoot{defconfig = "orangepi_one_defconfig"; extraMeta.platforms = ["armv7l-linux"]; filesToInstall = ["u-boot-sunxi-with-spl.bin"];}'
 
sudo dd if=result/uboot-orangepi_pc_defconfig-2017.11.nixpkgs.*.u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
 
</syntaxhighlight>
 
 
 
Then, install using the [[NixOS_on_ARM#NixOS_installation_.26_configuration|installation and configuration steps]].
 
 
 
== Serial console==
 
 
 
Your configuration.nix will need to add <code>console=ttyS0,115200n8</code> to the <code>boot.kernelParams</code> configuration to use the serial console.
 
 
 
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
 
{ config, pkgs, lib, ... }:
 
{
 
  boot.kernelParams = [
 
    "console=ttyS0,115200n8"
 
  ];
 
}
 
</nowiki>}}
 
== Compatibility notes ==
 
 
 
* Ethernet works with 4.19 kernel
 
* HDMI should work since kernel  4.17 (untested)
 
== Resources ==
 
 
 
* [http://www.orangepi.org/orangepipc/ Official product page]
 
* [https://linux-sunxi.org/Xunlong_Orange_Pi_PC linux-sunxi wiki page]
 

Latest revision as of 10:59, 6 April 2024

This page has been moved to the official NixOS Wiki:

    ⇒ NixOS on ARM/Orange Pi One

— samueldr, Lead of NixOS on ARM.