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

sound over hdmi ? I have it on AM6 Plus dts, I have never added analog audio to AM6plus dts. Maybe should look into it.

I am testing AM6-Plus dtb on AM6B Plus and I have everything working except the wifi which is expected. I will try to put the wifi firmware and see if it works.

I am testing AM6-Plus dtb on AM6B Plus and I have everything working except the wifi which is expected. I will try to put the wifi firmware and see if it works

So you got sound working with the AM6-plus dtb on AM6B-plus? Strange it never gives me sound out on hdmi when I use it. I also didnā€™t get the HS200 controller detected as HS200 controller for the EMMC on that file .

I checked the frequences emuelec uses on their dtb and they use:
2xA53 2200 4XA73 1800 GPU 850
On https://gadgetversus.com/processor/amlogic-s922xj-specs/ it says:
2xA53 2200 4xA73 1900 GPU 820
So thats what I use, but I donā€™t know the voltage specs so I undervoltage the values from the other dtsi files.
So it would be nice if you could get information on the datasheet for this processor.

1 Like

I didnā€™t test that in hurry to go to bed. I will test it today.

I will check this work the ugoos Team.

What changes did you make for Wi-Fi to work? I tried the firmware it tried to load but fails with some register issue.

I tried the firmware from Libreelec source. Which firmware file did you use?

I just read this thread again and i think youā€™re using boot script method while i used an old am6 image which is using chainloader method which might be making the difference for hs200? Idk i will move the image which you used.

I did a lot of try and fail so donā€™t remember exact what fw-files that is needed. As far as I remember I needed this, but I copied it all over to the brcm firmware catalog and renamed after trying inserting and removing the brcmfmac module looking in the dmesg for the result:

clm_bcm43752a2_ag.blob   ->  brcmfmac43752-sdio.clm_blob
fw_bcm43752a2_ag_p2p.bin ->brcmfmac43752-sdio.ugoos,am6.bin
nvram_ap6275s  -> brcmfmac43752-sdio.ugoos,am6.bin.txt
BCM4362A2.hcd

Can you please share the files which you used as the ones I have is not working for me.

I am going through your dts files and see if I should add the i2c3 node with rtc and es8388. I am still waiting for ugoos to send me the schematic so I am sure I am doing the right thing.

Do you have audio jack working with es8388 node ? I doubt it would.

I added the brcm firmware catalog into the dtbs-share I made. So you could pick the fwfiles you need from there.
I donā€™t think the es8838 is working with the device tree I made so I removed it from my dtb, but kept the clock.

I cannot find the firmware file in this link.

anything else you shared?

It should be there:
https://drive.google.com/file/d/1i_N_HM8dcmnepfzipInDBDJHigqtv055/view?usp=sharing

1 Like

thx for reply @spikerguy, iā€™ve changed dtb from meson-sm1-sei610 to meson-g12a-sei510.dtb or x96-max, now device booting & running well.

Using the botoscript method I have no hdmi audio nor wifi using your files.

so now need to compare what you changed in your dts that made it work.

Update:
Fixed HDMI audio with am6-plus.dtb and opened my device to make sure whether I have the same AP6275s wifi chip and it is there but still it doesnā€™t seem to work.

Update:
Fixed HDMI audio with am6-plus.dtb

Nice that you got the HDMI audio working.
I found that there was something wrong with usb with my dts file so I copied in the usb settings from the original am6 dts. I removed the es8388 and some khadas vim3 stuff. I have now 2 dtb files one with the cpu freq from s922x and one with higher clock based on s922x-j
dtbs am6b 12.01

1 Like

Can you be more specific so I can look into it.
I am trying to find why wifi is not working.

Wifi response:

[spikerguy@spikerguy-pc ~]$ sudo dmesg | grep brcm
[sudo] password for spikerguy: 
[    5.274312] brcmfmac: brcmf_chip_recognition: SB chip is not supported
[    5.275248] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!
[    5.281923] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed
[    5.282008] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...
[    5.295164] usbcore: registered new interface driver brcmfmac
[    5.963082] Bluetooth: hci0: BCM4362A2 'brcm/BCM4362A2.hcd' Patch
[spikerguy@spikerguy-pc ~]$ 

Using files from you and also libreelec sdio source.

I used the usb variables from the khadas-vim3. Booting on usb worked ok but if booting from sdcard it didnā€™t detect the usbdisk that was in the usbslot . Had to take it out and in again to get the disk detected. When using the usb variables for am6.dts the disk is recognized at boottime even wen booting from sdcard.

I donā€™t know why wifi will not work for you, but for me I get:

    5.869143] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43752-sdio for chip BCM43752/2
[    5.869475] usbcore: registered new interface driver brcmfmac
[    6.122240] Bluetooth: hci0: BCM4362A2 'brcm/BCM4362A2.hcd' Patch
[    6.281298] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43752-sdio for chip BCM43752/2
[    6.522104] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43752/2 wl0: Dec  4 2019 01:55:28 version 18.35.387.11 (wlan=r853831) FWID 01-ae9dfd3b

Which USB ? is it the OTG usb ? Do you have something in usb that is stopping it frm booting ?
I cannot understand the use case here. Currently I am typing from Ugoos AM6B Plus.

the wifi6 blob is causing mmc spam

Which kernel are you using ? I am on linux-khadas

Now on linux

[spikerguy@spikerguy-pc ~]$ sudo dmesg | grep brcm
[    4.940356] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43752-sdio for chip BCM43752/2
[    4.940453] usbcore: registered new interface driver brcmfmac
[    5.324843] Bluetooth: hci0: BCM4362A2 'brcm/BCM4362A2.hcd' Patch
[    6.189383] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[    7.199395] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

Now I will try your files

5.15.11-1-MANJARO-ARM, without problems. I had the same errors when I was using orginal am6.dts files. It was because the HS200 controller wasnā€™t recognized. I think it was something with max freqency variable was to low. I used the variables from khadad and got HS200 controller recognized and the the error messages was gone

/* eMMC */
&sd_emmc_c {
	status = "okay";
	pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
	pinctrl-1 = <&emmc_clk_gate_pins>;
	pinctrl-names = "default", "clk-gate";

	bus-width = <8>;
	cap-mmc-highspeed;
	mmc-ddr-1_8v;
	mmc-hs200-1_8v;
	max-frequency = <200000000>;
	disable-wp;

	mmc-pwrseq = <&emmc_pwrseq>;
	vmmc-supply = <&vcc_3v3>;
	vqmmc-supply = <&emmc_1v8>;
};
1 Like

Yes it if I have a disk in the OTG-port without boot partition or if I have a usb-bootdisk which mount the root partition from sdcard. When the system boots up it will not detect /dev/sda. I have to take out the stick wait and plug it in again to be detected. That was with my old dtb. With my new dtb that works ok

What is the last version that is capable of being installed to the emmc? Or is there a noobs guide for the workaround?

Hello and welcome to the forum,
Which device are you asking about ?

S905, which uses the gxbb_p201 dtb. The latest release boots fine on this box, but I really want to get internal install working again.

Hi, updated guide would be awesome, especially for noobs!
Iā€™m also struggling with running recent builds on my am6+ eMMC (s922xj), sdcard is fine though.
Tried lastest stable (21.12) and dev (Manjaro-ARM-gnome-vim3-20220117).

My steps:

  • Flash image to sdcard, change dtb_name=/dtbs/amlogic/meson-g12b-ugoos-am6-plus.dtb in uEnv.ini
  • Boot from SD card, sync time, run sudo /boot/install-aml-emmc.sh
  • Mount emmc boot, change bootargs root to PARTUUID of eMMC ROOT partition (can be taken from script output). In latest DEV build itā€™s already correct
    And that gives me just black screen without sdcard, good it still boots from sdcard if inserted

Install script output:

ļ€£ ī‚° desperex@ugloos-manjaro ī‚° /boot ī‚° sudo ./install-aml-emmc.sh
Start script create MBR and filesystem
/dev/mmcblk1
Start backup u-boot default
4+0 records in
4+0 records out
4194304 bytes (4,2 MB, 4,0 MiB) copied, 0,0970369 s, 43,2 MB/s
1+0 records in
1+0 records out
512 bytes copied, 0,000806747 s, 635 kB/s
Start create MBR and partittion
Start restore u-boot
442+0 records in
442+0 records out
442 bytes copied, 0,00882417 s, 50,1 kB/s
8191+0 records in
8191+0 records out
4193792 bytes (4,2 MB, 4,0 MiB) copied, 0,450252 s, 9,3 MB/s
Done
Start copy system for eMMC.
Formatting BOOT partition...mkfs.fat 4.2 (2021-01-31)
done.
Formatting ROOT partition...
/dev/mmcblk1p2 contains a ext4 file system labelled 'ROOT_MNJRO'
last mounted on /ddbr/install on Fri Feb 4 01:38:26 2022
e2fsck 1.46.5 (30-Dec-2021)
ROOT_MNJRO: clean, 11/1851392 files, 160257/7400192 blocks
done.
BOOT PARTITION: /dev/mmcblk1p1
ROOT PARTITION: /dev/mmcblk1p2
BOOT PARTUUID: e9f50000-01
ROOT PARTUUID: e9f50000-02
Copying BOOT...done.
rm: cannot remove '/ddbr/install/boot.ini': No such file or directory
Copying ROOTFS.
Copy BIN
Create DEV
Copy ETC
Copy HOME
Copy LIB
Create MEDIA
Create MNT
Copy OPT
Create PROC
Copy ROOT
Create RUN
Copy SBIN
Copy SELINUX
tar: selinux: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Copy SRV
Create SYS
Create TMP
Copy USR
Copy VAR
tar: var/lib/samba/private/msg.sock/940: socket ignored
tar: var/lib/samba/private/msg.sock/1682: socket ignored
tar: var/lib/samba/private/msg.sock/912: socket ignored
tar: var/lib/samba/private/msg.sock/911: socket ignored
tar: var/lib/samba/private/msg.sock/1277: socket ignored
tar: var/lib/samba/private/msg.sock/909: socket ignored
tar: var/lib/samba/private/msg.sock/915: socket ignored
tar: var/lib/samba/private/msg.sock/1681: socket ignored
tar: var/lib/samba/private/msg.sock/941: socket ignored
tar: var/lib/samba/private/msg.sock/908: socket ignored
tar: var/lib/samba/private/msg.sock/1500: socket ignored
tar: var/lib/samba/private/msg.sock/907: socket ignored
rm: cannot remove '/ddbr/install/usr/bin/ddbr': No such file or directory
*******************************************
Flasing Manjaro to eMMC Completed
Please Restart and Re-Activate the Multi-Boot
*******************************************

eMMC boot directory listing
dtbs --dirā€“
emmc_autoscript
emmc_autoscript.cmd
Image
initramfs-linux.img
install-aml-emmc.sh
u-boot-default-aml.img
uEnv.ini
uImage
uInitrd

My doubts and questions:

  • Do I need to do anything with the box before flashing? Installing particular firmware or version?
  • Is there a requirement to be on dual boot firmware? I planned to replace stock android with manjaroā€¦
  • When installation script has finished, Iā€™ve checked /etc/fstab on eMMC and it had root partition linked to sdcard, changed it to emmc root, but it didnā€™t help eitherā€¦