Newer
Older
barebox / arch / arm / boards / eukrea_cpuimx27 / env / bin / boot
@Eric Bénard Eric Bénard on 13 Oct 2010 981 bytes eukrea_cpuimx27: update board support
#!/bin/sh

. /env/config

if [ x$1 = xnand ]; then
	root=nand
	kernel=nand
fi

if [ x$1 = xnet ]; then
	root=net
	kernel=net
fi

if [ x$1 = xnor ]; then
	root=nor
	kernel=nor
fi

if [ x$root = xnet ]; then
	if [ x$ip = xdhcp ]; then
		bootargs="$bootargs ip=dhcp"
	else
		bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
	fi
else
	bootargs="$bootargs ip=off"
fi

if [ x$rootfstype = xubifs ]; then
	bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootpartnum rootfstype=ubifs"
else
	if [ x$root = xnand ]; then
		bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2"
	elif [ x$root = xnor ]; then
		bootargs="$bootargs root=$rootpart_nor rootfstype=jffs2"
	fi
fi

bootargs="$bootargs mtdparts=physmap-flash.0:$nor_parts;mxc_nand:$nand_parts"

if [ $kernel = net ]; then
	if [ x$ip = xdhcp ]; then
		dhcp
	fi
	tftp $uimage uImage || exit 1
	bootm uImage
elif [ $kernel = nor ]; then
	bootm /dev/nor0.kernel
else
	bootm /dev/nand0.kernel.bb
fi