@@ -23,12 +23,12 @@ macro(set_cpack_vars)
23
23
24
24
endmacro ()
25
25
26
- function (add_standalone_image SOURCE_TARGET)
26
+ function (add_standalone_image SOURCE_TARGET IMAGE_NAME )
27
27
if (NOT ${PROJECT_TARGET} STREQUAL "TARGET_RT1051" )
28
28
return ()
29
29
endif ()
30
30
set (BIN_FILE ${SOURCE_TARGET} -boot.bin)
31
- set (CPACK_PACKAGE_NAME ${SOURCE_TARGET } )
31
+ set (CPACK_PACKAGE_NAME ${IMAGE_NAME } )
32
32
set_cpack_vars()
33
33
34
34
set (STANDALONE_PKG ${PACKAGE_COMMON_NAME} -image.tar.xz)
@@ -37,8 +37,8 @@ function(add_standalone_image SOURCE_TARGET)
37
37
38
38
add_custom_target (${PACKAGE_COMMON_NAME} -package-standalone
39
39
# please do not:
40
- # 1. change compression to -9 (or higher) as i will have detrimental effects on compression times with not much gain
41
- # 2. change -T parameter to explicit thread count - xz with T0 will adjust thread count to your machine capatibilies
40
+ # 1. change compression to -9 (or higher) as it will have detrimental effects on compression times with not much gain
41
+ # 2. change -T parameter to explicit thread count - xz with T0 will adjust thread count to your machine capabilities
42
42
COMMAND tar Scf - ${SOURCE_TARGET} .img | xz -T0 > ${STANDALONE_PKG}
43
43
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
44
44
DEPENDS ${BIN_FILE}
@@ -57,13 +57,13 @@ function(add_standalone_image SOURCE_TARGET)
57
57
endfunction ()
58
58
59
59
60
- function (add_update_package SOURCE_TARGET)
60
+ function (add_update_package SOURCE_TARGET IMAGE_NAME )
61
61
if (NOT ${PROJECT_TARGET} STREQUAL "TARGET_RT1051" )
62
62
return ()
63
63
endif ()
64
- set (CPACK_PACKAGE_NAME ${SOURCE_TARGET } )
64
+ set (CPACK_PACKAGE_NAME ${IMAGE_NAME } )
65
65
set_cpack_vars()
66
- set (UPDATE_PKG "${SOURCE_TARGET } -${PROJECT_VERSION} -RT1051-Update.tar" )
66
+ set (UPDATE_PKG "${IMAGE_NAME } -${PROJECT_VERSION} -RT1051-Update.tar" )
67
67
68
68
set (PACKAGE_UPDATE_FILE_NAME ${UPDATE_PKG} PARENT_SCOPE)
69
69
set (PACKAGE_UPDATE_MIME "application/x-tar" PARENT_SCOPE)
@@ -76,7 +76,7 @@ function(add_update_package SOURCE_TARGET)
76
76
ecoboot.bin-target
77
77
recovery.bin-target
78
78
assets
79
- COMMAND python3 ${CMAKE_SOURCE_DIR} /tools/generate_update_package.py --output_path ${CMAKE_BINARY_DIR} --system_path ${SYSROOT_PATH} /system_a --product ${SOURCE_TARGET }
79
+ COMMAND python3 ${CMAKE_SOURCE_DIR} /tools/generate_update_package.py --output_path ${CMAKE_BINARY_DIR} --system_path ${SYSROOT_PATH} /system_a --product ${IMAGE_NAME }
80
80
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
81
81
COMMENT "Generating update image: ${UPDATE_PKG} "
82
82
)
0 commit comments