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
6.22k stars 1.99k forks source link

Fixing Boot on HG680P #262

Closed rapdodge closed 2 years ago

rapdodge commented 2 years ago

Dear @ophub,

So, i installed armbian on my HG680P emmc using armbian-install, and it's already okay... But when i'm restarting it, my STB didnt responding until i'm inserting and sdcard that already burn by bootcardmaker with HG680P u-boot...

image image

Do you have any idea to fix the bootloader (?)

Here's the HG680P u-boot file, it's 4MB u-boot... uboot.zip

rapdodge commented 2 years ago

Some small updates... I'm using my friend script to installing it to EMMC, its booted up, but cant enter the system...

image

install-emmc.zip <- inside the archive, there is an uboot, installer script, and fstab file...

rapdodge commented 2 years ago

It's working now, after some small touch after running armbian-install

dd if={HG680P u-boot} of={MMC} conv=fsync bs=1 count=442 dd if={HG680P u-boot} of={MMC} conv=fsync bs=512 skip=1 seek=1

Hope it will be adopted to armbian-install in the future for HG680P and B860H series (idk, why B860H using HG bootloader, but, it's work)

ophub commented 2 years ago

Can you test this U-BOOT to start normally? Which version of the kernel did you test?

I use u-boot-p212.bin to boot fine on my HG680P device

rapdodge commented 2 years ago

Already tested it and running perfectly without any issues...

I'm using 5.15.35, yesterday build...

I got the uboot is from Indonesian community, and for B860H in Indonesia, we should change the uboot to HG680P

https://youtu.be/fzf6uXTZ8pw

ophub commented 2 years ago

This is the previous discussion: https://github.com/ophub/amlogic-s9xxx-armbian/issues/60

imam1986 commented 2 years ago

Hey, I used B860H and HG860P too. There should be a mention somewhere in documentation, according this 2 STB. There are some variant and the handling should be different. HG680P there is 2 or 3 variant, with 1GB or 2GB RAM, but also the old (s905) and the new one (s905x). For the B860H, v1 (s905) 1GB, v2 2GB, v2.1 (s905x) 2GB and the mysterious V5 (s905x2). The usual hg680p bootloader could not work on V5 after dd command, from ls -lH it revert back to the original. (Cmiiw, maybe I'm wrong about the chipset) And, I'm still wondering the use of u-boot, is it some kind of bios or something :D

ophub commented 2 years ago

You test the 5.10/5.17 kernel, Currently this u-boot is not used under 5.15, you test 5.10 and 5.17 armbian-update 5.10.112 armbian-update 5.17.4

rapdodge commented 2 years ago

This is the previous discussion: https://github.com/ophub/amlogic-s9xxx-armbian/issues/60

Uboot p212 i think it automatically installed when we installing to emmc via armbian-install, right? And it's not working, just blank on my monitor...

So, I'm using 4M uboot and direct dd on the emmc

rapdodge commented 2 years ago

Hey, I used B860H and HG860P too. There should be a mention somewhere in documentation, according this 2 STB. There are some variant and the handling should be different. HG680P there is 2 or 3 variant, with 1GB or 2GB RAM, but also the old (s905) and the new one (s905x). For the B860H, v1 (s905) 1GB, v2 2GB, v2.1 (s905x) 2GB and the mysterious V5 (s905x2). The usual hg680p bootloader could not work on V5 after dd command, from ls -lH it revert back to the original. (Cmiiw, maybe I'm wrong about the chipset) And, I'm still wondering the use of u-boot, is it some kind of bios or something :D

Yes, I'm trying the HG680P S905X with 1GB RAM now, after this i will test on my B860H v1 (1GB RAM)

Until now, it's works perfectly, I'm installing docker right now 🤣

ophub commented 2 years ago

Is the uboot.bin file from the Android system or the mainline kernel?

rapdodge commented 2 years ago

You test the 5.10/5.17 kernel, Currently this u-boot is not used under 5.15, you test 5.10 and 5.17 armbian-update 5.10.112 armbian-update 5.17.4

Okay, i will testing it...

rapdodge commented 2 years ago

Is the uboot.bin file from the Android system or the mainline kernel?

I'm using from android system (4M)

imam1986 commented 2 years ago

dd if={HG680P u-boot} of={MMC} conv=fsync bs=1 count=442 dd if={HG680P u-boot} of={MMC} conv=fsync bs=512 skip=1 seek=1

Can you post the exact command? Especially {MMC}, please. And, when? After short pin? Or Armbian on sdcard?

rapdodge commented 2 years ago

dd if={HG680P u-boot} of={MMC} conv=fsync bs=1 count=442 dd if={HG680P u-boot} of={MMC} conv=fsync bs=512 skip=1 seek=1

Can you post the exact command? Especially {MMC}, please. And, when? After short pin? Or Armbian on sdcard?

dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=1 count=442 dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=512 skip=1 seek=1

uboot.bin is HG680P uboot (4M), you can get it from upper post

rapdodge commented 2 years ago

Dear @ophub,

I think its not successful... (5.10.112) image

rapdodge commented 2 years ago

5.10.112 bootloop

https://user-images.githubusercontent.com/33513626/164956287-c347fb4e-7140-4fc7-a71a-1382f15c25dd.mp4

ophub commented 2 years ago

The 5.4/5.15 firmware has added the TEXT_OFFSET patch, which can be booted without u-boot. 5.10/5.17 requires u-boot

Do you have the download address of the original Android TV firmware for HG680P? Share one, I haven't been able to find it.

rapdodge commented 2 years ago

Oohhh, you mean the img file? Hold on, im using 3rd party, but its just like an highly customized rom, deleting bloatware, etc

Here you go [deleted]

ophub commented 2 years ago

Thank you, I have this device, but I can't find the original Android system. I have been worried about how to rescue it if it is damaged. I can rest assured with the firmware. I uploaded it and backed it up.

rapdodge commented 2 years ago

Thank you, I have this device, but I can't find the original Android system. I have been worried about how to rescue it if it is damaged. I can rest assured with the firmware. I uploaded it and backed it up.

youre welcome, but keep in mind, i think that image is highly customized for Indonesian STB, because, if we accidentally forgot to uncheck the delete bootloader, the box will be bricked...

imam1986 commented 2 years ago

dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=1 count=442 dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=512 skip=1 seek=1

@rapdodge I think I messed up IMG-20220424-WA0011 IMG-20220424-WA0010

Instead of /dev/mmcblk2, I pick /dev/mmcblk0p1 (unfortunately, it's on sdcard). So, my emmc can't boot after install.sh, and I deleted /boot partition on my sdcard :D

@ophub I'm sorry, I hope this discussion not bothering you 🙏

rapdodge commented 2 years ago

dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=1 count=442 dd if=uboot.bin of=/dev/mmcblk2 (<- please be adjusted) conv=fsync bs=512 skip=1 seek=1

@rapdodge I think I messed up IMG-20220424-WA0011 IMG-20220424-WA0010

Instead of /dev/mmcblk2, I pick /dev/mmcblk0p1 (unfortunately, it's on sdcard). So, my emmc can't boot after install.sh, and I deleted /boot partition on my sdcard :D

@ophub I'm sorry, I hope this discussion not bothering you 🙏

You should use armbian-install, and after that, run dd command manually, and dont forget with sudo :)

And you should dd the emmc, not the partition of emmc image

imam1986 commented 2 years ago

@rapdodge Finally, success, with your method. Well, you're correct, actually, I did dd the partition, not the emmc. Remember the usual "dd ... of=/dev/block/bootloader" command? I did that, instead of "dd if=uboot.bin of=/dev/mmcblk2 conv=fsync bs=1 count=442" :D :D LOL. I instinctively did that. (oh, i discovered the emmc via lsblk on mmcblk1).

My ultimate goal actually running OpenWRT on ArmBian ProxMox (pimox7), as well as pi-hole, grafana if this box adequate. Unfortunately, it's a tall mountain. Pimox (run on sdcard) occupied 56% of 1896MB RAM, and I can't found OpenWRT image for Pimox, yet. And, when run from emmc, system load reach 66%, 30% RAM, 61 degress C. My Next experiment would be running OpenWRT via docker on this box, or the opposite, running openWRT as docker container host. The first would be more visible than the later, the doc says openwrt as docker host at least on x86_64. I'm abusing this little box too much :D

And, thank you, your method has safe my emmc installation twice, now. After blank screen, I run the command after (not before) the install-aml.sh, and it work. I hope @ophub can help us solved this mistery in the future. Thank you for your hard work :)

rapdodge commented 2 years ago

@rapdodge Finally, success, with your method. Well, you're correct, actually, I did dd the partition, not the emmc. Remember the usual "dd ... of=/dev/block/bootloader" command? I did that, instead of "dd if=uboot.bin of=/dev/mmcblk2 conv=fsync bs=1 count=442" :D :D LOL. I instinctively did that. (oh, i discovered the emmc via lsblk on mmcblk1).

My ultimate goal actually running OpenWRT on ArmBian ProxMox (pimox7), as well as pi-hole, grafana if this box adequate. Unfortunately, it's a tall mountain. Pimox (run on sdcard) occupied 56% of 1896MB RAM, and I can't found OpenWRT image for Pimox, yet. And, when run from emmc, system load reach 66%, 30% RAM, 61 degress C. My Next experiment would be running OpenWRT via docker on this box, or the opposite, running openWRT as docker container host. The first would be more visible than the later, the doc says openwrt as docker host at least on x86_64. I'm abusing this little box too much :D

And, thank you, your method has safe my emmc installation twice, now. After blank screen, I run the command after (not before) the install-aml.sh, and it work. I hope @ophub can help us solved this mistery in the future. Thank you for your hard work :)

Congratulations! Well, I'm still hoping STB price is not rising after we all fixing this emmc issues 🤣🙈

Good luck for your project using this wonderful STB 😅👍

ophub commented 2 years ago

@imam1986 @danboid

Your test result is that this u-boot can be used normally after dd? Has it been tested on 5.15/5.17/5.10/5.4 kernels? Is this the u-boot of the mainline kernel or the android one?

rapdodge commented 2 years ago

@imam1986 @danboid

Your test result is that this u-boot can be used normally after dd? Has it been tested on 5.15/5.17/5.10/5.4 kernels? Is this the u-boot of the mainline kernel or the android one?

On my test, it's success on 5.15, but doesnt work on 5.10 (bootloop)

I dont know about 5.17 and 5.4... Right now my STB is already fully setup :D

ophub commented 2 years ago

ok

rapdodge commented 2 years ago

ok

I will testing it on my other box (B860H) after i backed up all the files & configurations :)

ophub commented 2 years ago

ok, hard work

imam1986 commented 2 years ago

@imam1986 @danboid

Your test result is that this u-boot can be used normally after dd? Has it been tested on 5.15/5.17/5.10/5.4 kernels? Is this the u-boot of the mainline kernel or the android one?

I use this method while using only one image, the last Armbian Debian Bullseye from Armbian forum (Armbian_20.10_Arm-64_bullseye_current_5.9.0.img.xz), because the Pimox7 Tutorial using this image, and I try to follow it to the bone. Sorry. I follow all the instructions from i12bretro, edit file to u-boot.ext and change the extlinux.conf. So, this image doesn't have armbian-install, and use the semi-old install-aml.sh script. After boot emmc, the screen blank (on UART, show "no bootfromsd" "u-boot.emmc" and "starting application (0x1000000)" or sometimes it only stop at "g12a_u212_v1#" (on bullseye image).

rapdodge commented 2 years ago

Test right now (will updated after new test)

  1. Successfully installed to emmc, without dd the android uboot, installed to emmc using armbian-install on B860H

IMG_20220425_131000.jpg IMG_20220425_132155.jpg

WiFi didn't working (Realtek 8189FTV)

  1. Kernel 5.10.112 bootloop IMG_20220425_134145.jpg Android uboot it's not helping... Still bootloop...

  2. Kernel 5.17.4 bootloop too Android uboot still not helping...

  3. Kernel 5.4.190 successful boot...

ophub commented 2 years ago

https://github.com/kitty-panics/OrangePi-Lite-RTL8189FTV

try this driver

https://github.com/unifreq/linux-5.15.y/tree/main/drivers/net/wireless/realtek/rtl8189fs

Aren't rtl8189fs and rtl8189ftv one?

rapdodge commented 2 years ago

https://github.com/kitty-panics/OrangePi-Lite-RTL8189FTV

try this driver

https://github.com/unifreq/linux-5.15.y/tree/main/drivers/net/wireless/realtek/rtl8189fs

Aren't rtl8189fs and rtl8189ftv one?

I don't know, but it's not a big deal, since i will using it wired

rapdodge commented 2 years ago

Dear @ophub,

My test already done... It's only boot on 5.15.y and 5.4.y

Both kernel can't use wifi... (Realtek 8189FTV)

https://github.com/ophub/amlogic-s9xxx-armbian/issues/262#issuecomment-1108114386

I'm hoping all kernel having an patch that you mentioned before

https://github.com/ophub/amlogic-s9xxx-armbian/issues/262#issuecomment-1107706339

rapdodge commented 2 years ago

So, i'm trying to dd u-boot-s905x-s912 and the system after reboot didn't responding until I'm inserting the burned sdcard with hg680p uboot on b860h

Edit, after trying it with u-boot-p212, the respond is same, didn't load

5.15 kernel...

favianrizqulloh commented 6 months ago

So, which kernel is stable for installing to HG680-P with 2GB RAM?

favianrizqulloh commented 5 months ago

WiFi not working on kernel 6.x.x

ChandraOrbit commented 4 months ago

WiFi not working on kernel 6.x.x

I checked it turned out for the 6xx kernel there is no rtl81889fs wifi driver yet

do any friends have it? pls

jayaputra212 commented 4 months ago

Link download: https://www.armbian.com/amlogic-s9xx-tv-box/

ChandraOrbit commented 3 months ago

Untuk image "Armbian_24.8.0_amlogic_s905x_bookworm_6.6.41_server_2024.07.25.img.gz" silahkan download driver di repo saya https://github.com/ChandraOrbit/Driver-HG680P/releases/tag/6.6.41

jayaputra212 commented 3 months ago

Terimakasih

Pada Sen, 29 Jul 2024 22.40, ChandraOrbit @.***> menulis:

Untuk image "Armbian_24.8.0_amlogic_s905x_bookworm_6.6.41_server_2024.07.25.img.gz" silahkan download driver di repo saya https://github.com/ChandraOrbit/Driver-HG680P/releases/tag/6.6.41 http://url

— Reply to this email directly, view it on GitHub https://github.com/ophub/amlogic-s9xxx-armbian/issues/262#issuecomment-2256126602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHQK7C3ZS3J2HGI7BKPKPTZOZH5PAVCNFSM5UE7SXDKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRVGYYTENRWGAZA . You are receiving this because you commented.Message ID: @.***>