From 15aed52ef2c1ec6a0799dbadc0a77f85e3a400d7 Mon Sep 17 00:00:00 2001 From: Sujin Kang Date: Sun, 21 Feb 2021 08:27:37 -0800 Subject: [PATCH] [pcie.yaml] Move pcie configuration file path to platform directory (#6475) - Why I did it The pcie configuration file location is under plugin directory not under platform directory. #6437 - How I did it Move all pcie.yaml configuration file from plugin to platform directory. Remove unnecessary timer to start pcie-check.service Move pcie-check.service to sonic-host-services - How to verify it Verify on the device --- .gitignore | 7 +++++++ .../x86_64-arista_7050_qx32s/{plugins => }/pcie.yaml | 0 .../x86_64-arista_7050cx3_32s/{plugins => }/pcie.yaml | 0 .../x86_64-arista_7060_cx32s/{plugins => }/pcie.yaml | 0 .../x86_64-arista_7260cx3_64/{plugins => }/pcie.yaml | 0 .../x86_64-cel_e1031-r0/{plugins => }/pcie.yaml | 0 .../x86_64-cel_seastone-r0/{plugins => }/pcie.yaml | 0 .../x86_64-dell_s6000_s1220-r0/{plugins => }/pcie.yaml | 0 .../x86_64-dell_s6100_c2538-r0/{plugins => }/pcie.yaml | 0 files/build_templates/pcie-check.timer | 9 --------- files/build_templates/sonic_debian_extension.j2 | 4 ---- files/image_config/pcie-check/pcie-check.service | 3 +++ files/image_config/pcie-check/pcie-check.sh | 2 +- .../{plugins => }/pcie.yaml | 0 .../{plugins => }/pcie.yaml | 0 15 files changed, 11 insertions(+), 14 deletions(-) rename device/arista/x86_64-arista_7050_qx32s/{plugins => }/pcie.yaml (100%) rename device/arista/x86_64-arista_7050cx3_32s/{plugins => }/pcie.yaml (100%) rename device/arista/x86_64-arista_7060_cx32s/{plugins => }/pcie.yaml (100%) rename device/arista/x86_64-arista_7260cx3_64/{plugins => }/pcie.yaml (100%) rename device/celestica/x86_64-cel_e1031-r0/{plugins => }/pcie.yaml (100%) rename device/celestica/x86_64-cel_seastone-r0/{plugins => }/pcie.yaml (100%) rename device/dell/x86_64-dell_s6000_s1220-r0/{plugins => }/pcie.yaml (100%) rename device/dell/x86_64-dell_s6100_c2538-r0/{plugins => }/pcie.yaml (100%) delete mode 100644 files/build_templates/pcie-check.timer rename platform/barefoot/sonic-platform-modules-bfn-montara/{plugins => }/pcie.yaml (100%) rename platform/barefoot/sonic-platform-modules-bfn-newport/{plugins => }/pcie.yaml (100%) diff --git a/.gitignore b/.gitignore index 7e2f73f718..5e76a6cf92 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,13 @@ platform/**/*-none-any.whl platform/**/.pybuild platform/**/debian/* platform/**/build +platform/**/*.ko +platform/**/*.mod.c +platform/**/*.mod.o +platform/**/*.o +platform/**/*.d +platform/**/*.cmd +platform/**/*.order platform/broadcom/sonic-platform-modules-dell/s5232f/sonic_platform/ipmihelper.py platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_ich.c platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_s6100_lpc.c diff --git a/device/arista/x86_64-arista_7050_qx32s/plugins/pcie.yaml b/device/arista/x86_64-arista_7050_qx32s/pcie.yaml similarity index 100% rename from device/arista/x86_64-arista_7050_qx32s/plugins/pcie.yaml rename to device/arista/x86_64-arista_7050_qx32s/pcie.yaml diff --git a/device/arista/x86_64-arista_7050cx3_32s/plugins/pcie.yaml b/device/arista/x86_64-arista_7050cx3_32s/pcie.yaml similarity index 100% rename from device/arista/x86_64-arista_7050cx3_32s/plugins/pcie.yaml rename to device/arista/x86_64-arista_7050cx3_32s/pcie.yaml diff --git a/device/arista/x86_64-arista_7060_cx32s/plugins/pcie.yaml b/device/arista/x86_64-arista_7060_cx32s/pcie.yaml similarity index 100% rename from device/arista/x86_64-arista_7060_cx32s/plugins/pcie.yaml rename to device/arista/x86_64-arista_7060_cx32s/pcie.yaml diff --git a/device/arista/x86_64-arista_7260cx3_64/plugins/pcie.yaml b/device/arista/x86_64-arista_7260cx3_64/pcie.yaml similarity index 100% rename from device/arista/x86_64-arista_7260cx3_64/plugins/pcie.yaml rename to device/arista/x86_64-arista_7260cx3_64/pcie.yaml diff --git a/device/celestica/x86_64-cel_e1031-r0/plugins/pcie.yaml b/device/celestica/x86_64-cel_e1031-r0/pcie.yaml similarity index 100% rename from device/celestica/x86_64-cel_e1031-r0/plugins/pcie.yaml rename to device/celestica/x86_64-cel_e1031-r0/pcie.yaml diff --git a/device/celestica/x86_64-cel_seastone-r0/plugins/pcie.yaml b/device/celestica/x86_64-cel_seastone-r0/pcie.yaml similarity index 100% rename from device/celestica/x86_64-cel_seastone-r0/plugins/pcie.yaml rename to device/celestica/x86_64-cel_seastone-r0/pcie.yaml diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/plugins/pcie.yaml b/device/dell/x86_64-dell_s6000_s1220-r0/pcie.yaml similarity index 100% rename from device/dell/x86_64-dell_s6000_s1220-r0/plugins/pcie.yaml rename to device/dell/x86_64-dell_s6000_s1220-r0/pcie.yaml diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/pcie.yaml b/device/dell/x86_64-dell_s6100_c2538-r0/pcie.yaml similarity index 100% rename from device/dell/x86_64-dell_s6100_c2538-r0/plugins/pcie.yaml rename to device/dell/x86_64-dell_s6100_c2538-r0/pcie.yaml diff --git a/files/build_templates/pcie-check.timer b/files/build_templates/pcie-check.timer deleted file mode 100644 index 4ad5c64818..0000000000 --- a/files/build_templates/pcie-check.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Start the pcie-check.service 10 seconds after boot - -[Timer] -OnBootSec=10sec -Unit=pcie-check.service - -[Install] -WantedBy=timers.target diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 2a110a2fd8..8edd9af847 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -506,10 +506,6 @@ sudo cp $IMAGE_CONFIGS/constants/constants.yml $FILESYSTEM_ROOT/etc/sonic/ sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/ sudo cp $IMAGE_CONFIGS/sudoers/sudoers.lecture $FILESYSTEM_ROOT/etc/ -# Copy systemd timer configuration -sudo cp $BUILD_TEMPLATES/pcie-check.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM -sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable pcie-check.timer - # Copy pcie-check service files sudo cp $IMAGE_CONFIGS/pcie-check/pcie-check.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM echo "pcie-check.service" | sudo tee -a $GENERATED_SERVICE_FILE diff --git a/files/image_config/pcie-check/pcie-check.service b/files/image_config/pcie-check/pcie-check.service index fbf3cfd3f1..9df04ea840 100644 --- a/files/image_config/pcie-check/pcie-check.service +++ b/files/image_config/pcie-check/pcie-check.service @@ -5,3 +5,6 @@ After=rc.local.service database.service [Service] Type=simple ExecStart=/usr/bin/pcie-check.sh + +[Install] +WantedBy=multi-user.target diff --git a/files/image_config/pcie-check/pcie-check.sh b/files/image_config/pcie-check/pcie-check.sh index 4257a2544c..01a952d013 100755 --- a/files/image_config/pcie-check/pcie-check.sh +++ b/files/image_config/pcie-check/pcie-check.sh @@ -19,7 +19,7 @@ function check_and_rescan_pcie_devices() PCIE_CHK_CMD='sudo pcieutil check | grep "$RESULTS"' PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) - if [ ! -f /usr/share/sonic/device/$PLATFORM/plugins/pcie.yaml ]; then + if [ ! -f /usr/share/sonic/device/$PLATFORM/pcie.yaml ]; then debug "pcie.yaml does not exist! Can't check PCIe status!" exit fi diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/plugins/pcie.yaml b/platform/barefoot/sonic-platform-modules-bfn-montara/pcie.yaml similarity index 100% rename from platform/barefoot/sonic-platform-modules-bfn-montara/plugins/pcie.yaml rename to platform/barefoot/sonic-platform-modules-bfn-montara/pcie.yaml diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/plugins/pcie.yaml b/platform/barefoot/sonic-platform-modules-bfn-newport/pcie.yaml similarity index 100% rename from platform/barefoot/sonic-platform-modules-bfn-newport/plugins/pcie.yaml rename to platform/barefoot/sonic-platform-modules-bfn-newport/pcie.yaml