Jump to content

How to install armbian in h618?


alienxz77b

Recommended Posts

Armbian & Khadas are rewarding contributors

2 hours ago, Nick A said:

Try the firmware from https://github.com/LibreELEC/brcmfmac_sdio-firmware

brcmfmac4334-sdio.txt

brcmfmac4334-sdio.bin

 

Rename brcmfmac4334-sdio.bin to brcmfmac4334-sdio.transpeed,8k618-t.bin or create a link.

 

copy the files into your /lib/firmware/brcm/ directory.

Thank @Nick A! The internal wifi adapter is correctly loaded and working - thank you

 

Btw i noticed that the brcmfmac4334-sdio.bin in the git repo is identical to the brcmfmac4334-sdio.bin file already contained in the /lib/firmware/brcm directory. Maybe the underlying issue was that my system was configured to look for the brcmfmac4334-sdio.transpeed,8k618-t.bin instead of just the generic brcm4334 driver?

 

Anyway, everything works and the tvbox is surprising useful for light desktop and server applications (given it only cost about 26 bucks! What a deal)

Link to comment
Share on other sites

Quote

Hi @Nick A and friends,

 

I got my own Transpeed 8K earlier this week (4GB ram / 64GB emmc). I am including a picture with the top off below.

 

1) I first tried to install the MiniArch OS of WarpMe. I used the VONTAR image as recommended in this thread. Almost everything worked out of the box including WiFi.

- HDMI: Display works, sound not tested

- Ram: MiniArch correctly detects all 4GB of ram.

EMMC: For some reason, I could not get the emmc to work. First I tried to use the tool supplied by MiniArch to flash the OS to emmc, but it just hangs indefinitely. Then I tried to manually format / partition the emmc with fdisk, but everytime i try to write a partition table to mmcblk2 (both GPT and MBR), my system would just hang indefinitely - attempting to mount /dev/mmcblk2 produce the same outcome. I manage to somehow format the emmc.

- WiFi: The only other (minor) issue i had with MiniArch is that it takes about 2 min for the OS to properly load the wifi drivers (see output from dmesg for reference).  I didn't spend so more time on MiniArch because I'd much rather use Armbian.

[ 67.908595] cfg80211: failed to load regulatory.db [ 69.615347] brcmfmac mmc3:0001:1: loading /lib/firmware/brcm/brcmfmac4334-sdio.clm_blob failed with error -22 [ 69.625299] brcmfmac mmc3:0001:1: Direct firmware load for brcm/brcmfmac4334-sdio.clm_blob failed with error -22 [ 69.635482] brcmfmac mmc3:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac4334-sdio.clm_blob [ 131.233673] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 131.233699] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 131.234035] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4334/3 wl0: Jul 24 2019 12:58:36 version 6.10.191 (TOB) (r) FWID 01-b049404e

 

2) I then tried the Armbian-20240726-unofficial_24.8.0-trunk_Transpeed-8k618-t_bookworm_edge_6.7.12_server.img.tar.xz prepared by Nick.

- I had to unpack the xz file before flashing with balenaEtcher to get it to work correctly. The image works really well on my Transpeed8k.

- HDMI: Display works, sound not tested

- Ram: Correctly detects all 4GB

EMMC: It works! I ran armbian-install and succesfully transferred to OS to emmc and I am booting from emmc without SD-card!

- WiFi: does not work out of the box (dmesg output below). I have added a wifi dongle (RealTek 8188) and it worked right away. I will see if i can get the internal wifi to work.

- DE: I installed xfce4 and it works really well on the transpeed.

- Other: I noticed that the 7-segment display (time display) on the device is driven by a FD650 chip that communicates over i2c. 

brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4334-sdio for chip BCM4334/3 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4334-sdio.transpeed,8k618-t.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4334-sdio.txt failed with error -2 brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

John S. I have the vontar model identical to the box. The only difference is John S. Your box is v10, mine is v11. So far I've only been able to launch miniarc. I can't boot the Armbian images Nick gave me, it stays on a black screen. Does anyone have any ideas about this?

Link to comment
Share on other sites

Hi Hayat,

If you can boot Miniarch then you can boot Armbian. You just need to port over the vontar.dts and defconfig for u-boot and kernel from Miniarch to my Armbian build. I posted the steps in the previous page. I don't have a vontar box so I can't help you with testing. Plus I'm too busy with work right now.

 

https://github.com/warpme/minimyth2/blob/master/script/bootloaders/u-boot-h616/files/160-add-vontar-h618-defconfig.patch

https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-6.10/files/0647-arm64-dts-allwinner-h618-add-vontar-h618-TVbox.patch

 

https://github.com/NickAlilovic/build

 

 

Edited by Nick A
Link to comment
Share on other sites

5 hours ago, hayat Sınav said:

John S. I have the vontar model identical to the box. The only difference is John S. Your box is v10, mine is v11. So far I've only been able to launch miniarc. I can't boot the Armbian images Nick gave me, it stays on a black screen. Does anyone have any ideas about this?

Hi Hayat,
Just to confirm: I was able to boot up the image Nick provided without any further changes / patching.

- I used the "server" image of release V20240726 (https://github.com/NickAlilovic/build/releases/tag/v20240726

- I first unpacked the .xz file and then I flashed the .img file using balenaEtcher on a 16GB SD card.

*** Notice, initially I flashed the compressed .img.xy. The operation would complete, but when I tried to boot up, the boot process would fail in a similar manner to what you describe (black screen). I noticed that balenaEtcher did not correctly create a bootable system on the SD card. After unpacking the .xz file and flashing the .img file directly with balenaEtcher everything went smoothly. 

 

Good luck!

 

Link to comment
Share on other sites

Thank you. The problem was caused by my SD card. Gnome and xfce desktops work fine now. I have two different problems right now. First of all, while the system is running on the SD card, I change the name of the .bin file and copy it to the brcm folder with root permission. Even though I turn it off and on again, it doesn't see wifi. Do I need to add Armbian before compiling? My second problem is that the device does not boot when I install it on a 64GB mmc. I need support with MMC.

 

Sorry for my bad english.

Link to comment
Share on other sites

Hi Hayat,

I think you still need the brcmfmac4334-sdio.txt in the brcm folder. Right now it's called "brcmfmac4334-sdio.rockchip,rk3318-box.txt".  The rockchip does the opposite and renames the .txt file instead of the .bin file. 

 

If you can post your boot log we can figure it out. You might have a different WIFI chip. 

 

For MMC it could be something simple or it could be your dts. There are differences in the Transpeed and Vontar dts settings.

 

On the Transpeed box I have to set cd-gpios to PI16.

+&mmc0 {
+	vmmc-supply = <&reg_dldo1>;
+	cd-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>;	/* PI16 */
+	bus-width = <4>;
+	status = "okay";
+};

 

On the Vontar box this is set to broken-cd. You just need to change that one line in my u-boot and kernel .dts patches. 

+&mmc0 {
+	vmmc-supply = <&reg_dldo1>;
+	broken-cd;
+	bus-width = <4>;
+	status = "okay";
+};

 

git clone https://github.com/NickAlilovic/build.git

edit these two files.

~/build/patch/kernel/archive/sunxi-6.7/patches.armbian/dts-allwinner-h618-add-Transpeed-8K618-T-TV-box.patch

~/build/patch/u-boot/u-boot-sunxi/dts-Transpeed-8K618-T-Add-Transpeed-8K618-T-board-support.patch

./compile.sh

 

Not sure if you can still extract your original android dts. Your android dts can help figure out your gpio settings.

 

Edited by Nick A
Link to comment
Share on other sites

Hi Hayat,

 

Just out of curiosity could you share the following:

 

1) A picture of TV box' PCB and picture where you zoom in on the WiFi module (it is probably a module with a metal EMC-shield covering it).

 

2) Regarding WiFi: Could you run

dmesg | grep brc

and share output.

Then run 

ip link

and share output.

 

3) Regarding EMMC, could you run the commands below and share output

sudo lsblk
df -h

On my system, the emmc drive showed up as mmcblk2. I was trying (unsuccesfully) to load MiniArch on to the emmc, in the process, I first formatted the emmc to get rid of the android OS files using "fdisk /dev/mmcblk2" and interacting with the on-screen menu, but in MiniArch I was never able to complete the formatting operation, my system would hang every time I asked fdisk to create a new partion table. When I eventually booted up Nick's Armbian image, I was able to install to EMMC directly using the Armbian tool

sudo armbian-install

 

Link to comment
Share on other sites

I was able to solve the problems. I couldn't format MMC from disk management, it kept giving errors. I went in with the MMC install option from armbian-install and formatted it, then canceled it before starting the installation. I formatted the mmc in ext4 format from disk management and started it. Then I installed it to mmc again with armbian install. 

I am currently using it by booting from mmc. After installing mmc, when I copied the wifi files to the brcm folder, wifi worked too.

It's working fine now and I'm installing the klipper.

thank you very much for everything

Link to comment
Share on other sites

Hi, I have Tx3 mini-A (seems tanix clone as I not found officially same spec) that have H616 chip. i already open and setting serial cable to see serial message, I try with vontar miniarch it say DRAM not supported. When I try normal boot serial screen show DRAM Type = 8 (LPDDR4) so I try with Orange Pi3 setup it can boot but seems stuck, I try with HDMI screen it show 3 penguin there. Still dont know next move, I include screen shoot on original android serial and on Orangepi3 miniarch. Sure want armbian can manage my box with wifi

stuck.jpg

ori2.jpg

ori1.jpg

Link to comment
Share on other sites

Hi L Jumadi

You need the correct defconfig for your u-boot. You can use sunxi-fw to extract your DRAM setup. 

 https://github.com/apritzel/sunxi-fw

 

You can use an android update firmware or your extracted boot0. Also, you can run a statically linked sunxi-fw on the boot block device from Android, like "sunxi-fw info -v /dev/block/mmcblk1", to dump the DRAM parameters (if you have root there)

 

for example Orangepie zero 3 has lpddr4.

 

CONFIG_DRAM_SUN50I_H616_DX_ODT=0x07070707
CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0e
CONFIG_DRAM_SUN50I_H616_ODT_EN=0xaaaaeeee
CONFIG_DRAM_SUN50I_H616_TPR6=0x44000000
CONFIG_DRAM_SUN50I_H616_TPR10=0x402f6663
CONFIG_DRAM_SUN50I_H616_TPR11=0x24242624
CONFIG_DRAM_SUN50I_H616_TPR12=0x0f0f100f
CONFIG_MACH_SUN50I_H616=y
CONFIG_SUNXI_DRAM_H616_LPDDR4=y
CONFIG_DRAM_CLK=792

 

You can get more information on your box by extracting your android dts. Sometimes you can find the dram settings in your dts.

 

Edited by Nick A
Link to comment
Share on other sites

Your welcome Kazekami. If you have a working box. Make a board config. Post your board config, u-boot defconfig, u-boot dts and linux kernel dts. I can make a patch for you and add it to my build. It will help others with the same box as yours. 

 

https://github.com/NickAlilovic/build/blob/main/config/boards/transpeed-8k618-t.wip

Edited by Nick A
Link to comment
Share on other sites

I see two different dram settings in your dtb. Not sure which is the correct one. Lets try the first one. You can edit the values in my u-boot defconfig patch. 

 

git clone https://github.com/NickAlilovic/build.git --branch v20240909 --single-branch

cd build/patch/u-boot/u-boot-sunxi

pico configs-Transpeed-8K618-T-Add-Transpeed-8K618-T-board-support.patch

 

		dram_para1 {
			device_type = "dram_para1";
			dram_clk = <0x288>;
			dram_type = <0x03>;
			dram_dx_odt = <0x3030303>;
			dram_dx_dri = <0xe0e0e0e>;
			dram_ca_dri = <0x1c1c>;
			dram_odt_en = <0x01>;
			dram_para1 = <0x30fb>;
			dram_para2 = <0x00>;
			dram_mr0 = <0x840>;
			dram_mr1 = <0x04>;
			dram_mr2 = <0x08>;
			dram_mr3 = <0x00>;
			dram_mr4 = <0x00>;
			dram_mr5 = <0x00>;
			dram_mr6 = <0x00>;
			dram_mr11 = <0x00>;
			dram_mr12 = <0x00>;
			dram_mr13 = <0x00>;
			dram_mr14 = <0x00>;
			dram_mr16 = <0x00>;
			dram_mr17 = <0x00>;
			dram_mr22 = <0x00>;
			dram_tpr0 = <0xc0001305>;
			dram_tpr1 = <0x00>;
			dram_tpr2 = <0x00>;
			dram_tpr3 = <0x00>;
			dram_tpr6 = <0x33808080>;
			dram_tpr10 = <0x2f0006>;
			dram_tpr11 = <0xffffdddd>;
			dram_tpr12 = <0xfedf7657>;
			dram_tpr13 = <0x40>;
		};

 

	dram {
		compatible = "allwinner,dram";
		clocks = <0xd9>;
		clock-names = "pll_ddr";
		dram_clk = <0x2b8>;
		dram_type = <0x08>;
		dram_zq = <0x3f3fdd>;
		dram_odt_en = <0xffffeeee>;
		dram_para1 = <0x30fa>;
		dram_para2 = <0x00>;
		dram_mr0 = <0x00>;
		dram_mr1 = <0x34>;
		dram_mr2 = <0x1b>;
		dram_mr3 = <0x33>;
		dram_tpr0 = <0x00>;
		dram_tpr1 = <0x00>;
		dram_tpr2 = <0x00>;
		dram_tpr3 = <0x00>;
		dram_tpr4 = <0x00>;
		dram_tpr5 = <0x00>;
		dram_tpr6 = <0x39808080>;
		dram_tpr7 = <0x00>;
		dram_tpr8 = <0x00>;
		dram_tpr9 = <0x00>;
		dram_tpr10 = <0x402f6663>;
		dram_tpr11 = <0x31313031>;
		dram_tpr12 = <0xd0d0c0e>;
		dram_tpr13 = <0x60>;
		linux,phandle = <0x17d>;
		phandle = <0x17d>;
		device_type = "dram";
		dram_dx_odt = <0xc0c0c0c>;
		dram_dx_dri = <0xe0e0e0e>;
		dram_ca_dri = <0xe0b>;
		dram_mr4 = <0x03>;
		dram_mr5 = <0x00>;
		dram_mr6 = <0x00>;
		dram_mr11 = <0x04>;
		dram_mr12 = <0x72>;
		dram_mr13 = <0x00>;
		dram_mr14 = <0x09>;
		dram_mr16 = <0x00>;
		dram_mr17 = <0x00>;
		dram_mr22 = <0x24>;
	};

 

dram_clk = <0x288>;

288 hex = 648

https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=288

 

It should be 8 or 4 digits. I added a 0 to the beginning of DX_ODT and DX_DRI.

dram_dx_odt = <0x3030303>;

CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303

 

Change my defconfig to these values.

 

+CONFIG_DRAM_SUN50I_H616_DX_ODT=0x0c0c0c0c
+CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
+CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0b
+CONFIG_DRAM_SUN50I_H616_TPR0=0xc0001305
+CONFIG_DRAM_SUN50I_H616_TPR10=0x2f0006
+CONFIG_DRAM_SUN50I_H616_TPR11=0xffffdddd
+CONFIG_DRAM_SUN50I_H616_TPR12=0xfedf7657

 

Now you compile a new image. You will find the image in output/images.

 

cd ../../../

./compile.sh build BOARD=transpeed-8k618-t BRANCH=edge BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_APPGROUPS_SELECTED=browsers DESKTOP_ENVIRONMENT=xfce DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base KERNEL_CONFIGURE=no RELEASE=bookworm

cd output/images

 

If your box is really LPDDR4. Then change these lines.

+CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303
+CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
+CONFIG_DRAM_SUN50I_H616_CA_DRI=0x1f12
+CONFIG_DRAM_SUN50I_H616_TPR0=0xc0001002
+CONFIG_DRAM_SUN50I_H616_TPR10=0x2f1107
+CONFIG_DRAM_SUN50I_H616_TPR11=0xddddcccc
+CONFIG_DRAM_SUN50I_H616_TPR12=0xeddc7665
+CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_DDR3_1333=y
+CONFIG_DRAM_CLK=648

 

To

 

+CONFIG_DRAM_SUN50I_H616_DX_ODT=0x07070707
+CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
+CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0e
+CONFIG_DRAM_SUN50I_H616_ODT_EN=0xffffeeee
+CONFIG_DRAM_SUN50I_H616_TPR6=0x402f6663
+CONFIG_DRAM_SUN50I_H616_TPR10=0x402f6663
+CONFIG_DRAM_SUN50I_H616_TPR11=0x31313031
+CONFIG_DRAM_SUN50I_H616_TPR12=0x0d0d0c0e
+CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_LPDDR4=y
+CONFIG_DRAM_CLK=696

 

Because you are adding another line of code @@ -0,0 +1,27 @@ should be @@ -0,0 +1,28 @@.  

Or you can follow these steps to create your own patch.

 

 

Edited by Nick A
Link to comment
Share on other sites

I want to install armbian on TV box. I can buy Tanix TX68 4GB 64GB H618 for a good price. It has 1 USB3 and 2 USB2 which would be useful.

Anyone have experience with installing Armbian on this? It should be similar to other tv boxes in this thread?

Tanix T68.webp

Tanix TX68 rear.webp

 

22.thumb.jpg.7a6656c5a1bdf75e64706f5e024cbb75.jpg23.thumb.jpg.adafec79384f5a6d15fe0c48b6985938.jpgdveknopki.jpg.8c207756d47631cee9f3b1bc2c6f5dee.jpg

 

Edited by firepower
Link to comment
Share on other sites

 

My transpeed image should boot on all the boxes you listed.

 

X98H PRO:

you need to edit the transpeed dts and change the gpio for mmc0.

Android DTS.

cd-gpios = <0x00000023 0x00000005 0x00000006 0x00000011>;

Armbian/Linux DTS

cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;    /* PF6 */ 

 

This shows a picture of the x96. I have the non-pro version of the X98H and I'm pretty sure it's a AIC8800 chip.

http://nskhuman.ru/allwinner/x98hpro.php?np=3

 

you might have a hard time getting the AIC8800 driver for wifi to work. I haven't spent a lot of time on it.

https://github.com/radxa-pkg/aic8800/tree/3.0%2Bgit20240327.3561b08f-2

 

I'm working on the 6.10 kernel right now. I'm going to release a custom dts for X98H when I'm done.

 

Edited by Nick A
Link to comment
Share on other sites

https://github.com/warpme/minimyth2 close to to the bottom of the page.

 

Allwinner H6 OrangePi-3 LTS not works (aw859a)

 

Allwinner H616 OrangePi-Zero2 works (aw859a@SDIO)

 

Allwinner H618 OrangePi-Zero3 works (uwe5622a@SDIO)

 

I guess uwe5622 and aw859a are the same. OrangePi 3 LTS does not use SDIO. I'm pretty sure T95Z Plus does.

 

 

 

 

Edited by Nick A
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines