ilyakurdyukov / rk3528-tvbox

Armbian config for RK3528 TV-boxes
38 stars 6 forks source link

I have uboot.img but i dont know what to do #2

Open jins5 opened 10 months ago

jins5 commented 10 months ago

Hello, Im trying to install armbian on dq08, i did all the thing, i have the uboot.img. But I don't know what to do with it, I put it in my usb key in fat32 and I restarted the box, nothing happens, the box starts normally. I put it in the usb 2.0 port and it does the same thing. I don't know what to do, I'm new to this. Thanks for your help.

ilyakurdyukov commented 10 months ago

Have you read the README carefully?

It doesn't matter which USB port you use, only USB 1.1/2.0 devices will work, which are hard to find fast ones, so better use an SD card.

You need to update U-Boot on EMMC. If the instructions aren't clear to you, use an SD card. For example, you don't know what rkflashtool is or how to use it, and remember that you can break EMMC boot by writing the wrong data or to the wrong offset. USB booting is for experts.

i have the uboot.img. I put it in my usb key in fat32

I even wonder if this is the correct uboot.img, and not some random one downloaded from the Internet.

jins5 commented 10 months ago

I created the image by adding your patch to the folder, then I created the .dtb adapted for Armbian build . Then I mounted the image to access /dtb/rockchip/ . And I unmounted to create the uboot.img. Not a "uboot download from the internet".

I didn't have a micro SD, but I'm going to try. Thx

ilyakurdyukov commented 10 months ago

And I unmounted to create the uboot.img.

How does this create uboot.img?

jins5 commented 10 months ago

When i unmount and get back the .img, i do ur command :

$ dd if=Armbian.img bs=1M count=4 skip=8 > uboot.img

ilyakurdyukov commented 10 months ago

It doesn't matter whether you put the .dtb there or not, it's for Linux. This doesn't affect the U-Boot you read from the image.

To use rkflashtool, you need to hold the hidden key in the AV connector with a toothpick, connect the TV-box via an AM-AM cable (AM = USB A male, this is not a common cable) to the USB 2.0 port, after a couple of seconds you can release the toothpick. Do all this without connecting the TV-box with any other cables (even without the connection to the power supply). After this, the TV-box will be in loader mode for a few minutes. During which you need to use rkflashtool.

Before replacing U-Boot, you can make a backup of the original U-Boot:

./rkflashtool r 0x4000 0x2000 > uboot_old.bin

Keep in mind that loader mode runs from U-Boot, so if you write U-Boot and it doesn't work, you most likely won't be able to get back into this mode.

I don't recommend doing all this, most people don't have an AM-AM cable, so instead buy a microSD card and boot from it, it's more convenient and Linux runs faster. All these steps are needed for TV-boxes without a memory card slot.

ilyakurdyukov commented 10 months ago

When i unmount and get back the .img, i do ur command :

$ dd if=Armbian.img bs=1M count=4 skip=8 > uboot.img

I asked these questions because you already did a strange thing by copying uboot.img to a flash drive formatted in fat32. So you could have done something else wrong, and by writing the wrong U-Boot, you can brick the TV-box.

jins5 commented 10 months ago

Okay, I took your advice. Now I have an sd card, I flashed the armbian image I created with your method. I flashed it on a sd card using balenaetcher. I put it in the box but it won't turn on when there's only the sd card in it. I tried to restart the box without the sd card in it and then put it in. It won't restart and there's not even a led that says "boot".

jins5 commented 10 months ago

I tried with the av button with the toothpicker.

ilyakurdyukov commented 10 months ago

Are you familiar with Armbian? On first boot, you need to connect via SSH using wired Ethernet connection (login root, password 1234) to go through the setup script. Before this, there will be nothing on the screen.

The LED clock screen on the TV-box doesn't turn on because there is no driver for it in Linux.

Since there is no power button on the TV-box, to turn it off you need to unplug the cable from the power supply. To turn on, connect the power cable. (Just in case if someone will try to turn it on with the remote control.)

So, turn it off, insert the SD-card, turn it on, connect using an Ethernet cable, look for a new connection on the router/PC.

jins5 commented 10 months ago

I use ubuntu and all, but I don't know armbian at all, and I really don't want to make any mistakes.

Good news, it works, I've managed to connect (it's very slow, probably because of the SD card). But now I have to install armbian on the box so that it boots without the sd card. I did an apt update and upgrade. But how do I install armbian on the box? I can't find a clear tutorial, is there a trick with armbian-install?

jins5 commented 10 months ago

Should i do : armbian-install Choose : install/update the bootloader on sd/eMMC

?

ilyakurdyukov commented 10 months ago

But now I have to install armbian on the box so that it boots without the sd card.

I haven't tried this, I want to leave Android so that I can use both systems.

If you are doing this because it works slowly from a memory card, you probably have a cheap memory card or high demands.

I use Kingston SDCS2/32GBSP (package states reading at 100 MB/s) and Armbian works fast enough for me.

jins5 commented 10 months ago

I have a cheap memory card, thats why.

Even if you haven't tried it, don't you have an idea of how to install it permanently on the memory?

ilyakurdyukov commented 10 months ago

Even if you haven't tried it, don't you have an idea of how to install it permanently on the memory?

I guess it's a direct copy of the .img contents, but on the EMMC rather than the SD card. I would probably do this using rkflashtool, you can try built-in tools like armbian-install, but I won't be able to help you with that part.

jins5 commented 10 months ago

Ok ok, thank you very much in any case, for your patch and especially for your precious help.

jins5 commented 10 months ago

Hi, I managed to brick the box lol. I wanted to install armbian on the box using the armbian-install tool but in any case it doesn't work. The box no longer wants to boot or appear in my connected devices. I wanted to restore it with the tutorial provided by the sellers on AliExpress, but with the toothpicker on the front button and connecting the USB to 2.0 and on my PC in 2.0 it also doesn't work. The software does not recognize it. Even the Windows device thing doesn't recognize it. don't you have an idea thx ?

ilyakurdyukov commented 10 months ago

Armbian still booting from SD card?

jins5 commented 10 months ago

No, I've tried it, it doesn't work, I've even created a new se card with a blank armbian, it doesn't work either, it's not detected.

ilyakurdyukov commented 10 months ago

No, I've tried it, it doesn't work, I've even created a new se card with a blank armbian, it doesn't work either, it's not detected.

If Armbian copied itself from an SD card, it probably left the partition UUIDs the same. Try to rebuild the Armbian image, the UUID should change in armbianEnv.txt, then try to write this image to the SD card and boot from it.

jins5 commented 10 months ago

It's strange, I've mounted the old image I had of armbian to see the armbianEnv.txt. I noticed that there was nothing in its mnt folder, even as root. I have to create a new image with your patch (I don't really want to, it takes a lot of time).

jins5 commented 10 months ago

I have to create a new image with your patch ?

Thats was a question sorry.

jins5 commented 10 months ago

image

wtf look my armbianEnv.txt

ilyakurdyukov commented 10 months ago

If Armbian on the SD card is damaged - you can also try using the old image first. I just don’t know how Linux boot will behave if it finds partitions with the same UUID on the SD card and EMMC. Also keep in mind that if for some reason the SD card is disconnected while data is being written, the file system on it may become damaged.

jins5 commented 10 months ago

The screenshots I've shown you are from the image I created at the very beginning, not the one on the SD card.

If worst comes to worst, I'll start the whole tutorial again?

ilyakurdyukov commented 10 months ago

The screenshots I've shown you are from the image I created at the very beginning, not the one on the SD card.

Double-check that the image is mounted and not the SD card. If your image is somehow damaged, you will have to rebuild it again. But if you didn't delete the cache files that are created by the Armbian build, the build will be faster.

jins5 commented 10 months ago

I'll try again and I'll tell you. Thanks a lot.

ilyakurdyukov commented 10 months ago

According to the documentation, Rockchip chips have boot priority from the SD card, so devices with an SD slot theoretically cannot be bricked. But Rockchip can mess things up unintentionally or intentionally, you never know.

jins5 commented 10 months ago

Well, I defied all the laws. I have two dq08s exactly alike. So I tried the sd card I created on the dq08 on the one I never touched and it works. But the one I "brick" doesn't boot.

ilyakurdyukov commented 10 months ago

You can solder wires for the UART pins, maybe you can find in the UART messages what is wrong.

jins5 commented 10 months ago

I have to make a connection between two pins, right? Which pins? And where is the UART?

ilyakurdyukov commented 10 months ago

I have to make a connection between two pins, right? Which pins? And where is the UART?

You need a connection between the pins and the USB to UART adapter (I have a CH340G). But I don't know where these pins are on DQ08, because I only read UART messages on another TV-box (H96MAX M1). There I did without soldering, by inserting needles into the holes on the board.

Maybe you should create a topic on the Armbian forum and ask why armbian-install can brick the TV-box?

jins5 commented 10 months ago

I made a topic explaining my problem. I found another topic about my box and someone saw that when the emmc is erased, the box does not even want to boot on the SD card.

https://forum.armbian.com/topic/30276-help-dq08-rk3528-4go-ram-64go-ssd-cant-boot-with-multitool-with-photos/?do=findComment&comment=175265

image

ilyakurdyukov commented 10 months ago

But why did the Armbian installation ruin the boot? It's an install, not disk cleanup.

jins5 commented 10 months ago

image

I did boot from emmc and install the bootloader

fujianzz commented 5 months ago

I am attempting to flash Armbian to eMMC, and I've tried the following two methods:

Using armbian-install Using the command dd if=Armbian_24.5.0-trunk_6.1.43.img of=/dev/mmcblk2 Both failed, resulting in the same outcome as jins5.

The method I used to recover was as follows:

Power off the device and insert a blank (very important) SD card. Open RKDevTool. Press and hold the reset button, then insert a USB-to-USB cable (do not connect the power, USB will supply power). RKDevTool will prompt that a LOADER device has been detected. Use RKDevTool's firmware upgrade function to flash RK3528_DC_DQ08_Multi_WIFI_13_20231213.1628.img. This DQ08 firmware is incorrect for my device (H96MAX M7) as I do not have my own firmware, but it suffices for now. Power off, insert the SD card with Armbian, and it boots successfully. Under Armbian, I use dd to flash my backed-up Android.img to eMMC. Now eMMC can boot the original Android, and the SD card can boot Armbian.

jins5 commented 5 months ago

Incredible. So your method is supposed to avoid short-circuiting the pins? Because I did everything "except the sd card inside" and rkdevelop couldn't see my box.

fujianzz commented 5 months ago

A blank SD card is necessary. I used CH340 with bps=1500000 and saw the output, entering RKUSB mode. I didn't use the shorting method. If you can't find the reset button, it may be hidden inside the audio port. You can try poking around in there.

fujianzz commented 5 months ago

I see this https://github.com/ophub/amlogic-s9xxx-armbian/blob/ef0583fcaa031150a8685c17901d0d87c4319b10/documents/README.md#821-installation-method-for-radxa-rock5b explaining that Rockchip devices require a loader.bin when flashing to eMMC. However, it seems difficult to extract the loader.bin, and I'm afraid of bricking my device. Therefore, I haven't attempted to use the rk3528 loader.bin found online yet. Do you have any suggestions for this?

jins5 commented 5 months ago

You can see this : https://forum.armbian.com/topic/32141-why-armbian-install-can-brick-the-tv-box/

When I tried to unbrick my box, I had opened channel. I tried all the methods, with the button in the audio. Except that none of them worked until I tried to short-circuit the pins behind the thermal pad, which I tried to remove except that the processor came with ...

ilyakurdyukov commented 5 months ago

What does a blank SD card mean, when the partition table is erased?