Skip to content

Commit

Permalink
added configuration to compile the agent for openwrt armv7 (like Telt…
Browse files Browse the repository at this point in the history
…onika rutx11) (#249)
  • Loading branch information
TheiaInnovation authored Nov 26, 2024
1 parent 39a927f commit 1579eba
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions openssl/libstatic/linux/openssl-armvirt32
Original file line number Diff line number Diff line change
@@ -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 ..

0 comments on commit 1579eba

Please sign in to comment.