Create the src archive in target/ when INSTALL_DEBUG_TOOLS=y (#3323)
* Create the src archive in target/ when INSTALL_DEBUG_TOOLS=y * Dropped -v (verbose flag) from tar command
This commit is contained in:
parent
1840bef1a1
commit
14458b79ba
@ -488,10 +488,7 @@ then
|
|||||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"
|
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"
|
||||||
|
|
||||||
sudo mkdir -p $FILESYSTEM_ROOT/src
|
sudo mkdir -p $FILESYSTEM_ROOT/src
|
||||||
pushd src
|
sudo cp $DEBUG_SRC_ARCHIVE_FILE $FILESYSTEM_ROOT/src/
|
||||||
../scripts/dbg_files.sh | sudo tar -cvzf ../$FILESYSTEM_ROOT/src/sonic_src.tar.gz -T -
|
|
||||||
popd
|
|
||||||
|
|
||||||
sudo mkdir -p $FILESYSTEM_ROOT/debug
|
sudo mkdir -p $FILESYSTEM_ROOT/debug
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
# Provide file paths to archive for debug image as relative to src subdir
|
# Provide file paths to archive for debug image as relative to src subdir
|
||||||
#
|
#
|
||||||
for i in $debug_src_archive
|
if [ "$DEBUG_IMG" == "y" ]
|
||||||
do
|
then
|
||||||
find $i/ -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -type f
|
for i in $DEBUG_SRC_ARCHIVE_DIRS
|
||||||
done
|
do
|
||||||
|
find src/$i/ -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -type f
|
||||||
|
done | tar -czf $DEBUG_SRC_ARCHIVE_FILE -T -
|
||||||
|
fi
|
||||||
|
|
||||||
|
7
slave.mk
7
slave.mk
@ -37,6 +37,7 @@ PROJECT_ROOT = $(shell pwd)
|
|||||||
STRETCH_DEBS_PATH = $(TARGET_PATH)/debs/stretch
|
STRETCH_DEBS_PATH = $(TARGET_PATH)/debs/stretch
|
||||||
STRETCH_FILES_PATH = $(TARGET_PATH)/files/stretch
|
STRETCH_FILES_PATH = $(TARGET_PATH)/files/stretch
|
||||||
DBG_IMAGE_MARK = dbg
|
DBG_IMAGE_MARK = dbg
|
||||||
|
DBG_SRC_ARCHIVE_FILE = $(TARGET_PATH)/sonic_src.tar.gz
|
||||||
|
|
||||||
CONFIGURED_PLATFORM := $(shell [ -f .platform ] && cat .platform || echo generic)
|
CONFIGURED_PLATFORM := $(shell [ -f .platform ] && cat .platform || echo generic)
|
||||||
PLATFORM_PATH = platform/$(CONFIGURED_PLATFORM)
|
PLATFORM_PATH = platform/$(CONFIGURED_PLATFORM)
|
||||||
@ -667,9 +668,13 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
|||||||
chmod +x sonic_debian_extension.sh,
|
chmod +x sonic_debian_extension.sh,
|
||||||
)
|
)
|
||||||
|
|
||||||
export debug_src_archive="$(DBG_SRC_ARCHIVE)"
|
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||||
|
DEBUG_SRC_ARCHIVE_DIRS="$(DBG_SRC_ARCHIVE)" \
|
||||||
|
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||||
|
scripts/dbg_files.sh
|
||||||
|
|
||||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||||
|
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||||
USERNAME="$(USERNAME)" \
|
USERNAME="$(USERNAME)" \
|
||||||
PASSWORD="$(PASSWORD)" \
|
PASSWORD="$(PASSWORD)" \
|
||||||
./build_debian.sh $(LOG)
|
./build_debian.sh $(LOG)
|
||||||
|
Loading…
Reference in New Issue
Block a user