Skip to content

Commit 8410d19

Browse files
committed
[BH-2088] Add build stage for BellHybridPro
* Added PR build stage for BellHybridPro. * Changed naming of update and flash packages for Pro config.
1 parent 746a4f5 commit 8410d19

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

Jenkinsfile

+9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ pipeline {
5959
}
6060
}
6161

62+
stage('Build RT1051 - BellHybridPro') {
63+
steps {
64+
script{
65+
common.checkIfBranchIsRebased("false")
66+
buildSteps.build("rt1051","BellHybrid","Release","-DENABLE_VERSION_PRO=1")
67+
}
68+
}
69+
}
70+
6271
stage('Build Linux - PurePhone') {
6372
when {
6473
expression {

cmake/modules/AddPackage.cmake

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ macro(set_cpack_vars)
2323

2424
endmacro()
2525

26-
function(add_standalone_image SOURCE_TARGET)
26+
function(add_standalone_image SOURCE_TARGET IMAGE_NAME)
2727
if (NOT ${PROJECT_TARGET} STREQUAL "TARGET_RT1051")
2828
return()
2929
endif()
3030
set(BIN_FILE ${SOURCE_TARGET}-boot.bin)
31-
set(CPACK_PACKAGE_NAME ${SOURCE_TARGET})
31+
set(CPACK_PACKAGE_NAME ${IMAGE_NAME})
3232
set_cpack_vars()
3333

3434
set(STANDALONE_PKG ${PACKAGE_COMMON_NAME}-image.tar.xz)
@@ -37,8 +37,8 @@ function(add_standalone_image SOURCE_TARGET)
3737

3838
add_custom_target(${PACKAGE_COMMON_NAME}-package-standalone
3939
# 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
4242
COMMAND tar Scf - ${SOURCE_TARGET}.img | xz -T0 > ${STANDALONE_PKG}
4343
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
4444
DEPENDS ${BIN_FILE}
@@ -57,13 +57,13 @@ function(add_standalone_image SOURCE_TARGET)
5757
endfunction()
5858

5959

60-
function(add_update_package SOURCE_TARGET)
60+
function(add_update_package SOURCE_TARGET IMAGE_NAME)
6161
if (NOT ${PROJECT_TARGET} STREQUAL "TARGET_RT1051")
6262
return()
6363
endif()
64-
set(CPACK_PACKAGE_NAME ${SOURCE_TARGET})
64+
set(CPACK_PACKAGE_NAME ${IMAGE_NAME})
6565
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")
6767

6868
set(PACKAGE_UPDATE_FILE_NAME ${UPDATE_PKG} PARENT_SCOPE)
6969
set(PACKAGE_UPDATE_MIME "application/x-tar" PARENT_SCOPE)
@@ -76,7 +76,7 @@ function(add_update_package SOURCE_TARGET)
7676
ecoboot.bin-target
7777
recovery.bin-target
7878
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}
8080
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
8181
COMMENT "Generating update image: ${UPDATE_PKG}"
8282
)

products/BellHybrid/CMakeLists.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,13 @@ download_asset_json(json-rt1051-target
163163
download_asset_release(PureRecovery.bin recovery.bin PureRecovery ${RECOVERY_BIN_VERSION} ${MUDITA_CACHE_DIR})
164164
download_asset_release(ecoboot.bin ecoboot.bin ecoboot ${ECOBOOT_BIN_VERSION} ${MUDITA_CACHE_DIR})
165165

166-
167-
add_standalone_image(BellHybrid)
168-
add_update_package(BellHybrid)
166+
if (ENABLE_VERSION_PRO)
167+
add_standalone_image(BellHybrid BellHybridPro)
168+
add_update_package(BellHybrid BellHybridPro)
169+
else ()
170+
add_standalone_image(BellHybrid BellHybrid)
171+
add_update_package(BellHybrid BellHybrid)
172+
endif ()
169173

170174
add_subdirectory(alarms)
171175
add_subdirectory(apps)

products/PurePhone/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ download_asset_release(PureRecovery.bin recovery.bin PureRecovery ${RECOVERY_BIN
180180
download_asset_release(ecoboot.bin ecoboot.bin ecoboot ${ECOBOOT_BIN_VERSION} ${MUDITA_CACHE_DIR})
181181

182182

183-
add_standalone_image(PurePhone)
184-
add_update_package(PurePhone)
183+
add_standalone_image(PurePhone PurePhone)
184+
add_update_package(PurePhone PurePhone)
185185

186186
include(GitHubWorkerMessages)
187187
github_message_standalone()

0 commit comments

Comments
 (0)