交叉编译opencv以移植到TI DM6446
我已经在 GCC 上设置了目标文件系统
/home/myself/filesys/bin..etc//
编译:
host $ arm_v5t_le-gcc hello.c -o hello
运行:
target $ cd /opt/hello
target $./hello
我已经在主机ubuntu机器上安装了opencv2.3,现在我想将opencv移植到DM6446 所以我按照
uncompress opencv2.3 tarball
sudo cmake OpenCV-2.3.1
sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le-
但是当我运行bin 中的示例测试,它在专为 ARM 制作的 x86 机器上运行 我认为我没有遵循正确的程序来制作 opencv。
我需要做什么才能为 ARM 架构制作 opencv, 交叉编译的步骤是什么?
I have set up target fs on
/home/myself/filesys/bin..etc//
GCC
compile:
host $ arm_v5t_le-gcc hello.c -o hello
run:
target $ cd /opt/hello
target $./hello
I have installed opencv2.3 on host ubuntu machine now I want opencv to be ported to DM6446
so i follow
uncompress opencv2.3 tarball
sudo cmake OpenCV-2.3.1
sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le-
but when I run the sample test from bin it runs on x86 machine which was made for ARM
I think I am not following the correct procedure to make opencv.
Is there anything I have to do to make opencv for ARM architecture,
what are the steps to follow in cross compiling?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您执行的第二个命令应该提供有关您是否正在交叉编译的线索。如果您仔细观察,就会发现它是为 i686 而不是为 ARM 平台构建的。
本博客讨论如何使用 cmake 进行交叉编译。
cmake 使用与标准 make 不同的环境变量(因此不要使用 ARCH 和 CROSS-COMPILE)。
The 2nd command you executed should provide a clue as to whether you are cross-compiling or not. If you look closely it would have shown that it was building for the i686 and not for the ARM platform.
This blog discusses how to Cross Compile using cmake.
cmake uses different environment variables from standard make (so don't use ARCH, and CROSS-COMPILE).