Differences between revisions 1 and 63 (spanning 62 versions)
Revision 1 as of 2018-04-03 10:54:05
Size: 4987
Editor: ?HaraldGeyer
Comment: create page and add introduction
Revision 63 as of 2019-08-18 17:45:51
Size: 12088
Comment: Backlight control supported since Linux 5.2.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from InstallingDebianOn/Teres
Line 14: Line 15:
<<TableOfContents()>>
Line 15: Line 18:
The Teres-I is a DIY open hardware laptop sold by Olimex. Olimex has stated that they intend the Teres-I to be very modular, allowing main boards built around different !SoCs interchangeably. However the only main board available at the moment is based on the Allwinner A64 SoC with 2GB RAM and 16GB eMMC internal storage. The CPU is supported by the arm64 architecture in debian. armhf should work too, but is untested.

The laptop is sold with linux (ubuntu + vendor supplied kernel) preinstalled. There is not full source code available for the vendor kernel, which means that users of the preinstalled system are permanently stuck with an old version of linux. On the other hand since a linux system is available no external computer and no cross-compilation is required to bootstrap a debian system.

While debian should run fine from the eMMC internal storage, most people install debian to an external microSD card (there is one slot available) to have both systems available. That's also what is described in this guide.
The Teres-I is a DIY open hardware laptop sold by Olimex.
Olimex has stated that they intend the Teres-I to be very modular,
allowing main boards built around different !SoCs to be used interchangeably.
However the only main board available at the moment is based on the Allwinner A64 SoC
with 2GB RAM and 16GB eMMC internal storage.
The CPU is supported by the arm64 architecture in debian.
armhf should work too, but is untested.

The laptop is sold with linux (ubuntu + vendor supplied kernel) preinstalled.
Source code is only partially available
for the vendor kernel,
which means that users of the preinstalled system are permanently stuck with an old version of linux.
On the other hand since a linux system is available,
no external computer and no cross-compilation is required to bootstrap a debian system.

While debian should run fine from the eMMC internal storage,
most people install debian to an external microSD card (there is one slot available)
to have both systems available.
That's also what is described in this guide.
Line 22: Line 38:
To get an overview of mainline kernel support,
see the [[http://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix|status matrix of the linux sunxi community]].
Line 25: Line 44:
||Boot Standard Kernel: || [OK] ||
|| Detect mmc: || [OK] ||
||Boot Standard Kernel: || {OK} - since Buster ||
|| Detect mmc: || {OK} ||
Line 29: Line 48:
|| CPU Frequency Scaling || [X] || || CPU Frequency Scaling || {OK} ||
Line 31: Line 50:
|| Sleep / Suspend || [!] ||
|| Xorg || [OK] ||
|| Sleep / Suspend || {OK} - since Linux 4.19 ||
|| Xorg || {OK} ||
Line 35: Line 54:
|| Switch to External Screen || [X] || || Switch to External Screen || {X} - only with non-Mainline patches e.g. included in Olimex images ||
Line 37: Line 56:
|| - Built-in (Touchpad) || [OK] ||
|| Wireless/Wifi || [X-] ||
|| - Built-in (Touchpad) || {OK} ||
|| Wireless/Wifi || X-( ||
Line 40: Line 59:
~-Legend :<<BR>> {OK} = OK ; {X} Unsupported(No Driver) ; /!\ = Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable <<BR>> {i} = Configuration Required; X-( = Only works with a non-free driver and or firmware-~
~-Legend :<<BR>>
{OK} = OK ;
{X} Unsupported(No Driver) ;
/!\ = Error (Couldn't get it working);
[?] Unknown, Not Test ;
[-] Not-applicable <<BR>>
{i} = Configuration Required;
X-( = Only works with a non-free driver and or firmware-~

= Installation =
The laptop is sold as a kit for self-assembly.
Here we assume that it is completely assembled
and confirmed working correctly with the preinstalled system.

== Image install ==

Several images exist for directly writing to your microSD card:

## sorted by distance to debian - e.g. add official installer images at the top
 * [[https://box.redpill.dk/|Redpill]]
  * Source: Debian
  * Build: Boxer + qemu + multistrap + [[https://salsa.debian.org/tinker-team/box/|custom scripts]]
  * Quirks: Main image lack support for internal wifi - separate nonfree image includes support for it
 * [[https://www.armbian.com/olimex-teres-a64/|Armbian]]
  * Source: Debian (or Ubuntu) + Armbian + Armbian-maintained forks of kernel and bootloader
  * Build: debootstrap + [[https://github.com/armbian/build|custom scripts]]
 * [[ftp://staging.olimex.com/Allwinner_Images/A64-Teres/linux/xenial-teres-bspkernel-20190121_144941_EET-1_hdmi_out_v1_5.torrent|Olimex (torrent link)]]
  * Source: Ubuntu + Olimex + Olimex-maintained forks of kernel and bootloader
  * Build: qemu-debootstrap + [[https://github.com/OLIMEX/DIY-LAPTOP|custom scripts]]
 * [[ftp://staging.olimex.com/Allwinner_Images/A64-Teres/linux/armbian_experimental/|Olimex (Armbian)]]
  * Source: Ubuntu + Armbian + Olimex + Olimex-maintained forks of kernel and bootloader
  * Build: qemu-debootstrap + [[https://github.com/OLIMEX/build|custom scripts]]

For links, further information and discussion
see the [[https://www.olimex.com/forum/index.php?topic=6092.0|dedicated thread at the olimex forum]].

== Manual install ==
Buster and newer include boot-loader, kernel and arm64 userspace tools working out of the box.

=== partitioning ===
There are no real requirements for disk layout
other than that the bootloader is stored in an area close to the start of the disk but outside any partition.
Most microSD cards already come with a compatible partition layout,
so you only have to change the type of the existing partition from Windows to Linux
and format it with your favorite filesystem.

=== device tree ===

Buster and newer ships with working device-tree (DT) file for the teres.

=== arm trusted firmware ===

Stage 2 of bootstrapping the hardware is ARM Trusted Firmware.

The debian package DebPkg:arm-trusted-firmware has support for Teres I
using this binary:{{{
/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin
}}}

=== u-boot ===

Stage 1 and 3 of bootstrapping the hardware is U-boot.

mainline u-boot still (as of release 2019.04) misses a few bits
including the `sun50i-a64-teres-i.dtb` device tree file
with hints to enable the pwm driver (to get display backlight up).

The debian package DebPkg:u-boot-sunxi since release 2019.01+dfsg-5
includes a patch enabling support Teres I except USB support,
which implies that the built-in USB keyboard is not usable until Linux has loaded (proposed fix at DebianBug:935035).

The included patch is currently being [[https://patchwork.ozlabs.org/patch/1088354/|proposed mainlined into u-boot]].

Pre-built u-boot binaries are [[https://box.redpill.dk/quirks/|available]].

=== rootfs ===
Follow the debootstrap chapter
in the [[https://www.debian.org/releases/stable/arm64/apds03.html.en|installation manual]].

The default bootscript built into u-boot probably won't find all the files necessary to boot the system.
Simplest way to fix this is to install DebPkg:u-boot-menu which should work out of the box.

Alternatively you can try write a custom bootscript
and reformat it with mkimage from the package u-boot-tools:
{{{
mkimage -T script -d boot.txt /boot.scr
}}}

Here is a minimal [[attachment:boot.txt|example bootscript]]
which assumes that /dtb, /vmlinuz and /initrd.gz are symlinks to the real files.

== Using debian installer ==
There is no support in the official installer yet.
However it might be possible to copy the arm64 installer files and a suitable device tree file onto a microSD card
with a bootloader from external sources.
If you try that approach, please share your experience.

== Troubleshooting ==
If the screen remains blank or the system doesn't boot (is stuck in u-boot or initramfs)
you can connect a serial console.
The serial console is multiplexed with the headphone output.
Instructions how to make or buy a proper connector are at the olimex forum.
Line 50: Line 169:
 (not covered yet) LCD works with simplefb framebuffer.

Backlight is adjustable by echo'ing values 0-10 to `/sys/class/backlight/brightness`
since Linux 5.2.

Mali-400 MP2 ("Utgard") GPU is recognized since Linux 5.2,
but not yet used.

Use of Mali GPU requires the lima driver,
developed as part of Mesa3d in (among others) package DebPkg:libgl1-mesa-dri,
where the lima driver is expected enabled from release 19.2 onwards.

Possibly use of Mali GPU additionally requires X11 driver fbturbo,
not currently packaged for Debian.
Line 60: Line 192:
== Mouse ==
 (not covered yet)
Line 64: Line 193:
## Have you tested Hibernation and/or
## Then explain how to get it working
 (not covered yet)
Sleep is supported since Linux 4.19.

Battery status data is available since Linux 5.2,
at non-standard path `/sys/class/power_supply/axp20x-battery`.
Line 69: Line 199:
 (not covered yet)

== Modem ==
 (not covered yet)
Realtek RTL8723BS,
requiring non-free package DebPkg:firmware-realtek

A possibly race condition between wifi driver and mmc driver
is avoided by adding "rtl8723bs" to the file /etc/initramfs-tools/modules
and then regenerating initramfs with "update-initramfs -u".
This issue and workaround was found [[https://en.opensuse.org/HCL:Teres-I|here]].
Line 84: Line 217:
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  bDeviceClass 9 Hub
  bDeviceProtocol 0 Full speed (or root) hub
  iProduct 2 SW USB2.0 'Open' Host Controller (OHCI) Driver
Bus 001 Device 005: ID 15ba:003c Olimex Ltd.
  bDeviceClass 0 (Defined at Interface level)
  bDeviceProtocol 0
  iProduct 2 TERES Keyboard+Touchpad
  (Bus Powered)
Bus 001 Device 003: ID 1908:2311 GEMBIRD
  bDeviceClass 239 Miscellaneous Device
  bDeviceProtocol 1 Interface Association
  iProduct 2 USB2.0 PC CAMERA
      (Bus Powered)
  bDeviceClass 239 Miscellaneous Device
  bDeviceProtocol 1 Interface Association
  (Bus Powered)
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
  bDeviceClass 9 Hub
  bDeviceProtocol 1 Single TT
  iProduct 1 USB2.0 Hub
  bDeviceClass 9 Hub
  bDeviceProtocol 0 Full speed (or root) hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass 9 Hub
  bDeviceProtocol 0 Full speed (or root) hub
  iProduct 2 SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  bDeviceClass 9 Hub
  bDeviceProtocol 0 Full speed (or root) hub
  iProduct 2 SW USB2.0 'Open' Host Controller (OHCI) Driver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass 9 Hub
  bDeviceProtocol 0 Full speed (or root) hub
  iProduct 2 SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
Line 86: Line 253:
''USB Host controllers entries (without OHCI, UHCI, EHCI) are removed too.''
Line 105: Line 270:
Line 108: Line 272:
### Keep only one good category and remove others
## CategoryLaptopComputer | CategoryDesktopComputer | CategoryEmbeddedComputer
----

Translation(s): none

DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware.

The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware.

If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware.

Introduction

The Teres-I is a DIY open hardware laptop sold by Olimex. Olimex has stated that they intend the Teres-I to be very modular, allowing main boards built around different SoCs to be used interchangeably. However the only main board available at the moment is based on the Allwinner A64 SoC with 2GB RAM and 16GB eMMC internal storage. The CPU is supported by the arm64 architecture in debian. armhf should work too, but is untested.

The laptop is sold with linux (ubuntu + vendor supplied kernel) preinstalled. Source code is only partially available for the vendor kernel, which means that users of the preinstalled system are permanently stuck with an old version of linux. On the other hand since a linux system is available, no external computer and no cross-compilation is required to bootstrap a debian system.

While debian should run fine from the eMMC internal storage, most people install debian to an external microSD card (there is one slot available) to have both systems available. That's also what is described in this guide.

Overall Status

To get an overview of mainline kernel support, see the status matrix of the linux sunxi community.

Core Components

[ATTACH]

Boot Standard Kernel:

{OK} - since Buster

Detect mmc:

{OK}

Extra Features

CPU Frequency Scaling

{OK}

Hibernation

[?]

Sleep / Suspend

{OK} - since Linux 4.19

Xorg

{OK}

- OpenGL

[?]

- Resize-and-Rotate(randr)

[?]

Switch to External Screen

{X} - only with non-Mainline patches e.g. included in Olimex images

Mouse

- Built-in (Touchpad)

{OK}

Wireless/Wifi

X-(

Keyboard's Hotkeys

[?]

Legend :
{OK} = OK ; {X} Unsupported(No Driver) ; /!\ = Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable
{i} = Configuration Required; X-( = Only works with a non-free driver and or firmware

Installation

The laptop is sold as a kit for self-assembly. Here we assume that it is completely assembled and confirmed working correctly with the preinstalled system.

Image install

Several images exist for directly writing to your microSD card:

  • Redpill

    • Source: Debian
    • Build: Boxer + qemu + multistrap + custom scripts

    • Quirks: Main image lack support for internal wifi - separate nonfree image includes support for it
  • Armbian

    • Source: Debian (or Ubuntu) + Armbian + Armbian-maintained forks of kernel and bootloader
    • Build: debootstrap + custom scripts

  • Olimex (torrent link)

    • Source: Ubuntu + Olimex + Olimex-maintained forks of kernel and bootloader
    • Build: qemu-debootstrap + custom scripts

  • Olimex (Armbian)

    • Source: Ubuntu + Armbian + Olimex + Olimex-maintained forks of kernel and bootloader
    • Build: qemu-debootstrap + custom scripts

For links, further information and discussion see the dedicated thread at the olimex forum.

Manual install

Buster and newer include boot-loader, kernel and arm64 userspace tools working out of the box.

partitioning

There are no real requirements for disk layout other than that the bootloader is stored in an area close to the start of the disk but outside any partition. Most microSD cards already come with a compatible partition layout, so you only have to change the type of the existing partition from Windows to Linux and format it with your favorite filesystem.

device tree

Buster and newer ships with working device-tree (DT) file for the teres.

arm trusted firmware

Stage 2 of bootstrapping the hardware is ARM Trusted Firmware.

The debian package arm-trusted-firmware has support for Teres I using this binary:

/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin

u-boot

Stage 1 and 3 of bootstrapping the hardware is U-boot.

mainline u-boot still (as of release 2019.04) misses a few bits including the sun50i-a64-teres-i.dtb device tree file with hints to enable the pwm driver (to get display backlight up).

The debian package u-boot-sunxi since release 2019.01+dfsg-5 includes a patch enabling support Teres I except USB support, which implies that the built-in USB keyboard is not usable until Linux has loaded (proposed fix at 935035).

The included patch is currently being proposed mainlined into u-boot.

Pre-built u-boot binaries are available.

rootfs

Follow the debootstrap chapter in the installation manual.

The default bootscript built into u-boot probably won't find all the files necessary to boot the system. Simplest way to fix this is to install u-boot-menu which should work out of the box.

Alternatively you can try write a custom bootscript and reformat it with mkimage from the package u-boot-tools:

mkimage -T script -d boot.txt /boot.scr

Here is a minimal example bootscript which assumes that /dtb, /vmlinuz and /initrd.gz are symlinks to the real files.

Using debian installer

There is no support in the official installer yet. However it might be possible to copy the arm64 installer files and a suitable device tree file onto a microSD card with a bootloader from external sources. If you try that approach, please share your experience.

Troubleshooting

If the screen remains blank or the system doesn't boot (is stuck in u-boot or initramfs) you can connect a serial console. The serial console is multiplexed with the headphone output. Instructions how to make or buy a proper connector are at the olimex forum.

Configuration

Display

LCD works with simplefb framebuffer.

Backlight is adjustable by echo'ing values 0-10 to /sys/class/backlight/brightness since Linux 5.2.

Mali-400 MP2 ("Utgard") GPU is recognized since Linux 5.2, but not yet used.

Use of Mali GPU requires the lima driver, developed as part of Mesa3d in (among others) package libgl1-mesa-dri, where the lima driver is expected enabled from release 19.2 onwards.

Possibly use of Mali GPU additionally requires X11 driver fbturbo, not currently packaged for Debian.

Audio

  • (not covered yet)

Power Management

Sleep is supported since Linux 4.19.

Battery status data is available since Linux 5.2, at non-standard path /sys/class/power_supply/axp20x-battery.

WiFi

Realtek RTL8723BS, requiring non-free package firmware-realtek

A possibly race condition between wifi driver and mmc driver is avoided by adding "rtl8723bs" to the file /etc/initramfs-tools/modules and then regenerating initramfs with "update-initramfs -u". This issue and workaround was found here.


System Summary

lsusb

lsusb -v | grep -E '\<(Bus|iProduct|bDeviceClass|bDeviceProtocol)' 2>/dev/null

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 SW USB2.0 'Open' Host Controller (OHCI) Driver
Bus 001 Device 005: ID 15ba:003c Olimex Ltd. 
  bDeviceClass            0 (Defined at Interface level)
  bDeviceProtocol         0 
  iProduct                2 TERES Keyboard+Touchpad
  (Bus Powered)
Bus 001 Device 003: ID 1908:2311 GEMBIRD 
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  iProduct                2 USB2.0 PC CAMERA
      (Bus Powered)
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  (Bus Powered)
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
  bDeviceClass            9 Hub
  bDeviceProtocol         1 Single TT
  iProduct                1 USB2.0 Hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 SW USB2.0 'Open' Host Controller (OHCI) Driver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 SW USB2.0 'Enhanced' Host Controller (EHCI) Driver

Resources

Attachments

Some configuration files and sample outputs.

  • [get | view] (2018-04-07 09:22:19, 0.2 KB) [[attachment:boot.txt]]
 All files | Selected Files: delete move to page copy to page

Credits


CategoryLaptopComputer