[pddf]: Adding and enabling S3IP support in PDDF (#15073)
Why I did it The S3IP (Simplified Switch System INtegration Program) sysfs specification defines a unified interface to access peripheral hardware on devices from different vendors, making it easier for SONiC to support different devices and platforms. PDDF is a framework to simplify the driver and SONiC platform APIs development for new platforms. This effort is first step in combining the two frameworks. This specific PR adds support for pddf-s3ip-init.service and enables it in PDDF.
This commit is contained in:
parent
819ab5db50
commit
771a1170d8
14
platform/pddf/i2c/service/pddf-s3ip-init.service
Normal file
14
platform/pddf/i2c/service/pddf-s3ip-init.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=S3IP sysfs creation in PDDF based platforms
|
||||
After=pddf-platform-init.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=-/usr/local/bin/pre_pddf_s3ip.sh
|
||||
ExecStart=/usr/local/bin/pddf_s3ip.py create
|
||||
ExecStop=/usr/local/bin/pddf_s3ip.py clean
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1127
platform/pddf/i2c/utils/pddf_s3ip.py
Executable file
1127
platform/pddf/i2c/utils/pddf_s3ip.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -455,6 +455,11 @@ def do_install():
|
||||
if status:
|
||||
return status
|
||||
|
||||
# Check if S3IP support is enabled, if yes, start the service in no block mode
|
||||
if 'enable_s3ip' in pddf_obj.data['PLATFORM'].keys() and pddf_obj.data['PLATFORM']['enable_s3ip'] == 'yes':
|
||||
log_os_system('systemctl enable pddf-s3ip-init.service', 1)
|
||||
log_os_system('systemctl start --no-block pddf-s3ip-init.service', 1)
|
||||
|
||||
return
|
||||
|
||||
def do_uninstall():
|
||||
|
Loading…
Reference in New Issue
Block a user