2017-02-01 00:06:12 -06:00
|
|
|
# sonic broadcom one image installer
|
|
|
|
|
|
|
|
SONIC_ONE_IMAGE = sonic-broadcom.bin
|
|
|
|
$(SONIC_ONE_IMAGE)_MACHINE = broadcom
|
|
|
|
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
2017-11-16 14:27:03 -06:00
|
|
|
$(SONIC_ONE_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL)
|
|
|
|
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
2018-06-22 12:48:44 -05:00
|
|
|
$(DELL_Z9264F_PLATFORM_MODULE) \
|
2017-02-27 15:08:41 -06:00
|
|
|
$(DELL_Z9100_PLATFORM_MODULE) \
|
2017-02-28 18:02:43 -06:00
|
|
|
$(DELL_S6100_PLATFORM_MODULE) \
|
2017-05-18 13:05:49 -05:00
|
|
|
$(INGRASYS_S8900_54XC_PLATFORM_MODULE) \
|
|
|
|
$(INGRASYS_S8900_64XC_PLATFORM_MODULE) \
|
2017-06-15 12:33:42 -05:00
|
|
|
$(INGRASYS_S9100_PLATFORM_MODULE) \
|
2017-08-16 09:38:10 -05:00
|
|
|
$(INGRASYS_S8810_32Q_PLATFORM_MODULE) \
|
2017-11-29 13:57:35 -06:00
|
|
|
$(INGRASYS_S9200_64X_PLATFORM_MODULE) \
|
2017-07-18 13:21:24 -05:00
|
|
|
$(ACCTON_AS7712_32X_PLATFORM_MODULE) \
|
2017-11-22 04:59:28 -06:00
|
|
|
$(ACCTON_AS5712_54X_PLATFORM_MODULE) \
|
2017-12-22 12:06:21 -06:00
|
|
|
$(ACCTON_AS7816_64X_PLATFORM_MODULE) \
|
2018-01-12 21:34:51 -06:00
|
|
|
$(ACCTON_AS7716_32X_PLATFORM_MODULE) \
|
2018-02-14 21:10:37 -06:00
|
|
|
$(ACCTON_AS7312_54X_PLATFORM_MODULE) \
|
2018-03-23 14:36:25 -05:00
|
|
|
$(ACCTON_AS7326_56X_PLATFORM_MODULE) \
|
2018-03-20 01:40:12 -05:00
|
|
|
$(ACCTON_AS7716_32XB_PLATFORM_MODULE) \
|
2018-10-26 19:10:47 -05:00
|
|
|
$(ACCTON_AS6712_32X_PLATFORM_MODULE) \
|
2018-12-04 12:11:02 -06:00
|
|
|
$(ACCTON_AS7726_32X_PLATFORM_MODULE) \
|
2019-05-19 00:11:38 -05:00
|
|
|
$(ACCTON_AS4630_54PE_PLATFORM_MODULE) \
|
2019-03-15 11:40:38 -05:00
|
|
|
$(ACCTON_MINIPACK_PLATFORM_MODULE) \
|
2019-05-29 00:44:32 -05:00
|
|
|
$(ACCTON_AS5812_54X_PLATFORM_MODULE) \
|
2019-06-07 11:00:12 -05:00
|
|
|
$(ACCTON_AS5835_54X_PLATFORM_MODULE) \
|
2017-07-19 12:29:46 -05:00
|
|
|
$(INVENTEC_D7032Q28B_PLATFORM_MODULE) \
|
2017-10-19 15:06:03 -05:00
|
|
|
$(INVENTEC_D7054Q28B_PLATFORM_MODULE) \
|
2018-08-14 15:07:03 -05:00
|
|
|
$(INVENTEC_D7264Q28B_PLATFORM_MODULE) \
|
2017-11-27 16:29:22 -06:00
|
|
|
$(CEL_DX010_PLATFORM_MODULE) \
|
2018-08-05 01:49:36 -05:00
|
|
|
$(CEL_HALIBURTON_PLATFORM_MODULE) \
|
2018-02-11 21:11:26 -06:00
|
|
|
$(DELTA_AG9032V1_PLATFORM_MODULE) \
|
2018-03-01 04:14:26 -06:00
|
|
|
$(DELTA_AG9064_PLATFORM_MODULE) \
|
2018-03-23 17:17:41 -05:00
|
|
|
$(DELTA_AG5648_PLATFORM_MODULE) \
|
2018-05-02 04:46:02 -05:00
|
|
|
$(DELTA_ET6248BRB_PLATFORM_MODULE) \
|
2018-02-13 07:39:08 -06:00
|
|
|
$(QUANTA_IX1B_32X_PLATFORM_MODULE) \
|
2018-10-10 20:33:51 -05:00
|
|
|
$(MITAC_LY1200_32X_PLATFORM_MODULE) \
|
|
|
|
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE) \
|
2019-06-09 14:09:31 -05:00
|
|
|
$(ALPHANETWORKS_SNH60B0_640F_PLATFORM_MODULE) \
|
|
|
|
$(BRCM_XLR_GTS_PLATFORM_MODULE)
|
[build]: Build sonic-broadcom.bin using debug dockers for all stretch based dockers (#2833)
* Updated Makefile infrastructure to build debug images.
As a sample, platform/broadcom/docker-orchagent-brcm.mk is updated to add a docker-orchagent-brcm-dbg.gz target.
Now "BLDENV=stretch make target/docker-orchagent-brcm-dbg.gz" will build the debug image.
NOTE: If you don't specify NOSTRETcH=1, it implicitly calls "make stretch", which builds all stretch targets and that would include debug dockers too.
This debug image can be used in any linux box to inspect core file. If your module's external dependency can be suitably mocked, you my even manually run it inside.
"docker run -it --entrypoint=/bin/bash e47a8fb8ed38"
You may map the core file path to this docker run.
* Dropped the regular binary using DBG_PACKAGES and a small name change to help readability.
* Tweaked the changes to retain the existing behavior w.r.t INSTALL_DEBUG_TOOLS=y.
When this change ('building debug docker image transparently') is extended to all dockers, this flag would become redundant. Yet, there can be some test based use cases that rely on this flag.
Until after all the dockers gets their debug images by default and we switch all use cases of this flag to use the newly built debug images, we need to maintain the existing behavior.
* 1) slave.mk - Dropped unused Docker build args
2) Debug template builder: renamed build_dbg_j2.sh to build_debug_docker_j2.sh
3) Dropped insignifcant statement CMD from debug Docker file, as base docker has Entrypoint.
* Reverted some changes, per review comments.
"User, uid, guid, frr-uid & frr-guid" are required for all docker images, with exception of debug images.
* Get in sync with the new update that filters out dockers to be built (SONIC_STRETCH_DOCKERS_FOR_INSTALLERS) and build debug-dockers only for those to be built and debug target is available.
* Mkae a template for each target that can be shared by all platforms.
Where needed a platform entry can override the template.
This avoids duplication, hence easier to maintain.
* A small change, that can fit better with other targets too.
Just take the platform code and do the rest in template.
* Extended debug to all stretch based docker images
* 1) Combined all orchagent makefiles into one platform independent make under rules/docker-orchagent.mk
2) Extened debug image to all stretch dockers
* Changes per review comments:
1) Dropped LIBSAIREDIS_DBG from database, teamd, router-advertiser, telemetry, and platform-monitor docker*.mk files from _DBG_DEPENDS list
2) W.r.t docker make for syncd, moved DEPENDS from template to specific makefile and let the template has stuff that is applicable to all.
* 1) Corrected a copy/paste mistake
* Fixed a copy/paste bug
* The base syncd dockers follow a template, which defines the base docker as DOCKER_SYNCD_BASE instead of DOCKER_SYNCD_<platform code>. Fix the docker-syncd-<mlnx, bfn>.mk to use the new one.
[Yet to be tested locally]
* Fixed spelling mistake
* Enable build of dbg-sonic-broadcom.bin, which uses dbg-dockers in place of regular dockers, for dockers that build debug version. For dockers that do not build debug version, it uses the regular docker.
This debug bin is installable and usable in a DUT, just like a regular bin.
* Per review comments:
1) Share a single rule for final image for normal & debug flavors (e.g. sonic-broadcom.bin & sonic-broadcom-dbg.bin)
2) Put dbg as suffix in final image name.
3) Compared target/sonic-broadcom.bin.logs with & w/o fix to verify integrity of sonic-broadcom.bin
4) Compared target/sonic-broadcom.bin.logs with sonic-broadcom-dbg.bin.log for verification
This fix takes care of ONIE image only. The next PR will cover the rest.
The next PR, will also make debug image conditional with flag.
* Updated per comments.
Now that debug dockers are available, do not need a way to install debug symbols in regular dockers.
With this commit, when INSTALL_DEBUG_TOOLS=y is set, it builds debug dockers (for dockers that enable debug build) and the final image uses debug dockers. For dockers that do not enable debug build, regular dockers get used in the final image.
Note:
The debug dockers are explicitly named as <docker name>-dbg.gz. But there is no "-dbg" suffix for image.
Hence if you make two runs with and w/o INSTALL_DEBUG_TOOLS=y, you have complete set of regular dockers + debug dockers. But the image gets overwritten.
Hence if both regular & debug images are needed, make two runs, as one with INSTALL_DEBUG_TOOLS=y and one w/o. Make sure to copy/rename the final image, before making the second run.
2019-06-12 03:36:21 -05:00
|
|
|
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
|
|
|
|
|
2017-02-01 00:06:12 -06:00
|
|
|
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|