环境: 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. bzoj 1433 二分图匹配

    裸地匈牙利或者最大流,直接匹配就行了 需要注意的是(我就没注意细节WA了好多次...) 每个人和自己之间的边是0,但是应该是1 不是在校生是没有床的.... /******************** ...

  2. Map占用内存大小评估

    public class test { private static java.util.HashMap<String, String> needQueryResProductList = ...

  3. python memcache操作-安装、连接memcache

    安装memecache wget http://memcached.org/latest tar -zxvf memcached-1.x.x.tar.gz cd memcached-1.x.x ./c ...

  4. 【 LVS 】类型及算法

    一.概念: LVS( linux virtual server ) : Linux虚拟服务器 lvs是一个负载均衡设备,它不提供任何服务,用户请求到这里的时候,它将客户需求转发至后端的realserv ...

  5. String、ANSIString、PChar及TBytes之间的转换 BytesOf move stringof

    一.string转为ansistring 1.直接赋值 (有警告)2.ansistring()类型强制转换.(无警告) 二.ansistring 转为string 1.直接赋值 (有警告)2.stri ...

  6. 《Java编程思想》笔记 第十五章 泛型

    1 泛型 “泛型”意思就是适用于许多类型. 使用泛型的目的之一: 指定容器持有什么类型,让编译器确保正确性,而不是在运行期发现错误. 这个容器可以看成是有其他类型对象作为成员的类,而不单单只是JDK中 ...

  7. Selenium2+python自动化31-生成测试报告【转载】

    前言 最近小伙伴们总有一些测试报告的问题,网上的一些资料生成报告的方法,我试了都不行,完全生成不了,不知道他们是怎么生成的,同样的代码,有待研究. 今天小编写一下可以生成测试报告的方法.个人觉得也是最 ...

  8. hdu 5188(带限制的01背包)

    zhx and contest Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)T ...

  9. Python 进阶 之 @property

    @property是一个装饰器,由Python原生库所支持,无需import @property 的作用是将函数变成属性,一般作用于类内的成员函数. 先贴个代码来描述一下@poperty存在的意义: ...

  10. HDU 5969 最大的位或【贪心/按位或/思维】

    链接 最大的位或 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Subm ...