| | |
| | | PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) |
| | | |
| | | # top project absolute path |
| | | TOP_PATH=$(realpath $PRJ_PATH/..) |
| | | TOP_PATH=$PRJ_PATH/.. |
| | | |
| | | # prefix install path |
| | | PRFX_PATH=$PRJ_PATH/install |
| | |
| | | |
| | | # Download source code packet |
| | | if [ ! -s $TARBALL_PATH/$YCT_SRC.tar.xz ] ; then |
| | | wget $BSP_URL/bsp/$BSP_VER/$YCT_SRC.tar.xz -P $TARBALL_PATH |
| | | wget $BSP_URL/imx/bsp/$BSP_VER/$YCT_SRC.tar.xz -P $TARBALL_PATH |
| | | fi |
| | | |
| | | # decompress source code packet |
| | |
| | | BSP_VER=`echo $BSP_VER | sed 's/imx/lf/'` |
| | | cp $TOP_PATH/bootloader/patches/${BOARD}/uboot-imx-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-bsp/u-boot/files/ |
| | | cp $TOP_PATH/kernel/patches/${BOARD}/linux-imx-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-kernel/linux/files/ |
| | | cp $TOP_PATH/images/patches/config-*.txt $PRJ_PATH/$YCT_META/recipes-bsp/u-boot/files/ |
| | | |
| | | if [ ! -e $YCT_PATH/sources/$YCT_META ] ; then |
| | | ln -s $PRJ_PATH/$YCT_META $YCT_PATH/sources/$YCT_META |
| | |
| | | |
| | | function do_install() |
| | | { |
| | | IMAGE_NAME=yocto-${YCT_VER}-${BSP_VER}.wic |
| | | ROOTFS_TAR=rootfs-yocto-${YCT_VER}.tar.zst |
| | | |
| | | cd $YCT_PATH |
| | | |
| | | echo "" |
| | | pr_info "Yocto($YCT_VER) installed to '$PRFX_PATH'" |
| | | |
| | | mkdir -p ${PRFX_PATH} |
| | | cp $YCT_PATH/$BUILD_DIR/tmp/deploy/images/$BOARD/$BB_TARGET-$BOARD.wic ${PRFX_PATH}/ |
| | | cp $YCT_PATH/$BUILD_DIR/tmp/deploy/images/$BOARD/$BB_TARGET-$BOARD.tar.zst ${PRFX_PATH}/ |
| | | cp $YCT_PATH/$BUILD_DIR/tmp/deploy/images/$BOARD/$BB_TARGET-$BOARD.wic ${PRFX_PATH}/$IMAGE_NAME |
| | | cp $YCT_PATH/$BUILD_DIR/tmp/deploy/images/$BOARD/$BB_TARGET-$BOARD.tar.zst ${PRFX_PATH}/$ROOTFS_TAR |
| | | |
| | | if [[ $BOARD =~ mx6ull ]] ; then |
| | | cp $YCT_PATH/$BUILD_DIR/tmp/deploy/images/$BOARD/u-boot-${BOARD}.imx ${PRFX_PATH}/u-boot-${BOARD}.imx |
| | |
| | | cd ${PRFX_PATH}/ |
| | | |
| | | if [[ `echo $COMPRESS | tr 'A-Z' 'a-z'` == "yes" ]] ; then |
| | | pr_info "Start bzip2 compress $BB_TARGET-$BOARD.wic" |
| | | rm -f $BB_TARGET-$BOARD.wic.bz2 |
| | | bzip2 $BB_TARGET-$BOARD.wic |
| | | pr_info "Start bzip2 compress $IMAGE_NAME" |
| | | rm -f $IMAGE_NAME.bz2 |
| | | bzip2 $IMAGE_NAME |
| | | fi |
| | | chmod a+x u-boot-${BOARD}.imx |
| | | |
| | |
| | | if [ -n "$INST_PATH" -a -w $INST_PATH ] ; then |
| | | |
| | | pr_info "Start copy Yocto system images to $INST_PATH" |
| | | cp u-boot-${BOARD}.imx $INST_PATH |
| | | cp $BB_TARGET-$BOARD.wic* $INST_PATH |
| | | cp $BB_TARGET-$BOARD.tar.zst $INST_PATH |
| | | cp u-boot-${BOARD}.imx $INST_PATH |
| | | cp $IMAGE_NAME* $INST_PATH |
| | | cp $ROOTFS_TAR $INST_PATH |
| | | |
| | | ls ${INST_PATH} && echo "" |
| | | fi |