1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-07 11:03:55 +00:00

added configuration to compile the agent for openwrt armv7 (like Teltonika rutx11) (#249)

This commit is contained in:
Theia Innovation
2024-11-26 21:49:56 +01:00
committed by GitHub
parent 39a927f25e
commit 1579eba11d
2 changed files with 33 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ EXENAME = meshagent
# Cross-compiler paths
PATH_MIPS = ../ToolChains/ddwrt/3.4.6-uclibc-0.9.28/bin/
PATH_MIPS24KC = ../ToolChains/toolchain-mips_24kc_gcc-7.3.0_musl/
PATH_OPENWRT_ARMVIRT32 = ../ToolChains/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-8.4.0_musl_eabi/
PATH_MIPSEL24KC = ../ToolChains/toolchain-mipsel_24kc_gcc-7.3.0_musl/
PATH_ARM5 = ../ToolChains/LinuxArm/bin/
PATH_POGO = ../ToolChains/pogoplug-gcc/bin/
@@ -371,6 +372,20 @@ KVM = 0
LMS = 0
endif
# Official Linux ARMVIRT32 (OpenWRT)
ifeq ($(ARCHID),42)
ARCHNAME = armvirt32
export PATH := $(PATH_OPENWRT_ARMVIRT32)bin:$(PATH_OPENWRT_ARMVIRT32)libexec/gcc/arm-openwrt-linux-muslgnueabi/8.4.0:$(PATH_OPENWRT_ARMVIRT32)arm-openwrt-linux-muslgnueabi/bin:$(PATH)
export STAGING_DIR := $(PATH_OPENWRT_ARMVIRT32)
CC = $(PATH_OPENWRT_ARMVIRT32)bin/arm-openwrt-linux-gcc --sysroot=$(PATH_OPENWRT_ARMVIRT32)
STRIP = $(PATH_OPENWRT_ARMVIRT32)bin/arm-openwrt-linux-muslgnueabi-strip
CEXTRA = -D_FORTIFY_SOURCE=2 -D_NOILIBSTACKDEBUG -D_NOFSWATCHER -Wformat -Wformat-security -fno-strict-aliasing
CFLAGS += -DBADMATH
INCDIRS += -I$(PATH_OPENWRT_ARMVIRT32)include
KVM = 0
LMS = 0
endif
# Official Linux ARM
ifeq ($(ARCHID),9)
@@ -680,6 +695,7 @@ cleanbin:
rm -f $(EXENAME)_mips
rm -f $(EXENAME)_mips24kc
rm -f $(EXENAME)_mipsel24kc
rm -f $(EXENAME)_armvirt32
rm -f $(EXENAME)_osx-arm-64
rm -f $(EXENAME)_osx-x86-64
rm -f $(EXENAME)_osx-universal-64
@@ -705,6 +721,7 @@ cleanbin:
rm -f DEBUG_$(EXENAME)_mips
rm -f DEBUG_$(EXENAME)_mips24kc
rm -f DEBUG_$(EXENAME)_mipsel24kc
rm -f DEBUG_$(EXENAME)_armvirt32
rm -f DEBUG_$(EXENAME)_osx-arm-64
rm -f DEBUG_$(EXENAME)_osx-x86-64
rm -f DEBUG_$(EXENAME)_osx-universal-64

View File

@@ -0,0 +1,16 @@
#
# Copy and run this in the OpenSSL directory for ARM compatible OpenSSL stack
#
export PATH=/tmp/ToolChains/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-8.4.0_musl_eabi/bin/:$PATH
export CC=/tmp/ToolChains/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-8.4.0_musl_eabi/bin/arm-openwrt-linux-muslgnueabi-gcc
cd ../openssl
make clean
./Configure linux-generic32 no-weak-ssl-ciphers no-srp no-psk no-comp no-zlib no-zlib-dynamic no-threads no-hw no-err no-dso no-shared -no-asm no-rc5 no-idea no-md4 no-rmd160 no-ssl no-ssl3 no-seed no-camellia no-dso no-bf no-cast no-md2 no-mdc2
make depend
sed 's/ -O3 / -Os /g' Makefile > t
rm Makefile
mv t Makefile
make -j 8
cp *.a ../linux/armvirt32
cd ..