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 Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply / Ask Question