On 18/07/2015 11:40, Peter Crosthwaite wrote: > target-foo is converted to arch-obj. But some CPUs may still need to > export APIs to device land (hw/). An example of this is the ARM > co-processor register interface. Such fns can be split off to new C > files in target-foo/hw dir where they remain obj-y for global > visibility. This creates a clearer separation of which > functions are system global and which are private to the CPU.
You have: +arch-obj-y += target-$(TARGET_BASE_ARCH)/ +obj-y += $(foreach a, $(ARCH_DIRS), target-$(a)/hw/) Is the hw/ required? Or could it be simply arch-obj-y += target-$(TARGET_BASE_ARCH)/ obj-y += $(foreach a, $(ARCH_DIRS), target-$(a)/) The Makefile machinery will ignore arch-obj-y definition outside target-multi. If I'm not mistaken, this is exactly the case that is described with ASCII art in rules.mak. On one hand the separation is cool to have; on the other hand it seems a bit artificial when we have arch-obj-y and obj-y in the same directory everywhere else (e.g. at top level). I'm also not sure I like the hw/ prefix because target-arm/hw/ is also used by files in target-arm/. Paolo