Allow sdcard version change from cmake (#3816)

* Allow sdcard version change from cmake

* Make it sdcard version check ARM only

* Move to common ARM
This commit is contained in:
3djc
2016-09-17 08:53:01 +02:00
committed by Bertrand Songis
parent 6c38dcc885
commit 7bfb213687
7 changed files with 21 additions and 18 deletions
+5
View File
@@ -8,6 +8,11 @@ set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX}) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
message(STATUS "OpenTX ${VERSION}") message(STATUS "OpenTX ${VERSION}")
set(SDCARD_REVISION "0002")
set(SDCARD_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}V${SDCARD_REVISION})
file(WRITE radio/sdcard/horus/opentx.sdcard.version ${SDCARD_VERSION})
file(WRITE radio/sdcard/taranis/opentx.sdcard.version ${SDCARD_VERSION})
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0020 NEW) cmake_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0023 OLD) cmake_policy(SET CMP0023 OLD)
View File
View File
-3
View File
@@ -124,9 +124,6 @@
#define NUM_CYC 3 #define NUM_CYC 3
#define NUM_CAL_PPM 4 #define NUM_CAL_PPM 4
#if defined(SDCARD)
#define REQUIRED_SDCARD_VERSION "2.2V0001"
#endif
enum CurveType { enum CurveType {
CURVE_TYPE_STANDARD, CURVE_TYPE_STANDARD,
CURVE_TYPE_CUSTOM, CURVE_TYPE_CUSTOM,
+2 -2
View File
@@ -980,7 +980,7 @@ void doSplash()
#define doSplash() #define doSplash()
#endif #endif
#if defined(SDCARD) #if defined(SDCARD) && defined(CPUARM)
void checkSDVersion() void checkSDVersion()
{ {
if (sdMounted()) { if (sdMounted()) {
@@ -1038,7 +1038,7 @@ void checkAll()
checkFailsafe(); checkFailsafe();
#endif #endif
#if defined(SDCARD) #if defined(SDCARD) && defined(CPUARM)
checkSDVersion(); checkSDVersion();
#endif #endif
@@ -75,6 +75,7 @@ endif()
add_definitions(-DCPUARM -DVIRTUAL_INPUTS) add_definitions(-DCPUARM -DVIRTUAL_INPUTS)
add_definitions(-DTELEMETRY_FRSKY -DTELEMETRY_FRSKY_SPORT -DFRSKY_HUB -DGPS -DPXX -DDSM2) add_definitions(-DTELEMETRY_FRSKY -DTELEMETRY_FRSKY_SPORT -DFRSKY_HUB -DGPS -DPXX -DDSM2)
add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE -DGAUGES) add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE -DGAUGES)
add_definitions(-DREQUIRED_SDCARD_VERSION="${SDCARD_VERSION}")
include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable) include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable)
foreach(LANGUAGE ${TTS_LANGUAGES}) foreach(LANGUAGE ${TTS_LANGUAGES})
set(SRC ${SRC} translations/tts_${LANGUAGE}.cpp) set(SRC ${SRC} translations/tts_${LANGUAGE}.cpp)
+3 -3
View File
@@ -16,9 +16,6 @@ suffix="N$index"
cd ${workdir} cd ${workdir}
# Call sdcard generation
# code/tools/nightly22/build-sdcard.sh
# Create on-demand build environment # Create on-demand build environment
cp code/radio/util/Dockerfile . cp code/radio/util/Dockerfile .
docker build -t new-$docker --build-arg OPENTX_VERSION_SUFFIX=$suffix . docker build -t new-$docker --build-arg OPENTX_VERSION_SUFFIX=$suffix .
@@ -26,6 +23,9 @@ docker rmi $docker || true
docker tag new-$docker $docker docker tag new-$docker $docker
docker rmi new-$docker docker rmi new-$docker
# Call sdcard generation
code/tools/nightly22/build-sdcard.sh
# Build Linux companion # Build Linux companion
docker run -dit --name companion -v /home/opentx/$docker:/opentx $docker docker run -dit --name companion -v /home/opentx/$docker:/opentx $docker
docker exec companion sh -c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt" docker exec companion sh -c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt"