網路城邦
上一篇 回創作列表 下一篇   字體:
cross compile , am57x
2021/09/06 17:27:42瀏覽96|回應0|推薦0
release: clean qmi-proxy
$(CC) -Wall -s ${QL_CM_SRC} -o quectel-CM -lpthread -ldl \
--sysroot=/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi \
-I/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi/usr/include \
-I/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi/usr/lib


==========

qmi-proxy:
$(CC) -Wall -s quectel-qmi-proxy.c -o quectel-qmi-proxy -lpthread -ldl \
--sysroot=/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi \
-I/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi/usr/include \
-I/home/gcat/sdk/sysroots/armv7at2hf-neon-linux-gnueabi/usr/lib

==========
#the case that no set env

make ARCH=arm CROSS_COMPILE=/home/gcat/sdk/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-

========== ========== ========== ==========
#the case that set env#1
source ~/sdk/environment-setup-armv7at2hf-neon-linux-gnueabi

gcat@gcatpc:~$ echo $CROSS_COMPILE
arm-linux-gnueabihf-

gcat@gcatpc:~$ echo $ARCH
arm

gcat@gcatpc:~/quectel-CM$ make

========== ========== ========== ==========
#the case that set env#2

source ~/ti-processor-sdk-linux-am57xx-evm-06.03.00.106/linux-devkit/environment-setup

[linux-devkit]:~/quectel-CM> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

========== ========== ========== ==========
#by the way, am57x menuconfig :
make menuconfig ARCH=arm CROSS_COPILE=/home/gcat/sdk/sysroots/x86_64-
arago-linux/usr/bin/arm-linux-gnueabihf-

習俗吧?有些可以交叉編譯的源碼包, Makefile會參照ARCH/CROSS_COMPILE這兩個變數.
( 不分類不分類 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=167426725