From 581a92a29ac09906f819ba9b46c702079fadfea0 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sat, 18 Dec 2021 22:43:25 +0800
Subject: [PATCH] update linux kernel patch, remove unused modules
---
bsp/images/build.sh | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/bsp/images/build.sh b/bsp/images/build.sh
index 613a5a5..74dd65c 100755
--- a/bsp/images/build.sh
+++ b/bsp/images/build.sh
@@ -22,9 +22,9 @@
IMAGE_PATH=${PRJ_PATH}/boot/
-BOARD=imx6ull
+BOARD=igkboard
-# rootfs should be buildroot or stretch/buster/bullseye for debian system
+# rootfs should be buildroot/yocto or bullseye for debian system
ROOTFS=buildroot
# linux kernel tarball path and branch
@@ -50,10 +50,10 @@
BOOT_SIZE=100
-IMG_UBOOT=${PRJ_PATH}/u-boot-imx6ull-emmc.imx
+IMG_UBOOT=${PRJ_PATH}/u-boot-${BOARD}-emmc.imx
IMG_KERNEL=${IMAGE_PATH}/zImage
-IMG_DTB=${IMAGE_PATH}/imx6ull-emmc.dtb
-ROOTFS_TAR=${TAR_PATH}/rootfs_${ROOTFS}.tar.bz2
+IMG_DTB=${IMAGE_PATH}/${BOARD}-emmc.dtb
+ROOTFS_TAR=${PRJ_PATH}/../rootfs/rootfs_${ROOTFS}.tar.bz2
MNT_POINT=./mnt
LOOP_DEV=`losetup -f | cut -d/ -f3`
@@ -66,19 +66,24 @@
echo "Shell script exit now, do some clean work"
echo ""
+ set +e
+
mountpoint $MNT_POINT > /dev/null 2>&1
if [ $? == 0 ] ; then
+ echo "umount ${MNT_POINT}"
umount ${MNT_POINT}
fi
rm -rf ${MNT_POINT}
if [ -L /dev/mapper/${LOOP_DEV}p1 ] ; then
+ echo "kpartx -dv /dev/${LOOP_DEV}"
kpartx -dv /dev/${LOOP_DEV}
fi
losetup -a | grep "${LOOP_DEV}" > /dev/null 2>&1
if [ $? == 0 ] ; then
+ echo "losetup -d /dev/${LOOP_DEV}"
losetup -d /dev/${LOOP_DEV}
fi
}
@@ -160,6 +165,7 @@
mount -t ext4 /dev/mapper/${LOOP_DEV}p2 ${MNT_POINT}
tar -xjf ${ROOTFS_TAR} -C ${MNT_POINT} && sync
+ chown -R root.root ${MNT_POINT} && sync
umount ${MNT_POINT}
}
@@ -188,13 +194,13 @@
install_rootfs
msg_banner " bzip2 compress system image "
+ rm -f ${IMAGE_NAME}*.bz2
bzip2 ${IMAGE_NAME}
rm -rf ${MNT_POINT}
printf "\n\n -- generate system image done --\n\n"
}
-
function do_root()
{
@@ -246,4 +252,4 @@
do_root "yes"
do_image
-
+exit;
--
Gitblit v1.9.1