Skip to content

Commit

Permalink
[sonic-utilities]: integrate into base image
Browse files Browse the repository at this point in the history
Signed-off-by: marian-pritsak <marianp@mellanox.com>
  • Loading branch information
marian-pritsak committed Feb 12, 2017
1 parent 822680d commit 88c85b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in

sudo dpkg --root=$FILESYSTEM_ROOT -i {{config_engine}}

# Python tabulate required for sonic-utilities
python_tabulate_url=http://packages.microsoft.com/repos/sonic-dev/pool/main/p/python-tabulate/python-tabulate_0.7.7-1_all.deb
python_template_deb_temp=`mktemp`
trap_push "rm -f $python_template_deb_temp"
wget $python_tabulate_url -qO $python_template_deb_temp && { \
sudo dpkg --root=$FILESYSTEM_ROOT -i $python_template_deb_temp || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f; \
}

# Sonic utilities
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/sonic-utilities_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

# Create all needed directories
sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic/
sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic/templates/
Expand Down
2 changes: 1 addition & 1 deletion slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ $(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TA
###############################################################################

# targets for building installers with base image
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform onie-image.conf $$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS)) $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) $(LINUX_KERNEL) $(IGB_DRIVER)) $(addprefix $(DEBS_PATH)/,$(SONIC_CONFIG_ENGINE)) $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS))
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform onie-image.conf $$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS)) $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) $(LINUX_KERNEL) $(IGB_DRIVER) $(SONIC_UTILS)) $(addprefix $(DEBS_PATH)/,$(SONIC_CONFIG_ENGINE)) $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS))
$(HEADER)
## Pass initramfs and linux kernel explicitly. They are used for all platforms
export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)"
Expand Down

0 comments on commit 88c85b8

Please sign in to comment.