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})
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)
+1 -1
View File
@@ -1 +1 @@
2.2V0002
2.2V0002
+1 -1
View File
@@ -1 +1 @@
2.2V0002
2.2V0002
+2 -5
View File
@@ -124,15 +124,12 @@
#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,
CURVE_TYPE_LAST = CURVE_TYPE_CUSTOM
};
#if defined(CPUARM)
#define MIN_POINTS_PER_CURVE 3
#else
@@ -729,7 +726,7 @@ enum MixSources {
MIXSRC_FIRST_INPUT, LUA_EXPORT_MULTIPLE("input", "Input [I%d]", MAX_INPUTS)
MIXSRC_LAST_INPUT = MIXSRC_FIRST_INPUT+MAX_INPUTS-1,
#endif
#if defined(LUA_INPUTS)
MIXSRC_FIRST_LUA,
MIXSRC_LAST_LUA = MIXSRC_FIRST_LUA+(MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS)-1,
+8 -8
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
@@ -1877,7 +1877,7 @@ void opentxClose(uint8_t shutdown)
hapticOff();
#endif
}
#if defined(SDCARD)
logsClose();
#endif
@@ -1919,21 +1919,21 @@ void opentxClose(uint8_t shutdown)
void opentxResume()
{
TRACE("opentxResume");
menuHandlers[0] = menuMainView;
sdMount();
storageReadAll();
#if defined(PCBHORUS)
loadTheme();
loadFontCache();
#endif
opentxStart(false);
#if defined(CPUARM)
#if defined(CPUARM)
referenceSystemAudioFiles();
#endif
@@ -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)
+3 -3
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"