New cross-compile OpenWrt

Nuked and paved dev environment:
Ubuntu 18.04 (64bit)
OpenWrt 18.,06.1

Cross compiled Helloworld app.
Running hello on target OpenWrt machine, get the following:

Error loading shared library libmedtls.so.12: No such file or directory (needed by ./hello)
Error loading shared library libmedcrypto.so.3: No such file or directory (needed by ./hello)

Thoughts?

Thank you.

Are you using the GL SDK from the other thread?

When you make your helloworld app package, you need to add the libmbedtls dependency to your package so that the system installs it when you install your program as well.

include $(TOPDIR)/rules.mk

PKG_NAME:=helloworld
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define Package/helloworld
    TITLE:=Hello World
    DEPENDS:=+libmbedtls
endef

define Package/helloworld/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/helloworld $(1)/usr/bin/helloworld
endef

$(eval $(call BuildPackage,helloworld))
1 Like