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

Boot up Ugoos AM6 Plus without using chainloader?

1 Like

That is one thing but the screenshot have a better fix.
Hint in screenshot :wink:

mmcblk1 ?

1 Like

Good question :smiley:

i know :slight_smile: On my CoreELEC installation i tried to get rid off the two boot blocks, but that’s impossible i think (and not realy important)

1 Like

Hi @spikerguy,

Noticed new linux-khadas and linux-odroid being released on Unstable-Branch.

Any guides which kernel to use especially for Amlogic TV Boxes? Are there any additional packages need be updated to if we switch to these new kernels?

Two boot blocks, one USB/SD and the other EMMC?

linux-khadas for all amlogic devices expect for odroids.

linux-odroid only for odroid devices.

Nop.

No, he installed the full system into internal flash, no SD/USB needed. Maybe he used the flashtool of CoreELEC/LibreELEC?

2 Likes

No we always had the install-to-eMMC script written by Blabes long back.

I updated it to be used on current setup.

And it have worked on Vim2, Ugoos AM6 plus and soon I will test it on GT king Pro.

Will push it to unstable soon.

3 Likes

@spikerguy,
Can we install the new linux-khadas kernel on existing Manjaro-Arm image using the existing u-boot.ext chainloader?

Yes can be used.

Just an update. Installed linux-khadas-5.15.4-3 to replace linux-5.15.1-3 on Manjaro-XFCE on USB Flash. Boot up with NO issue. Just notice Machine model is listed twice on dmesg.


[jfl@MNJROGTKPRO ~]$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.4-3-MANJARO-ARM-KHADAS (builduser@fh-mjr-build-lon-xlarge) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Tue Nov 23 19:32:14 UTC 2021
[    0.000000] Machine model: Beelink GT-King Pro
[    0.000000] Machine model: Beelink GT-King Pro
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x00000000b8800000, size 896 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool

Before I finished this message, Kernel Panic strike.

First Power Cycle during boot up process suddenly monitor loss signal (most likely kernel panic?). Second power cycle rebooted successfully.

Edit: Reboot from USB Flash does not work just like mainline linux kernel. Reboot to Android. Need to insert a SD Card with Linux to Boot from USB again.

Also dmesg had this error messages:


[    1.804294] blk_update_request: I/O error, dev mmcblk0, sector 64 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[    1.804307] Buffer I/O error on dev mmcblk0, logical block 8, async page read
[    1.845544] hub 1-1:1.0: USB hub found
[    1.846122] hub 1-1:1.0: 4 ports detected
[    1.862398] blk_update_request: I/O error, dev mmcblk0, sector 32768 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[    1.915070] blk_update_request: I/O error, dev mmcblk0, sector 32768 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[    1.915094] Buffer I/O error on dev mmcblk0p1, logical block 0, async page read
[    1.942116] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    1.966685] blk_update_request: I/O error, dev mmcblk0, sector 1081400 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[    1.981976] usb 2-1: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.04
[    1.981991] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.981999] usb 2-1: Product: 4-Port USB 3.0 Hub
[    1.982005] usb 2-1: Manufacturer: Generic
[    2.007649] hub 2-1:1.0: USB hub found
[    2.008420] hub 2-1:1.0: 4 ports detected
[    2.028265] blk_update_request: I/O error, dev mmcblk0, sector 1081384 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
[    2.030277] blk_update_request: I/O error, dev mmcblk0, sector 1081480 op 0x0:(READ) flags 0x80700 phys_seg 15 prio class 0
[    2.030836] blk_update_request: I/O error, dev mmcblk0, sector 1081608 op 0x0:(READ) flags 0x80700 phys_seg 21 prio class 0
[    2.084491] blk_update_request: I/O error, dev mmcblk0, sector 1081488 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[    2.084503] Buffer I/O error on dev mmcblk0p2, logical block 18, async page read
[    2.086764] blk_update_request: I/O error, dev mmcblk0, sector 1081488 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[    2.086776] Buffer I/O error on dev mmcblk0p2, logical block 18, async page read
[    2.088829] Buffer I/O error on dev mmcblk0p2, logical block 18, async page read
1 Like

Yes the linux-khadas seems to kernel panic for me too.

Sad news for GT King Pro using bootscript

Starting kernel ...

uboot time: 12628591 us
[    0.876605] SError Interrupt on CPU0, code 0xbf000000 -- SError
[    0.876620] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 5.15.4-3-MANJARO-ARM-KHADAS #1
[    0.876627] Hardware name: Beelink GT-King Pro (DT)
[    0.876632] Workqueue: events_freezable mmc_rescan
[    0.876649] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    0.876659] pc : slabinfo_write+0x1b0/0x410
[    0.876678] lr : allocate_slab+0x2a4/0x3f4
[    0.876686] sp : ffff800011cd3630
[    0.876688] x29: ffff800011cd3630 x28: 0000000000000000 x27: 0000000000000000
[    0.876697] x26: ffff0000000ac880 x25: 0000000000000000 x24: ffff000005400000
[    0.876706] x23: 0000000000000004 x22: 0000000000008000 x21: fffffc0000150000
[    0.876714] x20: 0000000000000001 x19: ffff000000001800 x18: 0000000000000020
[    0.876723] x17: 0000000000000001 x16: 0000000000000019 x15: 0000000000000000
[    0.876731] x14: 0000000000000002 x13: 00000000000ceac8 x12: ffff800011bba238
[    0.876739] x11: ffff800011bba218 x10: 0000000000000000 x9 : 0000000000000000
[    0.876747] x8 : 0000000000000000 x7 : 0000000000000040 x6 : fffffc0000150040
[    0.876755] x5 : 0000000000000000 x4 : ffff000000000420 x3 : 0000000000000001
[    0.876763] x2 : 000000000000000a x1 : 0000000000000004 x0 : ffff000000000400
[    0.876774] Kernel panic - not syncing: Asynchronous SError Interrupt
[    0.876778] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 5.15.4-3-MANJARO-ARM-KHADAS #1
[    0.876785] Hardware name: Beelink GT-King Pro (DT)
[    0.876788] Workqueue: events_freezable mmc_rescan
[    0.876794] Call trace:
[    0.876796]  dump_backtrace+0x0/0x1cc
[    0.876808]  show_stack+0x18/0x24
[    0.876815]  dump_stack_lvl+0x68/0x84
[    0.876825]  dump_stack+0x18/0x34
[    0.876831]  panic+0x15c/0x32c
[    0.876841]  nmi_panic+0x8c/0x90
[    0.876845] SError Interrupt on CPU4, code 0xbf000000 -- SError
[    0.876848]  arm64_serror_panic+0x6c/0x7c
[    0.876854]  do_serror+0x58/0x5c
[    0.876856] CPU: 4 PID: 284 Comm: systemd-udevd Not tainted 5.15.4-3-MANJARO-ARM-KHADAS #1
[    0.876860]  el1h_64_error_handler+0x30/0x50
[    0.876864] Hardware name: Beelink GT-King Pro (DT)
[    0.876868] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    0.876870]  el1h_64_error+0x78/0x7c
[    0.876876]  slabinfo_write+0x1b0/0x410
[    0.876875] pc : setup_object.isra.0+0x0/0x110
[    0.876883]  new_slab+0x44/0x6c
[    0.876887] lr : allocate_slab+0x2a4/0x3f4
[    0.876889]  ___slab_alloc.constprop.0+0x2d8/0x3a4
[    0.876894] sp : ffff8000123a39e0
[    0.876897] x29: ffff8000123a39e0
[    0.876897]  __slab_alloc.constprop.0+0x30/0x7c
[    0.876900]  x28: 0000000000000000 x27: 0000000001200000
[    0.876905]  __kmalloc+0x308/0x330
[    0.876908] x26: ffff000005430580 x25: 000000000000000b x24: ffff000005430000
[    0.876912]  mmc_mq_init_request+0x3c/0x90
[    0.876917] x23: 0000000000000017 x22: 0000000000003f40 x21: fffffc0000150c00
[    0.876926] x20: 0000000000000011
[    0.876921]  blk_mq_alloc_rqs+0x218/0x290
[    0.876928]  x19: ffff000000007c00 x18: 0000000000000000
[    0.876934] x17: 0000000000000000
[    0.876932]  __blk_mq_alloc_map_and_request+0x54/0xf0
[    0.876936]  x16: 0000000000000000 x15: ffff000000a46f80
[    0.876942] x14: 0000000000000002
[    0.876940]  blk_mq_alloc_map_and_requests+0x4c/0xf0
[    0.876944]  x13: 00000000000ceac8 x12: ffff800011bba1d0
[    0.876951] x11: ffff800011bba1b0 x10: 0000000000000000
[    0.876950]  blk_mq_alloc_tag_set+0xf8/0x260
[    0.876955]  x9 : 0000000000000000
[    0.876958] x8 : 0000000000000000 x7 : 0000000000000040
[    0.876959]  mmc_init_queue+0xac/0x180
[    0.876962]  x6 : fffffc0000150c40
[    0.876966] x5 : 0000000000000000 x4 : 0000000000000000
[    0.876967]  mmc_blk_alloc_req+0xbc/0x33c
[    0.876969]  x3 : 00000000000002c0
[    0.876973] 
[    0.876974] x2 : ffff000000029480 x1 : ffff000005432100
[    0.876976]  mmc_blk_probe+0x88/0x35c
[    0.876978]  x0 : ffff000000007c00
[    0.876984]  mmc_bus_probe+0x24/0x30
[    0.876989]  call_driver_probe+0x2c/0x140
[    0.876997]  really_probe+0xb4/0x370
[    0.877003]  __driver_probe_device+0xf8/0x120
[    0.877009]  driver_probe_device+0x40/0x100
[    0.877015]  __device_attach_driver+0x98/0x130
[    0.877021]  bus_for_each_drv+0x78/0xd0
[    0.877028]  __device_attach+0xd8/0x1b4
[    0.877033]  device_initial_probe+0x14/0x20
[    0.877040]  bus_probe_device+0x98/0xa0
[    0.877046]  device_add+0x318/0x500
[    0.877051]  mmc_add_card+0x12c/0x2c4
[    0.877056]  mmc_attach_mmc+0xf4/0x180
[    0.877064]  mmc_rescan_try_freq+0x160/0x190
[    0.877072]  mmc_rescan+0x168/0x1f0
[    0.877078]  process_one_work+0x1c0/0x344
[    0.877086]  worker_thread+0x68/0x38c
[    0.877092]  kthread+0x120/0x130
[    0.877099]  ret_from_fork+0x10/0x20
[    0.877107] SMP: stopping secondary CPUs
[    0.877116] Kernel Offset: disabled
[    0.877118] CPU features: 0x00003051,00000846
[    0.877122] Memory Limit: none

and this

[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 3
OEM: 5344
Name: SB16G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
mmc clock: 40000000
Bus Width: 4-bit
reading s905_autoscript
930 bytes read in 4 ms (226.6 KiB/s)
## Executing script at 01020000
reading u-boot.ext
** Unable to read file u-boot.ext **
** Bad device usb 0 **
reading uImage
28906048 bytes read in 1568 ms (17.6 MiB/s)
reading uInitrd
8293325 bytes read in 452 ms (17.5 MiB/s)
reading uEnv.ini
243 bytes read in 3 ms (79.1 KiB/s)
## Error: "mac" not defined
## Error: "eth_mac" not defined
reading /dtbs/amlogic/meson-g12b-gtking-pro.dtb
75658 bytes read in 11 ms (6.6 MiB/s)
avb2: 0
ee_gate_off ...
avb2: 0
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   uImage
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    28905984 Bytes = 27.6 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd Image
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    8293261 Bytes = 7.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Start read misc partition datas!
info->magic = 
info->version_major = 1
info->version_minor = 0
info->slots[0].priority = 15
info->slots[0].tries_remaining = 7
info->slots[0].successful_boot = 0
info->slots[1].priority = 14
info->slots[1].tries_remaining = 7
info->slots[1].successful_boot = 0
info->crc32 = -1075449479
active slot = 0
active_slot is normal
load dtb from 0x1000000 ......
      Amlogic multi-dtb tool
      Single dtb detected
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
find 1 dtbos
No androidboot.dtbo_idx configured
And no dtbos will be applied
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x02c11200
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   Loading Ramdisk to 7f017000, end 7f7ffb8d ... OK
   Loading Device Tree to 000000001ffea000, end 000000001ffff83f ... OK

Starting kernel ...

uboot time: 6766818 us
[    0.872261] SError Interrupt on CPU5, code 0xbf000000 -- SError
[    0.872272] CPU: 5 PID: 284 Comm: udevadm Not tainted 5.15.4-3-MANJARO-ARM-KHADAS #1
[    0.872279] Hardware name: Beelink GT-King Pro (DT)
[    0.872282] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    0.872289] pc : __init_rwsem+0x20/0x30
[    0.872304] lr : init_once+0x78/0xa0
[    0.872310] sp : ffff8000131b3790
[    0.872312] x29: ffff8000131b3790 x28: 0000000000000000 x27: 0000000000000000
[    0.872322] x26: ffff000000af8e80 x25: 0000000000000000 x24: ffff000005400000
[    0.872330] x23: 0000000000000019 x22: 0000000000003db8 x21: fffffc0000150000
[    0.872337] x20: ffff000005403160 x19: ffff000005403160 x18: 0000000000000000
[    0.872344] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[    0.872351] x14: 0000000000000002 x13: 00000000000cea2b x12: ffff800011bba1d0
[    0.872358] x11: ffff800011bba1b0 x10: 0000000000000000 x9 : 0000000000000000
[    0.872364] x8 : ffff0000054033d0 x7 : 0000000000000000 x6 : 000000000000003f
[    0.872370] x5 : 0000000000000040 x4 : ffffffffffffffe0 x3 : 0000000000000021
[    0.872377] x2 : ffff800011c79f20 x1 : ffff000005403348 x0 : ffff000005403330
[    0.872386] Kernel panic - not syncing: Asynchronous SError Interrupt
[    0.872389] CPU: 5 PID: 284 Comm: udevadm Not tainted 5.15.4-3-MANJARO-ARM-KHADAS #1
[    0.872395] Hardware name: Beelink GT-King Pro (DT)
[    0.872398] Call trace:
[    0.872399]  dump_backtrace+0x0/0x1cc
[    0.872409]  show_stack+0x18/0x24
[    0.872416]  dump_stack_lvl+0x68/0x84
[    0.872425]  dump_stack+0x18/0x34
[    0.872430]  panic+0x15c/0x32c
[    0.872437]  nmi_panic+0x8c/0x90
[    0.872443]  arm64_serror_panic+0x6c/0x7c
[    0.872447]  do_serror+0x58/0x5c
[    0.872451]  el1h_64_error_handler+0x30/0x50
[    0.872459]  el1h_64_error+0x78/0x7c
[    0.872464]  __init_rwsem+0x20/0x30
[    0.872470]  setup_object.isra.0+0xf8/0x110
[    0.872477]  allocate_slab+0x258/0x3f4
[    0.872482]  new_slab+0x44/0x6c
[    0.872487]  ___slab_alloc.constprop.0+0x2d8/0x3a4
[    0.872493]  __slab_alloc.constprop.0+0x30/0x7c
[    0.872499]  kmem_cache_alloc+0x2b4/0x2d0
[    0.872504]  alloc_inode+0x84/0xdc
[    0.872508]  iget_locked+0xfc/0x26c
[    0.872513]  kernfs_get_inode+0x1c/0x60
[    0.872520]  kernfs_iop_lookup+0x74/0xd0
[    0.872526]  __lookup_slow+0x88/0x150
[    0.872534]  walk_component+0x114/0x1e0
[    0.872539]  path_lookupat+0x78/0x19c
[    0.872543]  path_openat+0x140/0x1cc
[    0.872547]  do_filp_open+0x84/0x134
[    0.872551]  do_sys_openat2+0xb0/0x16c
[    0.872558]  __arm64_sys_openat+0x68/0xb0
[    0.872563]  invoke_syscall+0x48/0x114
[    0.872570]  el0_svc_common.constprop.0+0x44/0xec
[    0.872577]  do_el0_svc+0x24/0x90
[    0.872583]  el0_svc+0x20/0x60
[    0.872588]  el0t_64_sync_handler+0x1a4/0x1b0
[    0.872593]  el0t_64_sync+0x1a0/0x1a4
[    0.872600] SMP: stopping secondary CPUs
[    0.872607] Kernel Offset: disabled
[    0.872608] CPU features: 0x00003051,00000846
[    0.872613] Memory Limit: none

@spikerguy,
Hope you find a solution for GT King Pro.

I have installed Manjaro-ARM-kde-plasma-vim3-20211129.img.xz on a usb3 drive on a AM6B-PLUS box.
I had to use the usb-storage.quirks parameter to boot it.On a usb2disk I tried it worked without the quirks.
I used the meson-g12b-ugoos-am6-plus.dtb
It has AP6275S wifi so I don’t know if it has linuxsupport, but as the cable work OK, it’s not a problem for me. Ethernet works ok with 1Gbit speed.
Looks like the display need some tuning. It works well on hdmi, but the colours are not OK. It has a blue green output.
I had some installation problems, but when I did put an empty sd-card in the sdslot it would boot on the USB OTG port

can you try this command
sudo pacman -S kvim2-firmware

then reboot to see if you have wifi.

Can you share the output of this command:
uname -a

Yes it is using a uboot chainloader which does not allow to boot frm sd-card but it will change soon.

@spikerguy
kvim2-firmware didn’t fix wifi
I still miss firmware:
[ 8.081409] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43752-sdio.ugoos,am6.bin failed with error -2
[ 8.081467] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43752-sdio.bin failed with error -2

uname -a
Linux test-pc 5.15.5-1-MANJARO-ARM #1 SMP PREEMPT Thu Nov 25 11:20:40 UTC 2021 aarch64 GNU/Linux

@hste, @spkierguy,

Based on previous discussion @tripole had to modify Manjaro arm on Amlogic Tv box? - #14 by tripole to get wifi to work on his Ugoos AM6 Plus. Hope this is helpful.

1 Like

I did an upgrade with pacman Syyuu and now have
Linux test-pc 5.15.6-1-MANJARO-ARM #1 SMP PREEMPT Wed Dec 1 13:08:14 UTC 2021 aarch64 GNU/Linux

The blueish screen is still there

[    1.281291] fb0: switching to meson from simple
[    1.281509] Console: switching to colour dummy device 80x25
[    1.329806] meson-dw-hdmi ff600000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[    1.330216] meson-dw-hdmi ff600000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[    1.330513] meson-drm ff900000.vpu: bound ff600000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
[    1.330911] [drm] Initialized meson 1.0.0 20161109 for ff900000.vpu on minor 0

#fbset

mode "1920x1200"
    geometry 1920 1200 1920 1200 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode