Search for the desired package using Apt-cache

Source: Internet
Author: User
Tags srec

Environment: Ubuntu14.10

I encountered the following problem when compiling the U-boot code:

LD test/dm/built-inch. 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 foundYour DTC is too old, please upgrade to DTC1.4or Newermakefile:1298: recipe forTarget'CHECKDTC'failed Make: * * * [CHECKDTC] Error1

You can see from the prompt that the device tree was configured for U-boot, but the tool DTC that compiled the device tree was not found at compile time.

So, what if I want to install the DTC via Apt-get install? If you write DTC directly, the following error occurs:

sudo Install dtcreading Package Lists ... Donebuilding dependency Tree       Locate Package DTC

Obviously there are no packages called DTC.

Workaround:

Search for the name of the package that contains the DTC using the Apt-cache Search command:

 [email protected]:~/work/study/qemu_study/u-boot/ u-boot$ sudo  apt-cache Search dtc[ sudo ] Password  Pengdl:device -tree-compiler-device Tree compiler for   Flat Device treesddtc - Deal with DDTs mailsdtc -xen-soap daemon and scripts To allow Control Panel management for   Xen vmsdtc
     -xen-firewall-small Firewall script for  -dtc-cgi for  Safer hosting environment  

As you can see, the first Device-tree-compiler is the right one for us.
Install this package below:

[Email protected]:~/work/study/qemu_study/u-boot/u-boot$sudoApt-getInstalldevice-tree-compiler Reading Package lists ... Donebuilding Dependency Tree Reading state information ... Donethe following NEW packages 'll be Installed:device-tree-compiler0Upgraded,1Newly installed,0To remove and1Not upgraded. Need to get356KB of archives. After this operation,546KB of additional disk space would be used. Get:1http//mirrors.namecheap.com/ubuntu/utopic/main device-tree-compiler amd64 1.4.0+dfsg-1 [356 KB]Fetched356Kbinch12s (27.7kb/s) Selecting previously unselected package device-tree-compiler. (Reading database ...305587files and directories currently installed.) Preparing to unpack .../device-tree-compiler_1.4.0+dfsg-1_amd64.deb ... Unpacking Device-tree-compiler (1.4.0+dfsg-1) ... Processing triggers for Mans-db (2.7.0.2-2) ... Processing triggers forDoc-base (0.10.6) ... Processing2Added doc-Base Files ... Registering documents with Scrollkeeper ...

Once the installation is complete, you can find the DTC tool:

which DTC/USR/BIN/DTC

Compile U-boot again:

LD common/built-inch. o CC Drivers/usb/gadget/f_thor.o LD Drivers/usb/gadget/built-inch. O CC lib/DISPLAY_OPTIONS.O LD Lib/built-inch. 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 (possiblyinchA subsequentPatch inchyour series) before sending patches to the mailing list.====================================================

You can see the compilation passed.

Search for the desired package using Apt-cache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.