Building iptables for Cortex-M based Targets |
|
Step through the following procedure in order to build iptables for Cortex-M based targets:
- Go to the top of your Linux Cortex-M installation and activate a Linux Cortex-M development session:
. ./ACTIVATE.sh
- For Cortex-M3 tartgets, specify the additional compiler options as follows:
export LDFLAGS="-mcpu=cortex-m3 -mthumb" export CFLAGS="-mcpu=cortex-m3 -mthumb"
If your target is Cortex-M4 or Cortex-M7, do the following instead:
export LDFLAGS="-mcpu=cortex-m4 -mthumb" export CFLAGS="-mcpu=cortex-m4 -mthumb"
- Go to the root of the iptables source tree and run the configure script:
./configure --build=i386-linux --host=arm-uclinuxeabi --disable-shared
- Search all subdirectories recursively for Makefile files and update them by adding the -DNO_SHARED_LIBS flag to the list of other flags automatically generated by configure. For example, the updated string will look as follows in iptables/Makefile:
regular_CPPFLAGS = -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"${xtlibdir}\" -DXTABLES_INTERNAL -DNO_SHARED_LIBS
- Now you are ready to build the package:
make
|