Skip to content

Commit c65318f

Browse files
author
Steve Revill
committed
build(fixes): Corrections to the Arduino MQTT builds.
- Made targetenv.sh output better errors for when 'apps' repo isn't checked out at RELEASE-PRODUCTION - Tweaked regression test script to output more tail, and the log file name. - Fix to build failures on the Auduino MQTT stack due to missing dependencies. - Added an export to the Arm64 tookchain.mk to allow pkg-config to find the AArch64 library configurations during cross-compilation
1 parent fc3c317 commit c65318f

File tree

5 files changed

+34
-10
lines changed

5 files changed

+34
-10
lines changed

SystemTests/CI/regression_test-published-only.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ function display_target {
100100
}
101101

102102
function display_log_tail {
103-
echo ">>>>>> START LOG TAIL >>>>>>"
104-
tail -n 15 $1
103+
echo ">>>>>> START LOG TAIL ($1) >>>>>>"
104+
tail -n 20 $1
105105
echo "<<<<<< END LOG TAIL <<<<<<"
106106
}
107107

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Include Arduino MQTT library source
2+
VPATH += /home/inxware/Arduino/libraries/ArduinoMqttClient/src
13

2-
3-
OBJECTS += mqtt.$(OBJ)
4+
OBJECTS += mqtt.$(OBJ)
5+
OBJECTS += MqttClient.$(OBJ)

target/envbuildscripts/targetenv.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,30 @@ echo "${TXT_FG_GREY}------------------------------------------------------------
128128
echo
129129
echo "Installing the default app"
130130

131-
if [ "${EHS_SKIP_REPO_PULL}" = "" ]; then
131+
if [ -z "${EHS_SKIP_REPO_PULL}" ]; then
132132
echo "Checking out the latest PRODUCTION branch of your app repo..."
133133
if [ -d ../apps ]; then
134-
pushd ../apps
135-
warn "About to git pull in '$(pwd)'"
136-
git pull origin RELEASE-PRODUCTION || exit 1
137-
popd
134+
pushd ../apps || exit 1
135+
136+
# Ensure we are on the right branch
137+
if ! git rev-parse --abbrev-ref HEAD | grep -qx "RELEASE-PRODUCTION"; then
138+
err "../apps is on branch '$(git rev-parse --abbrev-ref HEAD)'," >&2
139+
err "but the build expects RELEASE-PRODUCTION. Please switch branches or set EHS_SKIP_REPO_PULL=1." >&2
140+
exit 1
141+
fi
142+
143+
# Refuse to pull if it would require a merge
144+
git fetch origin RELEASE-PRODUCTION || exit 1
145+
if ! git merge-base --is-ancestor HEAD origin/RELEASE-PRODUCTION; then
146+
err "local RELEASE-PRODUCTION has diverged from origin/RELEASE-PRODUCTION." >&2
147+
echo "Please run 'git reset --hard origin/RELEASE-PRODUCTION' or push your changes," >&2
148+
echo "or set EHS_SKIP_REPO_PULL=1 to use your local state." >&2
149+
exit 1
150+
fi
151+
152+
git pull --ff-only origin RELEASE-PRODUCTION || exit 1
153+
154+
popd || exit 1
138155
else
139156
pushd ..
140157
if [ -f ${LOCAL_BASE}/COMMUNITY_RELEASE ]; then

target/os-arch/arduino_ALL/target.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,8 @@ LIB += misc
7070

7171

7272
#TODO2025 - Move to the component HAL
73+
# Include Arduino LSM6DS3 library source
74+
VPATH += /home/inxware/Arduino/libraries/Arduino_LSM6DS3/src
7375
OBJECTS += target_accel_gyro.$(OBJ)
76+
OBJECTS += LSM6DS3.$(OBJ)
7477
OBJECTS += target_display.$(OBJ)

target/os-arch/linux-arm64/toolchain.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ ifeq ($(EHS_TOOLCHAIN_TYPE),clang)
2929
LIB_DIRS+=/lib/aarch64-linux-gnu/
3030
LNKFLAGS+= --target=aarch64-linux-gnu
3131
CFLAGS+= -v --target=aarch64-linux-gnu
32-
CPPFLAGS+= -v --target=aarch64-linux-gnu
32+
CPPFLAGS+= -v --target=aarch64-linux-gnu
33+
# Set PKG_CONFIG_PATH for cross-compilation to find ARM64 libraries
34+
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
3335
endif
3436
# We need the maths lib - todo2-022, why not just have these as LIB+=m?
3537
LIB+=m

0 commit comments

Comments
 (0)