From 7f731008c854f4af41f49a48d0769849a3712c6f Mon Sep 17 00:00:00 2001 From: pilipala195 Date: Wed, 24 Mar 2021 14:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E6=B5=81=E7=A8=8B=E8=A7=A3?= =?UTF-8?q?=E8=80=A6=EF=BC=8Cbin=E3=80=81lib=E9=BB=98=E8=AE=A4=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=87=B3out=E4=B8=8B=E5=AF=B9=E5=BA=94=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- tools/scripts/make_rootfs/releaseinfo.sh | 7 ++++++- tools/scripts/make_rootfs/rootfsdir.sh | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 27dda5e6..216a703c 100755 --- a/Makefile +++ b/Makefile @@ -182,9 +182,9 @@ endif $(ROOTFSDIR): prepare $(APPS) $(HIDE)$(MAKE) clean -C apps - $(HIDE)$(LITEOSTOPDIR)/tools/scripts/make_rootfs/rootfsdir.sh $(OUT)/bin $(OUT)/musl $(ROOTFS_DIR) + $(HIDE)$(LITEOSTOPDIR)/tools/scripts/make_rootfs/rootfsdir.sh $(OUT)/bin $(OUT)/musl $(ROOTFS_DIR) $(LITEOS_TARGET_DIR) ifneq ($(VERSION),) - $(HIDE)$(LITEOSTOPDIR)/tools/scripts/make_rootfs/releaseinfo.sh "$(VERSION)" $(ROOTFS_DIR) + $(LITEOSTOPDIR)/tools/scripts/make_rootfs/releaseinfo.sh "$(VERSION)" $(ROOTFS_DIR) $(LITEOS_TARGET_DIR) endif $(ROOTFS): $(ROOTFSDIR) diff --git a/tools/scripts/make_rootfs/releaseinfo.sh b/tools/scripts/make_rootfs/releaseinfo.sh index 65c0cdd8..f15bb75d 100755 --- a/tools/scripts/make_rootfs/releaseinfo.sh +++ b/tools/scripts/make_rootfs/releaseinfo.sh @@ -30,13 +30,18 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set -e -if [ $# -ne 2 ];then +if [ $# -ne 3 ];then exit 1 fi VERSION=$1 ROOTFS_DIR=$2 +OUT_DIR=$3 RELEASE_TIME=$(date "+%Y-%m-%d %H:%M:%S") echo VERSION=\"${VERSION}\" > ${ROOTFS_DIR}/etc/os-release echo RELEASE_TIME=\"${RELEASE_TIME}\" >> ${ROOTFS_DIR}/etc/os-release +if [ ! -d ${OUT_DIR}etc ]; then + mkdir -p ${OUT_DIR}etc +fi +cp ${ROOTFS_DIR}/etc/os-release ${OUT_DIR}etc diff --git a/tools/scripts/make_rootfs/rootfsdir.sh b/tools/scripts/make_rootfs/rootfsdir.sh index ff7266cb..1abb5137 100755 --- a/tools/scripts/make_rootfs/rootfsdir.sh +++ b/tools/scripts/make_rootfs/rootfsdir.sh @@ -33,10 +33,13 @@ set -e BIN_DIR=$1 LIB_DIR=$2 ROOTFS_DIR=$3 +OUT_DIR=$4 mkdir -p ${ROOTFS_DIR}/bin ${ROOTFS_DIR}/lib ${ROOTFS_DIR}/usr/bin ${ROOTFS_DIR}/usr/lib ${ROOTFS_DIR}/etc \ ${ROOTFS_DIR}/app ${ROOTFS_DIR}/data ${ROOTFS_DIR}/proc ${ROOTFS_DIR}/dev ${ROOTFS_DIR}/data/system ${ROOTFS_DIR}/data/system/param \ ${ROOTFS_DIR}/system ${ROOTFS_DIR}/system/internal ${ROOTFS_DIR}/system/external if [ -d "${BIN_DIR}" ] && [ "$(ls -A "${BIN_DIR}")" != "" ]; then cp -f ${BIN_DIR}/* ${ROOTFS_DIR}/bin + cp -f ${BIN_DIR}/* ${OUT_DIR}/bin fi cp -f ${LIB_DIR}/* ${ROOTFS_DIR}/lib +cp -f ${LIB_DIR}/* ${OUT_DIR}/libs -- Gitee