How to resolve error : dtc: command not found

When trying to compile uboot on ubuntu, we seen the following error,

  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
./scripts/dtc-version.sh: line 17: dtc: command not found
./scripts/dtc-version.sh: line 18: dtc: command not found
*** Your dtc is too old, please upgrade to dtc 1.4 or newer
Makefile:1450: recipe for target 'checkdtc' failed
make: *** [checkdtc] Error 1

From the error it looks like we are unable to find “dtc” command, which actually is a “device tree compiler”

So, we need to install it on ubuntu as,

 $ sudo apt-get install device-tree-compiler

Now, lets verify that dtc is now installed,

 $ which dtc
       /usr/bin/dtc
 $ dtc --version
        Version: DTC 1.4.0
Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply