I finally found out why building one target, running menuconfig to change the target and recompiling fails unless you make clean in between: statictree.c and statictree.h are missing dependencies on .config or its derivatives. Ouch. That's not totally bad for statictree.c because it sits next to the dts, but for statictree.h. So if you configure for qemu, compile, reconfigure for alix1c, compile again, make thinks statictree.h is not stale because it is newer than the alix1c dts. Boom.
Two possible fixes: - move statictree.h to the mainboard dir next to statictree.c. - have statictree.h depend on .config or derivatives.
I like the first option a lot better.
Opinions?
Regards, Carl-Daniel