[U-Boot] [PATCH 1/2] MX28: config: Allow different target generation in elftosb call

The elftosb call needs to use a target param specific for i.MX28. This patch allow for later addition of i.MX233.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Makefile | 5 ++++- arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} (100%)
diff --git a/Makefile b/Makefile index f6471e2..5f11bb7 100644 --- a/Makefile +++ b/Makefile @@ -452,8 +452,11 @@ $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > \ $(obj)u-boot.ais
+# Specify the target for use in elftosb call +ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 + $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin - elftosb -zdf imx28 -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd \ + elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd.$(ELFTOSB_TARGET-y) \ -o $(obj)u-boot.sb
# On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot.bd b/arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28 similarity index 100% rename from arch/arm/cpu/arm926ejs/mxs/u-boot.bd rename to arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28

For i.MX233 addition the base registers need to be change so the SoC definition needs to be known before the header include.
The following boards has been changed:
* apx4devkit * m28evk * mx28evk * sc_sps_1
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- include/configs/apx4devkit.h | 4 ++-- include/configs/m28evk.h | 4 ++-- include/configs/mx28evk.h | 5 +++-- include/configs/sc_sps_1.h | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h index b5ae44f..af0b714 100644 --- a/include/configs/apx4devkit.h +++ b/include/configs/apx4devkit.h @@ -22,8 +22,6 @@ #ifndef __CONFIG_H #define __CONFIG_H
-#include <asm/arch/regs-base.h> - /* SoC configurations */ #define CONFIG_MX28 /* i.MX28 SoC */ #define CONFIG_MXS_GPIO /* GPIO control */ @@ -32,6 +30,8 @@ #define MACH_TYPE_APX4DEVKIT 3712 #define CONFIG_MACH_TYPE MACH_TYPE_APX4DEVKIT
+#include <asm/arch/regs-base.h> + #define CONFIG_SYS_NO_FLASH #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_CPU_INIT diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index b3ac316..91c6bb9 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -20,8 +20,6 @@ #ifndef __M28EVK_CONFIG_H__ #define __M28EVK_CONFIG_H__
-#include <asm/arch/regs-base.h> - /* * SoC configurations */ @@ -36,6 +34,8 @@
#define CONFIG_MACH_TYPE MACH_TYPE_M28EVK
+#include <asm/arch/regs-base.h> + #define CONFIG_SYS_NO_FLASH #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_MISC_INIT diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 4e70617..ac06caf 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -19,17 +19,18 @@ #ifndef __MX28EVK_CONFIG_H__ #define __MX28EVK_CONFIG_H__
-#include <asm/arch/regs-base.h> - /* * SoC configurations */ #define CONFIG_MX28 /* i.MX28 SoC */ + #define CONFIG_MXS_GPIO /* GPIO control */ #define CONFIG_SYS_HZ 1000 /* Ticks per second */
#define CONFIG_MACH_TYPE MACH_TYPE_MX28EVK
+#include <asm/arch/regs-base.h> + #define CONFIG_SYS_NO_FLASH #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_MISC_INIT diff --git a/include/configs/sc_sps_1.h b/include/configs/sc_sps_1.h index f0b6f2b..0ebdfb8 100644 --- a/include/configs/sc_sps_1.h +++ b/include/configs/sc_sps_1.h @@ -22,8 +22,6 @@ #ifndef __SC_SPS_1_H__ #define __SC_SPS_1_H__
-#include <asm/arch/regs-base.h> - /* * SoC configurations */ @@ -38,6 +36,8 @@
#define CONFIG_MACH_TYPE MACH_TYPE_SC_SPS_1
+#include <asm/arch/regs-base.h> + #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_ICACHE_OFF #define CONFIG_SYS_DCACHE_OFF

On 15/08/2012 20:51, Otavio Salvador wrote:
For i.MX233 addition the base registers need to be change so the SoC definition needs to be known before the header include.
The following boards has been changed:
- apx4devkit
- m28evk
- mx28evk
- sc_sps_1
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
include/configs/apx4devkit.h | 4 ++-- include/configs/m28evk.h | 4 ++-- include/configs/mx28evk.h | 5 +++-- include/configs/sc_sps_1.h | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h index b5ae44f..af0b714 100644 --- a/include/configs/apx4devkit.h +++ b/include/configs/apx4devkit.h @@ -22,8 +22,6 @@ #ifndef __CONFIG_H #define __CONFIG_H
-#include <asm/arch/regs-base.h>
We use the same "trick" for i.MX5.
You miss Veli-Pekka as maintainer for apx4devkit, I have added it, but you get here my:
Acked-by: Stefano Babic sbabic@denx.de
Best regards, Stefano Babic

Dear Otavio Salvador,
For i.MX233 addition the base registers need to be change so the SoC definition needs to be known before the header include.
The following boards has been changed:
- apx4devkit
- m28evk
- mx28evk
- sc_sps_1
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
include/configs/apx4devkit.h | 4 ++-- include/configs/m28evk.h | 4 ++-- include/configs/mx28evk.h | 5 +++-- include/configs/sc_sps_1.h | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
Seems ok to me
Best regards, Marek Vasut

On 15/08/2012 20:51, Otavio Salvador wrote:
The elftosb call needs to use a target param specific for i.MX28. This patch allow for later addition of i.MX233.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Makefile | 5 ++++- arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} (100%)
diff --git a/Makefile b/Makefile index f6471e2..5f11bb7 100644 --- a/Makefile +++ b/Makefile @@ -452,8 +452,11 @@ $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > \ $(obj)u-boot.ais
+# Specify the target for use in elftosb call +ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd \
elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd.$(ELFTOSB_TARGET-y) \ -o $(obj)u-boot.sb
# On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot.bd b/arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28 similarity index 100% rename from arch/arm/cpu/arm926ejs/mxs/u-boot.bd rename to arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28
IMHO it looks good
Acked-by: Stefano Babic sbabic@denx.de
Best regards, Stefano Babic

Dear Otavio Salvador,
The elftosb call needs to use a target param specific for i.MX28. This patch allow for later addition of i.MX233.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Makefile | 5 ++++- arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename arch/arm/cpu/arm926ejs/mxs/{u-boot.bd => u-boot.bd.imx28} (100%)
diff --git a/Makefile b/Makefile index f6471e2..5f11bb7 100644 --- a/Makefile +++ b/Makefile @@ -452,8 +452,11 @@ $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > \ $(obj)u-boot.ais
+# Specify the target for use in elftosb call +ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd \
elftosb -zdf $(ELFTOSB_TARGET-y) -c
$(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd.$(ELFTOSB_TARGET-y) \ -o $(obj)u-boot.sb
Swap this to u-boot.$(ELFTOSB_TARGET-y).bd ... so the .bd suffix is always at the end.
# On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot.bd b/arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28 similarity index 100% rename from arch/arm/cpu/arm926ejs/mxs/u-boot.bd rename to arch/arm/cpu/arm926ejs/mxs/u-boot.bd.imx28
Best regards, Marek Vasut
participants (3)
-
Marek Vasut
-
Otavio Salvador
-
Stefano Babic