after flashing EMMC with BPI-R2-EMMC-boot0-DDR1600-20191024-0k.img.gz it won’t boot anymore from SD.
I know it sounds curious to mention EMMC and SD-CARD in respect of booting but I’ll describe what happened :
running OS from SD-CARD since a while ago
decided to move some part of OS from SD-CARD to EMMC
activated write mode on /dev/mmcblk1boot0
checked config with mmc extcsd read /dev/mmcblk1 | grep PARTITION_CONFIG
with bpi-bootsel I’ve flashed BPI-R2-EMMC-boot0-DDR1600-20191024-0k.img.gz onto EMMC
that is the point where I stucked, because I had to reboot, and since then my system is not working!
it was a plan further migrating from SD-CARD to EMMC
I suspect that I flashed accidentally the preloader to the SD-CARD!
After that I made a new SD-CARD with a pure system, and flashed preloader in the way what Frank-w exactly suggested :
From this point, BPI-R2 can boot, but obviously there is no OS or anything on EMMC.
With the old one ( SD-CARD ), I can’t boot neither from EMMC nor SD-CARD!
I would like to use the OS from SD-CARD again, at best could be migrated onto EMMC.
Have you checked boot-switch? its position defines first location where bootrom looks for preloader. If it is set to 0 and emmc has preloader installed it will not boot sdcard. So it should be set to 1 to allow sdcard boot (boot sd if it has preloader,if not try emmc)
If I attach the old SD-CARD, bpi-r2 doesn’t do anything, no UART, no HDMI, just light 3 leds out!
With the new SD-CARD it boots.
Without SD-CARD I get U-Boot Menu.
It’s similar if I delete EMMC partitions.
I think somehow the old SD-CARD consists wrong settings.
Therefore if boot-switch was set 0, it wouldn’t boot with the new SD-CARD, but I might think it wrong!
I would like to use it furthermore, because of the kernel and invested work in root fs!
I have backup images of boot and root made from old SD-CARD.
Now I’m trying install your pure buster image, and than take a backup boot/root.
In this way, broken preloader or/and other headers could be fixed.
My main focus is using this kernel and settings, packages, etc…
This is done by uboot env variable selectmmc/checksd,which checks for sdcard and if none is inserted it uses emmc
That is where i set partition to load kernel from. But i do not set root because in mainline-kernel emmc is 0 (like uboot) but in my and bpi kernels it is 1 (and sdcard is 0)