Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build sonic-broadcom.bin using debug dockers for all stretch based dockers #2833

Merged
merged 29 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
941eb7d
Updated Makefile infrastructure to build debug images.
renukamanavalan Apr 5, 2019
042d51e
Dropped the regular binary using DBG_PACKAGES and a small name change…
renukamanavalan Apr 6, 2019
24f38f2
Tweaked the changes to retain the existing behavior w.r.t INSTALL_DEB…
renukamanavalan Apr 8, 2019
4443c70
1) slave.mk - Dropped unused Docker build args
renukamanavalan Apr 11, 2019
7b84e64
Reverted some changes, per review comments.
renukamanavalan Apr 11, 2019
c717e50
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 12, 2019
60a001c
Get in sync with the new update that filters out dockers to be built …
renukamanavalan Apr 12, 2019
cefc4b8
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 15, 2019
f659917
Mkae a template for each target that can be shared by all platforms.
renukamanavalan Apr 15, 2019
9d7aedb
A small change, that can fit better with other targets too.
renukamanavalan Apr 15, 2019
279084f
Extended debug to all stretch based docker images
renukamanavalan Apr 16, 2019
99783dd
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 18, 2019
a2297a3
1) Combined all orchagent makefiles into one platform independent mak…
renukamanavalan Apr 18, 2019
b4b30fd
Changes per review comments:
renukamanavalan Apr 18, 2019
575e43d
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 18, 2019
e504eb7
1) Corrected a copy/paste mistake
renukamanavalan Apr 18, 2019
0db6c0f
Fixed a copy/paste bug
renukamanavalan Apr 19, 2019
755dcee
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 22, 2019
6f1c92b
The base syncd dockers follow a template, which defines the base dock…
renukamanavalan Apr 22, 2019
3d74bcc
Fixed spelling mistake
renukamanavalan Apr 22, 2019
e537676
Merge remote-tracking branch 'upstream/master'
renukamanavalan Apr 28, 2019
31fa832
Enable build of dbg-sonic-broadcom.bin, which uses dbg-dockers in pla…
renukamanavalan Apr 28, 2019
b9ced6f
Sync with master
renukamanavalan May 17, 2019
fbaabca
Merge remote-tracking branch 'upstream/master'
renukamanavalan May 20, 2019
af4d3da
Per review comments:
renukamanavalan May 20, 2019
fc019bb
Merge remote-tracking branch 'upstream/master'
renukamanavalan Jun 2, 2019
1ccee7d
Updated per comments.
renukamanavalan Jun 2, 2019
fe438f8
Removed changes that are no more warranted.
renukamanavalan Jun 2, 2019
3fcfc18
Merge branch 'master' into master
lguohan Jun 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ sudo chroot $FILESYSTEM_ROOT docker info
{% set imagename = imagefilename.split('.')|first -%}
sudo LANG=C chroot $FILESYSTEM_ROOT docker load < {{image}}
sudo LANG=C chroot $FILESYSTEM_ROOT docker tag {{imagename}}:latest {{imagename}}:$(sonic_get_version)
{% if imagename.endswith('-dbg') %}
{% set imagebasename = imagename.replace('-dbg', '') -%}
sudo LANG=C chroot $FILESYSTEM_ROOT docker tag {{imagename}}:latest {{imagebasename}}:$(sonic_get_version)
sudo LANG=C chroot $FILESYSTEM_ROOT docker tag {{imagename}}:latest {{imagebasename}}:latest
{% endif %}
{% endfor %}
sudo chroot $FILESYSTEM_ROOT service docker stop
sudo rm $FILESYSTEM_ROOT/etc/init.d/docker
Expand Down
7 changes: 6 additions & 1 deletion platform/broadcom/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
$(MITAC_LY1200_32X_PLATFORM_MODULE) \
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE) \
$(ALPHANETWORKS_SNH60B0_640F_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
ifeq ($(INSTALL_DEBUG_TOOLS),y)
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
else
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_IMAGES)
endif
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
27 changes: 14 additions & 13 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG
./build_debug_docker_j2.sh $* $(subst -,_,$(notdir $($*.gz_PATH)))_dbg_debs $(subst -,_,$(notdir $($*.gz_PATH)))_image_dbgs > $($*.gz_PATH)/Dockerfile-dbg.j2
j2 $($*.gz_PATH)/Dockerfile-dbg.j2 > $($*.gz_PATH)/Dockerfile-dbg
docker info $(LOG)
docker build --squash --no-cache \
docker build \
$(if $($*.gz_DBG_DEPENDS), --squash --no-cache, --no-cache) \
--build-arg http_proxy=$(HTTP_PROXY) \
--build-arg https_proxy=$(HTTPS_PROXY) \
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
Expand Down Expand Up @@ -617,19 +618,19 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(foreach docker, $($*_DOCKERS),\
export docker_image="$(docker)"
export docker_image_name="$(basename $(docker))"
export docker_container_name="$($(docker)_CONTAINER_NAME)"
$(eval $(docker)_RUN_OPT += $($(docker)_$($*_IMAGE_TYPE)_RUN_OPT))
export docker_image_run_opt="$($(docker)_RUN_OPT)"
j2 files/build_templates/docker_image_ctl.j2 > $($(docker)_CONTAINER_NAME).sh
if [ -f files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 ]; then
j2 files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 > $($(docker)_CONTAINER_NAME).service
export docker_container_name="$($(docker:-dbg.gz=.gz)_CONTAINER_NAME)"
$(eval $(docker:-dbg.gz=.gz)_RUN_OPT += $($(docker:-dbg.gz=.gz)_$($*_IMAGE_TYPE)_RUN_OPT))
export docker_image_run_opt="$($(docker:-dbg.gz=.gz)_RUN_OPT)"
j2 files/build_templates/docker_image_ctl.j2 > $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
if [ -f files/build_templates/$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service.j2 ]; then
j2 files/build_templates/$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service.j2 > $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service
fi
chmod +x $($(docker)_CONTAINER_NAME).sh
chmod +x $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
)

export installer_start_scripts="$(foreach docker, $($*_DOCKERS),$(addsuffix .sh, $($(docker)_CONTAINER_NAME)))"
export installer_services="$(foreach docker, $($*_DOCKERS),$(addsuffix .service, $($(docker)_CONTAINER_NAME)))"
export installer_extra_files="$(foreach docker, $($*_DOCKERS), $(foreach file, $($(docker)_BASE_IMAGE_FILES), $($(docker)_PATH)/base_image_files/$(file)))"
export installer_start_scripts="$(foreach docker, $($*_DOCKERS),$(addsuffix .sh, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)))"
export installer_services="$(foreach docker, $($*_DOCKERS),$(addsuffix .service, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)))"
export installer_extra_files="$(foreach docker, $($*_DOCKERS), $(foreach file, $($(docker:-dbg.gz=.gz)_BASE_IMAGE_FILES), $($(docker:-dbg.gz=.gz)_PATH)/base_image_files/$(file)))"

j2 -f env files/initramfs-tools/union-mount.j2 onie-image.conf > files/initramfs-tools/union-mount
j2 -f env files/initramfs-tools/arista-convertfs.j2 onie-image.conf > files/initramfs-tools/arista-convertfs
Expand All @@ -652,8 +653,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
./build_image.sh $(LOG)

$(foreach docker, $($*_DOCKERS), \
rm -f $($(docker)_CONTAINER_NAME).sh
rm -f $($(docker)_CONTAINER_NAME).service
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service
)

$(if $($*_DOCKERS),
Expand Down