Amlogic S912 (X92 TV-Box)

This is for ARMv8 based devices

Amlogic S912 (X92 TV-Box)

Postby igelbox » Wed May 22, 2019 10:15 pm

Hi everyone,

It's a late night, but, I glad to share some results of booting ArchLinux on the X92 hardware.
A couple of moments ago I managed to boot the "Arch Linux 5.1.3-1-ARCH" kernel from the "linux-aarch64" package by:
- changing the initrd_addr from 0x13000000 to 0x15000000 and booti to bootm (by editing s905_autoscript.cmd and compiling it back to s905_autoscript)
- building uImage from the original Image using the following command:
$this->bbcode_second_pass_code('', 'mkimage -A arm64 -O linux -T kernel -C none -a 0x01080000 -e 0x01080000 -n "Linux kernel" -d Image uImage')

But, I still have an issue with the uInitrd image. Right now I'm using uInitrd from some Armbian distribution and the boot process seems OK (at least I see the "archlinux login:" prompt).
However, when I switch to use an uImage build from the ArchLinux initramfs-linux.img file by using the following command:
$this->bbcode_second_pass_code('', 'mkimage -A arm64 -O linux -T ramdisk -a 0x0 -e 0x0 -n initramfs-linux.img -d initramfs-linux.img uInitrd')
the boot process stuck on the following commands/logs:$this->bbcode_second_pass_code('', '
[ 4.500380] ALSA device list:
[ 4.502244] No soundcards found.
[ 4.510397] Freeing unused kernel memory: 1856K
[ 4.584501] Run /init as init process
[ 4.774513] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 4.964867] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[ 4.967418] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 4.974526] usb 1-1: Product: USB 2.0 Hub
[ 4.987133] random: fast init done
[ 5.038487] hub 1-1:1.0: USB hub found
[ 5.038577] hub 1-1:1.0: 4 ports detected
[ 5.409873] EXT4-fs (mmcblk0p3): mounted filesystem with writeback data mode. Opts: data=writeback')

I hope someone can suggest me what's wrong with my configs/environment/whatever else, coz, I have no idea what I'm doing)
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm

Re: Amlogic S912 (X92 TV-Box)

Postby igelbox » Thu May 23, 2019 9:14 pm

Well, it appeared I just needed to pass init=/usr/lib/systemd/systemd to the kernel command line. Now, I have linux-5.1.3-ARCH running on the x92 box. But, there is no WiFi support with the "native" ALARM linux-firmware package (if I copy /lib/firmware folder from the Armbian installation WiFI device is visible in the list). Also, ALARM doesn't detect any soundcard (even HDMI one which is detected by Armbian).

Moreover, 5.2-rc1 could be boot also, however with no HDMI output (monitor stays blank), I just see the following messages via RX/TX TTY device (thanks Arduino hardware:)
$this->bbcode_second_pass_code('', '[ 10.564840] panfrost d00c0000.gpu: clock rate = 666666666
[ 10.567856] meson-drm d0100000.vpu: Queued 3 outputs on vpu
[ 10.568816] libphy: mdio_mux: probed
[ 10.572030] panfrost d00c0000.gpu: mali-t820 id 0x820 major 0x1 minor 0x0 status 0x0
[ 10.588587] panfrost d00c0000.gpu: features: 00000000,101e76ff, issues: 00000000,24040400
[ 10.596698] panfrost d00c0000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002821 AS:0xff JS:0x7
[ 10.599196] libphy: mdio_mux: probed
[ 10.608420] panfrost d00c0000.gpu: shader_present=0x7 l2_present=0x1
[ 10.608617] panfrost d00c0000.gpu: GPU Fault 0x00000088 (UNKNOWN) at 0x000000c3c0811840
[ 10.608789] panfrost d00c0000.gpu: Fatal error during GPU init
[ 10.609611] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 10.609616] [drm] No driver support for vblank timestamp query.')
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm

Re: Amlogic S912 (X92 TV-Box)

Postby sehraf » Fri May 24, 2019 8:02 pm

Did you try to blacklist panfrost? https://wiki.archlinux.org/index.php/Kernel_module#Blacklisting
Could be that "Fatal error during GPU init" is causing the problems (this is only a guess, though)
sehraf
 
Posts: 81
Joined: Mon Feb 03, 2014 10:06 pm

Re: Amlogic S912 (X92 TV-Box)

Postby sehraf » Fri May 24, 2019 8:04 pm

Regarding WIFI and sound: Does it work with Armbian? On my S912 TV box i'm using an external USB-LAN adapter since there is neither WIFI nor (built-in) LAN working.
sehraf
 
Posts: 81
Joined: Mon Feb 03, 2014 10:06 pm

Re: Amlogic S912 (X92 TV-Box)

Postby sehraf » Fri May 31, 2019 2:18 pm

Just swicthed my Sunvell T95z Plus over to ALARM mainline kernel thanks to your groundwork 8-)
I've copied s905_autoscript.cmd and uEnv.ini from Armbian https://yadi.sk/d/5_32km_EsCV2A, changed s905_autoscript.cmd to use bootm (instead of booti), to load uImage (instead of zImage) (from mmc - in my case) and changed the initrd address as you suggested it. I updated uEnv.ini to add the init=... boot parameter and updated dtb_name to use meson-gxm-q201.dtb (in my case)

Then generated uInitrd, uImage and s905_autoscript with your commands
$this->bbcode_second_pass_code('', '
mkimage -T script -C none -n 'My Script' -d s905_autoscript.cmd s905_autoscript
mkimage -A arm64 -O linux -T ramdisk -a 0x0 -e 0x0 -n initramfs-linux.img -d initramfs-linux.img uInitrd
mkimage -A arm64 -O linux -T kernel -C none -a 0x01080000 -e 0x01080000 -n "Linux kernel" -d Image uImage
')

Et voilà !
5.1.5-2-ARCH :mrgreen: (with HDMI but no LAN, though that was expected)

EDIT:
for 5.2 i have to blacklist panfrost, too.

EDIT2:
https://lists.freedesktop.org/archives/ ... 19896.html this might cause the panfrost error...

EDIT3:
You can use this hook to automatically generate the uImage and uInitrd files
$this->bbcode_second_pass_code('', '
cat /usr/share/libalpm/hooks/91-linux-aarch64-uboot-img.hook
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/Image

[Action]
Description = Rebuilding uImage & uInitrd ...
When = PostTransaction
Exec = /bin/sh -c '/usr/bin/mkimage -A arm64 -O linux -T kernel -C none -a 0x01080000 -e 0x01080000 -n "Linux kernel" -d /boot/Image /boot/uImage; /usr/bin/mkimage -A arm64 -O linux -T ramdisk -a 0x0 -e 0x0 -n initramfs-linux.img -d /boot/initramfs-linux.img /boot/uInitrd'

')
sehraf
 
Posts: 81
Joined: Mon Feb 03, 2014 10:06 pm

Re: Amlogic S912 (X92 TV-Box)

Postby Sagittarius » Sat Aug 17, 2019 12:59 pm

Very interesting. Thank you.

I am also very impressed by Alyssa Rosenzweig's excellent work on Panfrost: https://rosenzweig.io/blog/gnome-meets-panfrost.html

So do you think we can hope to run some light GNU/Linux Desktop in few months on these TV boxes when they're equipped with 3 or 4GB RAM/32 or 64 GB emmc ?
Dockstar / GoFlexNet booting on NFS / Odroid C1+ / Odroid C2
Sagittarius
 
Posts: 61
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: Amlogic S912 (X92 TV-Box)

Postby igelbox » Mon Sep 02, 2019 8:25 pm

$this->bbcode_second_pass_quote('Sagittarius', 'S')o do you think we can hope to run some light GNU/Linux Desktop in few months on these TV boxes when they're equipped with 3 or 4GB RAM/32 or 64 GB emmc ?

I believe something light like Openbox or i3wm should work fine even without GPU acceleration (mali, panfrost, whatever else).
But I cannot test/prove it now, because, to be honest,
I stopped hacking my X92 TV-Box, coz, it has not enough RAM (2GB only) to enjoy a browser (thank you 2019 year :) ) and switched to a much promising one H96 Max (4GB RAM, 64GB EMMC). The work/achievements in this direction are outlined in viewtopic.php?f=67&t=14005.
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 11 guests