Skip to contentSkip to conversation

PXA: Fix off-the-tree build problems

PATCH Superseded Marek Vasut 1 participant 3 messages Aug 8, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 PXA: Fix off-the-tree build problems

---
 board/colibri_pxa270/Makefile |   18 +++++++++++-------
 board/vpac270/Makefile        |   18 +++++++++++-------
 2 files changed, 22 insertions(+), 14 deletions(-)
board/colibri_pxa270/Makefile +11 -7
index 44d73cc..59575ca 100644
@@ -21,13 +21,17 @@
 
 include $(TOPDIR)/config.mk
 
-LIB	= lib$(BOARD).a
+LIB	= $(obj)lib$(BOARD).a
 
-OBJS	:= colibri_pxa270.o
+COBJS	:= colibri_pxa270.o
 SOBJS	:= lowlevel_init.o
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
@@ -37,9 +41,9 @@ distclean:	clean
 
 #########################################################################
 
-.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-		$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
--include .depend
+sinclude $(obj).depend
 
 #########################################################################
board/vpac270/Makefile +11 -7
index 0f3eacd..92fc3a0 100644
@@ -24,13 +24,17 @@
 
 include $(TOPDIR)/config.mk
 
-LIB	= lib$(BOARD).a
+LIB	= $(obj)lib$(BOARD).a
 
-OBJS	:= vpac270.o
+COBJS	:= vpac270.o
 SOBJS	:= lowlevel_init.o
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
@@ -40,9 +44,9 @@ distclean:	clean
 
 #########################################################################
 
-.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
-		$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
--include .depend
+sinclude $(obj).depend
 
 #########################################################################
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/3 PXA: Fix missing includes

---
 board/colibri_pxa270/colibri_pxa270.c |    1 +
 board/vpac270/vpac270.c               |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
board/colibri_pxa270/colibri_pxa270.c +1 -0
index d3822f0..84ec38e 100644
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/vpac270/vpac270.c +1 -0
index 48e93ab..18e47e2 100644
@@ -30,6 +30,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 3/3 PXA: Declare __io for vpac270 IDE

In reply to Marek Vasut
---
 include/configs/vpac270.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/vpac270.h +2 -0
index 6d02995..d3e22d9 100644
@@ -228,6 +228,8 @@
 #undef	CONFIG_IDE_LED
 #undef	CONFIG_IDE_RESET
 
+#define	__io
+
 #define CONFIG_SYS_IDE_MAXBUS		1
 #define CONFIG_SYS_IDE_MAXDEVICE	1
 
Signature · 1 line
1.7.1