This is just a summary of the above recipe for posterity (and search engines everywhere):
To make it so that the BBB will ignore the SD card unless SW2 is pressed requires a new u-boot on the eMMC.
the following recipe needs to be followed exactly (otherwise there will be errors in the compile of u-boot.
Steps:
1) Make sure that you have a 64-bit Linux with git installed, and a BBB that can boot off the eMMC
2) Rebuild u-boot:
2.1) install the appropriate cross-compiler
>> tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
>> export CC=`pwd`/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
>> ${CC}gcc --version (** this tests to make sure CC is set correctly **)
2.2) Get u-boot from repository (~/)
>> cd u-boot/
>> git checkout v2016.03 -b tmp
2.3) patch it (~/u-boot)
>> patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
2.4) modify it
2.4.1) in the directory ~/u-boot/include/configs find the file am335x_evm.h
2.4.2) open it and search for the entry #define BOOT_TARGET_DEVICES
2.4.3) delete (comment out) the lines: (these are the lines that tell the bootloader to look at the SD card for a boot image)
func(MMC, mmc, 0) \
func(LEGACY_MMC, legacy_mmc, 0) \
2.4.4) save the file
2.5) build it (~/u-boot)
>> make ARCH=arm CROSS_COMPILE=${CC} distclean
>> make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig
>> make ARCH=arm CROSS_COMPILE=${CC}
3) There are two files that you are interested in - MLO and u-boot.img
4) Boot the BBB off the uSD card (necessary since we are going to muck with the eMMC)
5) Get the files MLO and u-boot.img to the BBB
5.1) Use SmarTTY to SCP these files to the BBB - they will end up in /tmp
6) Go to the directory where these files landed
7) make sure that the eMMC is mounted as mmcblk1 - this should be the case if you coot off the uSD
>> lsblk
the eMMC on the Rev C BBB is the 3.6G disk/partition
8) sudo dd if=./MLO of=/dev/mmcblk1 count=1 seek=1 bs=128k
9) sudo dd if=./u-boot.img of=/dev/mmcblk1 count=2 seek=1 bs=384k
10) reboot - will boot off the eMMC unless you hold down SW2 in which case it will boot off the uSD
Troubleshooting:
1) If u-boot compilation kicks errors it is probably because the value of ${CC} is not set properly. This value is not permanent, you'll need to export it every time unless you want to change your Linux PATH. It could also be a typo in the header you modified
2) If you still boot off the uSD regardless of SW2 - check that you actually updated the MLO and u-boot.img files. Best to just try to flash them again since they are a direct write to the uSD card (not part of the file system). Remember - reflashing the eMMC will probably lose your modified u-boot.