Diff for /elwix/build_rootfs.sh between versions 1.4.2.1 and 1.8.2.4

version 1.4.2.1, 2013/01/28 10:48:45 version 1.8.2.4, 2014/01/17 11:23:12
Line 30  if [ "${USER}" != "root" ]; then Line 30  if [ "${USER}" != "root" ]; then
         exit 1          exit 1
 fi  fi
   
NEWKERN="${REL}/kernel"KRNNAME="kernel_rootfs"
 NEWKERN="${REL}/${KRNNAME}"
 MKF="Makefile.elwix"
 MKH="Makefile.inc"
   
   # Set TARGET_CPUTYPE only for world compiling. Don't use this in kernel build!
   X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}"
   
 clean_elwix()  clean_elwix()
 {  {
         echo "+++ Clean elwix binary from ELWIX World ..."          echo "+++ Clean elwix binary from ELWIX World ..."
         rm -rf $BSDOBJ/elwix          rm -rf $BSDOBJ/elwix
   
         echo "+++ Clean ELWIX RootFS firmware ..."          echo "+++ Clean ELWIX RootFS firmware ..."
        rm -rf $MKDIR        rm -rf $ROOTFS_MKDIR
        mkdir $MKDIR        mkdir $ROOTFS_MKDIR
   
         echo "+++ Clean RootFS directory ..."          echo "+++ Clean RootFS directory ..."
         chflags -R noschg $ROOTFS          chflags -R noschg $ROOTFS
Line 53  clean_elwix() Line 59  clean_elwix()
 prepare_elwix()  prepare_elwix()
 {  {
         echo "+++ Prepair ELWIX RootFS firmware ..."          echo "+++ Prepair ELWIX RootFS firmware ..."
        cd $MKDIR        cd $ROOTFS_MKDIR
         cat >$MKH <<_EOF          cat >$MKH <<_EOF
 # Auto-generated Makefile include for crungegen  # Auto-generated Makefile include for crungegen
 # !!! Dont edit by hand !!!  # !!! Dont edit by hand !!!
Line 68  srcdirs ${BSDSRC}/bin ${BSDSRC}/sbin ${BSDSRC}/libexec Line 74  srcdirs ${BSDSRC}/bin ${BSDSRC}/sbin ${BSDSRC}/libexec
 srcdirs ${BSDSRC}/usr.bin ${BSDSRC}/usr.sbin ${BSDSRC}/usr.sbin/wpa  srcdirs ${BSDSRC}/usr.bin ${BSDSRC}/usr.sbin ${BSDSRC}/usr.sbin/wpa
 srcdirs ${BSDSRC}/secure/usr.bin ${BSDSRC}/secure/usr.sbin ${BSDSRC}/secure/libexec  srcdirs ${BSDSRC}/secure/usr.bin ${BSDSRC}/secure/usr.sbin ${BSDSRC}/secure/libexec
   
   buildopts TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} ${X_TARGET_CPUTYPE} __MAKE_CONF=${MAKECONF}
 buildopts -DNO_PAM -DNO_KERBEROS WITHOUT_PAM_SUPPORT=yes WITHOUT_KERBEROS_SUPPORT=yes WITHOUT_KERBEROS=yes  buildopts -DNO_PAM -DNO_KERBEROS WITHOUT_PAM_SUPPORT=yes WITHOUT_KERBEROS_SUPPORT=yes WITHOUT_KERBEROS=yes
 buildopts TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} MAKEOBJDIRPREFIX=${BSDOBJ}/elwix  
 _EOF  _EOF
         cat $CFGDIR/$ROOTFS_CONF >>$ROOTFS_CONF          cat $CFGDIR/$ROOTFS_CONF >>$ROOTFS_CONF
   
         . ${CENV}  
         install -d ${BSDOBJ}/elwix          install -d ${BSDOBJ}/elwix
        crunchgen -f -o -p ${BSDOBJ}/elwix -h $MKDIR/$MKH -m $MKF -c elwix.c -e elwix $ROOTFS_CONF        env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix crunchgen -f \
                 -h $ROOTFS_MKDIR/$MKH -m $MKF \
                 -c elwix.c -e elwix $ROOTFS_CONF
         cd -          cd -
 }  }
   
 build_elwix()  build_elwix()
 {  {
         echo "+++ Build ELWIX RootFS firmware ..."          echo "+++ Build ELWIX RootFS firmware ..."
        cd $MKDIR        cd $ROOTFS_MKDIR
        . ${CENV}        env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix ${CBUILD} -f $MKF \
        MAKEOBJDIRPREFIX=${BSDOBJ}/elwix                TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
        make -f $MKF clean                ${X_TARGET_CPUTYPE} __MAKE_CONF=${MAKECONF} clean
        make -f $MKF        env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix ${CBUILD} -f $MKF \
                 TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
                 ${X_TARGET_CPUTYPE} __MAKE_CONF=${MAKECONF}
         if [ $? -ne 0 ]; then          if [ $? -ne 0 ]; then
                 exit 1                  exit 1
         fi          fi
Line 138  install_rootfs() Line 147  install_rootfs()
         LNPRG="${SBIN}/elwix"          LNPRG="${SBIN}/elwix"
   
         echo "+++ Install ELWIX into RootFS directory ..."          echo "+++ Install ELWIX into RootFS directory ..."
        install $MKDIR/elwix $SBIN        install $ROOTFS_MKDIR/elwix $SBIN
   
         InstallList ${ELWIX_ROOTFS} ${WORLD} ${ROOTFS}          InstallList ${ELWIX_ROOTFS} ${WORLD} ${ROOTFS}
   
Line 373  build_image() Line 382  build_image()
 install_image()  install_image()
 {  {
         echo "+++ Install ELWIX RootFS Image into kernel ..."          echo "+++ Install ELWIX RootFS Image into kernel ..."
        START=`strings -td $KERNEL | 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 | 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))
   
        head -c $START $KERNEL >$NEWKERN        head -c $START $KERNEL_ROOTFS >$NEWKERN
         cat $REL/$ROOTFS_IMG >>$NEWKERN          cat $REL/$ROOTFS_IMG >>$NEWKERN
        tail -c +$STOP $KERNEL >>$NEWKERN        tail -c +$STOP $KERNEL_ROOTFS >>$NEWKERN
   
         cd $REL          cd $REL
        gzip -9 kernel        gzip -9 $KRNNAME
         cd -          cd -
 }  }
   
Line 391  if SnitVer ${WORLD}/elwix.ver; then Line 400  if SnitVer ${WORLD}/elwix.ver; then
         clean_elwix          clean_elwix
         prepare_elwix          prepare_elwix
         build_elwix          build_elwix
           exit 1
   
         build_rootdir          build_rootdir
         install_rootfs          install_rootfs
Line 398  if SnitVer ${WORLD}/elwix.ver; then Line 408  if SnitVer ${WORLD}/elwix.ver; then
         build_image          build_image
         install_image          install_image
 else  else
        echo "Skipped ELWIX RootFS build ..."        echo "$? Skipped ELWIX RootFS build ..."
 fi  fi
   
 echo "+++ Complete build ELWIX RootFS"  echo "+++ Complete build ELWIX RootFS"

Removed from v.1.4.2.1  
changed lines
  Added in v.1.8.2.4


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