Jump to content

Armbian for Amlogic S9xxx kernel 5.x


balbes150

Recommended Posts

 

Spoiler

I'm not sure that v4lm2m works correctly under x11. With -vf null and different -pxl_fmts and with a bunch of other options, all of which managed to achieve a buffer error. And with the killed xerver, the collected balbes150 ffmpeg gets a seq fault ...

Если коротко, погрузился в маны ffmpeg, путем манипуляции с фильтрами и форматов пикселей добился двух результатов -  ошибку buffer_sink и запуск и работа(никаких ошибок, просто намертво висит ffplay и при попытке последующего обращения к meson_vdec сыпятся ошибки), но без вывода картинки под иксами и намертво висящим ffplay. Та же libre, у них ведь оболочка не под иксами рисуется? Но, попробую еще глубже в маны забурится в том числе v4l2.

my failed attempts with ffplay...

Link to comment
Share on other sites

Hi guys, I just managed to get the latest Armbian XFCE image working from eMMC all dandy on my Tanix TX5 (s905x 2G/8G), and everything seems to be working just fine, but the only major pet peeve I have is the absence of the mali450 drivers on Xorg.. Without it X is sluggish, and videos extremely choppy. I know there is a driver that worked in the 3.14 series of kernels, is there any way to compile a kernel with mali-drm included in 4.19.6? By digging into the older releases I found one mali.ko file, but it's compiled for 4.19.0-rc7-aml and won't load. Is is possible to have an update to this or am I missing something?

 

Believe it or not I went through the hassle of making myself some images by compiling from Amlogic's openlinux buildroot, but it's extremely capricious, and while it does work after some manual coercing, it runs wayland and I have no idea how to get a desktop going on there.

 

Thanks guys, for giving this old useless android box some new life...

Link to comment
Share on other sites

Today I "installed" Armbian_5.67_Aml-s9xxx_Debian_stretch_default_4.19.6_20181207.img
on my Sunvell T95K Pro with the dtb for the gxm_q201

 

Does boot fine.

but eth0 and wlan0 doesnt work.

 

OK - Wifi is missing the Firmware blob:

[    9.938370] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    9.938386] cfg80211: failed to load regulatory.db
[   10.375780] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4330-sdio.clm_blob failed with error -2
[   13.086914] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5

On a legacy kernel version it could be "started" with 

modprobe dhd firmware_path=/lib/firmware/brcm/fw_bcm40183b2.bin nvram_path=/lib/firmware/brcm/nvram_ap6330.txt

 

I didnt see a error for eth0 in dmesg:
 

root@sunvell-t95kpro:~# dmesg|grep -i eth0
[   15.764056] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.874884] meson8b-dwmac c9410000.ethernet eth0: No Safety Features support found
[   15.874899] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[   15.875247] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

ifconfig also does see the MAC for eth0 and wlan0:

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c4:2f:ac:84:34:72  txqueuelen 1000  (Ethernet)

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ac:83:f3:0a:52:d0  txqueuelen 1000  (Ethernet)

A USB-Ethernet-Adapter does work fine as eth1

Boot-Informationen: 
http://ix.io/1vYX

Link to comment
Share on other sites

3 hours ago, guidol said:

Today I "installed" Armbian_5.67_Aml-s9xxx_Debian_stretch_default_4.19.6_20181207.img
on my Sunvell T95K Pro with the dtb for the gxm_q201

 

Does boot fine.

but eth0 and wlan0 doesnt work.

 

 

This forum post will help you with wifi as it looks the exact comms hardware at issue

It may be that the dbt file could be the problem for ethernet, even when the appropriate one is being used.

Link to comment
Share on other sites

6 minutes ago, Constantin Piffer said:

Hi, I try to reinstall the original image on my magicsee n4 on emmc. I made a backup of the image via ddbr. Now I try to flash it, but I get this failure:

 

 

And, why you try  burning tools instead of ddbr?

Link to comment
Share on other sites

19 minutes ago, Constantin Piffer said:

Hi, I try to reinstall the original image on my magicsee n4 on emmc. I made a backup of the image via ddbr. Now I try to flash it, but I get this failure:
 

I'm not an expert and have not backed up using ddbr but you might have to restore by hand with the dd command - see /usr/bin/ddbr_restore_nand assuming you can boot any linux like O/S from SD card.
I can see problems booting from SD card with armbian installed on emmc due to the root=LABEL=ROOTFS conflicts at boot.

Link to comment
Share on other sites

1 minute ago, Constantin Piffer said:

 

Because the box isn't booting anymore. I try to write armbian on emmc and now it will not boot.

Yep... but usb burning tools only for original amlogic firmware.  For a start, I would try to install the original image through it.  
It would be great to connect usb-to-ttl and see the output. And more info what exact image do you write .

Link to comment
Share on other sites

4 hours ago, dbsharpe said:

 

This forum post will help you with wifi as it looks the exact comms hardware at issue

It may be that the dbt file could be the problem for ethernet, even when the appropriate one is being used.

I did try that fix

Spoiler

On 150balbes 4.18.0-rc5 Ubuntu images, for those with T95 (p200) AML tvbox using meson-gxbb-p201.dtb / 200 device tree file, there is a problem with wifi caused by an error with nvram firmware files.
Problems manifests as wlan0 present but can't see any AP's.
To fix, use

 

mv /lib/firmware/brcm/brcmfmac4330-sdio.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt.old
ln -s  /lib/firmware/brcm/nvram_ap6330.txt  /lib/firmware/brcm/brcmfmac4330-sdio.txt

 

in a shell on the target as root. Not sure where this Ubuntu  distribution fault has crept in.
nvram_ap6330.txt is actually the same file as android system:/etc/wifi/40183/nvram.txt and although not perfect, works better!

- it seems to be only the half way for wifi, because now I can scan Wifi with

iwlist scan

and get a result....but I cant connect :(
using /etc/network/interfaces OR wpa_supplicant OR via configured entry with nmtui
see:

 

Spoiler

[    9.946527] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.953312] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.960705] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    9.960727] cfg80211: failed to load regulatory.db
[   10.011486] brcmfmac: F1 signature read @0x18000000=0x16044330
[   10.014995] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio for chip BCM4330/4
[   10.015244] usbcore: registered new interface driver brcmfmac
[   10.351530] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio for chip BCM4330/4
[   10.351665] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4330-sdio.clm_blob failed with error -2
[   10.351680] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   10.355490] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4330/4 wl0: Oct 25 2011 19:34:12 version 5.90.125.104
[   10.627769] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 184
[   10.627778] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 188
[   10.627781] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 192
[   10.627785] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 196
[   10.627788] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 200
[   10.627792] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 204
[   10.627796] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 208
[   10.627799] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 212
[   10.627803] brcmfmac: brcmf_construct_chaninfo: Ignoring unexpected firmware channel 216
[   15.968054] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   15.983589] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   16.128165] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.467239] brcmfmac: brcmf_p2p_create_p2pdev: timeout occurred
[   18.467261] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5
[   18.493170] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
 

 

[EDIT] but now I searched another way and did found (which I did read in the past sometime in the forum, but

thought its the same as nmtui "in green") : nmcli

 

At the page:
https://nullr0ute.com/2016/09/connect-to-a-wireless-network-using-command-line-nmcli/

I did read the command

if you don’t wan’t your password to be stored in the command line history use the –ask parameter like so:
# nmcli –ask device wifi connect SSID-Name password wireless-password
nmcli will ask for the password if you use the “–ask” argument.

nmcli device wifi connect your_SSID_Name password your_wireless-password
a.k.a.

nmcli device wifi connect Guidos_WiFi password CPE1704TKS

and it worked:
Gerät »wlan0« wurde erfolgreich mit »6b83xxxxx-f945-4668-b88c-15a2bxxxxxxx« aktiviert.

 

After this way to connect I could change the config in nmtui (from DHCP to static IP).

 

I would like to know the problem with /etc/network/interfaces /  wpa_supplicant / (initial) nmtui :(

Link to comment
Share on other sites

1 hour ago, guidol said:

I did try that fix

  Reveal hidden contents

On 150balbes 4.18.0-rc5 Ubuntu images, for those with T95 (p200) AML tvbox using meson-gxbb-p201.dtb / 200 device tree file, there is a problem with wifi caused by an error with nvram firmware files.
Problems manifests as wlan0 present but can't see any AP's.
To fix, use

 

mv /lib/firmware/brcm/brcmfmac4330-sdio.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt.old
ln -s  /lib/firmware/brcm/nvram_ap6330.txt  /lib/firmware/brcm/brcmfmac4330-sdio.txt

 

in a shell on the target as root. Not sure where this Ubuntu  distribution fault has crept in.
nvram_ap6330.txt is actually the same file as android system:/etc/wifi/40183/nvram.txt and although not perfect, works better!

- it seems to be only the half way for wifi, because now I can scan Wifi with

iwlist scan

and get a result....but I cant connect :(

 

For anyone reading and this is not working, it may be the file /lib/firmware/brcm/nvram_ap6330.txt is missing. I'm using
the same kernel on ubuntu but earlier image and it's not present on the image or repository package. The working file is 1522 bytes long, 82 lines fb5322048b8fa27d612a9f4dce1696cd md5sum with a head saying #AP6330_NVRAM_V1.0_20121130.

Link to comment
Share on other sites

11 minutes ago, dbsharpe said:

it may be the file /lib/firmware/brcm/nvram_ap6330.txt 

The working file is 1522 bytes long, 82 lines fb5322048b8fa27d612a9f4dce1696cd md5sum with a head saying #AP6330_NVRAM_V1.0_20121130.

I got/used the file since here:

root@sunvell-t95kpro:/lib/firmware/brcm# ls -l nvram_ap6330.txt
-rw-r--r-- 1 guido guido 1522 Dez 14 13:56 nvram_ap6330.txt

 

root@sunvell-t95kpro:/lib/firmware/brcm# more nvram_ap6330.txt
#AP6330_NVRAM_V1.0_20121130

 

root@sunvell-t95kpro:/lib/firmware/brcm# md5sum ./nvram_ap6330.txt
fb5322048b8fa27d612a9f4dce1696cd  ./nvram_ap6330.txt
 

 

nvram_ap6330.zip

Link to comment
Share on other sites

I did found a "small solution" for the error-msgs
 

[    9.938370] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    9.938386] cfg80211: failed to load regulatory.db

In the archive http://ftp.be.debian.org/pub/software/network/wireless-regdb/wireless-regdb-2018.10.24.tar.xz

you could find the files

regulatory.db
regulatory.db.p7s

 

copy them from the archive directory wireless-regdb-2018.10.24 to /lib/firmware and you will get (after a reboot)

[    9.180263] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.187698] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

 

regulatory.zip

Link to comment
Share on other sites

Hoping I'm on the right track here...

 

There is a kernel driver source for mali450 (and others!) on amlogic's FTP here: http://openlinux.amlogic.com:8000/download/ARM/gpu/gpu-2016-08-18-fe6d7b1d1b.tar.gz

 

This is dated 2016. I have downloaded Balbes' kernel source with git, ran menuconfig to produce a .config, and then tried to build the mali driver with this command:

sudo KDIR=<kernel_tree_path> USING_UMP=0 BUILD=release make

 

The first issue was that the kernel configuration did not have CONFIG_TRACEPOINTS enabled, and in addition it was hidden in the menu by default. So I edited the kernel's init/Kconfig file after I figured out what was missing:

config TRACEPOINTS

        bool

became

config TRACEPOINTS

        bool "Tracepoints"

 

After this, I went back into menuconfig, and the option was set in the General Setup menu, at the very bottom. Saved the .config, tried to compile again.

 

A few trivial corrections later (really trivial, I'm not even a linux programmer and managed to fix them in a few minutes), the next (and current) issue was with compiling the mali_osk_timers.c file. This file is very short, but uses the old style (pre-4.15) timer_list. Again, I managed to correct the majority of it (init_timer becomes timer_setup, easy stuff like that), but there is a single bit I cannot figure out how to port (not being a linux guy myself) in the _mali_osk_timer_setcallback function. It deals with too many pointers for my C novice eyes, but hopefully some of you guys can figure it out?

 

This is supposed to to compile to a mali.ko which doesn't need a user space driver when UMP is disabled in the build process, because it will use the kernel's dma_buf driver (which is already enabled in Balbes' kernel), and X should be able to use the driver as is for DRI.

 

It would be really great if you fine folks could help me port this driver!

 

Thanks,

 

Hugo

 

 

 

Link to comment
Share on other sites

hI balbes150, Do you know which is the perfect edition of Armbian Linux to below device? this is a popular device in the forum for Armbian Linux in CHINA.

 

However its wifi and the Bluetooth driver is not working good right now, and the wireless lost connection occasionally without any noticed reason.

 

Hardware NAME: Phicomm N1

CPU: Amlogic S905D, ARM Cortex-A53, Quad Core 2GHz

GPU: ARM Mali™-450, 4K@60fps Hardware acceleration support, HDMI 2.0

RAM: K4B4G1646E, DDR3-1866MHz 512MB*4=2GB

ROM: KLM8G1GEME, 8GB eMMC

Port: 1*HDMI 2.0; 2*USB2.0; 1*Gigabit Ethernet

Power Adapter: Input 110-240V~50/60Hz AC; Output 12V/2A DC

Ethernet(LAN): RTL8211F Gigabit Ethernet

WIFI/Bluetooth: CYW43455 (same as Raspberry Pi 3B+) 2.4G/5G WiFi IEEE 802.11n/ac with Integrated Bluetooth 4.1

Wireless Datasheet:

http://www.cypress.com/documentation/datasheets/cyw43455-single-chip-5g-wifi-ieee-80211nac-macbaseband-radio-integrated

Link to comment
Share on other sites

5 hours ago, Bangliang Shen said:

Do you know which is the perfect edition of Armbian Linux to below device?

I do not have such devices, I do not know what could be the reason and how to fix it. I recommend contacting the manufacturer to send the patch to the mainline kernel.

Link to comment
Share on other sites

..for me also none of the m2m-variants work properly with the provided ffplay. The "best" result was to get the sound playing, but instead of video some kind of multicolored waveform is displayed instead of video content. Mostly I get the segfault too when trying to play with any m2m-option. Without m2m(or other parameter) it works basically(seems to drop some frames..) okay.

Link to comment
Share on other sites

On 12/15/2018 at 4:54 PM, Bangliang Shen said:

hI balbes150, Do you know which is the perfect edition of Armbian Linux to below device? this is a popular device in the forum for Armbian Linux in CHINA.

 

However its wifi and the Bluetooth driver is not working good right now, and the wireless lost connection occasionally without any noticed reason.

 

Hardware NAME: Phicomm N1

CPU: Amlogic S905D, ARM Cortex-A53, Quad Core 2GHz

GPU: ARM Mali™-450, 4K@60fps Hardware acceleration support, HDMI 2.0

RAM: K4B4G1646E, DDR3-1866MHz 512MB*4=2GB

ROM: KLM8G1GEME, 8GB eMMC

Port: 1*HDMI 2.0; 2*USB2.0; 1*Gigabit Ethernet

Power Adapter: Input 110-240V~50/60Hz AC; Output 12V/2A DC

Ethernet(LAN): RTL8211F Gigabit Ethernet

WIFI/Bluetooth: CYW43455 (same as Raspberry Pi 3B+) 2.4G/5G WiFi IEEE 802.11n/ac with Integrated Bluetooth 4.1

Wireless Datasheet:

http://www.cypress.com/documentation/datasheets/cyw43455-single-chip-5g-wifi-ieee-80211nac-macbaseband-radio-integrated

 

Hi Shen

 

I have N1 and also from China. Here's the solution for N1 bluetooth & network-fix(kernel 4.18)

 

https://www.right.com.cn/forum/thread-353806-1-1.html

 

N1 dtb file

 

https://github.com/yangxuan8282/phicomm-n1/releases/download/dtb/meson-gxl-s905d-phicomm-n1.dtb

 

BT,with my experience,the Armbian 5.44 kernel 3.14-20180729(use balbes150's original dtb) works very well with phicomm-N1

 

Cheers

Link to comment
Share on other sites

10 hours ago, Constantin Piffer said:

Hi, I got the software, but now I got this failure. Any explenation?

Hi, as I could read in your log-text: "[18:12:07 469][HUB4-2][Inf]--Device is removed" it seems your cable is buggy, your USB doesn't provide enough power or something else with connection is wrong. Maybe try all other usb ports and if you don't succeed another cable. The behaviour of the tool is sometimes a bit odd: I got two identical Thinkpads but on one any Flashing just works with one USB3-port, but on the other it works only with the usb2 port on the other side of board. In normal operation on both laptops I got no problems with usb devices on all ports. So try out all combinations of ports, ideally without an external hub(for me it stopped often while burning using a hub-direct connection worked)...

Link to comment
Share on other sites

For stable eth in kernel 4.19, I had to apply patch below:

 

--- meson-gxm-q200.dts    2018-12-19 21:26:56.048662939 +0800
+++ meson-gxm-q200-1.dts    2018-12-19 10:58:32.639104759 +0800
@@ -1197,7 +1197,7 @@
         ethernet@c9410000 {
             compatible = "amlogic,meson-gx-dwmac", "amlogic,meson-gxbb-dwmac", "snps,dwmac";
             reg = <0x0 0xc9410000 0x0 0x10000 0x0 0xc8834540 0x0 0x4>;
-            interrupts = <0x0 0x8 0x1>;
+            interrupts = <0x0 0x8 0x4>;
             interrupt-names = "macirq";
             status = "okay";
             clocks = <0xf 0x24 0xf 0x4 0xf 0xf>;

Link to comment
Share on other sites

Hello,

 

I've recently got Armbian running from the SD card using these methods, but my device (MXQ PRO, S905X) does not boot into Android when the SD card is not present.  It waits at the Amlogic logo and does nothing.  I've tried booting into recovery mode (toothpick method, bootable SD card) but nothing works.  Any ideas?

 

Thanks!

Link to comment
Share on other sites

I am running latest armbian 5.67 kernel 4.19.7.

I was looking for some backup software to backup apps, in case of reinstalling the image.

I've found Apt-clone, which has only cli interface, and Aptik, which has cli and gtk ui.

It looks like Aptik has far more options to pick, at least on the pictures, and it's gtk version is far better than apt-clone.

Thing is, this gtk version is armhf architecture, it is available in repositories, but it gives me a message that my system can become unusable if install it.

It says it will remove one essential package(apt), and 13 other that also look like they are important, armbian-config is one of them, so i am scared to install this.

Anyone tried it, did it broke the system?

Link to comment
Share on other sites

Sorry... I just did the instructions on the first post on this thread.  Burned image to SD card, updated through the Update app, etc.  I used Armbian_5.67_Aml-s9xxx_Debian_stretch_default_4.19.7_20181218.  For Armbian everything worked fine, and I'm also able to boot other things from SD card (LibreElec works) but it won't boot from internal flash when I take the SD card out,  and I can't get it into recovery mode.  I didn't have to change the dtb file...default worked fine.  Thanks!

Link to comment
Share on other sites

2 hours ago, Tommy21 said:

I am running latest armbian 5.67 kernel 4.19.7.

I was looking for some backup software to backup apps, in case of reinstalling the image.

I've found Apt-clone, which has only cli interface, and Aptik, which has cli and gtk ui.

It looks like Aptik has far more options to pick, at least on the pictures, and it's gtk version is far better than apt-clone.

Thing is, this gtk version is armhf architecture, it is available in repositories, but it gives me a message that my system can become unusable if install it.

It says it will remove one essential package(apt), and 13 other that also look like they are important, armbian-config is one of them, so i am scared to install this.

Anyone tried it, did it broke the system?

just backup you config /home/username... It's pointless backup .deb packages.

Link to comment
Share on other sites

46 minutes ago, Greenhatguy said:

Sorry... I just did the instructions on the first post on this thread.  Burned image to SD card, updated through the Update app, etc.  I used Armbian_5.67_Aml-s9xxx_Debian_stretch_default_4.19.7_20181218.  For Armbian everything worked fine, and I'm also able to boot other things from SD card (LibreElec works) but it won't boot from internal flash when I take the SD card out,  and I can't get it into recovery mode.  I didn't have to change the dtb file...default worked fine.  Thanks!

You didn't write what TV box model.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines