[U-Boot] [RFC PATCH] IMX: Rename IMX image "SPL" to something else for Cygwin

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Jun 6 14:31:22 CEST 2014


I am not sure how much effort we should make
for building U-Boot on Cygwin.

Anyway, other than host programs, I notice file name problem.

Unlike Unix or Linux, on Windows upper/lower cases for file names
are not distinguished.

On Cygwin, for example, we cannot do this:

  $ mkdir abc
  $ mkdir ABC
  mkdir: cannot create directory `ABC': File exists

It causes some problems in U-Boot too.

For example,

  $ make mrproper
    CLEAN   SPL
  rm: cannot remove `SPL': Is a directory
  Makefile:1278: recipe for target 'clobber' failed
  make: *** [clobber] Error 1

  $ make qong_config
  Configuring for qong board...

  $ make clean
    CLEAN   arch/arm/imx-common
  rm: cannot remove `arch/arm/imx-common/../../../SPL': Is a directory
  scripts/Makefile.clean:79: recipe for target '__clean' failed
  make[1]: *** [__clean] Error 1
  Makefile:1256: recipe for target '_clean_arch/arm/imx-common' failed
  make: *** [_clean_arch/arm/imx-common] Error 2

I notice at least one file name conflict at the top directory.

  SPL - image for IMX
  spl - directory where SPL is built

This commit renames the former to a temporary name.

I guess there is few developers testing U-Boot on Cygwin.
If Cygwin support is mandatory, please consider to rename IMX image.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---

 .gitignore                   | 2 +-
 Makefile                     | 6 +++---
 arch/arm/config.mk           | 2 +-
 arch/arm/imx-common/Makefile | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4e4fd00..b68e4f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,7 @@
 # Top-level generic files
 #
 /MLO*
-/SPL
+/SPL__PLEASE_RENAME
 /System.map
 /u-boot*
 
diff --git a/Makefile b/Makefile
index aebee55..a6fe5d8 100644
--- a/Makefile
+++ b/Makefile
@@ -866,10 +866,10 @@ OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \
 tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
 	$(call if_changed,pad_cat)
 
-SPL: spl/u-boot-spl.bin FORCE
+SPL__PLEASE_RENAME: spl/u-boot-spl.bin FORCE
 	$(Q)$(MAKE) $(build)=arch/arm/imx-common $@
 
-u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE
+u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL__PLEASE_RENAME u-boot.bin FORCE
 	$(Q)$(MAKE) $(build)=arch/arm/imx-common $@
 
 MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
@@ -1221,7 +1221,7 @@ CLEAN_FILES += u-boot.lds include/bmp_logo.h include/bmp_logo_data.h \
 CLOBBER_DIRS  += $(patsubst %,spl/%, $(filter-out Makefile, \
 		 $(shell ls -1 spl 2>/dev/null))) \
 		 tpl
-CLOBBER_FILES += u-boot* MLO* SPL System.map
+CLOBBER_FILES += u-boot* MLO* SPL__PLEASE_RENAME System.map
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated          \
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 66ecc2e..e5bf171 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -119,7 +119,7 @@ endif
 ifneq ($(CONFIG_IMX_CONFIG),)
 ifdef CONFIG_SPL
 ifndef CONFIG_SPL_BUILD
-ALL-y += SPL
+ALL-y += SPL__PLEASE_RENAME
 endif
 else
 ifeq ($(CONFIG_OF_SEPARATE),y)
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index 016fb98..8bf4d20 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -50,7 +50,7 @@ endif
 MKIMAGEFLAGS_SPL = -n $(filter-out $< $(PHONY),$^) -T imximage \
 	-e $(CONFIG_SPL_TEXT_BASE)
 
-SPL: spl/u-boot-spl.bin $(IMX_CONFIG) FORCE
+SPL__PLEASE_RENAME: spl/u-boot-spl.bin $(IMX_CONFIG) FORCE
 	$(call if_changed,mkimage)
 
 MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
@@ -61,7 +61,7 @@ u-boot.uim: u-boot.bin FORCE
 
 OBJCOPYFLAGS += -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
 
-u-boot-with-spl.imx: SPL u-boot.uim FORCE
+u-boot-with-spl.imx: SPL__PLEASE_RENAME u-boot.uim FORCE
 	$(call if_changed,pad_cat)
 
 u-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx u-boot.uim FORCE
@@ -71,7 +71,7 @@ quiet_cmd_u-boot-nand-spl_imx = GEN     $@
 cmd_u-boot-nand-spl_imx = (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \
 	dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@
 
-spl/u-boot-nand-spl.imx: SPL FORCE
+spl/u-boot-nand-spl.imx: SPL__PLEASE_RENAME FORCE
 	$(call if_changed,u-boot-nand-spl_imx)
 
-targets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim spl/u-boot-nand-spl.imx)
+targets += $(addprefix ../../../,$(IMX_CONFIG) SPL__PLEASE_RENAME u-boot.uim spl/u-boot-nand-spl.imx)
-- 
1.9.1



More information about the U-Boot mailing list