ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.45k stars 1.74k forks source link

B860H v5 Support #433

Closed rapdodge closed 1 year ago

rapdodge commented 1 year ago

Dear @ophub,

This day i can booting my B860H v5 that using S905X2 SoC But, i'm changing boot partition using source from here, but i'm excluding the uEnv https://www.facebook.com/groups/armarchindo/permalink/438640774824289/

I already repack the boot partition https://gofile.io/d/pMk7gl <- uploaded here because the filesize is > 25MB

So, looks like the builder is already having dedicated .dtb zte-v5.dtb.txt

Can you investigate it?

ophub commented 1 year ago

I don't have a facebook account, so I can't read the content

You mean you made zte-v5.dtb files? You don't use the uEnv.txt file, what are you using?

rapdodge commented 1 year ago

I don't have a facebook account, so I can't read the content

You mean you made zte-v5.dtb files? You don't use the uEnv.txt file, what are you using?

image

I'm still using uEnv.txt, but i'm not replacing it with boot partition that i unpacked... So, i'm just editing it to use zte-v5.dtb...

ophub commented 1 year ago
        FDTFILE="zte-v5.dtb"
        UBOOT_OVERLOAD="u-boot-x96max.bin"
        MAINLINE_UBOOT="x96max-u-boot.bin.sd.bin"
        ANDROID_UBOOT=""

Do you use a combination like this? Have you tested both 5.10 and 5.15 kernels? If these two are tested, you can share your dts source code

https://github.com/ophub/amlogic-s9xxx-armbian/blob/e02f5e313b2cc824fc37c73c36299821d52c9f3e/build-armbian/common-files/rootfs/etc/amlogic_model_database.conf#L26

There is a B860H (s912) version here, yours is an s905x2?

rapdodge commented 1 year ago

B860H v1 and v2 are using S905X SoC, and S905X v5 are using S905X2

On testing... And i already request for .dts file from the builder

rapdodge commented 1 year ago

With x96max dtb -> https://pastebin.com/8h5B941c With zte-v5.dtb -> https://pastebin.com/Ev2Jmw6n

5.10 kernel, both are not booting to armbian

With x96max dtb -> https://pastebin.com/gJUihGve With zte-v5.dtb -> https://pastebin.com/vL8uKU6p

5.15 kernel, both are not booting to armbian

Conclusion, it's working when using all boot files from the unpacked images... Using zte-v5.dtb -> https://pastebin.com/g3jZgTUX

Trying to using armbian-install image

Yes, It's not booting from emmc... And to booting it again via sdcard, we should shorting it and type reboot update :)

ophub commented 1 year ago

Can only be used in SD card, can not be written to EMMC?

rapdodge commented 1 year ago

Can only be used in SD card, can not be written to EMMC?

I think it can be written to emmc, but, when i'm unplug the power and the sdcard, and plug the power again, it's stuck, not booting to the armbian...

It just stuck on

[...] Starting kernel ...

uboot time: 6507945 us

And after that, that's it

rapdodge commented 1 year ago

dts file

// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /*

/dts-v1/;

include "meson-g12a-x96-max.dts"

/ { compatible = "amlogic,u200", "amlogic,g12a"; model = "ZTE B860H V5";

memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; };

&ext_mdio { external_phy: ethernet-phy@0 { compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22"; reg = <0>; max-speed = <1000>; eee-broken-1000t; }; };

&ethmac { pinctrl-0 = <&eth_pins>; pinctrl-names = "default"; status = "okay"; phy-mode = "rmii"; phy-handle = <&internal_ephy>; };

/ SDIO / &sd_emmc_a { status = "okay"; pinctrl-0 = <&sdio_pins>; pinctrl-1 = <&sdio_clk_gate_pins>; pinctrl-names = "default", "clk-gate";

address-cells = <1>;

size-cells = <0>;

bus-width = <4>; cap-sd-highspeed; sd-uhs-sdr50; sd-uhs-sdr104; min-frequency = <400000>; max-frequency = <199999997>;

non-removable; disable-wp;

/ WiFi firmware requires power to be kept while in suspend / keep-power-in-suspend;

mmc-pwrseq = <&sdio_pwrseq>;

vmmc-supply = <&vddao_3v3>; vqmmc-supply = <&vddao_1v8>; };

rapdodge commented 1 year ago

An update... Using FDT=/dtb/amlogic/meson-g12a-x96-max-rmii.dtb is working... But wifi is not working...

So, i assume there is an edit on script, and the maybe u-boot ext, sd, usb...

image 5.15.57-flippy-75+o

LINUX=/zImage INITRD=/uInitrd FDT=/dtb/amlogic/meson-g12a-x96-max-rmii.dtb APPEND=root=UUID=46effec5-88cd-4854-807c-5ec46b6bff1c rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

IMG_20220725_110841.jpg

Other pic: https://github.com/ophub/amlogic-s9xxx-armbian/issues/275#issue-1220398834

rapdodge commented 1 year ago

Some research, u-boot.ext is using u-boot-x96max.bin Other file is likely same, but, there is difference on aml_autoscript by sibondt...

image

aml_autoscript.txt

If i'm translating it from hex to text, this the translation

ophub amlautoscript file `'V�b/j���I��}if printenv bootfromsd; then exit; else setenv ab 0; fi; setenv bootcmd 'run start_autoscript; run storeboot' setenv start_autoscript 'if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi; run start_emmc_autoscript' setenv start_emmc_autoscript 'if fatload mmc 1 1020000 emmc_autoscript; then autoscr 1020000; fi;' setenv start_mmc_autoscript 'if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;' setenv start_usb_autoscript 'for usbdev in 0 1 2 3; do if fatload usb ${usbdev} 1020000 s905_autoscript; then autoscr 1020000; fi; done' setenv upgrade_step 2 saveenv sleep 1 reboot `

sibondt amlautoscript file `'V�x��j�6"�|�.echo "start amlogic old u-boot" if printenv bootfromsd; then exit; fi; if fatload mmc 0 ${loadaddr} boot_android; then if test ${ab} = 0; then setenv ab 1; saveenv; exit; else setenv ab 0; saveenv; fi; fi; if fatload usb 0 ${loadaddr} boot_android; then if test ${ab} = 0; then setenv ab 1; saveenv; exit; else setenv ab 0; saveenv; fi; fi; if fatload mmc 0 0x1000000 u-boot.ext; then go 0x1000000; fi; if fatload usb 0 0x1000000 u-boot.ext; then go 0x1000000; fi; setenv fdt_addr_r 0x1000000 setenv env_addr 0x10400000 setenv kernel_addr_r 0x11000000 setenv ramdisk_addr_r 0x13000000 setenv l_mmc "0" setenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; elif printenv ethaddr; then setenv bootargs ${bootargs} mac=${ethaddr}; fi' for devtype in "mmc usb" ; do if test "${devtype}" = "usb"; then echo "start test usb"; setenv l_mmc "0 1 2 3"; fi; for devnum in ${l_mmc} ; do if test -e ${devtype} ${devnum} uEnv.txt; then fatload ${devtype} ${devnum} ${env_addr} uEnv.txt; env import -t ${env_addr} ${filesize}; setenv bootargs ${APPEND}; if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi; if fatload ${devtype} ${devnum} ${kernel_addr_r} ${LINUX}; then if fatload ${devtype} ${devnum} ${ramdisk_addr_r} ${INITRD}; then if fatload ${devtype} ${devnum} ${fdt_addr_r} ${FDT}; then fdt addr ${fdt_addr_r}; run aadmac; booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}; fi; fi; fi; fi; done; done; `

v5boot.zip

ophub commented 1 year ago

Using FDT=/dtb/amlogic/meson-g12a-x96-max-rmii.dtb is working... But wifi is not working...

/usr/lib/firmware/mediatek/mt7668pr2h.bin

There is this file in the firmware, try it. You use the modprobe mt76 command to load the module, and then look at the dmesg | grep mt76 log

rapdodge commented 1 year ago

dmesg | grep mt76

Nothing happen image

ophub commented 1 year ago
cd /lib/modules/*/kernel/
find ./ -name mt*
modprobe mt76-sdio

Snip20220725_8

rapdodge commented 1 year ago

image

image

Still, no response...

ophub commented 1 year ago

Can your zte-v5.dtb be used normally? Wired, wifi and bluetooth all normal?

rapdodge commented 1 year ago

Already try it before, and it shouldnt work too...

ophub commented 1 year ago

Then you use the wired network of meson-g12a-x96-max-rmii.dtb. The MT76 driver in the wireless and bluetooth kernel has been enabled, but it cannot be used. I will talk about it later.

rapdodge commented 1 year ago

Okay, no problem... Looking forward for next updates

mrnose commented 1 year ago

Any have Firmware Realunix Pro? Please For b860h v5