Build device tree: dtc: invalid option -- '@'

I try to build the device tree mainly to enable the atmel touch driver (

I am following this guide: Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center

I can successfully build U-Boot and the Linux kernel, but it fails to build the device tree ($ make DTC_FLAGS=“-@” imx6q-apalis-eval.dtb):

**dtc: invalid option -- '@' **

Below is a copy of the terminal output. I am using Ubuntu 16.04 with DTC 1.4.1, so I have installed 1.6.0 from source (I have tried different versions, same issue).

kb@kb-vb:~$ export ARCH=arm                                                                          
kb@kb-vb:~$ export DTC_FLAGS="-@"                                                                    
kb@kb-vb:~$ export PATH=~/gcc-linaro/bin/:$PATH                                                      
kb@kb-vb:~$ export CROSS_COMPILE=arm-linux-gnueabihf-                                                
kb@kb-vb:~$ dtc -v                                                                                   
Version: DTC 1.4.1-g47216cdb                                                                         
kb@kb-vb:~$ cd dtc                                                                                   
kb@kb-vb:~/dtc$ export PATH=$HOME/dtc/:$PATH                                                         
kb@kb-vb:~/dtc$ cd                                                                                   
kb@kb-vb:~$ dtc -v                                                                                   
Version: DTC 1.6.0                                                                                   
kb@kb-vb:~$ cd linux-toradex/                                                                        
kb@kb-vb:~/linux-toradex$ make apalis_imx6_defconfig                                                 
# configuration written to .config                                                                   
kb@kb-vb:~/linux-toradex$ make DTC_FLAGS="-@" imx6q-apalis-eval.dtb                                  
scripts/kconfig/conf  --silentoldconfig Kconfig                                                      
  DTC     arch/arm/boot/dts/imx6q-apalis-eval.dtb                                                    
./scripts/dtc/dtc: invalid option -- '@'                                                             
Usage: dtc [options]                                                                     
Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv]                                                          
  -q, --quiet                                                                                        
	Quiet: -q suppress warnings, -qq errors, -qqq all                                                  
  -I, --in-format                                                                               
	Input formats are:                                                                                 
		dts - device tree source text                                                                    
		dtb - device tree blob                                                                           
		fs  - /proc/device-tree style directory                                                          
  -o, --out                                                                                     
	Output file                                                                                        
  -O, --out-format                                                                              
	Output formats are:                                                                                
		dts - device tree source text                                                                    
		dtb - device tree blob                                                                           
		asm - assembler source                                                                           
  -V, --out-version                                                                             
	Blob version to produce, defaults to 17 (for dtb and asm output)                                   
  -d, --out-dependency                                                                          
	Output dependency file                                                                             
  -R, --reserve                                                                                 
	Make space for <number> reserve map entries (for dtb and asm output)                               
  -S, --space                                                                                   
	Make the blob at least <bytes> long (extra space)                                                  
  -p, --pad                                                                                     
	Add padding to the blob of <bytes> long (extra space)                                              
  -b, --boot-cpu                                                                                
	Set the physical boot cpu                                                                          
  -f, --force                                                                                        
	Try to produce output even if the input tree has errors                                            
  -i, --include                                                                                 
	Add a path to search for include files                                                             
  -s, --sort                                                                                         
	Sort nodes and properties before outputting (useful for comparing trees)                           
  -H, --phandle                                                                                 
	Valid phandle formats are:                                                                         
		legacy - "linux,phandle" properties only                                                         
		epapr  - "phandle" properties only                                                               
		both   - Both "linux,phandle" and "phandle" properties                                           
  -W, --warning                                                                                 
	Enable/disable warnings (prefix with "no-")                                                        
  -E, --error                                                                                   
	Enable/disable errors (prefix with "no-")                                                          
  -h, --help                                                                                         
	Print this help and exit                                                                           
  -v, --version                                                                                      
	Print version and exit                                                                             
Error: unknown option                                                                                
scripts/Makefile.lib:313: recipe for target 'arch/arm/boot/dts/imx6q-apalis-eval.dtb' failed         
make[1]: *** [arch/arm/boot/dts/imx6q-apalis-eval.dtb] Error 1                                       
arch/arm/Makefile:336: recipe for target 'imx6q-apalis-eval.dtb' failed                              
make: *** [imx6q-apalis-eval.dtb] Error 2                                                            
kb@kb-vb:~/linux-toradex$ echo $PATH  

What is wrong here?
Thank you for your help!

Hi @kbraendle and Welcome to the Toradex Community!

I can reproduce the issue. It seems that DTC Flags are supported starting from Bsp 3.0. For Bsp 2.8, you should export the variable DTC Flags. I will let update the Documentation.

Best regards,

Hi Jaski,
Thank you for your quick solution. I have seen the updated documentation, it works now.