Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ DOCKER_RUN := docker run --rm=true --privileged --init \
-w $(DOCKER_BUILDER_WORKDIR) \
-e "http_proxy=$(http_proxy)" \
-e "https_proxy=$(https_proxy)" \
-e "no_proxy=$(no_proxy)" \
-i$(shell { if [ -t 0 ]; then echo t; fi }) \
$(SONIC_BUILDER_EXTRA_CMDLINE)

Expand Down Expand Up @@ -197,6 +198,7 @@ DOCKER_BASE_BUILD = docker build --no-cache \
-t $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) \
--build-arg http_proxy=$(http_proxy) \
--build-arg https_proxy=$(https_proxy) \
--build-arg no_proxy=$(no_proxy) \
$(SLAVE_DIR)

DOCKER_BASE_PULL = docker pull \
Expand Down Expand Up @@ -240,6 +242,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_DPKG_CACHE_SOURCE=$(SONIC_DPKG_CACHE_SOURCE) \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
NO_PROXY=$(no_proxy) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ To build Arm64 bit for platform
`/usr/bin/tar: /path/to/sonic-buildimage/<some_file>: Cannot write: No space left on device`

The solution is to [move the directory](https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux) to a partition with more free space.
- Use `http_proxy=[your_proxy] https_proxy=[your_proxy] make` to enable http(s) proxy in the build process.
- Use `http_proxy=[your_proxy] https_proxy=[your_proxy] no_proxy=[your_no_proxy] make` to enable http(s) proxy in the build process.
- Add your user account to `docker` group and use your user account to make. `root` or `sudo` are not supported.

The SONiC installer contains all docker images needed. SONiC uses one image for all devices of a same ASIC vendor. The supported ASIC vendors are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if [[ "$1" == "init" ]]; then
pericom="/sys/bus/pci/devices/0000:08:00.0"
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe dell_ich
modprobe dell_s6100_iom_cpld
modprobe dell_s6100_lpc
modprobe nvram
Expand Down Expand Up @@ -59,6 +60,7 @@ elif [[ "$1" == "deinit" ]]; then
modprobe -r dell_s6100_iom_cpld
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r dell_ich
modprobe -r nvram
remove_python_api_package
else
Expand Down
9 changes: 7 additions & 2 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ $(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
$(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)")
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
$(info "NO_PROXY" : "$(NO_PROXY)")
$(info "ENABLE_ZTP" : "$(ENABLE_ZTP)")
$(info "SONIC_DEBUGGING_ON" : "$(SONIC_DEBUGGING_ON)")
$(info "SONIC_PROFILING_ON" : "$(SONIC_PROFILING_ON)")
Expand Down Expand Up @@ -647,7 +648,8 @@ $(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuff
# start docker daemon
docker-start :
@sudo sed -i '/http_proxy/d' /etc/default/docker
@sudo bash -c "echo \"export http_proxy=$$http_proxy\" >> /etc/default/docker"
@sudo bash -c "{ echo \"export http_proxy=$$http_proxy\"; \
echo \"export no_proxy=$$no_proxy\"; } >> /etc/default/docker"
@test x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) != x"y" && sudo service docker status &> /dev/null || ( sudo service docker start &> /dev/null && ./scripts/wait_for_docker.sh 60 )

# targets for building simple docker images that do not depend on any debian packages
Expand All @@ -661,6 +663,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g
docker build --squash --no-cache \
--build-arg http_proxy=$(HTTP_PROXY) \
--build-arg https_proxy=$(HTTPS_PROXY) \
--build-arg no_proxy=$(NO_PROXY) \
--build-arg user=$(USER) \
--build-arg uid=$(UID) \
--build-arg guid=$(GUID) \
Expand Down Expand Up @@ -751,6 +754,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform
docker build --squash --no-cache \
--build-arg http_proxy=$(HTTP_PROXY) \
--build-arg https_proxy=$(HTTPS_PROXY) \
--build-arg no_proxy=$(NO_PROXY) \
--build-arg user=$(USER) \
--build-arg uid=$(UID) \
--build-arg guid=$(GUID) \
Expand Down Expand Up @@ -802,7 +806,8 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG
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 http_proxy=$(HTTP_PROXY) \
--build-arg no_proxy=$(NO_PROXY) \
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
--label Tag=$(SONIC_IMAGE_VERSION) \
--file $($*.gz_PATH)/Dockerfile-dbg \
Expand Down