Commit Graph

72 Commits

Author SHA1 Message Date
Liu Shilong
a3a704cf19
[build] Add retry when make SONiC image to improve success rate. (#12325) (#13131)
Why I did it
Makefile needs some dependencies from the Internet. It will fail for network related issue.
Retries will fix most of these issues.

How I did it
Add retries when running commands which maybe related with networking.

How to verify it
2022-12-23 18:51:43 +08:00
xumia
3e29919b3a
[Build]: Fix the buster slave not built issue when building configure (#10696)
Why I did it
[Build]: Fix the buster slave not built issue when building configure

When running build command "make configure", we can expect the buster slave will be built.
2022-04-28 16:13:21 +08:00
VenkatCisco
8093ab2024 Platform/cisco-8000 module for sonic-buildimage (#8172)
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone git@github.com:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
2021-08-06 20:42:10 -07:00
lguohan
8060142f9c
[build]: disable build sonic-slave-jessie by default (#6297)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-12-24 21:55:20 -08:00
xumia
0a36de3a89
Recover "Support SONiC Reproduceable Build-debian/pip/web packages (#6255)
* Revert "Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)""

This reverts commit 17497a65e3.

* Revert "Revert "Remove unnecessary sudo authority in build Makefile (#6237)""

This reverts commit 163b7111b5.
2020-12-21 15:31:10 +08:00
Guohan Lu
17497a65e3 Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)"
This reverts commit 55a707586b.
2020-12-18 23:37:27 -08:00
xumia
55a707586b
Support SONiC Reproduceable Build-debian/pip/web packages (#5718)
* Support SONiC reproduceable build for deb/py2/py3/web

* Remove j2 files

* Fix bug

* Fix some issues

1. Change some code format issues
2. Fix curl calling wget command, pip2 calling pip3 issue
3. Fix wget/curl downloading multiple urls issue

* Fix some code format issue

* Fix bug

* Fix bug

* Fix command path hard code in build info scripts issue

* Add debian package sonic-build-tools

* Fix auto debian package removed issue

* Change build debian package name, and change the folder

* Collect the pre-versions and post-versions

* Change to use debian:buster

* Remove apt-mark and improve code

* Remove set_build_hooks

* Change docker trusted gpg files

* Fix docker build COPY directory name issue

* Move the trusted gpg files into the sonic-build-hooks package
2020-12-17 13:06:53 +08:00
Ying Xie
68f1352159
[makefile] re-organize make file so init only execute once (#6160)
- Why I did it
make init executed 3 times, which is unnecessary.

- How I did it
reorganize the makefile so that init only executed once.

- How to verify it
make reset
make init

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2020-12-09 14:13:33 -08:00
Guohan Lu
01cb7934b0 [build]: add buster docker as the last step of the build proces
- build SONIC_STRETCH_DOCKERS in sonic-slave-stretch docker
- build image related module in sonic-slave-buster docker.
  This includes all kernels modules and some packages

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-16 10:26:18 +00:00
Guohan Lu
358d93eeb5 [sonic-slave-buster]: build sonic-slave-buster docker
- add sonic-slave-buster docker
- remove debhelper from buster backports
  debhelper in buster is enough to build smartmontools 6.6

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-04-16 10:23:20 +00:00
Ying Xie
1515e39e71 [makefile] build Jessie slave unless NOJESSIE is specified (#3546)
* [makefile] build Jessie slave unless NOJESSIE is specified
* fix if condition
2019-10-01 21:12:19 -07:00
lguohan
30b37ec6fb
[build]: make sonic-slave-stretch as the default build docker (#2921)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-05-27 15:50:51 -07:00
lguohan
8080695ecf
[docker-{sonic,syncd}-vs]: upgrade {sonic,syncd}-vs docker to stretch (#2865)
* [docker-{sonic,syncd}-vs]: upgrade sonic-vs and syncd-vs docker to stretch

* remove python-click 6.6

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-05-06 07:19:36 -07:00
Ying Xie
a8ccf589c9 [build]: Makefile: make new step "make stretch" optional (#1936)
* [makefile] Rename Makefile to Makefile.work

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] Add new make file to avoid extra step

* avoiding calling "make stretch"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] allow skipping "make stretch"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [makefile] add all PHONY targets to pass through list

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-08-16 15:54:31 -07:00
lguohan
e15cf2d66a
[build]: print error message when use root or sudo to build. (#1923)
Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-13 18:30:22 -07:00
Guohan Lu
a7192939a0 [build]: sonic-slave-stretch- sha both Dockerfile and Dockerfile.user 2018-08-11 09:07:59 +00:00
Guohan Lu
a87da7b1f9 [build]: build stretch-based sonic slave docker 2018-08-11 09:07:59 +00:00
Guohan Lu
8c72d8c6f2 [build]: insert overlay kmod for base image build 2018-08-11 09:07:59 +00:00
Ying Xie
3c33737d58
[make] introducing new build option KERNEL_PROCURE_METHOD (#1837)
* [make] introducing new build option KERNEL_BUILD_METHOD

- Kernel could be built from source files with method 'build'
- Kernel could be downloaded from Azure storage with method 'download'

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Replace BUILD with PROCURE

* fix typo
2018-07-25 08:14:18 -07:00
lguohan
7edbf5d6f0
[build]: add show docker tag (#1833) 2018-07-01 09:46:42 -07:00
Jipan Yang
f0690b246b [build]: Fix the problem of ENABLE_SYSTEM_TELEMETRY not taking effect in rules/config (#1615)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-04-18 00:31:12 -07:00
Jipan Yang
f74de8914b [telemetry]: SONiC system telemetry Support (#1526)
* SONiC system telemetry Support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update package name from telemetry to sonic-telemetry

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-03-27 13:39:04 -07:00
Wenda Ni, Ph.D
17b09ef06a [build]: Move the mounting point inside the docker to home directory (#1522)
* Move the mounting point inside the docker to home directory

Signed-off-by: Wenda <wenni@microsoft.com>

* Change mount point to src under the home directory

Signed-off-by: Wenda <wenni@microsoft.com>
2018-03-24 02:36:48 -07:00
sihuihan88
7639cc1b53 [pfcwd]: add flag to enable pfc wd on start (#1429) 2018-03-05 23:55:37 -08:00
lguohan
15d433d975
[build]: allow to use http(s) proxy in the build (#1265)
* allow to use http(s) proxy in the build

To enable this, use following command
http_proxy=[your_proxy] https_proxy=[your_proxy] make
2017-12-23 23:34:15 -08:00
Joe LeVeque
ee73cdec26
Add 'make reset' target with warning prompt to reset git repo and submodules (#1258) 2017-12-21 11:15:06 -08:00
Ying Xie
eadd74fb84
[build] allow user to override the default number of build jobs (#1255)
User could issue SONIC_BUILD_JOBS=<num> to set number of concurrent
build job(s) to run.

With this commit, the default setting is still left at 1.
2017-12-20 15:25:30 -08:00
Ying Xie
d3765066fe
[make] Introducing build option SOURCE_FOLDER (#1155)
When KEEP_SLAVE_ON=yes and SOURCE_FOLDER is defined, the path pointed
by SOURCE_FOLDER will be mounted in the build slave docker at /var/src.

This option allows user to mount an extra path into the build slave
when the slave is left running. Usually when user need to build extra
stuff in SOURCE_FOLDER.
2017-11-16 08:15:14 -08:00
Samuel Angebault
a7e602501c Use sha1sum instead of shasum for portability (#1113)
sha1sum is a better option to use since it is part of the coreutil package.
shasum is owned by perl which might not always exist on the host system.
2017-11-03 14:36:26 -07:00
Ying Xie
41f226f0dc [build] capture 2 initialization git commands in 'make init' target (#1074) 2017-10-24 19:49:37 -07:00
Shuotian Cheng
27cac94da7 [Makefile]: Fix unmatched variable name ENABLE_SYNCD_RPC (#1032)
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2017-10-11 17:46:26 -07:00
Rodny Molina
b5eb0c2ce2 [Makefile] Allowing interactive session with the slave docker-container (#903)
* Fixing a couple of issues to enable FRR to run with latest SONiC code.

* Adjusting FRR's jinja template to meet latest sonic-cfgen requirements. Basically, i'm just extending #448 changes into FRR.

* Eliminate FRR's integrated-config file to prevent daemons from bypassing their own config files. FRR daemons now default to an integrated-config file for config-parsing purposes. But we are still interested in having each daemon looking in their specific config file (bgpd.conf, zebra.conf, etc). So here i'm just deleting this integrating-config file to prevent FRR from running from a bogus config-file.

* Allows interactive session with the slave docker-container after conclusion of the building process.

Proposed changes provide a more direct access to the building pipeline,
by allowing users to launch consecutive compilation tasks from the same
slave container.
2017-09-22 00:57:23 -07:00
lguohan
d3997f4a35 [sonic-slave]: SLAVE_TAG should be for both Dockerfile and Dockerfile.user (#950)
Should rebuild both Dockerfile and Dockerfile.user when any of the two
files change.
2017-09-09 15:22:52 -07:00
Marian Pritsak
afbf1ee2fb [sonic-slave]: Split user commands from generic. (#868)
In case when more than one user builds SONiC on same machine, we can
keep generic part that installs all packages to slave image apart from
creating user and calling user-related commands. Then generic base image
will be built only once, allowing other users to build only smaller
specific to them layers.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-08-08 10:21:54 +03:00
Marian Pritsak
1c165067af [Makefile]: Remove lockfile before build (#847)
In case previous build was forcefully stopped, we need to remove screen
lock so that build won't be stuck.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-27 07:52:12 +03:00
Marian Pritsak
7cf8479182 [Makefile]: Set build directory as docker workdir (#832)
Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-24 12:29:36 +03:00
Marian Pritsak
bc4ee14340 [Makefile]: Automatically deduce pseudo-TTY option (#830)
Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-07-24 10:52:51 +03:00
lguohan
3fd2014e93 [sonic-mgmt]: move sonic-mgmt docker build into sonic-slave (#819)
need to install sonic-device-data into sonic-mgmt docker
2017-07-19 08:10:45 -07:00
Taoyu Li
5e6620e19e [bgp] Save bgp admin state (#690)
* [bgp] Save admin state and set default state to shutdown

* Set default behavior to no shutdown

* Add build option SHUTDOWN_BGP_ON_START

* Script change for default admin state to be on

* Address CR comments to bgp_neighbor script

* Fix script bug
2017-06-12 11:05:22 -07:00
Marian Pritsak
520fff5b2d Add ENABLE_SYNCD_RPC option (#642)
Under rules/config now there's additional configuration option
ENABLE_SYNCD_RPC that allows building SONIC installer with
docker-syncd-*-rpc for evaluation purposes.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-05-30 16:17:03 -07:00
lguohan
6c24574e9f [mgmt]: add sonic-mgmt docker for running test in sonic-mgmt repo (#606)
* [mgmt]: add sonic-mgmt docker for running test in sonic-mgmt repo
2017-05-18 16:54:48 -07:00
lguohan
2e9b92e1c1 [build]: allow to customize USERNAME and PASSWORD in command line (#492)
* [build]: allow to customize USERNAME and PASSWORD in command line

* use default password and username if not specified in the command line
2017-04-12 11:23:48 -07:00
Marian Pritsak
6dbe979e5f [build]: Include SONiC version into installer. (#472)
* [build]: Include SONiC version into installer.

Signed-off-by: marian-pritsak <marianp@mellanox.com>

* Append dirty if contains local changes

Signed-off-by: marian-pritsak <marianp@mellanox.com>

* Update config

* Use correct name for kernel version field

* Update sysDescription.j2
2017-04-05 16:14:41 -07:00
lguohan
0ed9b3ce28 [platform]: remove sku from build parameter (#350)
different sku will be contained in a single one sonic image.
no longer need to specify sku at the build time
2017-03-01 17:05:13 -08:00
Marian Pritsak
7d10892dce [Makefile]: Add --no-cache to docker build (#352)
Option was removed by mistake in 38b9eb1829

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-03-01 14:25:44 -08:00
Marian Pritsak
38b9eb1829 [Makefile]: Automatically rebuild sonic-slave (#338)
sonic-slave is not built upon every make call, because it
takes a lot of time. So in order to track changes hash of
Dockerfile is included to sonic-slave image.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-03-01 11:00:59 -08:00
Taoyu Li
40fdde5749 Allow enabling dhcp graph service by cmdline input (#322) 2017-02-22 17:21:03 -08:00
Taoyu Li
f5b2dccee9 Allow build image with local changes for debug purpose (#247)
* Allow build with local change for debug purpose
Uncomment DEBUG_BUILD = y in rule.mk/config to enable local build
2017-02-14 16:56:08 -08:00
lguohan
afe3fbf82f make tty as an option in docker run (#225) 2017-01-31 11:47:52 -08:00
Oleksandr Ivantsiv
34ea91349c one image implementation (#215)
* Single image

* Fix review comments

* Update syncd service. Add HW mgmt to Mellanox single image.

* Add single image template for Broadcom platform.

SKU should be provided during configure:
make configure PLATFORM=broadcom SKU=Force10-S6000

* Add single image template for Cavium platform.

SKU should be provided during configure:
make configure PLATFORM=cavium SKU=AS7512

* Add description to sonic_debian_extension.j2 file.
2017-01-29 11:33:33 -08:00