Changes between Version 3 and Version 4 of OpenWrt/SDK


Ignore:
Timestamp:
03/30/2018 10:45:12 PM (20 months ago)
Author:
Cale Collins
Comment:

updated building using staging dir

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/SDK

    v3 v4  
    200200 * avila/cambria (ixp4xx) - target-armeb_v5te_gcc-linaro_uClibc-0.9.32/
    201201
    202 For example, if you wanted to build hello-world for laguna:
    203 {{{
    204 $ ls staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/
    205 arm-openwrt-linux                bin      info.mk  libexec  share  usr
    206 arm-openwrt-linux-uclibcgnueabi  include  lib      sbin     stamp
    207 $ cat << EOF > hello-world.c
    208 #include <stdio.h>
    209 
    210 int main (int argc, char** argv)
    211 {
    212 printf("Hello World\n");
    213 return 0;
    214 }
    215 EOF
    216 $ ./staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc ../hello-world.c -o hello-world
    217 $ file hello-world
    218 hello-world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
    219 }}}
    220 
    221  * *The STAGING_DIR may need to be set as noted here: [http://wiki.openwrt.org/doc/devel/crosscompile]
     202Examples:
     203 * Cross-compile hello-world.c for Ventana (imx6) using the OpenWrt 16.02, built in the present working directory:
     204{{{#!bash
     205export STAGING_DIR=$PWD/staging_dir
     206export PATH=$STAGING_DIR/toolchain-arm_cortex-a9+neon_gcc-5.2.0_musl-1.1.12_eabi/bin:$PATH
     207arm-openwrt-linux-gcc hello-world.c -o hello-world
     208}}}
     209 * Cross-compile hello-world.c for Laguna (cns3xxx) using the OpenWrt 14.08, built in the present working directory:
     210{{{#!bash
     211export STAGING_DIR=$PWD/staging_dir
     212export PATH=$STAGING_DIR/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin:$PATH
     213arm-openwrt-linux-uclibcgnueabi-gcc hello-world.c -o hello-world
     214}}}
    222215
    223216= Other Notes =