diff --git a/projects/rocm-smi-lib/CMakeLists.txt b/projects/rocm-smi-lib/CMakeLists.txt index b779d4ca60..c8138f44ea 100755 --- a/projects/rocm-smi-lib/CMakeLists.txt +++ b/projects/rocm-smi-lib/CMakeLists.txt @@ -14,6 +14,10 @@ endif() ## Include common cmake modules include(utils) +if (NOT DEFINED CPACK_RESOURCE_FILE_LICENSE) + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") +endif() + set(ROCM_SMI "rocm_smi") set(ROCM_SMI_COMPONENT "lib${ROCM_SMI}") set(ROCM_SMI_TARGET "${ROCM_SMI}64") @@ -74,6 +78,7 @@ set(CMAKE_CXX_FLAGS ## Address Sanitize Flag if (${ADDRESS_SANITIZER}) + set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g") set(CMAKE_EXE_LINKER_FLAGS -fsanitize=address) @@ -170,7 +175,8 @@ install(FILES install(EXPORT rocm_smiTargets DESTINATION "${ROCM_SMI}/lib/cmake" COMPONENT dev) - +#License file +install( FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/smi-lib RENAME LICENSE.txt) ########################### # Packaging directives diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index 256a8edf98..d35bec23f9 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -1536,8 +1536,8 @@ def showFwInfo(deviceList, fwType): fw_name = fw_name.upper() ret = rocmsmi.rsmi_dev_firmware_version_get(device, fw_block_names_l.index(fw_name), byref(fw_ver)) if rsmi_ret_ok(ret, device, fw_name): - # The VCN, VCE, UVD, and SOS firmware's value needs to be in hexadecimal - if fw_name in ['VCN', 'VCE', 'UVD', 'SOS']: + # The VCN, VCE, UVD, SOS and ASD firmware's value needs to be in hexadecimal + if fw_name in ['VCN', 'VCE', 'UVD', 'SOS', 'ASD']: printLog(device, '%s firmware version' % (fw_name), '\t0x%s' % (str(hex(fw_ver.value))[2:].zfill(8))) # The TA XGMI, TA RAS, and SMC firmware's hex value looks like 0x12345678 diff --git a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt index dff27c9f42..e6c49b87e9 100755 --- a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt +++ b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt @@ -99,7 +99,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL Release) if(${BUILD_SHARED_LIBS}) #stripping only for .so add_custom_command( TARGET ${ROCM_SMI_TARGET} - POST_BUILD COMMAND ${CMAKE_STRIP} lib${ROCM_SMI_TARGET}.so) + POST_BUILD COMMAND ${CMAKE_STRIP} lib${ROCM_SMI_TARGET}.so.${SO_VERSION_STRING}) endif() endif ()