Diff for /elwix/build_rootfs.sh between versions 1.11.2.1 and 1.12

version 1.11.2.1, 2021/03/24 08:26:16 version 1.12, 2021/07/16 18:35:50
Line 30  if [ "${USER}" != "root" ]; then Line 30  if [ "${USER}" != "root" ]; then
         exit 1          exit 1
 fi  fi
   
   if [ ! -x "${OBJDUMP}" ]; then
           echo
           echo "ELWIX project is not configured - executable objdump not found !"
           echo
           exit 1
   fi
   
 KRNNAME="kernel_rootfs"  KRNNAME="kernel_rootfs"
 NEWKERN="${REL}/${KRNNAME}"  NEWKERN="${REL}/${KRNNAME}"
 MKF="Makefile.elwix"  MKF="Makefile.elwix"
Line 430  install_image() Line 437  install_image()
         mfs_size=`stat -f '%z' $REL/$ROOTFS_IMG 2>/dev/null`          mfs_size=`stat -f '%z' $REL/$ROOTFS_IMG 2>/dev/null`
         [ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1          [ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1
   
        echo "exec> ${CROSSTOOLDIR}/usr/bin/objdump -h $KERNEL_ROOTFS 2> /dev/null | grep \" oldmfs \""        echo "exec> ${OBJDUMP} -h $KERNEL_ROOTFS 2> /dev/null | grep \" oldmfs \""
        sec_info=`${CROSSTOOLDIR}/usr/bin/objdump -h $KERNEL_ROOTFS 2> /dev/null | grep " oldmfs "`        sec_info=`${OBJDUMP} -h $KERNEL_ROOTFS 2> /dev/null | grep " oldmfs "`
         [ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1          [ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1
         echo "'-> Object dump { ${sec_info} }"          echo "'-> Object dump { ${sec_info} }"
   
Line 444  install_image() Line 451  install_image()
         dd if=$REL/$ROOTFS_IMG ibs=8192 of=$NEWKERN obs=${sec_start} oseek=1 conv=notrunc \          dd if=$REL/$ROOTFS_IMG ibs=8192 of=$NEWKERN obs=${sec_start} oseek=1 conv=notrunc \
                 2>/dev/null && echo "'-> Completed MFS image embedded into kernel"                  2>/dev/null && echo "'-> Completed MFS image embedded into kernel"
   
#       START=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | head -1`###       START=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | head -1`
#       STOP=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | tail -1`###        STOP=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | tail -1`
#       STOP=$(($STOP + 1))###        STOP=$(($STOP + 1))
#       echo "'-> Start offset from $START to $STOP byte"###       echo "'-> Start offset from $START to $STOP byte"
   
#       head -c $START $KERNEL_ROOTFS >$NEWKERN###       head -c $START $KERNEL_ROOTFS >$NEWKERN
#       cat $REL/$ROOTFS_IMG >>$NEWKERN###        cat $REL/$ROOTFS_IMG >>$NEWKERN
#       tail -c +$STOP $KERNEL_ROOTFS >>$NEWKERN###       tail -c +$STOP $KERNEL_ROOTFS >>$NEWKERN
   
         echo "'-> Compress kernel"          echo "'-> Compress kernel"
         cd $REL          cd $REL

Removed from v.1.11.2.1  
changed lines
  Added in v.1.12


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