Diff for /elwix/Attic/install2ub.sh between versions 1.1 and 1.1.2.2

version 1.1, 2013/05/14 08:22:23 version 1.1.2.2, 2013/05/14 09:32:42
Line 0 Line 1
   #!/bin/sh
   #
   # ELWIX install script for u-boot image
   #
   # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
   #    by Michael Pounov <misho@elwix.org>
   #
   # $Id$
   #
   
   [ -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
   
   UB_K=""
   
   cleanUB()
   {
           echo "+++ Clean ELWIX U-boot images ..."
   
           rm -rf ${UB_OBJS}
           install -d ${UB_OBJS}
   }
   
   prepareUB()
   {
           echo "+++ Prepare ELWIX U-boot kernel ..."
   
           cp ${KERNEL} ${UB_OBJS}
           ${DEST}/cross_exec.sh objcopy -O binary ${UB_KERNEL} ${UB_KERNEL}.bin
   }
   
   compUB()
   {
           echo "+++ Compress ELWIX U-boot kernel ..."
   
           case ${UB_COMPRESS} in
                   gzip)
                           gzip --force --best ${UB_KERNEL}.bin
                           UB_K="${UB_KERNEL}.bin.gz"
                           ;;
                   lzma)
                           oldlzma ${UB_KERNEL}.bin
                           UB_K="${UB_KERNEL}.bin.lzma"
                           ;;
                   *)
                           echo "Error:: not supported compress method ..."
                           exit 1
                           ;;
           esac
   }
   
   mkimgUB()
   {
           echo "+++ Make ELWIX U-boot kernel image ..."
   
           mkimage -A ${TARGET} -O linux -T kernel -C ${UB_COMPRESS} \
                   -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -n "ELWIX version ${VERSION} kernel" \
                   -d ${UB_K} ${UB_K}.ub
   }
   
   instUB()
   {
           echo "+++ Install ELWIX U-boot kernel image into release directory ..."
   
           install ${UB_K}.ub ${REL}
   }
   
   ### main()
   
   if [ ! -x ${DEST}/cross_exec.sh ]; then
           echo
           echo "Error:: ELWIX cross-toolchain not ready ... First execute ./build_world.sh"
           echo
           exit 1
   fi
   
   cleanUB
   prepareUB
   compUB
   mkimgUB
   instUB
   
   echo "ELWIX U-boot images install complete."

Removed from v.1.1  
changed lines
  Added in v.1.1.2.2


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