summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-02-10 15:19:57 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-02-10 15:19:57 +0000
commit5dac2c31e22781a061d7cc760138d79444894196 (patch)
tree9753d72f387f43e0af35a121759390129401e600 /target
parent7897a950fe2546d09e09a0645e38a6f8ab063623 (diff)
downloadbuildroot-novena-5dac2c31e22781a061d7cc760138d79444894196.tar.gz
buildroot-novena-5dac2c31e22781a061d7cc760138d79444894196.zip
u-boot: don't touch config.h unless explicitly requested by user
Fixes the problem of important variables like serverip being overwritten with empty strings if the network/default env stuff isn't used.
Diffstat (limited to 'target')
-rw-r--r--target/u-boot/Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/target/u-boot/Makefile.in b/target/u-boot/Makefile.in
index 61753f290..be889a076 100644
--- a/target/u-boot/Makefile.in
+++ b/target/u-boot/Makefile.in
@@ -105,15 +105,18 @@ $(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.patched
$(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured
# Modify configuration header in $(U_BOOT_INC_CONF_FILE)
+ifdef BR2_TARGET_UBOOT_DEFAULT_ENV
@echo >> $(U_BOOT_INC_CONF_FILE)
@echo "/* Add a wrapper around the values Buildroot sets. */" >> $(U_BOOT_INC_CONF_FILE)
@echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
@echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
- $(call insert_define, DATE, $(DATE))
+ $(call insert_define, DATE, $(DATE))
$(call insert_define, CONFIG_LOAD_SCRIPTS, 1)
ifneq ($(strip $(BR2_PROJECT)),"")
$(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))
endif
+endif # BR2_TARGET_UBOOT_DEFAULT_ENV
+ifdef BR2_TARGET_UBOOT_NETWORK
ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"")
$(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR))
ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"")
@@ -134,9 +137,11 @@ ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"")
$(call insert_define, CONFIG_ETH1ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR))
endif
endif
+endif # BR2_TARGET_UBOOT_NETWORK
ifeq ($(BR2_TARGET_UBOOT_SILENT),y)
$(call insert_define, CONFIG_SILENT_CONSOLE,)
endif
+ifdef BR2_TARGET_UBOOT_DEFAULT_ENV
ifneq ($(strip $(BR2_TARGET_UBOOT_KERNEL_START)),"")
$(call insert_define, KERNEL_START, $(BR2_TARGET_UBOOT_KERNEL_START))
endif
@@ -159,6 +164,7 @@ ifneq ($(strip $(BR2_TARGET_UBOOT_MEMORY_SIZE)),"")
$(call insert_define, MEMORY_SIZE, $(BR2_TARGET_UBOOT_MEMORY_SIZE))
endif
@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
+endif # BR2_TARGET_UBOOT_DEFAULT_ENV
touch $@
$(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified