Skip to content

Commit 5469234

Browse files
Add support for MtFuji elba dpu image build (#21949)
Add support for MtFuji elba dpu image build
1 parent 977354c commit 5469234

8 files changed

Lines changed: 28 additions & 8 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_ich.c
9393
platform/broadcom/sonic-platform-modules-dell/z9100/modules/dell_mailbox.c
9494
platform/broadcom/sonic-platform-modules-dell/z9264f/sonic_platform/ipmihelper.py
9595
platform/cisco-8000
96+
platform/pensando/pensando-sonic-artifacts
9697

9798
# buildinfo
9899
files/build/buildinfo

files/dsc/install_debian.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ image_dir=image-$image_version
1515

1616
INSTALLER_PAYLOAD=fs.zip
1717
DOCKERFS_DIR=docker
18-
{% if BUILD_REDUCE_IMAGE_SIZE == "y" -%}
18+
{% if BUILD_REDUCE_IMAGE_SIZE | default("n") == "y" -%}
1919
FILESYSTEM_DOCKERFS=dockerfs.tar.zstd
2020
{%- else -%}
2121
FILESYSTEM_DOCKERFS=dockerfs.tar.gz

platform/checkout/pensando.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[module]
2+
repo=git@github.com:pensando/pensando-sonic-artifacts.git
3+
ref=1.87.0-SS-14-release
4+
path=platform/pensando/pensando-sonic-artifacts

platform/checkout/template.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
{% if module.path is defined %}
2+
{% set path = module.path %}
3+
{% else %}
14
{% set path = env('PLATFORM_PATH') %}
5+
{% endif %}
26
if [ ! -d {{ path }} ]; then git clone {{ module.repo }} {{ path }}; fi;
37
if [ -d {{ path }}/.git ]; then cd {{ path }} &&
48

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DEP_FILES := rules/docker-dpu-base.dep rules/docker-dpu-base.mk
1+
DEP_FILES := rules/docker-dpu-base.dep rules/docker-dpu-base.mk platform/checkout/template.j2 platform/checkout/pensando.ini
22

33
$(DOCKER_DPU_BASE)_CACHE_MODE := none
44
$(DOCKER_DPU_BASE)_DEP_FILES := $(DEP_FILES)

platform/pensando/docker-dpu-base.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DOCKER_DPU_BASE_STEM = docker-dpu-base
44

55
DOCKER_DPU_BASE = $(DOCKER_DPU_BASE_STEM).gz
66

7-
$(DOCKER_DPU_BASE)_URL = https://github.com/pensando/dsc-artifacts/blob/main/docker-dpu-base.gz?raw=true
7+
$(DOCKER_DPU_BASE)_PATH = $(PLATFORM_PATH)/pensando-sonic-artifacts
88

9-
DOWNLOADED_DOCKER_IMAGES += $(DOCKER_DPU_BASE)
9+
COPY_DOCKER_IMAGES += $(DOCKER_DPU_BASE)
1010

platform/pensando/sdk.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Pensando SAI
22
PENSANDO_SAI = libsai_1.10.1-0_arm64.deb
33
PENSANDO_SAI_DEV = libsai-dev_1.10.1-0_arm64.deb
4-
$(PENSANDO_SAI)_URL = https://github.com/pensando/dsc-artifacts/blob/main/libsai_1.10.1-0_arm64.deb?raw=true
5-
$(PENSANDO_SAI_DEV)_URL = https://github.com/pensando/dsc-artifacts/blob/main/libsai-dev_1.10.1-0_arm64.deb?raw=true
4+
$(PENSANDO_SAI)_PATH = $(PLATFORM_PATH)/pensando-sonic-artifacts
5+
$(PENSANDO_SAI_DEV)_PATH = $(PLATFORM_PATH)/pensando-sonic-artifacts
66

77
$(eval $(call add_conflict_package,$(PENSANDO_SAI_DEV),$(LIBSAIVS_DEV)))
88

9-
SONIC_ONLINE_DEBS += $(PENSANDO_SAI)
10-
SONIC_ONLINE_DEBS += $(PENSANDO_SAI_DEV)
9+
SONIC_COPY_DEBS += $(PENSANDO_SAI)
10+
SONIC_COPY_DEBS += $(PENSANDO_SAI_DEV)

slave.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,16 @@ $(addprefix $(TARGET_PATH)/,$(DOWNLOADED_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz :
11231123

11241124
$(FOOTER)
11251125

1126+
# Targets for copy docker images
1127+
$(addprefix $(TARGET_PATH)/,$(COPY_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform \
1128+
$$(%.gz_DEP_FILES)
1129+
$(HEADER)
1130+
1131+
rm -rf $@ $@.log
1132+
cp "$($*.gz_PATH)/$*.gz" target/$(COPY_DOCKER_IMAGES) $(LOG)
1133+
1134+
$(FOOTER)
1135+
11261136
# Targets for building docker images
11271137
$(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start \
11281138
$$(addprefix $$($$*.gz_DEBS_PATH)/,$$($$*.gz_DEPENDS)) \
@@ -1286,6 +1296,7 @@ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES))
12861296
DOCKER_LOAD_TARGETS = $(addsuffix -load,$(addprefix $(TARGET_PATH)/, \
12871297
$(SONIC_SIMPLE_DOCKER_IMAGES) \
12881298
$(DOWNLOADED_DOCKER_IMAGES) \
1299+
$(COPY_DOCKER_IMAGES) \
12891300
$(DOCKER_IMAGES) \
12901301
$(DOCKER_DBG_IMAGES)))
12911302

0 commit comments

Comments
 (0)