用openwrt编译工具链编译一个可执行文件

1、修改一个环境变量

export STAGING_DIR=/home/yangweitao/share/openwrt-cgminer/build/openwrt.b1_c1/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi

2、加入到path中

export PATH=$PATH:$STAGING_DIR/bin

3、编译

 arm-openwrt-linux-gcc client.c -o  client

4、scp拷贝可执行文件到openwrt上

scp client root@192.168.1.101:/root

  

  

posted @ 2021-09-10 14:19  轻轻的吻  阅读(529)  评论(0编辑  收藏  举报