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.69k stars 1.83k forks source link

X96Max_Plus2_T can not boot from usb flash #107

Closed test012012 closed 2 years ago

test012012 commented 2 years ago

Hello, I have X96Max_Plus2_T box (model name in adroid menu) with android firmware X96Max_Plus2_T_20210426-2030.

I downloaded file Armbian_22.02.0_Aml_s905x3_bullseye_5.10.98_2022.02.07.1955.img , ungziped (gzip -d) and copied to usb flash using dd if=Armbian_22.02.0_Aml_s905x3_bullseye_5.10.98_2022.02.07.1955.img of=/dev/sdb bs=1m , then I connected usb flash drive to the STB, rebooted STB (power off, power on) and nothing happens. STB boots android, not armbian.

Can I use usb flash instead of usb hdd?

Shall I change something to use your armbian build on X96Max_Plus2_T?

Thank you in advance

ophub commented 2 years ago

Choose the corresponding firmware according to your box. Then write the IMG file to the USB hard disk through software such as Rufus or balenaEtcher. Insert the USB hard disk into the box. Common for all Amlogic s9xxx tv box.

test012012 commented 2 years ago

@ophub thank you for your reply. Can I use usb flash stick instead of usb hard disk?

ophub commented 2 years ago

yes, you can

test012012 commented 2 years ago

@ophub

I wrote the image Armbian_22.02.0_Aml_s905x3_bullseye_5.10.98_2022.02.07.1955.img via https://www.balena.io/etcher/ , but it didn't help. the same story, my STB boots android instead of armbian

How can I troubleshoot the issue?

ophub commented 2 years ago

https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/router-config/README.md#1010-set-the-box-to-boot-from-usbtfsd

test012012 commented 2 years ago

@ophub thanks for the link, now STB tries to boot from USB, but fails. After X96 logo I can see only black screen and then, no hdmi signal.

I've tries 4 images: openwrt 5.4,5.10; armbian (bullseye) 5.4,5.10. always the same story - black screen, then no signal from hdmi and no network traffic from LAN port

ophub commented 2 years ago

The black screen indicates that the usb is not recognized, please replace the usb or re-download the firmware and flash the usb

test012012 commented 2 years ago

My usb flash is 4Gb only. Can it be the issue?

Can I use ophub images to boot from SD card? (Maybe I will find an SD card)

ophub commented 2 years ago

USB/TF/SD can be used, you can re-flash the usb, even if the firmware cannot be used, at least you can see the error message on the screen. There is no code on the black screen, indicating that the usb cannot be recognized for use. Or your adb in the previous step did not enable usb mode.

test012012 commented 2 years ago

USB/TF/SD can be used, you can re-flash the usb, even if the firmware cannot be used, at least you can see the error message on the screen. There is no code on the black screen, indicating that the usb cannot be recognized for use. Or your adb in the previous step did not enable usb mode.

Adb 'reboot update' definitely changed the behavior, because now STB tries to load from USB, but fails. Before 'reboot update' STB didn't try to load from USB and just started Android from internal rom.

ophub commented 2 years ago

You first try the 5.4 kernel, which is more general and does not require u-boot support.

ophub commented 2 years ago

Is your network card chip IP1001M? There is no driver for this card

test012012 commented 2 years ago

You first try the 5.4 kernel, which is more general and does not require u-boot support.

I've tried. The same story. X96 logo, then black screen, then no signal on hdmi output

Network card on my box is realtek, not ip1001m

test012012 commented 2 years ago

Hi @ophub

My amlogic board id is: sm1_ac213_4g.

franklin:/proc/device-tree $ cat amlogic-dt-id                                                                                              
sm1_ac213_4g

I have dumped dtb (from /deb/dtb) and splitted using this tool https://github.com/Wilhansen/aml-dtbtools.

Do you know if my board is supported by ophub images?

dtb.tar.gz

test012012 commented 2 years ago

Photo of recovery: 2022-02-12 22 53 31

ophub commented 2 years ago

Support x96max box, your startup is stuck in this interface, it is usb wrong. Redownload the firmware, unzip it, and rewrite it with Rufus. If not, change to a usb.

https://github.com/ophub/amlogic-s9xxx-armbian/releases/download/Armbian_Aml_focal_02.12.2214/Armbian_22.02.0_Aml_s905x3_focal_5.4.179_2022.02.12.2137.img.gz

https://rufus.ie/

test012012 commented 2 years ago

your startup is stuck in this interface, it is usb wrong.

no, I manually entered to bootloader just to show it, maybe this photo has some useful information.

When I flash ophub images, I have x96 logo, then black screen, then hdmi signal lost.

Ok, I will try Rufus, but I have already tried dd and etcher, I don't think that rufus will help

test012012 commented 2 years ago

Rufus didn't help.

I've soldered UART to the STB. Now I get boot logs (when android boots from ssd and when ophub image boots from sd card). Linux starts, but hangs after bluetooth init fromsd.log android1.log fromsd2.log

@ophub do you have full bootlog from uart? I just want to compare what is the difference between my STB and working STB

test012012 commented 2 years ago

20220213_131209 20220213_131216 20220213_131224 Photos of my stb

test012012 commented 2 years ago

I've managed to boot up ophub openwrt (5.10 kernel) (only eth works, in 100mbit mode), BUT it boots only if UART is connected, if I disconnect UART, then it fails, but when I connect UART in failed state, I can see u-boot promprt (=>). As I understand, it means that I need a pull-down resistor to work with 5.10 kernel.

@ophub do you know, who compiled this u-boot to boot 5.10 kernel? Was it provided by amlogic or it was built by somebody else? If it has source code, I want to rebuild u-boot to disable 'Hit any key to stop autoboot' feature

test012012 commented 2 years ago

openwrt 5.4 boots up without UART normally and accessible by eth port (192.168.1.1) (hdmi output doesn't work, but it is not very important for openwrt use-cases)

ophub commented 2 years ago

The /boot partition of OpenWrt is the same as Armbian. So you can try Armbian's 5.4 kernel firmware.

The firmware of 5.10 and above needs u-boot support. If you can use the 5.4 kernel, but cannot start the 5.10 kernel, it means that u-boot does not support it.

ophub commented 2 years ago

meson-sm1-sei610.dtb

HDMI no signal is really confusing, you try another /boot/uEnv.txt

ophub commented 2 years ago

Your usb is plugged into the box to start. If the startup is successful,you can find the ip of armbian in the connected router.You use ssh to connect to the ip of armbian from the computer.

test012012 commented 2 years ago

The firmware of 5.10 and above needs u-boot support. If you can use the 5.4 kernel, but cannot start the 5.10 kernel, it means that u-boot does not support it.

I can start 5.10 (openwrt), but I face the issue described here https://github.com/ophub/amlogic-s9xxx-openwrt/blob/b7cb393231b8edb8ecd7375ed702d0131154baeb/router-config/README.md#109-if-you-cant-startup-after-using-the-mainline-u-boot . On my dev box I can add a resistor, but I don't want to add the resistor if it goes to production. So looks like the issue described in the page https://github.com/ophub/amlogic-s9xxx-openwrt/blob/b7cb393231b8edb8ecd7375ed702d0131154baeb/router-config/README.md#109-if-you-cant-startup-after-using-the-mainline-u-boot is also applicable for HW v4.1, not only v4.0.

armbian doesn't boot due to it hangs after bluetooth init (most probably it happens because of lack of firmware).

Sorry, but I ask you again: do you know, who compiled this u-boot to boot 5.10 kernel? Was it provided by amlogic or it was built by somebody else? If it has source code, I want to rebuild u-boot to disable 'Hit any key to stop autoboot' feature

test012012 commented 2 years ago

fromsd.log

armbian hangs on boot (both from usb and sd). the log is here https://github.com/ophub/amlogic-s9xxx-armbian/files/8055500/fromsd.log , it hangs after bluetooth init

ophub commented 2 years ago

my s922x Beelink GT-King Pro boot from usb

log: messages.txt