Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Boot on HG680P #262

Closed
rapdodge opened this issue Apr 23, 2022 · 36 comments
Closed

Fixing Boot on HG680P #262

rapdodge opened this issue Apr 23, 2022 · 36 comments
Labels
documentation Improvements or additions to documentation new box Research Fills in the Blanks support This need is supported

Comments

@rapdodge
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

ophub commented Apr 24, 2022

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
Copy link
Author

rapdodge commented Apr 24, 2022

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
Copy link
Owner

ophub commented Apr 24, 2022

This is the previous discussion: #60

@imam1986
Copy link

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
Copy link
Owner

ophub commented Apr 24, 2022

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
Copy link
Author

This is the previous discussion: #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
Copy link
Author

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
Copy link
Owner

ophub commented Apr 24, 2022

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

@rapdodge
Copy link
Author

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
Copy link
Author

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

I'm using from android system (4M)

@imam1986
Copy link

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
Copy link
Author

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
Copy link
Author

Dear @ophub,

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

@rapdodge
Copy link
Author

5.10.112 bootloop

1650773576223.mp4

@ophub
Copy link
Owner

ophub commented Apr 24, 2022

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
Copy link
Author

rapdodge commented Apr 24, 2022

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
Copy link
Owner

ophub commented Apr 24, 2022

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
Copy link
Author

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
Copy link

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
Copy link
Author

rapdodge commented Apr 24, 2022

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
Copy link

@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
Copy link
Author

@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
Copy link
Owner

ophub commented Apr 25, 2022

@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
Copy link
Author

rapdodge commented Apr 25, 2022

@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
Copy link
Owner

ophub commented Apr 25, 2022

ok

@rapdodge
Copy link
Author

ok

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

@ophub
Copy link
Owner

ophub commented Apr 25, 2022

ok, hard work

@imam1986
Copy link

@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
Copy link
Author

rapdodge commented Apr 25, 2022

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
Copy link
Owner

ophub commented Apr 25, 2022

@rapdodge
Copy link
Author

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
Copy link
Author

rapdodge commented Apr 25, 2022

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)

#262 (comment)

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

#262 (comment)

@rapdodge
Copy link
Author

rapdodge commented Apr 25, 2022

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...

@ophub ophub closed this as completed Apr 27, 2022
@ophub ophub added documentation Improvements or additions to documentation support This need is supported new box Research Fills in the Blanks labels Jun 23, 2023
@favianrizqulloh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation new box Research Fills in the Blanks support This need is supported
Projects
None yet
Development

No branches or pull requests

4 participants