Page 1 of 1

How to Restore eMMC Loader?

Posted: Sun Oct 29, 2023 1:03 am
by potate
I bought a NanoPi R5C to play around with as I know nothing about Linux or using this mini devices for various task.

I was having issues getting an OS to load from the SD card so I used the command

Code: Select all

dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1
to try and force it to skip the eMMC. Once I realized my mistake, it was too late - I can only boot from an SD card now (obviously).

Is there a way to restore the Loader so that I can again boot from the eMMC? I've flashed a new OS onto the eMMC but I can't load it as it defaults to the SD card.

Thanks!

Re: How to Restore eMMC Loader?

Posted: Thu Nov 02, 2023 7:03 pm
by potate
Anybody?

Re: How to Restore eMMC Loader?

Posted: Fri Nov 03, 2023 6:06 pm
by usual user
You need to reinstate the deleted firmware.
For mainline firmware with U-Boot as payload it may look like this:

Code: Select all

dd bs=512 seek=64 conv=notrunc,fsync if=u-boot-rockchip.bin of=/dev/mmcblk2

MASKROM uses sector 64 as the entry point on MMC devices, so the firmware binary must cover at least that range.

Re: How to Restore eMMC Loader?

Posted: Wed Jan 10, 2024 8:10 am
by reindeerfell
potate wrote:
I bought a NanoPi R5C to play around with as I know nothing about Linux or using this mini devices for various task.

I was having issues getting an OS to load from the SD card so I used the command

Code: Select all

dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1
to try and force it to skip the eMMC. Once I realized my mistake, it was too late - I can only boot from an SD card now (obviously).

Is there a way to restore the Loader so that I can again boot from the eMMC? I've flashed a new OS onto the eMMC but I can't load it as it defaults to the SD card. burrito craft

Thanks!

Set the switch (SW1) to boot with MicroSD on the board 1. Insert the Micro SD flashed with booting image into its slot and power on. You must stop at U- 2. boot once the board is started.

Re: How to Restore eMMC Loader?

Posted: Wed Jan 31, 2024 8:47 am
by MarcoLuff
potate wrote:
I bought a NanoPi R5C to play around with as I know nothing about Linux or using this mini devices for various task.
snaptik
I was having issues getting an OS to load from the SD card so I used the command

Code: Select all

dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1
to try and force it to skip the eMMC. Once I realized my mistake, it was too late - I can only boot from an SD card now (obviously).

Is there a way to restore the Loader so that I can again boot from the eMMC? I've flashed a new OS onto the eMMC but I can't load it as it defaults to the SD card.

Thanks!

It looks like you've overwritten the first 8 megabytes of your eMMC (embedded MultiMediaCard) with zeros, effectively erasing the initial bootloader. To restore the bootloader and regain the ability to boot from eMMC, you'll need to follow a procedure that involves flashing a new bootloader onto the eMMC.

Re: How to Restore eMMC Loader?

Posted: Sat Feb 10, 2024 1:13 am
by Fisiu
You need to flash it back. I think, a method with using RKDevTool should help. Take a look at https://wiki.friendlyelec.com/wiki/inde ... OS_via_USB

Maybe a firefly wiki will be helpful too: https://wiki.t-firefly.com/en/ROC-RK332 ... _emmc.html