我正在使用 buildroot-2012.11 为嵌入式系统生成 Linux 映像的项目中工作。
我需要为使用 FTDI 芯片 (FT2232D) 的 JTAG 调试器配置 openocd。
我意识到这个 buildroot 版本集成了 openocd-0.5.0,而最新的 openocd 版本是 0.9.0。我有兴趣更新到这个版本,因为我想使用ftdi接口驱动程序而不是ft2232(已弃用)。
我试图通过修改 /package/openocd/openocd.mk 来实现这一点:
OPENOCD_VERSION:=0.9.0
OPENOCD_CONF_OPT += --enable-ftdi
新的 openocd 文件已成功下载,但当它尝试安装并应用openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch 时,我得到了:
Applying openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch using patch:
can't find file to patch at input line 17
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 3728c4af7f6303ccedab56ec220797f8f290580e Mon Sep 17 00:00:00 2001
|From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|Date: Wed, 10 Aug 2011 00:17:29 +0800
|Subject: [PATCH] fix cross compilation: host libsub was used before
|
|tested in buildroot
|
|Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|---
| configure.in | 7 +++++--
| 1 files changed, 5 insertions(+), 2 deletions(-)
|
|diff --git a/configure.in b/configure.in
|index dfa1e8f..cfe2218 100644
|--- a/configure.in
|+++ b/configure.in
--------------------------
File to patch: configure.in
configure.in: No such file or directory
如果我跳过补丁,构建过程将停止并且我无法生成图像。
我在互联网上做了一些研究,但我找不到如何正确地做到这一点。
也许一个明显的解决方案可能是更新 buildroot 版本,但由于有很多其他人在使用当前版本进行开发,所以我现在无法做出这个决定。
我会很感激任何帮助。