yet another try
This commit is contained in:
parent
14f1cc90dd
commit
d6823c5533
@ -21,7 +21,6 @@ add_custom_command(OUTPUT ${SPC_HEADERS}
|
|||||||
# If the "linux" folder exists the driver will be build.
|
# If the "linux" folder exists the driver will be build.
|
||||||
# Alternatively you can set the SPC_SOURCE environment variable to the micx_drv folder
|
# Alternatively you can set the SPC_SOURCE environment variable to the micx_drv folder
|
||||||
|
|
||||||
message("\nIf you have signed the NDA from Spectrum and got a kernel driver tarball (i.e. drvsrc_all_V*.tgz), put it in:\n\n\t" ${CMAKE_CURRENT_SOURCE_DIR} "\n\nto get a kernel module built\n")
|
|
||||||
file(GLOB MILIST "drvsrc_all_V*.tgz" )
|
file(GLOB MILIST "drvsrc_all_V*.tgz" )
|
||||||
# sort and select last (alphabetic order) tarball driver
|
# sort and select last (alphabetic order) tarball driver
|
||||||
list(SORT MILIST)
|
list(SORT MILIST)
|
||||||
@ -48,10 +47,10 @@ elseif(DEFINED ENV{SPC_SOURCE})
|
|||||||
set(SPC_SRC $ENV{SPC_SOURCE})
|
set(SPC_SRC $ENV{SPC_SOURCE})
|
||||||
else()
|
else()
|
||||||
set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv")
|
set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv")
|
||||||
|
message("\nIf you have signed the NDA from Spectrum and got a kernel driver tarball (i.e. drvsrc_all_V*.tgz), put it in:\n\n\t" ${CMAKE_CURRENT_SOURCE_DIR} "\n\nto get a kernel module built\n")
|
||||||
message(WARNING "Spectrum driver source path not defined in envirnoment variable SPC_SOURCE,\nusing default: " ${SPC_SRC})
|
message(WARNING "Spectrum driver source path not defined in envirnoment variable SPC_SOURCE,\nusing default: " ${SPC_SRC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(DRIVER_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
set(DRIVER_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
file(GLOB KERNEL_VERSIONS_DIR RELATIVE "/lib/modules" "/lib/modules/*/build")
|
file(GLOB KERNEL_VERSIONS_DIR RELATIVE "/lib/modules" "/lib/modules/*/build")
|
||||||
foreach(KERNEL_DIR ${KERNEL_VERSIONS_DIR})
|
foreach(KERNEL_DIR ${KERNEL_VERSIONS_DIR})
|
||||||
@ -70,8 +69,8 @@ foreach(KERNEL_DIR ${KERNEL_VERSIONS_DIR})
|
|||||||
WORKING_DIRECTORY ${SPC_SRC}
|
WORKING_DIRECTORY ${SPC_SRC}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
if(EXISTS ${SPC_SRC})
|
if(EXISTS ${SPC_SRC})
|
||||||
add_custom_target (micx_drv_${KERNEL_VERSION} ALL DEPENDS ${DRIVER_FILE} )
|
add_custom_target (micx_drv_${KERNEL_VERSION} ALL DEPENDS ${DRIVER_FILE})
|
||||||
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${KERNEL_VERSION}/kernel/damaris)
|
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${KERNEL_VERSION}/kernel/damaris)
|
||||||
else()
|
else()
|
||||||
message(WARNING "Spectrum MI40xx kernel driver directory not found\n " ${SPC_SRC} "\nunpack and configure it (i.e. set SPC_SOURCE variable)")
|
message(WARNING "Spectrum MI40xx kernel driver directory not found\n " ${SPC_SRC} "\nunpack and configure it (i.e. set SPC_SOURCE variable)")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user