Recover from botching os install on emmc chip

I have a Rock Pi 4b. I was able to install and boot Ubuntu on a uSD card. I then tried to install the image on the emmc chip using the dd command. Since doing that I have not been able to boot from either. I tried shorting 23-25 on the gpio but that did not help. Do you have any suggestions as to what I should do next? Is there any way to recover without removing the emmc chip from the board? If I have to remove the chip what is the best way of doing it.

How did you dd the image to eMMC? I think you forget to decompress it?

I have two images -

LibreELEC-RK3399.arm-10.0.2-rock-pi-4.img
rockpi-4b-debian-buster-xfce4-arm64-20220506-0320-gpt.img

I did decompress both files I downloaded from RADXA.

I installed each on a separate uSD card. Both worked fine on my Rock Pi 4. I then copied the LibreELEC-RK3399.arm-10.0.2-rock-pi-4.img onto the Debian uSD card and booted Debian. I then executed the command from the Dedian terminal.

sudo dd if=LibreELEC-RK3399.arm-10.0.2-rock-pi-4.img of=/dev/mmcblk1

It ran for several minutes and finished with no error messages.

How would I erase what is on the eMMc chip or does that does not matter when using the dd command? I ask because when I was mucking about earlier some things may have gotten written to the eMMc chip.

With regard to computer literacy I have been using linux since the 1990’s when I installed slackware on a 486 from 50 high density floppy disks and have built at least 12 desktop linux machines. I have no experience (until now) with the Raspberry Pi or Rock Pi hardware.

I just came across this thread by accident and I think I may have the same problem - I also wrote that LibreELEC 10.0.2 image to my EMMC (using a USB adapter) and ever since, my RockPi 4A Rev1.4 does not boot from either EMMC or SD anymore. Just as for brombo, shorting pins 23-25 does not make any difference.

I attached a TTL to USB cable and I do get a few lines of console output so at least the board is not dead. However, I’m not familiar enough with the boot process of these devices to be able to interpret the output:

DDR Version 1.24 20191016
In
channel 0
CS = 0
MR0=0x19
MR4=0x3
MR5=0x6
MR8=0x0
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 1
CS = 0
MR0=0x19
MR4=0x3
MR5=0x6
MR8=0x0
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 0 training pass!
channel 1 training pass!
change freq to 416MHz 0,1
Channel 0: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=14 CS=1 Die Bus-Width=16 Size=512MB
Channel 1: LPDDR4,416MHz
Bus Width=32 Col=10 Bank=8 Row=14 CS=1 Die Bus-Width=16 Size=512MB
256B stride
channel 0
CS = 0
MR0=0x19
MR4=0x3
MR5=0x6
MR8=0x0
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 1
CS = 0
MR0=0x19
MR4=0x3
MR5=0x6
MR8=0x0
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0xFF
channel 0 training pass!
channel 1 training pass!
channel 0, cs 0, advanced training done

I then uninstalled my EMMC and noticed that:

a) the very same LibreELEC image boots just fine when written on an SD card (as long as the EMMC is not installed)
b) booting from the EMMC also works using the official Android 9 image

Before noticing this thread, I created an issue over at the LibreELEC forums at https://forum.libreelec.tv/thread/25829-le-10-0-2-fails-to-boot-on-rock-pi-4a-with-emmc/ but haven’t received a response yet.

I hope the above is useful to pinpoint the problem - otherwise please ignore as I didn’t intend to hijack the op’s thread.

Please note the I cannot remove my eMMc chip. I found a link that said if the os on the uSD card was not the same as the one on the eMMc chip the Rock Pi would boot from the uSD card. This worked for me. I am building a case for my Rock Pi 4 (no good prebuilt options if you don’t want it shipped from China) after that I will try to wipe the eMMc chip from within Debian -

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M

and then reinstall LibreELEC with -

sudo dd if=LibreELEC-RK3399.arm-10.0.2-rock-pi-4.img of=/dev/mmcblk1 bs=16M

Last time I did not have bs=16M and I don’t know if that made a difference.

Since you want to use LibreELEC I assume you are making an htpc. I am also doing this with my Samsung Smart TV. I have found if you turn off the htpc the Samsung Smart TV will forget how to connect. To connect I have to remove all the hdmi connectors from the TV and unplug the TV. After plugging the TV in again turn it on and off to reinitialize all the hdmi ports. Then connect your htpc and turn on the TV and the TV will see an connect to the hdmi port you have connects the htpc to. Putting the htpc to sleep would probably work (I need to check this with a full size htpt desktop model I have that can sleep and wake up) but I don’t know if the Rock Pi has a sleep mode or whether or not it can be activated from LibreELEC.

I just wanted to let you know that I solved my boot issue by writing an official U-Boot image to the onboard SPI flash using an USB-A to USB-A cable as descibed here. Apparently the SPI flash was empty before and the LibreELEC guys changed something between version 9 and 10 because only the latter showed the boot issue while the former started without problems.

I briefly connected the RockPi to my Samsung Q80 and thankfully I didn’t observe the issues you described. I did notice, though, that I could only select 4k@30Hz - I would have expected 60Hz but didn’t investigate further.

Right now I have limited time but I eventually want to run the RockPi with the Penta SATA Hat as a PVR, replacing my current setup of two separate SBCs for recording and playback. I would be curious to see the kind of case you’re building!

Hear are pictures of the case:



There is a heatsink stuck to the Rockchip and a fan underneath the heatsink. The thing stuck to the side of the case is the receiver for an Ortek VRC-1100 remote. It was made for Windows 7 Media Center and to the computer looks like a keyboard so it works fine with any linux such as LibreElec. For PVR hardware I am using a HD Homerun Prime which converts the cable signal to ethernet.

The Prime version which works with cable (the slot on the back is for a cable card, the device has three cable tuners) only works in the US. Versions for over the air antennas would work in Europe. There is software that comes with the hardware and an add on for Kodi so you can record cable channels on any computer on you LAN. The channel guide looks like this:

I record any shows I want to on my main computer:

It has about 44TB worth of hard drive storage currently.