1: #!/bin/sh
2: #
3: # ELWIX install script for u-boot image
4: #
5: # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
6: # by Michael Pounov <misho@elwix.org>
7: #
8: # $Id: install2uboot.sh,v 1.1.2.2 2014/01/20 13:15:46 misho Exp $
9: #
10:
11: [ -r ./config/rc.elwix ] && . ./config/rc.elwix
12: if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
13: echo
14: echo "ELWIX project is not configured !?!"
15: echo
16: exit 1
17: fi
18:
19: if [ "${USER}" != "root" ]; then
20: echo
21: echo "ELWIX project is not configured - install must build under root !?!"
22: echo
23: exit 1
24: fi
25:
26:
27: ### main()
28:
29: if [ -z "$1" ]; then
30: echo
31: echo "Error:: ELWIX u-boot option not found ..."
32: echo
33: exit 2
34: fi
35:
36: case $1 in
37: kernel)
38: oldlzma e ${KERNEL} ${REL}/kernel.lzma
39: uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX \
40: -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel.lzma \
41: ${REL}/kernel.lzma.uImage
42: ;;
43: kernel_rootfs)
44: oldlzma e ${KERNEL_ROOTFS} ${REL}/kernel_rootfs.lzma
45: uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX_ROOTFS \
46: -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel_rootfs.lzma \
47: ${REL}/kernel_rootfs.lzma.uImage
48: ;;
49: *)
50: echo "Option $1 not supported at this moment"
51: ;;
52: esac
53:
54: echo "ELWIX u-boot image $1 complete."
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>