diff options
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | api/api.c | 3 | ||||
| -rw-r--r-- | board/BuS/EB+MCF-EV123/config.mk | 2 | ||||
| -rw-r--r-- | board/esd/mecp5200/config.mk | 2 | ||||
| -rw-r--r-- | board/linkstation/Makefile | 15 | ||||
| -rw-r--r-- | board/linkstation/config.mk | 2 | ||||
| -rw-r--r-- | board/munices/config.mk | 2 | ||||
| -rw-r--r-- | board/v38b/config.mk | 2 | ||||
| -rw-r--r-- | common/cmd_nvedit.c | 13 | ||||
| -rw-r--r-- | common/env_eeprom.c | 4 | ||||
| -rw-r--r-- | common/env_nvram.c | 3 | ||||
| -rw-r--r-- | common/ft_build.c | 3 | ||||
| -rw-r--r-- | include/environment.h | 10 | ||||
| -rw-r--r-- | include/version.h | 2 |
14 files changed, 37 insertions, 40 deletions
@@ -424,13 +424,19 @@ $(obj)System.map: $(obj)u-boot # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. # the dep file is only include in this top level makefile to determine when # to regenerate the autoconf.mk file. -$(obj)include/autoconf.mk: $(obj)include/config.h - @$(XECHO) Generating include/autoconf.mk ; \ +$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h + @$(XECHO) Generating $@ ; \ set -e ; \ : Generate the dependancies ; \ - $(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \ + $(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \ + -MQ $(obj)include/autoconf.mk include/common.h > $@ + +$(obj)include/autoconf.mk: $(obj)include/config.h + @$(XECHO) Generating $@ ; \ + set -e ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed > $@ + $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \ + sed -n -f tools/scripts/define2mk.sed > $@ sinclude $(obj)include/autoconf.mk.dep @@ -30,6 +30,7 @@ #include <command.h> #include <common.h> #include <malloc.h> +#include <environment.h> #include <linux/types.h> #include <api_public.h> @@ -40,8 +41,6 @@ /* U-Boot routines needed */ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -extern uchar (*env_get_char)(int); -extern uchar *env_get_addr(int); /***************************************************************************** * diff --git a/board/BuS/EB+MCF-EV123/config.mk b/board/BuS/EB+MCF-EV123/config.mk index 9fe2fc5da..f03e3962d 100644 --- a/board/BuS/EB+MCF-EV123/config.mk +++ b/board/BuS/EB+MCF-EV123/config.mk @@ -22,7 +22,7 @@ # MA 02111-1307 USA # -sinclude $(TOPDIR)/board/$(BOARDDIR)/textbase.mk +sinclude $(OBJTREE)/board/$(BOARDDIR)/textbase.mk ifndef TEXT_BASE TEXT_BASE = 0xFE000000 endif diff --git a/board/esd/mecp5200/config.mk b/board/esd/mecp5200/config.mk index 07b5de188..170779d6c 100644 --- a/board/esd/mecp5200/config.mk +++ b/board/esd/mecp5200/config.mk @@ -32,7 +32,7 @@ # 0x00100000 boot from RAM (for testing only) # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE ## Standard: boot high diff --git a/board/linkstation/Makefile b/board/linkstation/Makefile index 57c84de60..8d92d8a6c 100644 --- a/board/linkstation/Makefile +++ b/board/linkstation/Makefile @@ -23,18 +23,21 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a OBJS = $(BOARD).o ide.o hwctl.o avr.o -$(LIB): .depend $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(OBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) crv $@ $(OBJS) ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/linkstation/config.mk b/board/linkstation/config.mk index bdf611dc2..d04829014 100644 --- a/board/linkstation/config.mk +++ b/board/linkstation/config.mk @@ -35,7 +35,7 @@ # 0x07F00000 boot from RAM # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE # For flash image - all models diff --git a/board/munices/config.mk b/board/munices/config.mk index d226244a1..1b573bc88 100644 --- a/board/munices/config.mk +++ b/board/munices/config.mk @@ -29,7 +29,7 @@ # 0xFFF00000 boot high (standard configuration) # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE TEXT_BASE = 0xFFF00000 diff --git a/board/v38b/config.mk b/board/v38b/config.mk index 75577fcbe..bc55fc7b2 100644 --- a/board/v38b/config.mk +++ b/board/v38b/config.mk @@ -25,7 +25,7 @@ # MarelV38B board # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp TEXT_BASE = 0xFF000000 diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index cab727f76..9c5d1fcb9 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -68,19 +68,6 @@ DECLARE_GLOBAL_DATA_PTR; /************************************************************************ ************************************************************************/ -/* Function that returns a character from the environment */ -extern uchar (*env_get_char)(int); - -/* Function that returns a pointer to a value from the environment */ -/* (Only memory version supported / needed). */ -extern uchar *env_get_addr(int); - -/* Function that updates CRC of the enironment */ -extern void env_crc_update (void); - -/************************************************************************ -************************************************************************/ - /* * Table with supported baudrates (defined in config_xyz.h) */ diff --git a/common/env_eeprom.c b/common/env_eeprom.c index 2adc129c6..9e1a20194 100644 --- a/common/env_eeprom.c +++ b/common/env_eeprom.c @@ -38,10 +38,6 @@ env_t *env_ptr = NULL; char * env_name_spec = "EEPROM"; -extern uchar (*env_get_char)(int); -extern uchar env_get_char_memory (int index); - - uchar env_get_char_spec (int index) { uchar c; diff --git a/common/env_nvram.c b/common/env_nvram.c index 7c18896cb..fa7771912 100644 --- a/common/env_nvram.c +++ b/common/env_nvram.c @@ -63,9 +63,6 @@ char * env_name_spec = "NVRAM"; extern uchar default_environment[]; extern int default_environment_size; -extern uchar (*env_get_char)(int); -extern uchar env_get_char_memory (int index); - #ifdef CONFIG_AMIGAONEG3SE uchar env_get_char_spec (int index) { diff --git a/common/ft_build.c b/common/ft_build.c index 0e5699a95..b951178a1 100644 --- a/common/ft_build.c +++ b/common/ft_build.c @@ -396,9 +396,6 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp) /********************************************************************/ -/* Function that returns a character from the environment */ -extern uchar(*env_get_char) (int); - void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end) { u32 *p; diff --git a/include/environment.h b/include/environment.h index c4f7c33be..946a393e3 100644 --- a/include/environment.h +++ b/include/environment.h @@ -107,4 +107,14 @@ typedef struct environment_s { unsigned char data[ENV_SIZE]; /* Environment data */ } env_t; +/* Function that returns a character from the environment */ +unsigned char (*env_get_char)(int); + +/* Function that returns a pointer to a value from the environment */ +unsigned char *env_get_addr(int); +unsigned char env_get_char_memory (int index); + +/* Function that updates CRC of the enironment */ +void env_crc_update (void); + #endif /* _ENVIRONMENT_H_ */ diff --git a/include/version.h b/include/version.h index b56d2e990..a34291adc 100644 --- a/include/version.h +++ b/include/version.h @@ -24,6 +24,8 @@ #ifndef __VERSION_H__ #define __VERSION_H__ +#ifndef DO_DEPS_ONLY #include "version_autogenerated.h" +#endif #endif /* __VERSION_H__ */ |