Domanda

I have built the openwrt firmware and installed it to a device. Now I want to compile my source code in C in the device (I can ssh into it). However, openwrt firmware is quite basic and does not include make.

How can I install make/ equivalent to compile my C source code inside the device running openwrt firmware?

È stato utile?

Soluzione

OpenWrt is not intended to work as a build server, so you won't find compiler, linker etc. in its root file system. As you mentioned before, you've successfully compiled the firmware. That means you have cross compiler at hand, so you can cross compile your software and then copy it to your system via scp.

Another approach would be to create your own feed, add your software to this feed, so that at the end you'll get an ordinary ipkg package, that you can download and install via web interface. See OpenWrt documentation for more details.

Altri suggerimenti

Lots of Cross Compiler are available for host system i.e PC running any Linux OS. Just install compiler corresponding to Architecture in which Openwrt is running,

e.g If OpenWRT running on ARM architecture, sudo apt-get install gcc-arm-linux-gnueabi

then compile source code as: arm-linux-gcc -o yourprogram yourprogram.c

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top