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

Commits on Apr 5, 2019

  1. 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.
    renukamanavalan committed Apr 5, 2019
    Configuration menu
    Copy the full SHA
    941eb7d View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2019

  1. Configuration menu
    Copy the full SHA
    042d51e View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2019

  1. Tweaked the changes to retain the existing behavior w.r.t INSTALL_DEB…

    …UG_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.
    renukamanavalan committed Apr 8, 2019
    Configuration menu
    Copy the full SHA
    24f38f2 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2019

  1. 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.
    renukamanavalan committed Apr 11, 2019
    Configuration menu
    Copy the full SHA
    4443c70 View commit details
    Browse the repository at this point in the history
  2. Reverted some changes, per review comments.

    "User, uid, guid, frr-uid & frr-guid" are required for all docker images, with exception of debug images.
    renukamanavalan committed Apr 11, 2019
    Configuration menu
    Copy the full SHA
    7b84e64 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2019

  1. Configuration menu
    Copy the full SHA
    c717e50 View commit details
    Browse the repository at this point in the history
  2. 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.
    renukamanavalan committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    60a001c View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2019

  1. Merge remote-tracking branch 'upstream/master'

    merge with upstream
    renukamanavalan committed Apr 15, 2019
    Configuration menu
    Copy the full SHA
    cefc4b8 View commit details
    Browse the repository at this point in the history
  2. 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.
    renukamanavalan committed Apr 15, 2019
    Configuration menu
    Copy the full SHA
    f659917 View commit details
    Browse the repository at this point in the history
  3. A small change, that can fit better with other targets too.

    Just take the platform code and do the rest in template.
    renukamanavalan committed Apr 15, 2019
    Configuration menu
    Copy the full SHA
    9d7aedb View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2019

  1. Configuration menu
    Copy the full SHA
    279084f View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2019

  1. Merge remote-tracking branch 'upstream/master'

    sync with upstream
    renukamanavalan committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    99783dd View commit details
    Browse the repository at this point in the history
  2. 1) Combined all orchagent makefiles into one platform independent mak…

    …e under rules/docker-orchagent.mk
    
    2) Extened debug image to all stretch dockers
    renukamanavalan committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    a2297a3 View commit details
    Browse the repository at this point in the history
  3. 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.
    renukamanavalan committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    b4b30fd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    575e43d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e504eb7 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2019

  1. Configuration menu
    Copy the full SHA
    0db6c0f View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2019

  1. Merge remote-tracking branch 'upstream/master'

    Sync with upstream
    renukamanavalan committed Apr 22, 2019
    Configuration menu
    Copy the full SHA
    755dcee View commit details
    Browse the repository at this point in the history
  2. The base syncd dockers follow a template, which defines the base dock…

    …er 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]
    renukamanavalan committed Apr 22, 2019
    Configuration menu
    Copy the full SHA
    6f1c92b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d74bcc View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2019

  1. Configuration menu
    Copy the full SHA
    e537676 View commit details
    Browse the repository at this point in the history
  2. Enable build of dbg-sonic-broadcom.bin, which uses dbg-dockers in pla…

    …ce 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.
    renukamanavalan committed Apr 28, 2019
    Configuration menu
    Copy the full SHA
    31fa832 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2019

  1. Sync with master

    Merge remote-tracking branch 'upstream/master'
    renukamanavalan committed May 17, 2019
    Configuration menu
    Copy the full SHA
    b9ced6f View commit details
    Browse the repository at this point in the history

Commits on May 20, 2019

  1. Configuration menu
    Copy the full SHA
    fbaabca View commit details
    Browse the repository at this point in the history
  2. 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.
    renukamanavalan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    af4d3da View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2019

  1. Configuration menu
    Copy the full SHA
    fc019bb View commit details
    Browse the repository at this point in the history
  2. 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.
    renukamanavalan committed Jun 2, 2019
    Configuration menu
    Copy the full SHA
    1ccee7d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe438f8 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2019

  1. Configuration menu
    Copy the full SHA
    3fcfc18 View commit details
    Browse the repository at this point in the history