c - Cross compiling libcurl and openssl for A9331 -
using dragino product arduino yun running openwrt linino iot related project. data arduino part , send json firebase db using libcurl (and https) in c program on openwrt part.
have managed setup cross-compiling toolchain ar9331 , can compile simple programs relying on libc. need cross compile libcurl ssl support in order send data firebase https. means need crosscompile openssl. however, not sure option have pass configure script in order set correctly. can compile static library openssl , curl program doest have dependency ? or bad practice ?
in last attempt compile openssl with:
./configure --prefix=$(realpath $libpath)/openssl linux-mips32
where $libpath location of lib in toolchain. makes returns following :
apps/speed.o: in function `speed_main': speed.c:(.text+0x4424): undefined reference `aes_set_encrypt_key' speed.c:(.text+0x443c): undefined reference `aes_set_encrypt_key' speed.c:(.text+0x4454): undefined reference `aes_set_encrypt_key' speed.c:(.text+0x7530): undefined reference `aes_encrypt' speed.c:(.text+0x7544): undefined reference `aes_encrypt' ./libcrypto.so: undefined reference `aes_set_decrypt_key' ./libcrypto.so: undefined reference `getcontext' ./libcrypto.so: undefined reference `setcontext' ./libcrypto.so: undefined reference `makecontext' ./libcrypto.so: undefined reference `aes_decrypt' collect2: error: ld returned 1 exit status makefile.shared:180: recipe target 'link_app.gnu' failed
how can compile openssl ar9331 ? if try add host flag architecture not recognised.
edit: maybe best method avoid dependencies problem create ipkg package (openwrt package manager)
try , inform if works.
those packages should present in openwrt default. have tried downloading them opkg? maybe have check repos pulling from.
as last resort can download openwrt source code , build 2 packages , .ipkg device, openwrt build system takes care of getting toolchain , building you.
Comments
Post a Comment