Without modifying code and building from source, the easiest approach might be to use “extroot” configuration. Extroot boots normally, then adds an additional overlay using “external” storage, such as an SD card. It has a drawback in that upgrades are more complicated as the sysupgrade process assumes that the internal flash is the proper place to put the saved config for restore once the system reboots the first time.
I don’t know the X750 under ath79 as well as ipq40xx, but my first thoughts would be not to modify U-Boot and its environment unless you absolutely have to. Leaving it alone means you can always flash “stock” firmware and get something running again. Modifying the U-Boot environment can be dicey as I’ve seen U-Boot rewrite its environment to some in-built default, which could leave you soft-bricked. I also know that the public source for the GL-AR750S U-Boot is not current.
Looking at target/linux/ath79/dts/qca9531_glinet_gl-x750.dts shows that there is plenty of space for a kernel there, at least up to what U-Boot can load and decompress.
You can change the kernel command line and the root device with DTS, at least on the ipq40xx target.
Some targets have a “munge” or full override possible also. I haven’t looked into this on the ath79 target.
From target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-linksys_ea8300.dts, the following code overrides the U-Boot command argument (early init effectively takes the “last” value for a command-line argument):
// OEM U-Boot provides either
// init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 \
// root=ubi0:ubifs rootwait rw
// or the same with ubi.mtd=13,2048
bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
Assuming that your kernel has the proper drivers for the SD card and its file system built in, you should be able to mount root directly off of it. I’m guessing that it would be the USB drivers, mass-storage access, and either ext4 or perhaps UBIFS. (I’ve read that F2FS has some reliability problems.)
hmmm… working from Master - X750 is covered under both ar7xxx/ar9xxx, and there is work on ath79.
OP is asking how to redirect boot - and x750 is nominally a NOR based target - so it’s uboot that would have to do the switch there, but how to decide to boot from NOR or wait for SDCard (mmcblock) without breaking everything.
Can be done - see the AR300M-NAND target, and there it’s uboot to decide.
For general purposes, probably out of scope to modify uboot for the use-case that OP wants, as someone would have to maintain u-boot there.
@jeffsf - not sure where ipq40xx comes in, and there, it’s even more complication - b1300 being NOR, and S1300 being eMMC - sometimes I wonder if we’re both looking at ath79 a bit too hard