NixOS on ARM/OLIMEX Teres-A64: Difference between revisions
imported>KREYREN Verbose compatibility notes |
imported>KREYREN Add instructions for serial console |
||
Line 55: | Line 55: | ||
== Serial console== | == Serial console== | ||
Serial console can be accessed by default on BAUM 115200 using the [https://www.olimex.com/Products/DIY-Laptop/KITS/TERES-USB-DEBUG/ TERES-USB-DEBUG] cable (or make one it's 3 pole jack with pl2303 converter, can be made work off of single board computer, etc..) in headphone jack port and accessed through: | |||
<pre> | |||
$ picocom -b BAUM /dev/SERIAL-DEVICE # Often set as /dev/ttyUSB0 | |||
</pre> | |||
Currently the sdcard has set this by fault, but if you use custom configuration and want to maintain the serial console functionality then you need to append it to the kernel CLI through: | |||
<pre> | |||
boot.kernelParams = [ | |||
"console=ttyS0,115200n8" | |||
"console=ttyAMA0,115200n8" | |||
"console=tty0" | |||
]; | |||
</pre> | |||
== Compatibility notes == | == Compatibility notes == |
Revision as of 10:40, 3 July 2023
OLIMEX Teres-A64 | |
---|---|
Manufacturer | OLIMEX, Ltd |
Architecture | AArch64 |
Bootloader | Upstream U-Boot[1] |
Boot order | SD, eMMC |
Maintainer | KREYREN |
Teres-1 (often referred as teres-a64) is an open-source hardware and software netbook design based on the Allwinner A64 SoC.
It can boot from SD or from the included and slow af eMMC module (insane people use only).
Status
Work In Progress..
The system is bootable and seems to work, but audio is broken and has rare graphical issues that are currently being investigated, note known issues below for building on Linux 6.0~6.1 resulting in broken display.
U-boot support has been submitted on 2023-06-30, but not yet merged.
Installation instructions
To use the generic installation image for your board, you will need to copy it verbatim to an SD card.
sudo dd if=sd-image-aarch64-linux.img of=/dev/DEVICE conv=sync status=progress
This board requires the installation of u-boot at a specific location on the storage where NixOS was written to.
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/DEVICE bs=1024 seek=8
Partitioning
All Allwinner SoCs will try to find a boot image at sector 16 (8KB) of an SD card, connected to the first MMC controller.[3]
MBR partition scheme
GPT partition scheme
The Allwinner GPT Installation instruction explains how to create a GPT partition table while allowing the isntallation of u-boot at the required offset.
Serial console
Serial console can be accessed by default on BAUM 115200 using the TERES-USB-DEBUG cable (or make one it's 3 pole jack with pl2303 converter, can be made work off of single board computer, etc..) in headphone jack port and accessed through:
$ picocom -b BAUM /dev/SERIAL-DEVICE # Often set as /dev/ttyUSB0
Currently the sdcard has set this by fault, but if you use custom configuration and want to maintain the serial console functionality then you need to append it to the kernel CLI through:
boot.kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ];
Compatibility notes
Mainline kernel on NixOS | |
---|---|
HDMI |
|
Display |
|
WiFi/Bluetooth |
|
Audio (reproductors) |
|
Audio (audio jack) |
|
3D Acceleration |
|
Webcam |
|
Touchpad |
|
Keyboard |
|
SdCard reader |
|
FOSS Bootloader |
|
Downstream kernel
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:
Hit any key to stop autoboot: 0 => setenv boot_targets usb0 => boot
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.
Known issues
Building the bootloader and the configuration on linux 6.0~6.1 will result in broken display rendering due to "DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory' caused by insufficient Quality Assurance at mesa upstream tracked on https://gitlab.freedesktop.org/mesa/mesa/-/issues/8198.
The fix has been merged in https://gitlab.freedesktop.org/mesa/mesa/-/commit/c426e5677f36c3b0b8e8ea199ed4f2c7fad06d47 and is part of Linux 6.2 so as long as you build ""and use"" this kernel the display should work without an issue.
Note that if you boot and build on broken kernel then you can use serial console on BAUM 115200 to fix the issue.
As of 03/07/2023-EU NixOS 23.05 is shipped with LTS kernel which is 6.1 to get non-broken kernel you can use the following configuration:
# configuration.nix boot.kernelPackages = pkgs.linuxPackages_6_3;
Please let me know if you encounter this issue outside of known broken linux release. -- KREYREN