File:  [ELWIX - Embedded LightWeight unIX -] / elwix / install2uboot.sh
Revision 1.1.2.2: download - view: text, annotated - select for diffs - revision graph
Mon Jan 20 13:15:46 2014 UTC (10 years, 4 months ago) by misho
Branches: elwix2_2
add options in install2uboot

#!/bin/sh
#
# ELWIX install script for u-boot image
#
# (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
#    by Michael Pounov <misho@elwix.org>
#
# $Id: install2uboot.sh,v 1.1.2.2 2014/01/20 13:15:46 misho Exp $
#

[ -r ./config/rc.elwix ] && . ./config/rc.elwix
if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
	echo
	echo "ELWIX project is not configured !?!"
	echo
	exit 1
fi

if [ "${USER}" != "root" ]; then
	echo
	echo "ELWIX project is not configured - install must build under root !?!"
	echo
	exit 1
fi


### main()

if [ -z "$1" ]; then
	echo
	echo "Error:: ELWIX u-boot option not found ..."
	echo
	exit 2
fi

case $1 in
	kernel)
		oldlzma e ${KERNEL} ${REL}/kernel.lzma
		uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX \
			-a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel.lzma \
			${REL}/kernel.lzma.uImage
		;;
	kernel_rootfs)
		oldlzma e ${KERNEL_ROOTFS} ${REL}/kernel_rootfs.lzma
		uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX_ROOTFS \
			-a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel_rootfs.lzma \
			${REL}/kernel_rootfs.lzma.uImage
		;;
	*)
		echo "Option $1 not supported at this moment"
		;;
esac

echo "ELWIX u-boot image $1 complete."

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>