Newer
Older
barebox / arch / arm / boards / mioa701 / env / bin / sdcard_override
@Jean-Christophe PLAGNIOL-VILLARD Jean-Christophe PLAGNIOL-VILLARD on 4 Sep 2012 427 bytes command/mount: add autodetection support
#!/bin/sh
# Script to switch to execute sdcard environment scripts if available
#
# This enables an override of the default environment if an SD Card
# is inserted, has a FAT filesystem,  and has a barebox.env file in
# the root directory.

mci0.probe=1
if [ $mci0.probe = 1 ]; then
	mkdir /sdcard
	mount /dev/disk0.0 /sdcard
	if [ -f /sdcard/barebox.env ]; then
		loadenv /sdcard/barebox.env /env.sd
		/env.sd/bin/init
	fi
fi