Luckily, my local store had an A-to-A 3.0 cable. I was able to enter maskrom mode and successfully boot into friendlywrt using the Install OS via USB method.
What is stopping people from configuring u-boot default boot command to swap SDCard order and eMMC btw.?
If you look here, https://docs.u-boot.org/en/stable/develop/bootstd/overview.html, you can adjust boot_targets env in uboot, no? You can either overwrite it here: https://github.com/u-boot/u-boot/blob/master/include/configs/rockchip-common.h#L17 or specify custom BOOT_TARGETS when building u-boot.
This will be a bit different in a sense that u-boot in EMMC loads SDCard image (instead of u-boot booting straight from SDCard) but should still have desired effect no? Or am I missing something?
My understanding about uBoot is almost none. With that said, I believe we would need to create a .patch file and add it to OpenWrt uboot-rockchip (https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=package/boot/uboot-rockchip/patches;hb=HEAD) and test if it works.
The problem with upstreaming the patch is that I imagine only NanoPi R6S has the issue that mask button doesnât force SDCard boot, correct?
I soldered UART connector to get access to u-boot shell and added the patch to u-boot under package/boot/uboot-rockchip/patches - which will now boot OpenWRT from SDCard first - but the catch is that rootfs is mounted by UUID and SDCard / eMMC rootfs blkid is identical, so I end up loading kernel from SDCard and rootfs from eMMC. Needs more tweaks.
From 71438c33ed2e5a20c85e44aa6463cab9f997dabe Mon Sep 17 00:00:00 2001
From: skrilax <skrilax@gmail.com>
Date: Tue, 28 Oct 2025 15:29:50 -0700
Subject: [PATCH] Set preference to SDCard booting over EMMC
---
include/configs/rockchip-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 9121bba3738..1d0947220d3 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -13,7 +13,7 @@
#ifndef CONFIG_SPL_BUILD
-#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi"
+#define BOOT_TARGETS "mmc0 mmc1 nvme scsi usb pxe dhcp spi"
#ifdef CONFIG_ARM64
#define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
--
2.43.0
Hmm, after editing the boot.scr file on the SDCard in the kernel partition of the image and forcing rootfs to SDCard by not using UUID it will fully boot from SDCard when itâs inserted. So SDCard boot works properly this way.
Not sure why the UUID of rootfs is constant, need to take a look. I do see why this situation is tricky to upstream to work ideally (I guess thatâs why nobody was really bothered to do it yet) ![]()
5 posts were split to a new topic: SQM optimization for NanoPi R6S with 24.10.4