[barefoot] Switch to Y profiles for Newport board (#5187)

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
Volodymyr Boiko 2020-10-08 23:23:51 +03:00 committed by GitHub
parent 01fceb6f79
commit 9a1f68ba12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -1 +0,0 @@
x86_64-accton_as9516_32d-r0

View File

@ -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
)