环境: Ubuntu14.10

我在编译u-boot代码的时候遇到了如下问题:

 LD      test/dm/built-in.o
CC examples/standalone/stubs.o
LD examples/standalone/libstubs.o
CC examples/standalone/hello_world.o
LD examples/standalone/hello_world
OBJCOPY examples/standalone/hello_world.srec
OBJCOPY examples/standalone/hello_world.bin
LDS u-boot.lds
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot.bin
CFG u-boot.cfg
./scripts/dtc-version.sh: line : dtc: command not found
./scripts/dtc-version.sh: line : dtc: command not found
*** Your dtc is too old, please upgrade to dtc 1.4 or newer
Makefile:: recipe for target 'checkdtc' failed
make: *** [checkdtc] Error

从提示信息可以看到是因为u-boot配置了设备树,但是在编译的时候找不到编译设备树的工具dtc。

那么,如果我想通过apt-get install 来安装dtc的话,又该安装那个软件包呢?如果直接写dtc,会出现如下错误:

pengdl@pengdl-HP:~/work/study/qemu_study/u-boot/u-boot$ sudo apt-get install dtc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dtc

显然没有叫做dtc的软件包。

解决办法:

使用apt-cache search命令,搜索包含有dtc的软件包的名字:

pengdl@pengdl-HP:~/work/study/qemu_study/u-boot/u-boot$ sudo apt-cache search dtc
[sudo] password for pengdl:
device-tree-compiler - Device Tree Compiler for Flat Device Trees
ddtc - Deal with ddts mails
dtc-xen - SOAP daemon and scripts to allow control panel management for Xen VMs
dtc-xen-firewall - small firewall script for your dom0
sbox-dtc - CGI chroot wrapper script for safer hosting environment

可以看到,第一个 device-tree-compiler 最合适,正是我们要找的。
下面安装这个软件包:

pengdl@pengdl-HP:~/work/study/qemu_study/u-boot/u-boot$ sudo apt-get install device-tree-compiler
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
device-tree-compiler
upgraded, newly installed, to remove and not upgraded.
Need to get kB of archives.
After this operation, kB of additional disk space will be used.
Get: http://mirrors.namecheap.com/ubuntu/ utopic/main device-tree-compiler amd64 1.4.0+dfsg-1 [356 kB]
Fetched kB in 12s (27.7 kB/s)
Selecting previously unselected package device-tree-compiler.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../device-tree-compiler_1.4.0+dfsg-1_amd64.deb ...
Unpacking device-tree-compiler (1.4.+dfsg-) ...
Processing triggers for man-db (2.7.0.2-) ...
Processing triggers for doc-base (0.10.) ...
Processing added doc-base files...
Registering documents with scrollkeeper...

安装完后,就可以找到dtc这个工具了:

pengdl@pengdl-HP:~/work/study/qemu_study/u-boot/u-boot$ which dtc
/usr/bin/dtc

再次编译u-boot:

  LD      common/built-in.o
CC drivers/usb/gadget/f_thor.o
LD drivers/usb/gadget/built-in.o
CC lib/display_options.o
LD lib/built-in.o
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot.bin
DTC arch/arm/dts/exynos4210-origen.dtb
DTC arch/arm/dts/exynos4210-smdkv310.dtb
DTC arch/arm/dts/exynos4210-universal_c210.dtb
DTC arch/arm/dts/exynos4210-trats.dtb
DTC arch/arm/dts/exynos4412-trats2.dtb
DTC arch/arm/dts/exynos4412-odroid.dtb
DTC arch/arm/dts/exynos4412-tiny4412.dtb
SHIPPED dts/dt.dtb
COPY u-boot.dtb
CAT u-boot-dtb.bin
===================== WARNING ======================
This board uses CONFIG_DM_I2C_COMPAT. Please remove
(possibly in a subsequent patch in your series)
before sending patches to the mailing list.
====================================================

可以看到编译通过。

使用apt-cache search搜索想要的软件包的更多相关文章

  1. 随笔之——各大热门网站search 搜索框的写法,浅析!

    随笔之——各大热门网站search 搜索框的写法,浅析!   关于搜索框,写法有很多种,搜索框这一块是一个比较细的活,要先计算好他的高.宽: 下面我就以京东搜索框为例,给大家浅析一下. 上面就是最终s ...

  2. 【起航计划 032】2015 起航计划 Android APIDemo的魔鬼步伐 31 App->Search->Invoke Search 搜索功能 Search Dialog SearchView SearchRecentSuggestions

    Search (搜索)是Android平台的一个核心功能之一,用户可以在手机搜索在线的或是本地的信息.Android平台为所有需要提供搜索或是查询功能的应用提 供了一个统一的Search Framew ...

  3. apt如何列出所有已经安装的软件包

    apt如何列出所有已经安装的软件包 转 https://www.helplib.com/ubuntu/article_155294 问题: 我想将所有已安装软件包的列表输出到文本文件中,以便我可以查看 ...

  4. django的前后的结合,search搜索功能案例

    利用django的Q()功能可以很好的展开搜索功能 假设我要做个这样的搜索功能

  5. Odoo search 搜索视图详解与搜索视图工作原理

    转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10826430.html 搜索视图 搜索视图的search标签本身没什么属性可以使用,只要是<searc ...

  6. Sentry 监控 - Search 搜索查询实战

    系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建版本 快速使用 Docker 上手 Sentry-CLI - 30 秒上手 Source Maps Sentry For ...

  7. search搜索功能

    1.html <div class="search">        <form name="formsearch" action=" ...

  8. 添加本地jar包到本地的Maven仓库以及在Maven仓库中搜索想要添加的jar包

    今天在学习Memacached的时候,将java_memcached-release下载下来,要使用maven来集成相关的jar包,Memcached的jar包如下: java_memcached-r ...

  9. 【LeetCode每天一题】Word Search(搜索单词)

    Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from le ...

随机推荐

  1. [POJ2406&POJ1961]用KMP解决字符串的循环问题两例

    翻阅了一下网上资料,发现大部分都说这题是找规律...或是说YY出的一个算法..不会证明... 然后就脑补了一下证明 ~ 结论:对于一个字符串S[1..N],如果N mod (N-next[N])=0 ...

  2. bzoj 1301 后缀数组

    比较裸的后缀数组. /************************************************************** Problem: User: BLADEVIL La ...

  3. sublime text 2学习(二):创建可复用的代码片段

    对于前端工程师来讲,写一个html页面的基本结构是体力活,每次去拷贝一个也麻烦,sublime text 2 提供了一个很好的复用代码片段.下面介绍一下创建一个html5的代码片段的过程. 在菜单上点 ...

  4. 安全测试===Mysql 注入技巧学习 MySQL注入技巧(1)

    默认存在的数据库: mysql 需要root权限读取 information_schema 在5以上的版本中存在 测试是否存在注入方法 假:表示查询是错误的 (MySQL 报错/返回页面与原来不同) ...

  5. UT技巧

    (一)PowerMockito进行UT测试如何略过方法,使方法不被执行(含私有方法): PowerMockito.doNothing().when(TestMock.class,"foo1& ...

  6. mysql约束与索引的区别

    一:约束 作用:是为了保证数据的完整性而实现的一套机制,它具体的根据各个不同的数据库的实现而有不同的工具(约束): 这里主要讲解mysql的约束: 1.非空约束:not null; 指示某列不能存储 ...

  7. 【 Ngnix 】配置路径转发至后端Apache多台虚拟主机

    一.安装apache并开启端口 [root@server ~]# netstat -ntplu | grep httpd tcp /httpd tcp /httpd 二.nginx配置 locatio ...

  8. IE6 下的HTML5兼容问题

    下面列举IE6中10个不得不注意的问题: 1. 使用 DOCTYPE你需要在HTML页面的最顶部加上DOCTYPE类型,当然, strict版是值得推荐的,例如: <!DOCTYPE HTML ...

  9. GO语言的数据结构测试

    用于docker了,go也慢慢看一些.. 推荐书籍<go语言实践>就是<Go in Action>的中文版,有文字版PDF的. package main import ( &q ...

  10. PHP的Trait

    PHP的Trait Trait是在PHP5.4中加入的,它既不是接口也不是类.主要是为了解决单继承语言的限制.是PHP多重继承的一种解决方案.例如,需要同时继承两个 Abstract Class, 这 ...