Jump to content

Armbian for Amlogic S912


chocho

Recommended Posts

Hi,

First I want to say thanks for this amazing project.

Also English is not my native language, so please excuse me for misspell :)

 

Last week I received my shiny new Beelink GT1 with Amlogic S912 CPU.

And now I have a itching in my hands to break it.

 

So I forked @150balbes repo and start messing with it.

Dowloaded original firmware from here:

https://mega.nz/#F!bIVGFaKY!Om3XTxlHmjPB4x2_jukFYw

 

Extracted original device tree and kernel config (attached below) and after little tuning I was able to build a Ubuntu 16.04 CLI image (only build, not tested)

I use a LibreELEC linux-amlogic repo.

 

But there is still some problems to solve and I will appreciate any help for them.

 

1. Where to put this device tree and in which config to address it

2. How to fork original boot.img, so the device to boot from sd card

 

Still didn't open the device, but of course it is a matter of time

 

Thanks!

gxm_q201_2g.zip

Link to comment
Share on other sites

You can try this option. To record to external media the version of Ubuntu that You have collected. To copy the dtb file from Your firmware to the media with the name "dtb.img" onto the FAT partition. To activate the multi-boot TV box. Try to start the system from external media. To include directly in the way of Your data (dtb and the kernel configuration), you need to make changes in build scripts.

Link to comment
Share on other sites

Thanks for the tips.

Unfortunately I can't make it boot from SD.

Can you tell me for changing boot.img it's need to be the original Android forked one or can be a compiled from Amlogic u-boot source.
And if is the second how can I transform u-boot.bin to boot.img

Thank you again!

Link to comment
Share on other sites

It looks nice device but its a bit expensive for buying just like that with purpose to (maybe) support it. And we usually need two devices, that the load is spread.

 

When we first talk about, I added it to my Amazon wish list and if somebody buys it for us, than we would start digging and it gets a chance to become a supported device. Unfortunately Amazon.de is currently out of stock  :P

Link to comment
Share on other sites

@tkaiser, I'm interested in helping in this effort. How Armbian see the possibility to fully support GT1? It is a special hardware!

 

I think S912 boxes become support sooner or later but I'm personally not that much interested in it since I miss the use cases. Number crunching on TV boxes comes to my mind but that's nothing I'm interested in. I will go this route instead.

 

BTW: based on Jean-Juc's unboxing pictures I don't believe you get any decent 'octa-core performance' out of such S912 TV boxes unless you open the enclosure and mount a large heatsink + fan.

Link to comment
Share on other sites

I think that the Beelink GT1 and the "branded variants" will probably become popular.

Personally, the Beelink GT1 looks interesting because of the 8 64-bit cores at 2GHz.

I could live with "unboxing" it and adding a large heatsink. I would not like fan noise, though, so it would have to go in a different room from where I normally am.

My use case would be a personal compile-farm (perhaps using distcc, perhaps using something more recent, suggestions welcome).

-But if Thomas recommends not to buy a box, it's certainly worth listening - I speak from experience! ;)

Any Marvell Armada based board is worth considering (how I wish I had a 8040 based board with a 88SE9230 RAID controller, 4GB+ RAM, multiple independent GMACs, free PCIe slots plus a bunch of "fun"-ports).

 

Some of you know that I do not have any Intel-based computers or systems. I do, however have a few PowerMacs and a PowerBook G4. In addition, I have a Cubieboard2 and a Lamobo-R1. (The Lamobo could probably be used for cluster compiling too - I should probably use it for that, as a Redis database is not the most important thing at the moment).

I've been working the past 3 days on getting a 64-bit Linaro toolchain to build on my Cubieboard2, because this time, I want to *know* that I can build Linux before I buy a box. It does not cost anything to build an image (even if it doesn't work), however purchasing a box without being able to put anything on it is kinda waste of money.

 

Back to the topic...

Armbian has been built for Odroid C2, which is S912 based. That means it might be a timesaver to look at those files (I'm absolutely no expert here).

Link to comment
Share on other sites

I have tested GT1 under extremely load cases and it is the best hardware and thermal design I've seen so far. I'm highly interested in helping Armbian support GT1.

 

@tkaiser, can you help me with steps to help it go faster?

Link to comment
Share on other sites

Personally, the Beelink GT1 looks interesting because of the 8 64-bit cores at 2GHz.

 

Please be careful, it has been discovered that all recent Amlogic Cortex-A53 SoCs report wrong cpufreq (everything above 1.5 GHz was reported wrongly by kernel), then I just have some doubts about octa-core devices in general and especially TV boxes but @lvmc seems to be confident so let's see what happens. BTW: ODROID-C2 is based on S905 and not S912.

 

@tkaiser, can you help me with steps to help it go faster?

 

Nope, since I never got into details regarding Amlogic SoCs (just did some measurements after others did the hard work). Better ask @balbes150 and @Igor.

Link to comment
Share on other sites

Attention: 200 pieces S912 TV box for $50 each including shipping

Certainly a low price, and the best offer compared to any S912 box on eBay. If I had the money, I'd order one right now. :)

 

For those, who wants to see these and other S912 based boxes (those I mention have 2GB RAM and GMAC; fortunately, it seems that boxes with less won't really sell anymore)...

I think it's very likely that these boxes contain the same hardware for several reasons:

1: Amlogic provides a development board, which the designers often use as a base design.

2: Changing to a different Ethernet PHY would probably be too expensive, than duplicating the reference design.

3: A/V, S/PDIF/USB2/HDMI support are CPU on-chip features; Amlogic provides drivers for those, so it'd be stupid to add some custom chips for this (unless using high-end sound via I2S, but that's not likely.

-So if an Armbian image becomes available but not for the box you've chosen, try and see if it works anyway. ;)

 

However, some designers may take the step anyway; some may implement NAND instead of eMMC, some may pick a different WiFi module, etc...

 

I've seen the beelink GT1 on eBay for £46 and $56.

The MECOOL BB2 (£43 ≈ $55) box also looks interesting (both KM8 and BB2 has A/V-out in addition to the GT2's spec, which in my opinion adds some value to the box; it can be used as a HiFi-box when it's retiring).

BB2 has the external antenna, which might also be a good thing.

Intbox i8 has both external antenna and A/V out like BB2, but it adds a 7-segment clock display on the front.

Somehow I like this idea with a network-synchronized clock.

"ARM Cortex-A powered alarm clock". Hmm.

 

I just wonder why the GT1 does not have 3 USB-ports (on the PCB, you can hack your own extra USB2 port easily by soldering the 4 wires).

 

Orow T95Z ($60 ≈ £47) looks cool, two USB2 ports, network, S/PDIF, MicroSD, HDMI, A/V-out, clock.

No external antenna, though, but I think I would be able to live without that one, as I'd prefer wired connections anyway.

I do not know if a flying squirrel is included in the price.

 

See these and other kinds of S912 based TV-boxes on eBay.

 

If you see a box for less than $25, it's just a hoax.

You can try purchasing it, you will have your money refunded if it does not show up after a month (I tried that 3 times).

 

-Note: There's also Amazon and others; just because I use eBay does not mean that you have to. ;)

BM8 seems to be a branded KM8, so does Yoka KB2.

There are also branded variants of beelink GT1 (same size, different print, same demo-pictures).

Oh, by the way, a "flying squirrel" means "air mouse".

Link to comment
Share on other sites

I just saw there is a error in building u-boot

  x Building board/amlogic/gxm_q201_v1/bl21.bin                                                                          x
  x   CC      serial.c                                                                                                   x
  x   CC      bl21_main.c                                                                                                x
  x   CC      timer.c                                                                                                    x
  x   PP      bl21.ld.S                                                                                                  x
  x   AS      bl21_entrypoint.S                                                                                          x
  x   LD      /opt/fork-lib/sources/u-boot-beelinkgt1/master/build/board/amlogic/gxm_q201_v1/firmware/bl21.elf           x
  x   OD      /opt/fork-lib/sources/u-boot-beelinkgt1/master/build/board/amlogic/gxm_q201_v1/firmware/bl21.dump          x
  x   BIN     /opt/fork-lib/sources/u-boot-beelinkgt1/master/build/board/amlogic/gxm_q201_v1/firmware/bl21.bin           x
  x                                                                                                                      x
  x Built /opt/fork-lib/sources/u-boot-beelinkgt1/master/build/board/amlogic/gxm_q201_v1/firmware/bl21.bin successfully  x
  x                                                                                                                      x
  x make clean                                                                                                           x
  x make /opt/fork-lib/sources/u-boot-beelinkgt1/master/build/scp_task/bl301.out                                         x
  x        CC user_task.o                                                                                                x
  x        CPP user_task.lds                                                                                             x
  x        CPP task_entry.s                                                                                              x
  x        CC uart.o                                                                                                     x
  x        CPP misc.s                                                                                                    x
  x        CC suspend.o                                                                                                  x
  x        CC dvfs.o                                                                                                     x
  x        CC lib/string.o                                                                                               x
  x        CC lib/delay.o                                                                                                x
  x        CC misc.o                                                                                                     x
  x        CC task_entry.o
In file included from suspend.c:6:0:
./scp_remote.c: In function 'resume_remote_register':
./scp_remote.c:196:6: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] int tmp = 0;
./scp_remote.c: In function 'ir_remote_init_32k_mode':
./scp_remote.c:209:6: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable]
Makefile:147: recipe for target 'sub-make' failed
[sub-make] Error 2or 2
cc1: all warnings being treated as errors
make[3]: *** [/opt/fork-lib/sources/u-boot-beelinkgt1/master/build/scp_task/suspend.o] Error 1
[ o.k. ] Building deb [ linux-u-boot-beelinkgt1_5.21_arm64.deb ]
dpkg-deb: building package 'linux-u-boot-beelinkgt1-default' in 'linux-u-boot-beelinkgt1_5.21_arm64.deb'
Link to comment
Share on other sites

... and it's in our plan / interest to bring one of those, most likely GT1, directly to our supported list. 

 

@chocho

Which compiler is recommended for this u-boot if any?

Link to comment
Share on other sites

Sorry for the late answer, but my free time is very limited.

To be honest, I used copy/paste of make script from @150balbes u-boot repo.

There is it:

#!/bin/bash

make distclean

export PATH=$PATH:/opt/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin/
export PATH=$PATH:/opt/CodeSourcery/Sourcery_G++_Lite/bin

ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- make  gxm_q201_v1_config
ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- make

And it's compiles without errors, but after uninstall gcc-arm-none-eabi

This is the end result:

Building board/amlogic/gxm_q201_v1/acs.bin
  CC      acs.c
  AS      acs_entry.S
  PP      acs.ld.S
  LD      /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/acs.elf
  OD      /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/acs.dump
  BIN     /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/acs.bin

Built /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/acs.bin successfully

  DEPS    /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21.ld.d
  DEPS    /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21_entrypoint.d
  DEPS    /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/timer.d
  DEPS    /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/serial.d
  DEPS    /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21_main.d
Building board/amlogic/gxm_q201_v1/bl21.bin
  CC      bl21_main.c
  CC      serial.c
  CC      timer.c
  AS      bl21_entrypoint.S
  PP      bl21.ld.S
  LD      /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21.elf
  OD      /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21.dump
  BIN     /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21.bin

Built /opt/Amlogic_u-boot/build/board/amlogic/gxm_q201_v1/firmware/bl21.bin successfully

        CPP user_task.lds
        CPP task_entry.s
        CC task_entry.o
        CC user_task.o
        CPP misc.s
        CC misc.o
        CC uart.o
        CC suspend.o
        CC dvfs.o
        CC lib/string.o
        CC lib/delay.o
        LD /opt/Amlogic_u-boot/build/scp_task/bl301.out
        OBJDUMP /opt/Amlogic_u-boot/build/scp_task/bl301.dis
        OBJCOPY /opt/Amlogic_u-boot/build/scp_task/bl301.bin
9848+0 records in
9848+0 records out
9848 bytes (9.8 kB, 9.6 KiB) copied, 0.0149399 s, 659 kB/s
3764+0 records in
3764+0 records out
3764 bytes (3.8 kB, 3.7 KiB) copied, 0.00593117 s, 635 kB/s
Amlogic img found, use new FIP structure!
Creating "../fip/gxl/fip.bin"
Firmware Image Package ToC:
---------------------------
- SCP Firmware BL3-0: offset=0x4000, size=0xD400
- EL3 Runtime Firmware BL3-1: offset=0x14000, size=0x140D0
- Non-Trusted Firmware BL3-3: offset=0x2C000, size=0xA7F38
---------------------------
ACS tool process done.
11840+0 records in
11840+0 records out
11840 bytes (12 kB, 12 KiB) copied, 0.0181297 s, 653 kB/s
5825+0 records in
5825+0 records out
5825 bytes (5.8 kB, 5.7 KiB) copied, 0.00897931 s, 649 kB/s
../fip/gxl/u-boot.bin build done!

Link to comment
Share on other sites

@balbes150

I've tried multiboot enableed with Universal multi-boot 0.6.

But, It didn't work.(update app and Toothpick both)

My box is T95Z Plus.

I've also built buildroot for S912.

 

PS : I've solved problem.

First, enable kszaq's Libeelec with the Toothpick method.

Second enable balbes150's Universal multi-boot.

Link to comment
Share on other sites

Finally S912(T95Z Pluse) succeeded in booting Linux.



Image source is balbes150's https://yadi.sk/d/lnMowa-Swau3E

I just overwrite dtb.img and Image files.

Check balbes150's comment

Link to comment
Share on other sites

It looks nice device but its a bit expensive for buying just like that with purpose to (maybe) support it. And we usually need two devices, that the load is spread.

 

When we first talk about, I added it to my Amazon wish list and if somebody buys it for us, than we would start digging and it gets a chance to become a supported device. Unfortunately Amazon.de is currently out of stock  :P

 

Ordered 2 x Beelink GT1 today, however not on Amazon. Can sent them to you if you leave me your address via PM

Link to comment
Share on other sites

Yes, of course.

1. Download and burn image Armbian to the media.

2. Using prepared media to activate universal multiboot.

3. Try to start the system from external media without modifications.

If the system cannot start, try to copy the from the directory "dtb" in the root of the FAT partition dtb file with the name "dtb.img". And try to start the system with this file. For tests, recommended you have connected the console UART. This will significantly ease the debugging process, because will be immediately obvious where the error occurs run, will allow you to make adjustments to the testing process (to load the elements of the system separately , without the need of a long process of rebuilding). You can try to use files that have collected garyang (link above in this thread), just remember to rename the kernel Image to zImage.

Link to comment
Share on other sites

And what hinders to try existing images ?

You do not make any changes in the contents of the internal memory and try to start Armbian from SD card.

To capture the image and rename the file s905_autoscript in aml_autoscript (to replace existing). To connect to the TV box and use the toothpicks. At startup the system will attempt to run an external Armbian (without enabling multi-boot).

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