dtc: invalid option -- '@'
This is an error familiar to anyone trying to compile device tree overlays for the BeagleBone Black (BBB) on the latest Ubuntu image (2013-07-22). These overlays are required to enable the various devices on board, such as the CANBus in my previous post.
There are plenty of places out there which direct you to Robert C Nelsons Script for building the patched version. But for some reason or other this does not work for me. It gets as far as fetching the dtc source files, but does not patch them or compile/install anything. So if anyone else is having similar troubles, here is how to do it manually (from the comments here).
Firstly, install the packages needed to build the dtc binary.
sudo apt-get install build-essential bison flex
Grab the dtc source code
git clone http://jdl.com/software/dtc.git/ cd dtc
Go to the specific state which the patch is for
git reset --hard f8cb5dd94903a5cfa1609695328b8f1d5557367f
Grab the patch
wget https://patchwork.kernel.org/patch/1934471/raw/ -O dynamic-symbols.patch
Apply the patch
git apply dynamic-symbols.patch
Now build and install dtc
make sudo cp dtc /usr/local/bin
Now you should be able to compile device tree overlays with the following prototype
dtc -O dtb -o <overlay filename> -b 0 -@ <source filename>