Annotation of elwix/install2uboot.sh, revision 1.1.2.5

1.1.2.1   misho       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: #
1.1.2.5 ! misho       8: # $Id: install2uboot.sh,v 1.1.2.4 2014/01/23 22:26:00 misho Exp $
1.1.2.1   misho       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: 
1.1.2.3   misho      26: if [ -z "${UB_LOADADDR}" ]; then
                     27:        echo
                     28:        echo "ELWIX project is not configured for u-boot use !?!"
                     29:        echo
                     30:        exit 1
                     31: fi
                     32: 
1.1.2.1   misho      33: 
                     34: ### main()
                     35: 
1.1.2.2   misho      36: if [ -z "$1" ]; then
1.1.2.1   misho      37:        echo
1.1.2.2   misho      38:        echo "Error:: ELWIX u-boot option not found ..."
1.1.2.1   misho      39:        echo
                     40:        exit 2
                     41: fi
                     42: 
1.1.2.2   misho      43: case $1 in
                     44:        kernel)
1.1.2.3   misho      45:                oldlzma e ${KERNEL} ${REL}/kernel.${UB_COMPRESS}
1.1.2.2   misho      46:                uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX \
1.1.2.3   misho      47:                        -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel.${UB_COMPRESS} \
                     48:                        ${REL}/kernel.${UB_COMPRESS}.uImage
1.1.2.2   misho      49:                ;;
                     50:        kernel_rootfs)
1.1.2.3   misho      51:                oldlzma e ${KERNEL_ROOTFS} ${REL}/kernel_rootfs.${UB_COMPRESS}
1.1.2.2   misho      52:                uboot_mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} -n ELWIX_ROOTFS \
1.1.2.3   misho      53:                        -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel_rootfs.${UB_COMPRESS} \
                     54:                        ${REL}/kernel_rootfs.${UB_COMPRESS}.uImage
                     55:                ;;
                     56:        rootfs)
1.1.2.4   misho      57:                makefs -t ffs -B ${UB_ORDER} -f 1000 \
                     58:                        -o "version=1,bsize=4096,fsize=512,minfree=0" \
1.1.2.3   misho      59:                        ${REL}/rootfs.dsk ${UBOOT_FS}
                     60:                mkulzma -v -s 131072 -o ${REL}/rootfs.${UB_COMPRESS_ROOTFS} ${REL}/rootfs.dsk
1.1.2.2   misho      61:                ;;
                     62:        *)
                     63:                echo "Option $1 not supported at this moment"
                     64:                ;;
                     65: esac
1.1.2.1   misho      66: 
                     67: echo "ELWIX u-boot image $1 complete."

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