[How To] Install run Manjaro ARM on Amlogic TV Boxes with S922X - S905X3 SOC

Does it run on Gt King Pro without kernel panic or not?
Kernel version in the package list is linux-vim 5.9.0-2, where and how did you get linux-5.9.12-3 kernel.

It will work but fail with kernel panic.

This package is linux-vim which is build from balbes kernel branch.

This is upstream linux kernel with patches for supported boards

You can install it using sudo pacman -S linux linux-headers
Incase headers are needed.
Source for the same can be found on our git.

Hi Darkstar,

Kernel Panic still persist even Beelink latest firmware update 914P0 on mainline kernel. As far as I know, the linux-5.9.13-1 (sound working on GT King Pro on this kernel) is available to Manjaro Stable Branch Update (2020-12-16). In my case if I want to change kernel in the same Manjaro branch I use “pacman gui” to install the kernel.

Hi Darkstar,

I might have accidentally found a solution for GT King Pro kernel panic on mainline kernel. I am now on Manjaro_ARM-VIM3-XFCE release 20.12 but with linux-vim 5.10.1-1 and a new u-boot.ext from LibreElec for_linux-vim-5101.tar — Yandex.Disk . With this new u-boot.ext the kernel panic on GT King Pro with Mainline Kernel 5.10.1-1 seems to be resolved at least so far I have tested where with the old u-boot.ext it always causes kernel panic on GT King Pro. Please do Manjaro arm on Tv box?.

Since you have GT King Pro, if you can confirm with this new u-boot.ext from LibreElec also resolved kernel panic on your device and also to try it out on Debian/Ubuntu especially with kernel 5.10 built to see whether it is a universal solution. Look forward to input and new mainline kernel built.

Dear Spikerguy!

Thanks for your great work! I have followed the instructions above with my GT King rev. A and had the following results (Image Manjaro-ARM-kde-plasma-vim3-22-11-2020.img; balenaEtcher, 32Gb sd card)

  • I could boot from sd card without problems. I did not check all features, since I wanted to have the box as a smart home server
  • I tried to flash the installation of the sd card with the included script “install-aml-emmc.sh”. The installation ran up to “Copy USR” and stuck their
  • I tried the installation again, but it stuck at the same point even waiting for few hours
  • I booted again from the sd card and could mount the emmc partition and see the complete folder structures. I have checked carefully the boot data and all files are in
  • When I tried to run the installation from emmc with connected monitor it shows simply a black screen with no messages.
    I have been trying to run “Manjaro-ARM-kde-plasma-vim3-22-11-2020.img” and “GTKingPro_Debian-xfce-buster_Linux-4.9_arm64_SD-USB_V0.8.4-20200513” from the emmc with no success. Both worked fine out of the sd card.
    Do you have a idee, what am I doing wrong?
    Thanks

Yes,

The image is old and GtKing devices cause kernel panic when data transfer is heavy which is causing the device to get stuck.

If you want to use Manjaro on emmc then erase everything on emmc by formatting the emmc and dd the gt king pro mainline uboot image onto the emmc card.
For that you can flash the mainline uboot version image on sd and start the os and then copy thr same image to sd and flash it manually to the emmc.

I hope you understand what I mean.
Gt king pro image can be found here

Damned, completely missed this tutorial, as I was only watching the other thread.

Hopefully I’ll manage to get this going on my second X96 Air P3 (S905X3) once I finally find the time to dive in (my first X96 Air P3 is running CoreELEC in my home cinema, the second unit was supposed to be used as general purpose home server, but I held off so far because of conflicting info with mainline kernel, various DTBs and missing gigabit ethernet support).

Anyway, thanks for all the hard work put into this for making it work. There is just no cheaper way to a machine with this kind of capabiltities! :+1:

Dear spikerguy!

I have downloaded the indicated image and installed it onto the sd card. I could not find the appropriate dtb file for GT KING. I have used those dtb’s, which ran with the “Manjaro-ARM-kde-plasma-vim3-22-11-2020.img” successfully, but did not work. Which dtb file would you recommend?
which kernel version is used in Manjaro-ARM-kde-plasma-gtking-pro-Mainline.img.xz?
I have modified my script in order to follow your recommendation above, where uboot.bin is the uboot file from the image Manjaro-ARM-kde-plasma-gtking-pro-Mainline.img.xz. Is that the way it is supposed to be?

Thanks for your reply!

#!/bin/sh
if [ ! -f /boot/uboot.bin ] ; then
echo “Not found new u-boot /boot/uboot.bin !!! Stop install !!!”
exit 1
fi

echo “Start script create MBR and filesystem”

DEV_EMMC=/dev/mmcblk1

echo “Start backup u-boot default”

dd if="${DEV_EMMC}" of=/boot/u-boot-default.img bs=1M count=4
dd if=/dev/zero of="${DEV_EMMC}" bs=512 count=1
echo “Start create MBR and partittion”

parted -s “${DEV_EMMC}” mklabel msdos
parted -s “${DEV_EMMC}” mkpart primary fat32 4M 132M
parted -s “${DEV_EMMC}” mkpart primary ext4 133M 100%
echo “copy mainline u-boot”

dd if=/boot/uboot.bin of="${DEV_EMMC}" conv=fsync bs=1 count=442
dd if=/boot/uboot.bin of="${DEV_EMMC}" conv=fsync bs=512 skip=1 seek=1
sync

echo “Done”

echo “Start copy system onto eMMC.”

Sorry dear, I cannot understand your situation here.

If you try to install using install script then it will fail with kernel panic because it have kernel panic issue when transferring big files.

I informed you to erase the emmc so Mainline Uboot Image can boot once you have Mainline uboot image running on sd card then you can copy the same .img file to sd card from a different computer then boot into the sdcard mainline uboot os again and flash the copied .img to emmc using dd command then it will be able to boot from emmc.

If you want to use Linux on eMMC then just use Mainline uboot and as I mentioned above you will need to erase emmc of Android for the Mainline uboot image to boot.

I am not sure if you will be able to get this as it is a bit confusing with Amlogic devices.

Dear Spikerguy!
Thanks for your reply!
I am sorry, but I was really confused!
I did not understand clearly the described steps above.
Now I understood the following

  • Boot from sd card with the installtion of the img “Manjaro-ARM-kde-plasma-vim3-22-11-2020.img” and erase all partitions on emmc of GT King. No partitions shall be created.
  • Copy the file Manjaro-ARM-kde-plasma-vim3-22-11-2020.img onto the sd card above
  • Boot again with same sd card
  • dd if=…/Manjaro-ARM-kde-plasma-vim3-22-11-2020.img of=/dev/mmcblk0
  • Update extlinux.conf with the right dtb
  • Reboot without sd card!!
    Is my understanding correct now?

Thanks for your support!

Copy the mainline image to the sd card before erasing the emmc cause once you erase then you need to flash the fresh image on the emmc.

Let me break it down for you.

  • Boot from sd card with the installtion of the img “Manjaro-ARM-kde-plasma-vim3-22-11-2020.img” and erase the emmc.
  • Flash Manjaro Mainline gt king pro image on sd card.
  • Boot into sd card with mainline image. Test if everything works, Copy the mainline gt king pro image on the sd card.
  • Flash the mainline gt king pro image to emmc drive using dd command. dd if=…/Manjaro-ARM-kde-plasma-mainline-image-name.img of=/dev/mmcblk0 status=progress please use the correct file name and mmcblk.
  • Update extlinux.conf with the right dtb in emmc Boot partition.
  • Reboot without the sd card and it should boot into fresh os from emmc.

Hope this helps.

I have explained it in Beelink forum.
http://bee-link.com/forum.php?mod=viewthread&tid=70933&extra=page%3D1
Check this out.

Thanks a lot spikerguy! I think I have now the right understanding. In the beginning I understood that the native uboot on the emmc was the cause of the probem. I will give the procedure above a try!
Could you once boot GTKingPro_Debian-xfce-buster_Linux-4.9_arm64_SD-USB_V0.8.4-20200513 (Your image from beelink forum) out of the emmc?

Hi GILL,

To avoid Kernel Panic on GT King or GT King Pro download this new u-boot.ext from this link for_linux-vim-5101.tar — Yandex.Disk. It so far works on my GT King Pro (Manjaro-ARM-VIM3-XFCE on linux-vim 5.10.1-1 kernel) without kernel panic on mainline kernel.

Replace the u-boot.ext from Manjaro-ARM-kde-plasma-vim3-22-11-2020.img with this new u-boot.ext you just downloaded. With this new u-boot.ext, hopefully, it resolved the kernel panic issue on your GT King, that is, if you want to continue to boot from SD Card (I have only tried it on USB Flash).

Thanks JFL!
I can boot from SD with no issues, but I failed to install Manjaro to the emmc.
I tried again with dd if=/image as described above, but GT King stuck during execution.

When you say your are stuck, do you mean your system freezes during the installation into emmc? If it freezes it most likely the kernel panic issue. With the linux mainline kernel on GT King or GT King Pro.

The new u-boot.ext might resolve the kernel panic issue so that you can complete your installation on emmc without the kernel panic/freeze.

Thanks! I will give it a try.

Finally I managed to boot and to condcut the dd command until the end
Now I need to modify the dtb file name in extlinux. When I try to mount
mount /dev/mmcblk0p1 /mnt
I get
mount: /mnt/: special device /dev/mmcblk0p1 does not exist
Even I can see the device with fdisk

Disk /dev/mmcblk0: 57.6 GiB, 61865984000 bytes, 120832000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa358f736

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 32768 524287 491520 240M b W95 FAT32
/dev/mmcblk0p2 524288 10084351 9560064 4.6G 83 Linux

I tried to refresh the drives table with sys/class/mmc_host
After reboot blach screen and reboot from SD card not possible. I still have no clue, why it does’t work out of the emmc.

Thanks a lot for your support JFL and Spikerguy!

1 Like

If you’re using kde then you should be able to see BOOT_MANJARO twice on the left bar inside dolphin file manager.

So the new u-boot.ext from LibreElec seems to resolve the kernel panic on GILL’s GT King too. Great,

GT King could not reboot after the dd has finished.GT King was broken and I had to open the box ,bridge the boot pins and reflash android on it.
In the moment I can not see how to install a bootable Linux on the emmc. I have tried a lot of things, but no success. In the past I managed to install debian on H96 Pro+ (Amlogics912) in few hours. When I repeat the same procedure on GT King it does’t work.

I could boot on GT King debian and manjaro out of the sd, when I copy the installation onto emmc (It does’t matter how), then GT does’t boot from emmc or does’t boot from emmc and sd anymore.
I installed CoreElec on emmc and all is fine. I guess CoreElec is overwriting the native bootloader of GT King with its own.
I guess it is related to the native bootloader, but I have no clue, why it is not working with emmc.

I have just found this explanation for the problem [Posts by darkstar - LibreELEC Forum]