From f2733b7bf062d8f560bfdc8b4583d21680351f01 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 12 Jun 2022 17:08:24 +0800
Subject: [PATCH] update rootfs & images build shell script, use rsync instead tar to install rootfs
---
bsp/rootfs/build.sh | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/bsp/rootfs/build.sh b/bsp/rootfs/build.sh
index 13f7c61..33f7488 100755
--- a/bsp/rootfs/build.sh
+++ b/bsp/rootfs/build.sh
@@ -175,6 +175,9 @@
function do_install()
{
+ # Remove lib/modules first
+ rm -rf $ROOTFS_DIR/lib/modules/*
+
# apt install extra packet for debian rootfs
if [ $SYSTEM == "debian" ] ; then
do_debian_apt
@@ -185,7 +188,6 @@
elif [ $SYSTEM == "buildroot" ] ; then
do_install_json $JSON_CONF SYS_BUILDROOT.INSTALL_FILES
fi
-
}
function do_config()
@@ -228,11 +230,6 @@
function do_pack()
{
- if [ -f ${ROOTFS_DIR}.tar.bz2 ] ; then
- pr_warn "rootfs already generate, skip it"
- return ;
- fi
-
pr_warn "start generate $SYSTEM($DISTRO) rootfs packet"
cd ${ROOTFS_DIR}
@@ -256,7 +253,6 @@
do_fetch
do_install
do_config
- do_pack
}
function do_root()
@@ -277,8 +273,9 @@
{
echo ""
echo "Usage:"
- echo " $0 [-b] [-c] [-h]"
+ echo " $0 [-b] [p] [-c] [-h]"
echo " -b: download and build $PRJ_NAME"
+ echo " -p: packet the rootfs tree source"
echo " -c: clean all the source code"
echo " -h: show this help message"
echo ""
@@ -287,13 +284,17 @@
exit;
}
-while getopts "bch" OPTNAME
+while getopts "bpch" OPTNAME
do
case "${OPTNAME}" in
"b")
break;
;;
+ "p")
+ do_pack
+ ;;
+
"c")
do_root "yes"
do_distclean
--
Gitblit v1.9.1