Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Marvell] Build infrastructure enhancements #18143

Merged
merged 10 commits into from
Apr 15, 2024
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
2 changes: 2 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ jobs:
pool: sonicbld-armhf
timeoutInMinutes: 2880
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf

- name: marvell-arm64
${{ if not(parameters.qemuOrCrossBuild) }}:
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: arm64

- name: marvell
Expand Down
3 changes: 2 additions & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
sudo modprobe overlay
sudo apt-get install -y acl
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
[ -z "$PLATFORM_NAME" ] && PLATFORM_NAME=$(PLATFORM_AZP)
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$PLATFORM_NAME PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
displayName: 'Make configure'
postSteps:
- script: |
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/official-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ stages:
pool: sonicbld-armhf
timeoutInMinutes: 1200
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
[submodule "src/sonic-dash-api"]
path = src/sonic-dash-api
url = https://github.com/sonic-net/sonic-dash-api.git
[submodule "platform/marvell-arm64/mrvl-prestera"]
path = platform/marvell-arm64/mrvl-prestera
[submodule "platform/marvell/mrvl-prestera"]
path = platform/marvell/mrvl-prestera
url = https://github.com/Marvell-switching/mrvl-prestera.git
[submodule "platform/marvell-arm64/sonic-platform-marvell"]
path = platform/marvell-arm64/sonic-platform-marvell
[submodule "platform/marvell/sonic-platform-marvell"]
path = platform/marvell/sonic-platform-marvell
url = https://github.com/Marvell-switching/sonic-platform-arm64.git
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ make target/sonic-[ASIC_VENDER]-armhf.bin
_example:_

```shell
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make configure PLATFORM=marvell PLATFORM_ARCH=armhf
make target/sonic-marvell-armhf.bin
```

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

NOJESSIE=1 NOSTRETCH=1 BLDENV=buster CROSS_BLDENV=1 \
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make configure PLATFORM=marvell PLATFORM_ARCH=armhf

# Execute Arm32 build using cross-compilation environment

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

# example:

make configure PLATFORM=marvell-arm64 PLATFORM_ARCH=arm64
make configure PLATFORM=marvell PLATFORM_ARCH=arm64
```

**NOTE**:
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ stages:
- name: marvell-arm64
pool: sonicbld-arm64
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: arm64
- name: marvell-armhf
pool: sonicbld-armhf
timeoutInMinutes: 1200
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf
INCLUDE_RESTAPI: y

Expand Down
2 changes: 1 addition & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ if [[ $TARGET_BOOTLOADER == uboot ]]; then
## Overwriting the initrd image with uInitrd
sudo LANG=C chroot $FILESYSTEM_ROOT mv /boot/u${INITRD_FILE} /boot/$INITRD_FILE
else
sudo cp -v $PLATFORM_DIR/${sonic_asic_platform}-${CONFIGURED_ARCH}/sonic_fit.its $FILESYSTEM_ROOT/boot/
sudo cp -v $PLATFORM_DIR/$CONFIGURED_PLATFORM/sonic_fit.its $FILESYSTEM_ROOT/boot/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

centec-arm64 is also impacted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But $CONFIGURED_PLATFORM for "centec-arm64" is "centec-arm64". So change will work.

sudo LANG=C chroot $FILESYSTEM_ROOT mkimage -f /boot/sonic_fit.its /boot/sonic_${CONFIGURED_ARCH}.fit
fi
fi
Expand Down
12 changes: 10 additions & 2 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ set -x -e
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)

if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
. ./onie-image-${CONFIGURED_ARCH}.conf
if [ -r ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf ]; then
. ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf
else
. ./onie-image-${CONFIGURED_ARCH}.conf
fi
else
. ./onie-image.conf
fi
Expand Down Expand Up @@ -82,10 +86,14 @@ generate_onie_installer_image()
done
done

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

Expand Down
2 changes: 1 addition & 1 deletion device/marvell/arm64-marvell_rd98DX35xx-r0/platform_asic
Original file line number Diff line number Diff line change
@@ -1 +1 @@
marvell-arm64
marvell
Original file line number Diff line number Diff line change
@@ -1 +1 @@
marvell-arm64
marvell
2 changes: 1 addition & 1 deletion device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_asic
Original file line number Diff line number Diff line change
@@ -1 +1 @@
marvell-arm64
marvell
2 changes: 1 addition & 1 deletion device/nokia/armhf-nokia_ixs7215_52x-r0/platform_asic
Original file line number Diff line number Diff line change
@@ -1 +1 @@
marvell-armhf
marvell
8 changes: 4 additions & 4 deletions onie-image-armhf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ DOCKERFS_DIR=docker
DOCKER_RAMFS_SIZE=2500M

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

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

## Raw image size in MB
RAW_IMAGE_DISK_SIZE=4096

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

## Kvm image size in GB
KVM_IMAGE_DISK_SIZE=16

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

## Aboot boot image name
ABOOT_BOOT_IMAGE=.sonic-boot.swi
2 changes: 1 addition & 1 deletion onie-mk-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ echo -n "."
cp -r $onie_installer_payload $tmp_installdir || clean_up 1
echo -n "."
[ -r "$platform_conf" ] && {
cp $platform_conf $tmp_installdir || clean_up 1
cp $platform_conf $tmp_installdir/platform.conf || clean_up 1
}
echo "machine=$machine" > $tmp_installdir/machine.conf
echo "platform=$platform" >> $tmp_installdir/machine.conf
Expand Down
27 changes: 0 additions & 27 deletions platform/marvell-arm64/docker-syncd-mrvl-rpc.mk

This file was deleted.

This file was deleted.

56 changes: 0 additions & 56 deletions platform/marvell-arm64/docker-syncd-mrvl-rpc/Dockerfile.j2

This file was deleted.

10 changes: 0 additions & 10 deletions platform/marvell-arm64/docker-syncd-mrvl-rpc/ptf_nn_agent.conf

This file was deleted.

16 changes: 0 additions & 16 deletions platform/marvell-arm64/docker-syncd-mrvl.mk

This file was deleted.

37 changes: 0 additions & 37 deletions platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2

This file was deleted.

This file was deleted.

39 changes: 0 additions & 39 deletions platform/marvell-arm64/docker-syncd-mrvl/supervisord.conf

This file was deleted.

12 changes: 0 additions & 12 deletions platform/marvell-arm64/docker-syncd-mrvl/syncd.sh

This file was deleted.

Loading
Loading