From 0ecf21d42ee3bfd2f2d11705f0bfcf560d8abc1c Mon Sep 17 00:00:00 2001 From: "Zhi Yuan (Carl) Zhao" Date: Fri, 12 Nov 2021 14:21:01 -0800 Subject: [PATCH] Add platform-init support to docker-orchagent The platform-init, similar to hwsku-init, would be scripts that need to be called for a specific platform. --- device/arista/x86_64-arista_7060_cx32s/platform-init | 3 +++ dockers/docker-orchagent/Dockerfile.j2 | 1 + dockers/docker-orchagent/docker-init.sh | 5 +++++ 3 files changed, 9 insertions(+) create mode 100755 device/arista/x86_64-arista_7060_cx32s/platform-init diff --git a/device/arista/x86_64-arista_7060_cx32s/platform-init b/device/arista/x86_64-arista_7060_cx32s/platform-init new file mode 100755 index 00000000000..e31a7a0db4c --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/platform-init @@ -0,0 +1,3 @@ +# Increase PCIe timeout value to 210ms +setpci -s01:00.0 CAP_EXP+0x28.B=6 +setpci -s01:00.1 CAP_EXP+0x28.B=6 diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index 2a927b5f2b6..0d690f03372 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -19,6 +19,7 @@ RUN apt-get update && \ bridge-utils \ conntrack \ ndppd \ + pciutils \ # Needed for installing netifaces Python package build-essential \ python3-dev diff --git a/dockers/docker-orchagent/docker-init.sh b/dockers/docker-orchagent/docker-init.sh index d395f2076e4..86070ff24db 100755 --- a/dockers/docker-orchagent/docker-init.sh +++ b/dockers/docker-orchagent/docker-init.sh @@ -17,6 +17,11 @@ CFGGEN_PARAMS=" \ " VLAN=$(sonic-cfggen $CFGGEN_PARAMS) +# Executed platform specific initialization tasks. +if [ -x /usr/share/sonic/platform/platform-init ]; then + /usr/share/sonic/platform/platform-init +fi + # Executed HWSKU specific initialization tasks. if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then /usr/share/sonic/hwsku/hwsku-init