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