[baseimage]: install picocom 3.1 in base image (#1943)

* [baseimage]: install picocom 3.1 in base image

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* add picocom to stretch build

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* fix slave.mk bug

Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
lguohan 2018-08-17 09:06:05 -07:00 committed by GitHub
parent 5a17a04c82
commit c059d9982a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 4 deletions

View File

@ -227,8 +227,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
hping3 \
python-scapy \
tcptraceroute \
mtr-tiny \
picocom
mtr-tiny
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
grub-pc-bin
@ -238,6 +237,9 @@ sudo mv $FILESYSTEM_ROOT/grub-pc-bin*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/libwrap0_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/picocom_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
## Disable kexec supported reboot which was installed by default
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec

11
rules/picocom.mk Normal file
View File

@ -0,0 +1,11 @@
# picocom packages
PICOCOM_VERSION = 3.1-2
export PICOCOM_VERSION
PICOCOM = picocom_$(PICOCOM_VERSION)_amd64.deb
$(PICOCOM)_SRC_PATH = $(SRC_PATH)/picocom
SONIC_MAKE_DEBS += $(PICOCOM)
SONIC_STRETCH_DEBS += $(PICOCOM)

View File

@ -462,7 +462,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(BASH) \
$(LIBWRAP) \
$(LIBPAM_TACPLUS) \
$(LIBNSS_TACPLUS)) \
$(LIBNSS_TACPLUS) \
$(PICOCOM)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))

View File

@ -201,7 +201,9 @@ RUN apt-get update && apt-get install -y \
# For pam_tacplus build
autoconf-archive \
# For initramfs
bash-completion
bash-completion \
# For picocom
pandoc
# For linux build
RUN apt-get -y build-dep linux

28
src/picocom/Makefile Normal file
View File

@ -0,0 +1,28 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = picocom_$(PICOCOM_VERSION)_amd64.deb
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf ./picocom-3.1
# Get source package
wget -NO picocom_$(PICOCOM_VERSION).dsc "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1-2.dsc?sv=2015-04-05&sr=b&sig=puo9KA27jT9Ey%2FkxRPBLIm30gFDdQJF85VKA7vuv9hk%3D&se=2155-07-10T08%3A03%3A50Z&sp=r"
wget -NO picocom_$(PICOCOM_VERSION).debian.tar.xz "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1-2.debian.tar.xz?sv=2015-04-05&sr=b&sig=4HPuUi2FTb0AzCEsH9%2FsSfj17qIukyyOdRrHQFtjyBE%3D&se=2155-07-10T08%3A04%3A23Z&sp=r"
wget -NO picocom_3.1.orig.tar.gz "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1.orig.tar.gz?sv=2015-04-05&sr=b&sig=RjQ84sf%2B%2FQuI%2B0PAcbPHXvnlNAuP%2BQoVrp2xzDJZfX4%3D&se=2155-07-10T08%3A04%3A45Z&sp=r"
dpkg-source -x picocom_$(PICOCOM_VERSION).dsc
# Build source and Debian packages
pushd picocom-3.1
patch -p0 < ../debhelper_10.patch
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd
# Move the newly-built .deb packages to the destination directory
mv $(DERIVED_TARGETS) $* $(DEST)/
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

View File

@ -0,0 +1,11 @@
--- debian/control.old 2018-08-17 08:05:35.996230100 +0000
+++ debian/control 2018-08-17 08:05:43.712230100 +0000
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Matt Palmer <mpalmer@debian.org>
Uploaders: W. Martin Borgert <debacle@debian.org>
-Build-Depends: debhelper (>= 11),
+Build-Depends: debhelper (>= 10),
pandoc
Standards-Version: 4.1.3
Rules-Requires-Root: no