[U-Boot] [PATCH] config.mk: add drivers as default include PATH

Macpaul Lin macpaul at andestech.com
Wed Dec 15 08:27:29 CET 2010


Some device drivers and their header files will
invoke some definitions for assembly code. If a
device is required to be initilized in board.S
or in lowlevel_init.S, such memory controller,
flash controller, power control units. Sometimes
we both need to access these devices in bootstrap
process and later in normal operation period.

Hence the definitions of these drivers in the
header files is required to be found in cpu and
board folders. Moreover, these devices is usually
built into multiple different SoC with different
architectures. So the header files should be able
to be shared among the SoCs.

Add this
	CPPFLAGS += -I$(TOPDIR)/drivers
into the default include PATH will avoid such code
	"#include "../../../../../drivers/mtd/flash.h"

So this patch is suggested.

Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
 config.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 19e0a6e..52f2280 100644
--- a/config.mk
+++ b/config.mk
@@ -178,6 +178,7 @@ ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif
 
+CPPFLAGS += -I$(TOPDIR)/drivers
 CPPFLAGS += -I$(TOPDIR)/include
 CPPFLAGS += -fno-builtin -ffreestanding -nostdinc	\
 	-isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
-- 
1.7.3.2



More information about the U-Boot mailing list