Post

atheros mips cross compile

cpu arch에 맞추어 toolchain 을 받습니다.

1
2
3
wget http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/OpenWrt-SDK-atheros-2.6-for-Linux-i686.tar.bz2

wget http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/OpenWrt-SDK-atheros-2.6-for-Linux-x86_64.tar.bz2

압축을 풀고 path 를 추가해줍니다.

1
export PATH=~/OpenWrt-SDK-atheros-2.6-for-Linux-x86_64/staging_dir_mips/bin/:$PATH
1
2
3
4
5
6
7
// test.c

#include <stdio.h>

int main() {
    printf("hello world");
}
1
mips-linux-uclibc-gcc test.c -s -o test
This post is licensed under CC BY 4.0 by the author.

Trending Tags