It could be that line's fault but I am surprised that the change comes from us when this behaviour is the same on upstream beagleboard bootloader. Try setting bootcmd from uEnv.txt indeed, or hardcoding the mmc=
.
Ward I already have the PCB's though so I can't change the gpio pin the button goes to.
You won't need to: if you can modify uEnv.txt on the mmc so that it always boots from emmc, then when you press the button and it will skip that and boot directly from SD card. If you do need to read it, you can still use
Ward Also I don't really get what the point of the SD boot button is then, if it ends up booting from SD anyways if an SD is present...
I believe the motivation for this behaviour is that Beagleboard realised late that it was convenient that if a valid SD card was present it would boot from it instead of eMMC, but the hardware wiring was such that eMMC booted before SD card. It makes sense in most cases: if you put in an SD card, you'd expect to boot from it. But as they had hardwired an emmc-first behaviour, they introduced this as a sw workaround. Later boards (e.g.: BBAI64 I think) would have the default boot sequence so that it boots from SD card first and then eMMC.