guowenxue
2023-12-22 2ff83b8dc72aa3d6d10134ed63d6d80c025dbcd1
Update yocto build shell script

Signed-off-by: guowenxue <guowenxue@gmail.com>
1 files modified
27 ■■■■ changed files
yocto/build.sh 27 ●●●● patch | view | raw | blame | history
yocto/build.sh
@@ -16,7 +16,7 @@
#INST_PATH=/srv/ftp/
# compress system image or not
#COMPRESS=yes
COMPRESS=yes
# download taballs path
TARBALL_PATH=$PRJ_PATH/tarballs
@@ -25,7 +25,7 @@
CONF_FILE=$TOP_PATH/config.json
# Download path
#DL_PATH="/srv/yocto_packets/"
DL_PATH="/srv/yocto_packets/"
# shell script will exit once get command error
set -e
@@ -135,7 +135,6 @@
    pr_warn "start update BSP patches for $YCT_META"
    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/bootloader/patches/${BOARD}/imx-atf-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-bsp/imx-atf/files/
    cp $TOP_PATH/kernel/patches/${BOARD}/linux-imx-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-kernel/linux/files/
    if [ ! -e $YCT_PATH/sources/$YCT_META ] ; then
@@ -174,19 +173,19 @@
    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/imx-boot ${PRFX_PATH}/u-boot-${BOARD}.imx
    chmod a+x ${PRFX_PATH}/u-boot-${BOARD}.imx
    ls ${PRFX_PATH} && echo ""
    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
    fi
    chmod a+x u-boot-${BOARD}.imx
    ls && echo ""
    if [ -n "$INST_PATH" -a -w $INST_PATH ] ; then
        cd ${PRFX_PATH}/
        rm -f $BB_TARGET-$BOARD.wic.bz2
        if [[ `echo $COMPRESS | tr 'A-Z' 'a-z'` == "yes" ]] ; then
            pr_info "Start bzip2 compress $BB_TARGET-$BOARD.wic"
            bzip2 $BB_TARGET-$BOARD.wic
        fi
        pr_info "Start copy Yocto system images to $INST_PATH"
        cp u-boot-${BOARD}.imx       $INST_PATH