--- elwix/install2uboot.sh 2014/01/20 13:15:46 1.1.2.2 +++ elwix/install2uboot.sh 2014/01/21 23:37:03 1.1.2.3 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: install2uboot.sh,v 1.1.2.2 2014/01/20 13:15:46 misho Exp $ +# $Id: install2uboot.sh,v 1.1.2.3 2014/01/21 23:37:03 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -23,7 +23,14 @@ if [ "${USER}" != "root" ]; then exit 1 fi +if [ -z "${UB_LOADADDR}" ]; then + echo + echo "ELWIX project is not configured for u-boot use !?!" + echo + exit 1 +fi + ### main() if [ -z "$1" ]; then @@ -35,16 +42,21 @@ fi case $1 in kernel) - oldlzma e ${KERNEL} ${REL}/kernel.lzma + oldlzma e ${KERNEL} ${REL}/kernel.${UB_COMPRESS} 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 + -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel.${UB_COMPRESS} \ + ${REL}/kernel.${UB_COMPRESS}.uImage ;; kernel_rootfs) - oldlzma e ${KERNEL_ROOTFS} ${REL}/kernel_rootfs.lzma + oldlzma e ${KERNEL_ROOTFS} ${REL}/kernel_rootfs.${UB_COMPRESS} 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 + -a ${UB_LOADADDR} -e ${UB_ENTRYADDR} -d ${REL}/kernel_rootfs.${UB_COMPRESS} \ + ${REL}/kernel_rootfs.${UB_COMPRESS}.uImage + ;; + rootfs) + makefs -t ffs -B ${UB_ORDER} -f 1000 -o "version=1,bsize=4096,fsize=512" \ + ${REL}/rootfs.dsk ${UBOOT_FS} + mkulzma -v -s 131072 -o ${REL}/rootfs.${UB_COMPRESS_ROOTFS} ${REL}/rootfs.dsk ;; *) echo "Option $1 not supported at this moment"