| | |
| | | export JOBS=`cat /proc/cpuinfo | grep processor | wc -l` |
| | | export ARCH=arm |
| | | |
| | | ROOTFS_SRC=rootfs |
| | | ROOTFS_IMG=rootfs-${BOARD}.ubi |
| | | ROOTFS_SRC=rootfs |
| | | ROOTFS_IMG=rootfs-${BOARD}.ubi |
| | | |
| | | export SRCS="rootfs" |
| | | } |
| | |
| | | continue |
| | | fi |
| | | |
| | | pr_info "start fetch $src source code" |
| | | mkdir -p $TARBALL_PATH |
| | | pr_info "start fetch $src source code" |
| | | mkdir -p $TARBALL_PATH |
| | | |
| | | # Download source code packet |
| | | if [ ! -s $TARBALL_PATH/$src.tar.xz ] ; then |
| | | wget $BSP_URL/at91/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH |
| | | fi |
| | | # Download source code packet |
| | | if [ ! -s $TARBALL_PATH/$src.tar.xz ] ; then |
| | | wget $BSP_URL/at91/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH |
| | | fi |
| | | |
| | | # decompress source code packet |
| | | do_unpack $TARBALL_PATH/$src.tar.xz $ROOTFS_SRC |
| | | # decompress source code packet |
| | | do_unpack $TARBALL_PATH/$src.tar.xz $ROOTFS_SRC |
| | | done |
| | | } |
| | | |
| | |
| | | |
| | | #echo "Parition size ${partition_size}MiB and LEB=$LEB_CNT" |
| | | set -x |
| | | sudo mkfs.ubifs -F -d ${ROOTFS_SRC} -m ${PAGE_SIZE} -e ${LEB_SIZE} -c $LEB_CNT -o ${ubimg_tmp} |
| | | fakeroot mkfs.ubifs -F -d ${ROOTFS_SRC} -m ${PAGE_SIZE} -e ${LEB_SIZE} -c $LEB_CNT -o ${ubimg_tmp} |
| | | set +x |
| | | |
| | | # vol_size smaller than the actual size of the partition to leave room for Ubifs internal data. |
| | |
| | | } |
| | | |
| | | |
| | | function do_modify() |
| | | { |
| | | cd $PRJ_PATH |
| | | |
| | | pr_info "start modify rootfs ..." |
| | | |
| | | cp patches/profile $ROOTFS_SRC/etc/profile |
| | | cp patches/S50sshd $ROOTFS_SRC/etc/init.d/S50sshd |
| | | } |
| | | |
| | | function do_build() |
| | | { |
| | | cd $PRJ_PATH |
| | |
| | | pr_info "start build rootfs image..." |
| | | build_ubifs |
| | | |
| | | mv $ROOTFS_IMG $PRFX_PATH |
| | | mv $ROOTFS_IMG $PRFX_PATH |
| | | } |
| | | |
| | | function do_install() |
| | |
| | | |
| | | echo "" |
| | | pr_info "install all images to '$PRFX_PATH'" |
| | | cp $TOP_PATH/bootloader/install/* $PRFX_PATH |
| | | cp $TOP_PATH/kernel/install/* $PRFX_PATH |
| | | cp $TOP_PATH/bootloader/install/* $PRFX_PATH |
| | | cp $TOP_PATH/kernel/install/* $PRFX_PATH |
| | | |
| | | ls $PRFX_PATH && echo "" |
| | | |
| | |
| | | |
| | | do_fetch |
| | | |
| | | do_modify |
| | | |
| | | do_build |
| | | |
| | | do_install |