guowenxue
2024-02-22 86063e8b34368bab47956834efd6536259cd9baf
images/build.sh
@@ -105,6 +105,7 @@
    export KERNEL_BINPATH=$TOP_PATH/kernel/install/
    export ROOTFS_YCTPATH=$TOP_PATH/yocto/install/
    export IMAGE_NAME=${DIS_TYPE}-${DIS_VER}-${BSP_VER}.img
    export KERNEL_IMAGE=Image
    if [[ $BOARD =~ mx8ulp ]] || [[ $BOARD =~ mx8mq ]] || [[ $BOARD =~ mx8mm ]] ; then
        export UBOOT_OFFSET_SECTOR=66
@@ -112,6 +113,7 @@
        export UBOOT_OFFSET_SECTOR=64
    elif [[ $BOARD =~ mx6 ]] || [[ $BOARD =~ mx7 ]] ; then
        export UBOOT_OFFSET_SECTOR=2
        export KERNEL_IMAGE=zImage
    fi
}
@@ -158,7 +160,7 @@
        # Download source code packet
        if [ ! -s $TARBALL_PATH/$tarball ] ; then
            wget $BSP_URL/${BOARD}/rootfs/$tarball -P $TARBALL_PATH
            wget $BSP_URL/imx/${BOARD}/rootfs/$tarball -P $TARBALL_PATH
        fi
        # decompress source code packet
@@ -211,7 +213,7 @@
    pr_info "start install linux kernel images"
    mount -t vfat /dev/mapper/${LOOP_DEV}p1 ${MNT_POINT}
    cp -rf $KERNEL_BINPATH/Image       ${MNT_POINT}/
    cp -rf $KERNEL_BINPATH/$KERNEL_IMAGE ${MNT_POINT}/
    cp -rf $KERNEL_BINPATH/${BOARD}.dtb ${MNT_POINT}/
    sync && umount ${MNT_POINT}