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
20 changes: 13 additions & 7 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
dbg_image: no
swi_image: no
raw_image: no
sync_rpc_image: no
docker_syncd_rpc_image: no
syncd_rpc_image: no
platform_rpc: no
${{ if ne(parameters.jobGroups, '') }}:
jobGroups: ${{ parameters.jobGroups }}
Expand All @@ -44,7 +45,7 @@ jobs:

- name: barefoot
variables:
sync_rpc_image: yes
docker_syncd_rpc_image: yes
platform_rpc: bfn
swi_image: yes

Expand All @@ -53,13 +54,13 @@ jobs:
dbg_image: yes
swi_image: yes
raw_image: yes
sync_rpc_image: yes
docker_syncd_rpc_image: yes
platform_rpc: brcm

- name: centec
variables:
dbg_image: yes
sync_rpc_image: yes
docker_syncd_rpc_image: yes
platform_rpc: centec

- name: centec-arm64
Expand All @@ -85,13 +86,14 @@ jobs:
- name: mellanox
variables:
dbg_image: yes
sync_rpc_image: yes
docker_syncd_rpc_image: yes
syncd_rpc_image: yes
platform_rpc: mlnx

- name: nephos
variables:
dbg_image: yes
sync_rpc_image: yes
docker_syncd_rpc_image: yes
platform_rpc: nephos

buildSteps:
Expand All @@ -113,9 +115,13 @@ jobs:
if [ $(raw_image) == yes ]; then
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw
fi
if [ $(sync_rpc_image) == yes ]; then
if [ $(docker_syncd_rpc_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz
fi
if [ $(syncd_rpc_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin
mv target/sonic-mellanox.bin target/sonic-$(GROUP_NAME)-rpc.bin
fi
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
fi
displayName: "Build sonic image"
10 changes: 10 additions & 0 deletions installer/sharch_body.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@ fi

echo " OK."

image_size_in_kb=$((($(sed -e '1,/^exit_marker$/d' "$0" | tar --to-stdout -xf - | wc -c) + 1023 ) / 1024))
# Untar and launch install script in a tmpfs
cur_wd=$(pwd)
export cur_wd
archive_path=$(realpath "$0")
tmp_dir=$(mktemp -d)
if [ "$(id -u)" = "0" ] ; then
mount -t tmpfs tmpfs-installer $tmp_dir || exit 1
mount_size_in_kb=$(df $tmp_dir | tail -1 | tr -s ' ' | cut -d' ' -f4)
#checking extra 100KB space in tmp_dir, after image extraction
padding=102400
if [ "$mount_size_in_kb" -le "$((image_size_in_kb + padding))" ]; then
image_size_in_mb=$(((image_size_in_kb + 1023) / 1024))
#Adding extra 32MB free space for image extraction.
mount_size_in_mb=$((((image_size_in_mb + 31) / 32) * 32))
mount -o remount,size="${mount_size_in_mb}M" -t tmpfs tmpfs-installer $tmp_dir || exit 1
fi
fi
cd $tmp_dir
echo -n "Preparing image archive ..."
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-utilities