sonic-buildimage/platform/broadcom/one-image.mk

87 lines
5.3 KiB
Makefile
Raw Normal View History

# sonic broadcom one image installer
SONIC_ONE_IMAGE = sonic-broadcom.bin
$(SONIC_ONE_IMAGE)_MACHINE = broadcom
$(SONIC_ONE_IMAGE)_DEPENDENT_MACHINE = broadcom-dnx
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
$(SONIC_ONE_IMAGE)_INSTALLS += $(PDDF_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_INSTALLS += $(FLASHROM)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
$(DELL_Z9264F_PLATFORM_MODULE) \
$(DELL_S5224F_PLATFORM_MODULE) \
$(DELL_S5232F_PLATFORM_MODULE) \
$(DELL_S5248F_PLATFORM_MODULE) \
$(DELL_Z9332F_PLATFORM_MODULE) \
$(DELL_S5296F_PLATFORM_MODULE) \
$(DELL_Z9100_PLATFORM_MODULE) \
$(DELL_S6100_PLATFORM_MODULE) \
$(DELL_N3248PXE_PLATFORM_MODULE) \
$(DELL_N3248TE_PLATFORM_MODULE) \
$(INGRASYS_S8900_54XC_PLATFORM_MODULE) \
$(INGRASYS_S8900_64XC_PLATFORM_MODULE) \
$(INGRASYS_S9100_PLATFORM_MODULE) \
$(INGRASYS_S8810_32Q_PLATFORM_MODULE) \
$(INGRASYS_S9200_64X_PLATFORM_MODULE) \
2017-07-18 13:21:24 -05:00
$(ACCTON_AS7712_32X_PLATFORM_MODULE) \
$(ACCTON_AS5712_54X_PLATFORM_MODULE) \
$(ACCTON_AS7816_64X_PLATFORM_MODULE) \
$(ACCTON_AS7716_32X_PLATFORM_MODULE) \
New model as7312 54x (#1339) * Update sonic-platform-modules-accton to lastest Signed-off-by: roylee123 <roy_lee@accton.com> * Install sonic-platform-common package in platform-monitor docker for ledd (#1330) * Install sonic-platform-common package in platform-monitor docker for ledd * Specify Python wheel dependencies in docker-platform-monitor.mk; Remove explicit specifications from Dockerfile.j2 * [7312_54x] Add plug-in files. Signed-off-by: roylee123 <roy_lee@accton.com> * [as7312-54x] Update i2c related drivers after tested on R0B model. Signed-off-by: roylee123 <roy_lee@accton.com> * Add as7312-54x driver package. Signed-off-by: roylee123 <roy_lee@accton.com> * [as7312-54x] Add index to port_config.ini for mmaping port with single lane. Validate sfputil.py and mark unsupported for lp mode. Signed-off-by: roylee123 <roy_lee@accton.com> * [as7312-54x] Change for R01 HW board. Signed-off-by: roylee123 <roy_lee@accton.com> * [as7312-54x] recovered for the lint corrected not suitable for python. Signed-off-by: roylee123 <roy_lee@accton.com> * Remove debug printing. Signed-off-by: roylee123 <roy_lee@accton.com> * [platform] as7312-32x, update for util.py recovered. Signed-off-by: roylee123 <roy_lee@accton.com> * [platform] Accton: merged the commit by Polly Hsu. Change platform modules to depend on 3.16.0-5-amdn64 kernel. Signed-off-by: roylee123 <roy_lee@accton.com> * [Device] As7312-54x, update for correct I2C addresses for sfp and psu. Signed-off-by: roy_lee <roy_lee@accton.com> * [Platform] as7312-54x, pushed submodule to new i2c drivers and script. Signed-off-by: roy_lee <roy_lee@accton.com> * resolved PR New model as7312 54x #1339 merge conflicts on sfputil.py. Signed-off-by: roy_lee <roy_lee@accton.com>
2018-02-14 21:10:37 -06:00
$(ACCTON_AS7312_54X_PLATFORM_MODULE) \
$(ACCTON_AS7326_56X_PLATFORM_MODULE) \
$(ACCTON_AS7716_32XB_PLATFORM_MODULE) \
$(ACCTON_AS6712_32X_PLATFORM_MODULE) \
$(ACCTON_AS7726_32X_PLATFORM_MODULE) \
$(ACCTON_AS4630_54PE_PLATFORM_MODULE) \
$(ACCTON_AS4630_54TE_PLATFORM_MODULE) \
$(ACCTON_MINIPACK_PLATFORM_MODULE) \
$(ACCTON_AS5812_54X_PLATFORM_MODULE) \
$(ACCTON_AS5812_54T_PLATFORM_MODULE) \
$(ACCTON_AS5835_54X_PLATFORM_MODULE) \
$(ACCTON_AS9716_32D_PLATFORM_MODULE) \
$(ACCTON_AS9726_32D_PLATFORM_MODULE) \
$(ACCTON_AS5835_54T_PLATFORM_MODULE) \
$(ACCTON_AS7312_54XS_PLATFORM_MODULE) \
$(ACCTON_AS7315_27XB_PLATFORM_MODULE) \
$(INVENTEC_D7032Q28B_PLATFORM_MODULE) \
$(INVENTEC_D7054Q28B_PLATFORM_MODULE) \
$(INVENTEC_D7264Q28B_PLATFORM_MODULE) \
$(INVENTEC_D6356_PLATFORM_MODULE) \
$(INVENTEC_D6332_PLATFORM_MODULE) \
$(CEL_DX010_PLATFORM_MODULE) \
$(CEL_HALIBURTON_PLATFORM_MODULE) \
$(CEL_SEASTONE2_PLATFORM_MODULE) \
$(DELTA_AG9032V1_PLATFORM_MODULE) \
$(DELTA_AG9064_PLATFORM_MODULE) \
$(DELTA_AG5648_PLATFORM_MODULE) \
$(DELTA_ET6248BRB_PLATFORM_MODULE) \
$(QUANTA_IX1B_32X_PLATFORM_MODULE) \
$(QUANTA_IX7_32X_PLATFORM_MODULE) \
$(QUANTA_IX7_BWDE_32X_PLATFORM_MODULE) \
$(QUANTA_IX8_56X_PLATFORM_MODULE) \
$(QUANTA_IX8A_BWDE_56X_PLATFORM_MODULE) \
$(QUANTA_IX8C_56X_PLATFORM_MODULE) \
$(QUANTA_IX9_32X_PLATFORM_MODULE) \
$(MITAC_LY1200_32X_PLATFORM_MODULE) \
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE) \
$(ALPHANETWORKS_SNH60B0_640F_PLATFORM_MODULE) \
$(BRCM_XLR_GTS_PLATFORM_MODULE) \
$(DELTA_AG9032V2A_PLATFORM_MODULE) \
$(JUNIPER_QFX5210_PLATFORM_MODULE) \
$(CEL_SILVERSTONE_PLATFORM_MODULE) \
$(JUNIPER_QFX5200_PLATFORM_MODULE) \
$(DELTA_AGC032_PLATFORM_MODULE) \
$(RUIJIE_B6510_48VS8CQ_PLATFORM_MODULE) \
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE) \
$(RAGILE_RA_B6910_64C_PLATFORM_MODULE) \
$(NOKIA_IXR7250_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
[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
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)