Skip to content

Commit 006f4b2

Browse files
[Marvell] Build infrastructure enhancements (sonic-net#18143)
* Move mrvl-prestera and sonic-platform-marvell submodule 'mrvl-prestera' and 'sonic-platform-marvell' submodules are moved from 'marvell-arm64'to 'marvell'. Additionaly submodules are changed to support multi-architecture build. Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
1 parent c076c12 commit 006f4b2

File tree

184 files changed

+223
-1184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+223
-1184
lines changed

.azure-pipelines/azure-pipelines-build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ jobs:
9090
pool: sonicbld-armhf
9191
timeoutInMinutes: 2880
9292
variables:
93+
PLATFORM_NAME: marvell
9394
PLATFORM_ARCH: armhf
9495

9596
- name: marvell-arm64
9697
${{ if not(parameters.qemuOrCrossBuild) }}:
9798
pool: sonicbld-arm64
9899
timeoutInMinutes: 2880
99100
variables:
101+
PLATFORM_NAME: marvell
100102
PLATFORM_ARCH: arm64
101103

102104
- name: marvell

.azure-pipelines/azure-pipelines-image-template.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
sudo modprobe overlay
5050
sudo apt-get install -y acl
5151
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
52-
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
52+
[ -z "$PLATFORM_NAME" ] && PLATFORM_NAME=$(PLATFORM_AZP)
53+
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$PLATFORM_NAME PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
5354
displayName: 'Make configure'
5455
postSteps:
5556
- script: |

.azure-pipelines/official-build-cache.yml

+1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ stages:
4949
pool: sonicbld-armhf
5050
timeoutInMinutes: 1200
5151
variables:
52+
PLATFORM_NAME: marvell
5253
PLATFORM_ARCH: armhf

.gitmodules

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@
115115
[submodule "src/sonic-dash-api"]
116116
path = src/sonic-dash-api
117117
url = https://github.com/sonic-net/sonic-dash-api.git
118-
[submodule "platform/marvell-arm64/mrvl-prestera"]
119-
path = platform/marvell-arm64/mrvl-prestera
118+
[submodule "platform/marvell/mrvl-prestera"]
119+
path = platform/marvell/mrvl-prestera
120120
url = https://github.com/Marvell-switching/mrvl-prestera.git
121-
[submodule "platform/marvell-arm64/sonic-platform-marvell"]
122-
path = platform/marvell-arm64/sonic-platform-marvell
121+
[submodule "platform/marvell/sonic-platform-marvell"]
122+
path = platform/marvell/sonic-platform-marvell
123123
url = https://github.com/Marvell-switching/sonic-platform-arm64.git

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ make target/sonic-[ASIC_VENDER]-armhf.bin
204204
_example:_
205205

206206
```shell
207-
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
207+
make configure PLATFORM=marvell PLATFORM_ARCH=armhf
208208
make target/sonic-marvell-armhf.bin
209209
```
210210

@@ -215,7 +215,7 @@ using cross-compilation, run the following commands:
215215
# Execute make configure once to configure ASIC and ARCH for cross-compilation build
216216

217217
NOJESSIE=1 NOSTRETCH=1 BLDENV=buster CROSS_BLDENV=1 \
218-
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
218+
make configure PLATFORM=marvell PLATFORM_ARCH=armhf
219219

220220
# Execute Arm32 build using cross-compilation environment
221221

@@ -234,7 +234,7 @@ make configure PLATFORM=[ASIC_VENDOR] PLATFORM_ARCH=arm64
234234

235235
# example:
236236

237-
make configure PLATFORM=marvell-arm64 PLATFORM_ARCH=arm64
237+
make configure PLATFORM=marvell PLATFORM_ARCH=arm64
238238
```
239239

240240
**NOTE**:

azure-pipelines.yml

+2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ stages:
7979
- name: marvell-arm64
8080
pool: sonicbld-arm64
8181
variables:
82+
PLATFORM_NAME: marvell
8283
PLATFORM_ARCH: arm64
8384
- name: marvell-armhf
8485
pool: sonicbld-armhf
8586
timeoutInMinutes: 1200
8687
variables:
88+
PLATFORM_NAME: marvell
8789
PLATFORM_ARCH: armhf
8890
INCLUDE_RESTAPI: y
8991

build_debian.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ if [[ $TARGET_BOOTLOADER == uboot ]]; then
781781
## Overwriting the initrd image with uInitrd
782782
sudo LANG=C chroot $FILESYSTEM_ROOT mv /boot/u${INITRD_FILE} /boot/$INITRD_FILE
783783
else
784-
sudo cp -v $PLATFORM_DIR/${sonic_asic_platform}-${CONFIGURED_ARCH}/sonic_fit.its $FILESYSTEM_ROOT/boot/
784+
sudo cp -v $PLATFORM_DIR/$CONFIGURED_PLATFORM/sonic_fit.its $FILESYSTEM_ROOT/boot/
785785
sudo LANG=C chroot $FILESYSTEM_ROOT mkimage -f /boot/sonic_fit.its /boot/sonic_${CONFIGURED_ARCH}.fit
786786
fi
787787
fi

build_image.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ set -x -e
99
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)
1010

1111
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
12-
. ./onie-image-${CONFIGURED_ARCH}.conf
12+
if [ -r ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf ]; then
13+
. ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf
14+
else
15+
. ./onie-image-${CONFIGURED_ARCH}.conf
16+
fi
1317
else
1418
. ./onie-image.conf
1519
fi
@@ -82,10 +86,14 @@ generate_onie_installer_image()
8286
done
8387
done
8488

89+
platform_conf_file="platform/$TARGET_MACHINE/platform_${CONFIGURED_ARCH}.conf"
90+
if [ ! -f $platform_conf_file ]; then
91+
platform_conf_file="platform/$TARGET_MACHINE/platform.conf"
92+
fi
8593
## Generate an ONIE installer image
8694
## Note: Don't leave blank between lines. It is single line command.
8795
./onie-mk-demo.sh $CONFIGURED_ARCH $TARGET_MACHINE $TARGET_PLATFORM-$TARGET_MACHINE-$ONIEIMAGE_VERSION \
88-
installer platform/$TARGET_MACHINE/platform.conf $output_file OS $IMAGE_VERSION $ONIE_IMAGE_PART_SIZE \
96+
installer $platform_conf_file $output_file OS $IMAGE_VERSION $ONIE_IMAGE_PART_SIZE \
8997
$INSTALLER_PAYLOAD $SECURE_UPGRADE_SIGNING_CERT $SECURE_UPGRADE_DEV_SIGNING_KEY
9098
}
9199

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
marvell-arm64
1+
marvell
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
marvell-arm64
1+
marvell
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
marvell-arm64
1+
marvell
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
marvell-armhf
1+
marvell

onie-image-armhf.conf

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ DOCKERFS_DIR=docker
3131
DOCKER_RAMFS_SIZE=2500M
3232

3333
## Output file name for onie installer
34-
OUTPUT_ONIE_IMAGE=target/sonic-$TARGET_MACHINE.bin
34+
OUTPUT_ONIE_IMAGE=target/sonic-$TARGET_MACHINE-$CONFIGURED_ARCH.bin
3535

3636
## Output file name for raw image
37-
OUTPUT_RAW_IMAGE=target/sonic-$TARGET_MACHINE.raw
37+
OUTPUT_RAW_IMAGE=target/sonic-$TARGET_MACHINE-$CONFIGURED_ARCH.raw
3838

3939
## Raw image size in MB
4040
RAW_IMAGE_DISK_SIZE=4096
4141

4242
## Output file name for kvm image
43-
OUTPUT_KVM_IMAGE=target/sonic-$TARGET_MACHINE.img
43+
OUTPUT_KVM_IMAGE=target/sonic-$TARGET_MACHINE-$CONFIGURED_ARCH.img
4444

4545
## Kvm image size in GB
4646
KVM_IMAGE_DISK_SIZE=16
4747

4848
## Output file name for aboot installer
49-
OUTPUT_ABOOT_IMAGE=target/sonic-aboot-$TARGET_MACHINE.swi
49+
OUTPUT_ABOOT_IMAGE=target/sonic-aboot-$TARGET_MACHINE-$CONFIGURED_ARCH.swi
5050

5151
## Aboot boot image name
5252
ABOOT_BOOT_IMAGE=.sonic-boot.swi

onie-mk-demo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ echo -n "."
107107
cp -r $onie_installer_payload $tmp_installdir || clean_up 1
108108
echo -n "."
109109
[ -r "$platform_conf" ] && {
110-
cp $platform_conf $tmp_installdir || clean_up 1
110+
cp $platform_conf $tmp_installdir/platform.conf || clean_up 1
111111
}
112112
echo "machine=$machine" > $tmp_installdir/machine.conf
113113
echo "platform=$platform" >> $tmp_installdir/machine.conf

platform/marvell-arm64/docker-syncd-mrvl-rpc.mk

-27
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl-rpc/99-syncd.conf

-1
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl-rpc/Dockerfile.j2

-56
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl-rpc/ptf_nn_agent.conf

-10
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl.mk

-16
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2

-37
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl/critical_processes

-1
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl/supervisord.conf

-39
This file was deleted.

platform/marvell-arm64/docker-syncd-mrvl/syncd.sh

-12
This file was deleted.

0 commit comments

Comments
 (0)