VPD ECC shared library
This commit makes the VPD ECC source into a shared library
and links the shared library with other executables which
are dependant on VPD ECC.
Since the ECC source file is confidential, we need to share the
ECC as a shared library to the IBM Power customers.
Test:
Tested on simics:
1. Corrupted the vpd data.
root@p10bmc:/usr/lib# dd if=/dev/zero of=/sys/bus/i2c/drivers/at24/7-0050/eeprom bs=1 count=2 seek=184
2+0 records in
2+0 records out
root@p10bmc:/usr/lib# ibm-read-vpd --file /sys/bus/i2c/drivers/at24/7-0050/eeprom
ERROR: ECC check did not pass for the Record:VINI
2. VPD Parser parsed successfully for a valid vpd
root@p10bmc:/usr/lib# ibm-read-vpd --file /sys/bus/i2c/drivers/at24/7-0050/eeprom
<no error>
3.ECC Code worked fine with VPD-Manager
root@p10bmc:/usr/lib# vpd-tool -w -O /system/chassis/motherboard/base_op_panel_blyth -R VINI -K PN -V "PN34"
root@p10bmc:/usr/lib# ibm-read-vpd --file /sys/bus/i2c/drivers/at24/7-0050/eeprom
root@p10bmc:/usr/lib#
root@p10bmc:/usr/lib#
root@p10bmc:/usr/lib# vpd-tool -w -O /system/chassis/motherboard/base_op_panel_blyth -R VINI -K PN -V "PN12"
root@p10bmc:/usr/lib# ibm-read-vpd --file /sys/bus/i2c/drivers/at24/7-0050/eeprom
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: I72306b06ca8724193ef5ef05a0659467994a154d
diff --git a/test/meson.build b/test/meson.build
index 36d5383..c9ddf1b 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -24,8 +24,6 @@
]
application_src =['../impl.cpp',
- '../vpdecc/vpdecc.c',
- '../vpdecc/vpdecc_support.c',
'../vpd-parser/ipz_parser.cpp',
'../ibm_vpd_utils.cpp',
'../common_utility.cpp',
@@ -45,7 +43,8 @@
c_args: ['-Wno-unused-parameter',
'-Wno-unused-variable'],
dependencies: dependecy_list,
- include_directories: configuration_inc
+ include_directories: configuration_inc,
+ link_with : libvpdecc,
),
workdir: meson.current_source_dir())
endforeach