1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

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

View file

@ -8,6 +8,11 @@ set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
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_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0023 OLD)

0
radio/sdcard/horus/opentx.sdcard.version Executable file → Normal file
View file

0
radio/sdcard/taranis/opentx.sdcard.version Executable file → Normal file
View file

View file

@ -124,9 +124,6 @@
#define NUM_CYC 3
#define NUM_CAL_PPM 4
#if defined(SDCARD)
#define REQUIRED_SDCARD_VERSION "2.2V0001"
#endif
enum CurveType {
CURVE_TYPE_STANDARD,
CURVE_TYPE_CUSTOM,

View file

@ -980,7 +980,7 @@ void doSplash()
#define doSplash()
#endif
#if defined(SDCARD)
#if defined(SDCARD) && defined(CPUARM)
void checkSDVersion()
{
if (sdMounted()) {
@ -1038,7 +1038,7 @@ void checkAll()
checkFailsafe();
#endif
#if defined(SDCARD)
#if defined(SDCARD) && defined(CPUARM)
checkSDVersion();
#endif

View file

@ -75,6 +75,7 @@ endif()
add_definitions(-DCPUARM -DVIRTUAL_INPUTS)
add_definitions(-DTELEMETRY_FRSKY -DTELEMETRY_FRSKY_SPORT -DFRSKY_HUB -DGPS -DPXX -DDSM2)
add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE -DGAUGES)
add_definitions(-DREQUIRED_SDCARD_VERSION="${SDCARD_VERSION}")
include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable)
foreach(LANGUAGE ${TTS_LANGUAGES})
set(SRC ${SRC} translations/tts_${LANGUAGE}.cpp)

View file

@ -16,9 +16,6 @@ suffix="N$index"
cd ${workdir}
# Call sdcard generation
# code/tools/nightly22/build-sdcard.sh
# Create on-demand build environment
cp code/radio/util/Dockerfile .
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 rmi new-$docker
# Call sdcard generation
code/tools/nightly22/build-sdcard.sh
# Build Linux companion
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"