u-boot: fix wrong syntax in Makefile
PATCH 1/1 u-boot: fix wrong syntax in Makefile
u-boot: fix wrong syntax in Makefile
Some $(call insert_define, ..., ...) calls were lacking the comma after the variable. That didn't lead to a syntax error but it didn't have any effect on the output u-boot/include/config.h
--- target/u-boot/Makefile.in | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
target/u-boot/Makefile.in +4 -4
@@ -98,16 +98,16 @@ ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"") $(call insert_define, "CONFIG_ETHADDR", $(BR2_TARGET_UBOOT_ETHADDR)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"") - $(call insert_define "CONFIG_ETH2ADDR", $(BR2_TARGET_UBOOT_ETH1ADDR)) + $(call insert_define, "CONFIG_ETH2ADDR", $(BR2_TARGET_UBOOT_ETH1ADDR)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTARGS)),"") - $(call insert_define "CONFIG_BOOTARGS", $(BR2_TARGET_UBOOT_BOOTARGS)) + $(call insert_define, "CONFIG_BOOTARGS", $(BR2_TARGET_UBOOT_BOOTARGS)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTCMD)),"") - $(call insert_define "CONFIG_BOOTCOMMAND", $(BR2_TARGET_UBOOT_BOOTCMD)) + $(call insert_define, "CONFIG_BOOTCOMMAND", $(BR2_TARGET_UBOOT_BOOTCMD)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_SILENT)),"") - $(call insert_define "CONFIG_SILENT_CONSOLE", "") + $(call insert_define, "CONFIG_SILENT_CONSOLE", "") endif @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE) touch $@
PATCH 1/1 u-boot: fix wrong syntax in Makefile
Hello,
today I've noticed, that the previous patch has some issues. There are no "" around the value of CONFIG_BOOTARGS and the make run may stop with an error when echoing CONFIG_BOOTCOMMAND into U-Boots config.h. This time I have tested it with different configurations, on Friday the time was short.
u-boot: fix broken insert_define in Makefile
--- target/u-boot/Makefile.in | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-)
target/u-boot/Makefile.in +13 -12
@@ -31,10 +31,11 @@ endif # Define a helper function define insert_define + at echo "" >> $(U_BOOT_INC_CONF_FILE) @echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) @echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) @echo "#endif" >> $(U_BOOT_INC_CONF_FILE) - at echo "#define $(strip $(1)) $(2)" >> $(U_BOOT_INC_CONF_FILE) + at echo '#define $(strip $(1)) $(2)' >> $(U_BOOT_INC_CONF_FILE) endef $(DL_DIR)/$(U_BOOT_SOURCE):
@@ -78,36 +79,36 @@ $(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) ifneq ($(strip $(BR2_PROJECT)),"") - $(call insert_define, "CONFIG_HOSTNAME", $(BR2_PROJECT)) + $(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"") - $(call insert_define, "CONFIG_SERVERIP", $(BR2_TARGET_UBOOT_SERVERIP)) + $(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"") - $(call insert_define, "CONFIG_IPADDR", $(BR2_TARGET_UBOOT_IPADDR)) + $(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR)) ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"") - $(call insert_define, "CONFIG_GATEWAYIP", $(BR2_TARGET_UBOOT_GATEWAY)) + $(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"") - $(call insert_define, "CONFIG_NETMASK", $(BR2_TARGET_UBOOT_NETMASK)) + $(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK)) endif endif # end BR2_TARGET_U_BOOT_IPADDR ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"") - $(call insert_define, "CONFIG_ETHADDR", $(BR2_TARGET_UBOOT_ETHADDR)) + $(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"") - $(call insert_define "CONFIG_ETH2ADDR", $(BR2_TARGET_UBOOT_ETH1ADDR)) + $(call insert_define, CONFIG_ETH2ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTARGS)),"") - $(call insert_define "CONFIG_BOOTARGS", $(BR2_TARGET_UBOOT_BOOTARGS)) + $(call insert_define, CONFIG_BOOTARGS, $(BR2_TARGET_UBOOT_BOOTARGS)) endif ifneq ($(strip $(BR2_TARGET_UBOOT_BOOTCMD)),"") - $(call insert_define "CONFIG_BOOTCOMMAND", $(BR2_TARGET_UBOOT_BOOTCMD)) + $(call insert_define, CONFIG_BOOTCOMMAND, $(BR2_TARGET_UBOOT_BOOTCMD)) endif -ifneq ($(strip $(BR2_TARGET_UBOOT_SILENT)),"") - $(call insert_define "CONFIG_SILENT_CONSOLE", "") +ifeq ($(strip $(BR2_TARGET_UBOOT_SILENT)),y) + $(call insert_define, CONFIG_SILENT_CONSOLE,) endif @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE) touch $@
Signature · 1 line
1.5.6.4
PATCH 1/1 u-boot: fix wrong syntax in Makefile
In reply to Markus HeidelbergQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markus" == Markus Heidelberg <[email protected]> writes:
Markus> u-boot: fix wrong syntax in Makefile
Thanks, both patches are committed to trunk.
Signature · 1 line
Bye, Peter Korsgaard