环境: 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. windows mysql 安装及启动

    0.下载:

  2. 转:Linux 目录结构和常用命令

    转自:http://www.cnblogs.com/JCSU/articles/2770249.html仅为学习参考之用 一.Linux目录结构 你想知道为什么某些程序位于/bin下,或者/sbin, ...

  3. 【CF1027F】Session in BSU(dsu,基环树)

    题意:给出n场考试,每场考试有2天可以通过(第ai与bi天).每天最多参加一场考试,现在要求所有考试全部通过的最小天数 n<=1e6,1<=a[i]<b[i]<1e9 思路:F ...

  4. [bzoj4515][Sdoi2016]游戏-树链剖分+李超线段树

    Brief Description Alice 和 Bob 在玩一个游戏. 游戏在一棵有 n 个点的树上进行.最初,每个点上都只有一个数字,那个数字是 123456789123456789. 有时,A ...

  5. 一道面试题:C++相比C#或者java的优势到底在哪里

    被问到了这样一道面试题,当时就懵了,内心一直觉得C++肯定在很多方面要比C#或者java要牛b的. 但是真的不知道怎么回答. 问题是:你以前一直做得是.NET相关项目,现在为什么找C++开发相关工作呢 ...

  6. UVALIVE 3486 Cells

    通过入栈出栈顺序判断祖先关系 这里UVALIVE还 #include <map> #include <set> #include <list> #include & ...

  7. 跟我一起写 Makefile(一)【转】

    转自:http://blog.csdn.net/haoel/article/details/2886 跟我一起写 Makefile 陈皓 概述—— 什么是makefile?或许很多Winodws的程序 ...

  8. 4.flask数据库

    1.安装MySQL 直接去下载即可,如果是windows建可以下载msi,一路next即可.我已经安装过了,这里就不再演示了. 最后使用Navicat连接测试一下,我这里是没有问题的 2.SQLAlc ...

  9. PhpStorm最新版 2017激活办法

    特别注意:为避免phpstorm联网时注册失效,请将“0.0.0.0 account.jetbrains.com”添加到hosts文件中. 最新版PhpStorm 2017正式版改进了PHP 7支持, ...

  10. rhel 6.5 yum源的配置

    https://blog.csdn.net/error_0_0_/article/details/54962199