Skip to content

Commit

Permalink
[barefoot] Switch to Y profiles for Newport board (sonic-net#5187)
Browse files Browse the repository at this point in the history
Signed-off-by: Volodymyr Boyko <[email protected]>
  • Loading branch information
vboykox authored and santhosh-kt committed Feb 25, 2021
1 parent 7966178 commit 8ae0d1a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 0 additions & 1 deletion device/barefoot/x86_64-accton_as9516bf_32d-r0

This file was deleted.

23 changes: 23 additions & 0 deletions device/barefoot/x86_64-accton_as9516bf_32d-r0/syncd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash


y_profile_set() {
P4_PROFILE=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["p4_profile"]')
if [[ -n "$P4_PROFILE" || ( ! -L /opt/bfn/install && -e /opt/bfn/install ) ]]; then
return
fi

Y_PROFILE=$(ls -d /opt/bfn/install_y*_profile 2> /dev/null | head -1)
if [[ -z $Y_PROFILE ]]; then
echo "No P4 profile found for Newport"
return
fi

ln -srfn $Y_PROFILE /opt/bfn/install
}

(
unset PYTHONPATH
unset PYTHONHOME
y_profile_set
)

0 comments on commit 8ae0d1a

Please sign in to comment.