Newer
Older
barebox / arch / arm / boards / phytec-phycard-omap4 / env / bin / nand_bootstrap
@Sascha Hauer Sascha Hauer on 3 Feb 2014 539 bytes ARM: rename boards to more consistent naming

echo "copying barebox to nand..."

mci0.probe=1
mkdir mnt

mount /dev/disk0.0 /mnt
if [ $? != 0 ]; then
	echo "failed to mount mmc card"
	exit 1
fi

if [ ! -f /mnt/mlo-nand.bin ]; then
	echo "mlo-nand.bin not found on mmc card"
	exit 1
fi

if [ ! -f /mnt/barebox.bin ]; then
	echo "barebox.bin not found on mmc card"
fi

gpmc_nand0.eccmode=bch8_hw_romcode
erase /dev/nand0.xload.bb
cp /mnt/mlo-nand.bin /dev/nand0.xload.bb

gpmc_nand0.eccmode=bch8_hw
erase /dev/nand0.barebox.bb
cp /mnt/barebox.bin /dev/nand0.barebox.bb

echo "success"