Jump to content

Armbian for Amlogic S912


chocho

Recommended Posts

That would be interesting indeed.

... somewhere (perhaps here) I heard about a recent mali driver code tarball:

TX011-SW-99002-r16p0-00rel0.tgz

https://armkeil.blob.core.windows.net/developer/Files/downloads/mali-drivers/kernel/mali-midgard-gpu/TX011-SW-99002-r16p0-00rel0.tgz

but I don't think it has a driver for S912 (but then I am not familiar with all terms)

balbes150 also mentioned Mali T830 GPU (s912) is not licensed.

 

Link to comment
Share on other sites

Hi everyone !

I have seen that some of you have done an amazing job here, providing support for a proper packaged linux system targeting S912 boards out there.

I may be interested in setuping a H96 pro box (32GB hard drive + 3GB RAM) for my Gitlab runners, and some occasional benchmark related to a software I am developing, that make use of NEON intrisics.

I have two questions :

-Is the H96 pro a good choice for what I am trying to achieve and/or to have fun doing embedded linux (I have no TV) ?

-What linux image would you advise me to use ?

 

I am not yet interested in doing openCL computations on the mali GPU by the way, and probably won't until openCL will offer a compatibility with C++14 (variadic templates, lamda, etc...)

Link to comment
Share on other sites

Is someone able to follow the instructions given at http://openlinux.amlogic.com/wiki/index.php/Arm/Buildroot/buildroot-3.14/buildroot-2017-03-10 ?

The ssh command ask me for a password, so I am stuck right now.

I would like to see if I can build my own mini distribution from scratch with a recent kernel, and all driver support from AmLogic through the builroot project they provide.

Link to comment
Share on other sites

57 minutes ago, gnthibault said:

Is someone able to follow the instructions given at http://openlinux.amlogic.com/wiki/index.php/Arm/Buildroot/buildroot-3.14/buildroot-2017-03-10 ?

The ssh command ask me for a password, so I am stuck right now.

I would like to see if I can build my own mini distribution from scratch with a recent kernel, and all driver support from AmLogic through the builroot project they provide.

 

It seems transition to repo correctly is imminent,  but for now one can still download from

http://openlinux.amlogic.com:8000/download/ARM/filesystem/buildroot-openlinux-20170310.tar.gz

Then one can go from step:

% source buildroot/build/setenv.sh

no password needed.

I am doing this right now...

 

Link to comment
Share on other sites

Thank you @Nofan Tasi I did not understood that this was what you posted earlier. Unfortunately the bandwidth looks extremely limited to download the 1.8GB file, I won't probably be able to get it today.

I'll try to build an image to qemu first, and maybe if I can get my software to compile and run om qemu, I'll buy a S912 TV box.

Link to comment
Share on other sites

I just started to understand. Inside there is such a folder:

buildroot-openlinux-20170310/hardware/aml-3.14/arm/gpu/t83x/kernel/drivers/gpu/arm/midgard

 

Unzip buildroot-openlinux-20170310.tar.gz to /home

A folder is created: /buildroot-openlinux-20170310

 

$ cd ~/buildroot-openlinux-20170310

$ source buildroot/build/setenv.sh

You're building on Linux

Lunch menu...pick a combo:

1. mesongxl_p212_32_kernel49_release

2. mesongxl_p212_kernel49_release

3. mesongxm_q200_32_kernel49_release

4. mesongxm_q200_kernel49_release

5. mesongxb_p200_release

6. mesongxb_p200_32_release

7. mesongxb_p201_release

8. mesongxb_p201_32_release

9. mesongxl_p212_release

10. mesongxl_p212_32_release

11. mesongxl_p230_release

12. mesongxl_p230_32_release

13. mesongxm_q200_release

14. mesongxm_q200_32_release

15. meson8_k200_release

16. meson8_k200b_release

17. meson8b_m200_release

18. meson8b_m201_release

19. meson8m2_n200_release

 

Which would you like? [5] 13

 

(Note: mesongxm_q200 is board on Amlogic S912

Q200:

•   Amlogic S912 CPU

•   2GB DDR3

•   HDMI out x 1

•   TF Card x 1

•   Ethernet 100M x 1, 1000M x 1

•   SDIO WIFI/BT (AP6356S) x 1

•   SPDIF x 1

•   USB hub x 2

•   USB otg x 1

•   EMMC x 1

end Note)

 

#TARGET_BOARD=q200

#BUILD_TYPE=64

#OUTPUT_DIR=output/mesongxm_q200

#CONFIG=mesongxm_q200_release_defconfig

 

#

# configuration written to /home/buildroot-openlinux-20170310/output/mesongxm_q200/.config

#

$ make menuconfig

The buildroot window opens

In the bookmark KERNEL there is such an item

 

[*] amlogic gpu driver git repo │ │

│ │ (r6p1) amlogic gpu branch

 

[*] amlogic gpu driver local

│$(TOPDIR)/../hardware/aml-3.14/arm/gpu

 

I chose package gstreamer1

Started the assembly..

$ make

Let's look :-)

Link to comment
Share on other sites

Ouch, during buildroot build, it looks like one has also to download http://openlinux.amlogic.com:8000/deploy/arc-4.8-amlogic-20130904-r2.tar.gz, which can take some time.

Edit : looks like someone had a spare ;)https://gitlab.com/ember-dev/deploy/blob/master/deploy_ubuntu_14.04.sh :

 

wget https://www.dropbox.com/s/tkvnj4n6klrb3pw/CodeSourcery.tar.gz

wget  https://www.dropbox.com/s/rvved2rwjptibfb/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.gz 

gunzip  gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.gz 

wget https://www.dropbox.com/s/5pn69t7gcthuqf0/arc-4.8-amlogic-20130904-r2.tar.gz

 

Also had to download (and bypass sha256)

wget http://sources.buildroot.net/DirectFB-1.7.7.tar.gz

 

I can share the various buildroot utilities (including buildroot-openlinux-20170310.tar.gz) on amazon if someone is interested.

 

Looks promising anyway, but I have seen that default kernel is 3.14, although 4.9 seems to be included. I'll report my build results when I will be done

Link to comment
Share on other sites

Yes, in order to build without any problems (the fact is that the download from openlinux.amlogic.com is constantly broken), you need to use any tool with the ability to download the following packages of large sizes:

http://openlinux.amlogic.com:8000/deploy/CodeSourcery.tar.gz

http://openlinux.amlogic.com:8000/deploy/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar

http://openlinux.amlogic.com:8000/deploy/arc-4.8-amlogic-20130904-r2.tar.gz

And put them in the folder:

~/buildroot-openlinux-20170310/buildroot/dl

 

Link to comment
Share on other sites

I was finally not able to build:

 

RuntimeError: Bad magic number in .pyc file
/home/tnotargi/projects/S912/buildroot/buildroot-openlinux-20170310/output/mesongxm_q200/build/uboot-next-2015-dev/Makefile:927: recipe for target 'boot.bin' failed

 

How can I debug this, and eventually remove the package that generated the error  ?

Link to comment
Share on other sites

10 minutes ago, gnthibault said:

I was finally not able to build:

 

RuntimeError: Bad magic number in .pyc file
/home/tnotargi/projects/S912/buildroot/buildroot-openlinux-20170310/output/mesongxm_q200/build/uboot-next-2015-dev/Makefile:927: recipe for target 'boot.bin' failed

 

How can I debug this, and eventually remove the package that generated the error  ?

 

 I get similar error when I build in gentoo.

But when I build same way inside a minimal ubuntu chroot all goes fine.

Not sure how to troubleshoot this. Perhaps python 2.7 is required.

If I google "RuntimeError: Bad magic number in .pyc file", I do get a lot of hits.

 Which linux distribution do you use? And which python version?

My gentoo has python 3.6 selected active. The ubuntu chroot has python 2.7 selected active

 PS: I built mesongxl_p212_kernel49.

 

 

Link to comment
Share on other sites

During the compilation, was built a file: mali.ko, Which is placed in the file system /output/target  In folder /lib/modules/3.14.29/kernel/amlogic/gpu

 

gpu r6p1 Installing to target

 

In folder buildroot-openlinux-20170310/output/mesongxm_q200/build created folder /gpu-r6p1

Link to comment
Share on other sites

5 minutes ago, diaamant said:

During the compilation, was built a file: mali.ko, Which is placed in the file system /output/target  In folder /lib/modules/3.14.29/kernel/amlogic/gpu

 

gpu r6p1 Installing to target

 

In folder buildroot-openlinux-20170310/output/mesongxm_q200/build created folder /gpu-r6p1

 

That's nice. It seems 4.9.4 does not provide this module (yet).

Link to comment
Share on other sites

43 minutes ago, gnthibault said:

How can I debug this, and eventually remove the package that generated the error  ?

Run the command "make menuconfig" and remove from the configuration Assembly u-boot. This set of files not needed for normal use for TV boxes. To replace the stock u-boot in the TV box for this option is risky. It probably not support all the features of the TV box (buttons on the remote control and the inclusion of a number of other features of this particular iron TV box).

Link to comment
Share on other sites

Unfortunately, everything is very simple.
The library libmali.so is in the folders at: buildroot/package/opengl/src/lib/arm64/r6p1
There are folders:
m450
m450-x
And there are no folder for T8xx

And assembly buildroot with opengl for S912 is interrupted with the inscription:
cp: cannot stat '/home/buildroot-openlinux-20170310/output/mesongxm_q200/build/opengl/lib/arm64/r6p1//*.so*': No such file or directory

 

For the active use of Linux, the acquisition of S912 seems so far too early ... IMHO

S905x at the moment is the most ..

Link to comment
Share on other sites

@diaamant

If you want to use it as a proper desktop, but what about a headless server ?

I still have many things to learn about embedded linux, but I think I should be able to run at least some scripts, and some of my applications.

I ordered my H96 pro + (3GB RAM /32GB RON / S912) today, just to run ssh, and some continuous integration tests.

Link to comment
Share on other sites

5 hours ago, diaamant said:

Unfortunately, everything is very simple.
The library libmali.so is in the folders at: buildroot/package/opengl/src/lib/arm64/r6p1
There are folders:
m450
m450-x
And there are no folder for T8xx

And assembly buildroot with opengl for S912 is interrupted with the inscription:
cp: cannot stat '/home/buildroot-openlinux-20170310/output/mesongxm_q200/build/opengl/lib/arm64/r6p1//*.so*': No such file or directory

 

For the active use of Linux, the acquisition of S912 seems so far too early ... IMHO

S905x at the moment is the most ..

You could perhaps attempt to continue assembly by linking, say

ln -s m450/libMali.so /home/buildroot-openlinux-20170310/output/mesongxm_q200/build/opengl/lib/arm64/r6p1

I recall I did something similar for S905x.

 

Link to comment
Share on other sites

Hi, I want to thank balbes150 and armbian for the opportunity to install linux on s912 devices.
I've installed armbian 5.27, and run it as a complete webserver, with Nextcloud
I've put it on internal memory with an external HDD that serves as Home partition and no issue so far, except I cannot change settings to static ip, right now I'm on dhcp with ip reserved in router.
All and all, you did a great job!

Link to comment
Share on other sites

23 hours ago, kingul said:

Home partition and no issue so far, except I cannot change settings to static ip, right now I'm on dhcp with ip reserved in router.
All and all, you did a great job!

In Networkmanager edit does not work. I opened in the editor (as root) the file /etc/network/interfaces, changed the settings from DHCP to static, restarted. Now a static address. If you need a graphical system settings, You can use WebMin.

Link to comment
Share on other sites

@kingul Just out of curiosity, what device are you using, 2 or 3GB of RAM ?

I was also interested in installing armbian directly on the emmc memory (32GB on the H96 pro+ I should receive in a few days) have you used the builtin tool from ubuntu to do that ?

Thank you in advance for your help.

Link to comment
Share on other sites

@gnthibault I have 2GB of ram with 32GB rom. (Yoka TV KB2)
First time I tried with nand-sata-install, but it was a bad move, because bootloader was rewritten, I had to restore official image of my device.
After a little search I found /root/install.sh script and it worked perfectly.

@balbes150

I've tried all possibilities but none worked. Every change that I've made in /etc/network/interfaces for static ip was resulting in no ip at all, eth0 didn't wanna start.
Also tried in webmin, same situation, so I figured that may be a bug related to my hardware. I can live with that though.
I didn't try wifi settings because I use only cable.

P.S. I'm using Armbian_5.27_S9xxx_Ubuntu_xenial_3.14.29_server_20170323 image

Edited by kingul
P.S.
Link to comment
Share on other sites

Show your configuration file /etc/network/interfaces

Here is an option that works for me with a static address.

******************************************

# Wired adapter #1
auto eth0
iface eth0 inet static
#dhcp
address 192.168.1.155
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
#    hwaddress ether # if you want to set MAC manually
#    pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838


# Wireless adapter #1
# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually. The below lines are only meant as an example how configuration could
# be done in an anachronistic way:
#
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#address 192.168.0.100
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
#wireless-mode Managed
#wireless-power off

# Local loopback
auto lo
iface lo inet loopback

 

Link to comment
Share on other sites

 

That's my configuration that works. I did some testing again, just to be sure that it wasn't a one time thing.

# Wired adapter #1
#auto eth0
iface eth0 inet dhcp
	allow-hotplug eth0
	no-auto-down eth0
#    address 192.168.10.115
#    netmask 255.255.255.0
#    gateway 192.168.10.1
#dns-nameservers 8.8.8.8 8.8.4.4
#	hwaddress ether # if you want to set MAC manually
#	pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838


# Wireless adapter #1
# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually. The below lines are only meant as an example how configuration could
# be done in an anachronistic way:
# 
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#address 192.168.0.100
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
#wireless-mode Managed
#wireless-power off

# Local loopback
auto lo
iface lo inet loopback


So, after I make changes for static ip, the box starts in almost 3 minutes, but only after I disconnect and reconnect ethernet cable. That's my dmesg output:

[   28.958652] aml_audio_i2s_mute_flag: flag=0
[   28.958674] aml_audio_set_spdif_mute: flag=0
[   28.958687] aml_snd_card: aml_m8_set_spk: aml_m8_spk_enabled=0
[   32.802936] libphy: stmmac-0:00 - Link is Up - 1000/Full
[   64.801664] libphy: stmmac-0:00 - Link is Down
[   66.801605] libphy: stmmac-0:00 - Link is Up - 1000/Full
[   86.421880] brcmfmac: brcmf_sdio_get_fw: fail to request firmware brcm/brcmfmac4335-sdio.txt (-2)
[   86.477075] brcmfmac: brcmf_bus_start: brcmf_sdbrcm_bus_init failed -2
[   86.484371] brcmfmac: brcmf_sdio_probe: dongle is not responding
[   86.507041] sdio: queuing unknown CIS tuple 0x80 (2 bytes)
[   86.512346] sdio: queuing unknown CIS tuple 0x80 (7 bytes)
[   86.515179] sdio: queuing unknown CIS tuple 0x80 (3 bytes)
[   86.619785] sdio: clk 200000000 SDR mode tuning start
[   86.620536] sdio: rx_tuning_result[0] = 10
[   86.621354] sdio: rx_tuning_result[1] = 10
[   86.622086] sdio: rx_tuning_result[2] = 10
[   86.622805] sdio: rx_tuning_result[3] = 10
[   86.622899] sdio: best_win_start =0, best_win_size =4
[   86.622924] sdio: sd_emmc_regs->gclock=0x1000245,sd_emmc_regs->gadjust=0x22000
[   86.622961] sdio: gclock =0x1000245, gdelay=0x0, gadjust=0x22000
[   86.622992] [sdio_reinit] finish
[   87.631238] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x00
[   88.681218] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x00
[  142.006841] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...
[  142.064678] usbcore: registered new interface driver brcmfmac
[  142.082690] bcmsdh_register: register client driver
[  142.083365] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[  142.083430] bus num (host idx)=0, slot num (rca)=1
[  142.083478] found adapter info 'DHD generic adapter'
[  142.083855] sdioh_attach: set sd_f2_blocksize 128
[  142.093954] bcmsdh_sdmmc: Failed to enable F1 Err: 0xffffffc2dhdsdio_probe : no mutex held. set lock
[  144.801212] libphy: stmmac-0:00 - Link is Down
[  146.188723] F1 signature read @0x18000000=0x   5
[  146.188803] dhdsdio_probe: ChipClkCSR access: err 0 wrote 0x28 read 0x00
[  146.188810] dhdsdio_probe: dhdsdio_probe_attach failed
[  146.188819] dhdsdio_probe : the lock is released.
[  146.188824] bcmsdh_probe: device attach failed
[  146.188831] sdioh_probe: bcmsdh_probe failed
[  146.188953] bcmsdh_sdmmc: probe of sdio:0001:2 failed with error -12
[  146.189033] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[  146.801248] libphy: stmmac-0:00 - Link is Up - 1000/Full
[  149.452227] vout_serve: vmode set to 720p60hz

You can see where I disconnect the ethernet cable. Also, don't know how to disable completely the wifi module, maybe it has something to do with it.
 

Link to comment
Share on other sites

Here are the contents of the file, which will allow you to have a static address. Change the highlighted value to the desired ip.

 

#################

# Wired adapter #1

auto eth0
iface eth0 inet static
address 192.168.1.155
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1

 

# Local loopback
auto lo
iface lo inet loopback

 

Link to comment
Share on other sites

I really know how to do this, you will see in my config that static settings are commented out. :)

Don't worry about that, I'm just a particularly case, I can live with that.
Dmesg output is taken after changing to static ip, but man...it takes long to boot.
So, I'll stay with dhcp settings until I'll find out how to completely disable wifi modules without breaking the server.
Thank you again for your work!

Link to comment
Share on other sites

Open the file /etc/module and remove from the run list module Wi-Fi (wifi_dumy). If does not help, additionally insert in the blocking list all the modules that are in the output of the lsmod command is responsible for Wi-Fi.

Link to comment
Share on other sites

@gnthibault I see you're waiting for an H96+ Pro - mind trying a memory benchmark on it? (previous comment)

 

I've managed to get my hands on this device without having to buy it and I'm about to do some testing, having successfully booted with the following dtb file (q912_otg.dtb):

https://mega.nz/#!4VVxiaxL!GpIoviN2diegsmlfovIV2zElfv_eQ6EPXBukSRd58y0

 

I'll be posting benchmark results including memory performance soon. 

 

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