Re: u-boot & uImage on M5282LITE
Allon Stern <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
On Feb 20, 2008, at 12:45 PM, Loren A. Linden Levy wrote:
> Hi Allon,
>
> Thanks so much for this detailed description. I am working on applying
> the patch and building u-boot for the card. I do have one question
> though. In the README.m68k it says to edit the file
> board/m5282evb/config.mk and chenge TEXT_BASE. Did you also have to do
> this or am I missing something? Thanks.
Oh, you are right. I changed my TEXT_BASE to 0xF0000000.
Hm, a couple other things as well. I changed the compiler to m68k-
uclinux....
Let's see here, lemme do a more comprehensive diffing. This should do
it. My apologies:
diff -Nurp u-boot-1.3.1/board/m5282evb/config.mk u-boot/board/
m5282evb/config.mk
--- u-boot-1.3.1/board/m5282evb/config.mk 2007-12-06
04:21:19.000000000 -0500
+++ u-boot/board/m5282evb/config.mk 2008-01-29 22:43:01.000000000 -0500
@@ -22,4 +22,4 @@
# MA 02111-1307 USA
#
-TEXT_BASE = 0xFFE00000
+TEXT_BASE = 0xf0000000
diff -Nurp u-boot-1.3.1/include/configs/M5282EVB.h u-boot/include/
configs/M5282EVB.h
--- u-boot-1.3.1/include/configs/M5282EVB.h 2007-12-06
04:21:19.000000000 -0500
+++ u-boot/include/configs/M5282EVB.h 2008-02-18 16:44:01.000000000
-0500
@@ -48,8 +48,9 @@
/* Configuration for environment
* Environment is embedded in u-boot in the second sector of the flash
*/
-#define CFG_ENV_ADDR 0xffe04000
-#define CFG_ENV_SIZE 0x2000
+/*#define CFG_ENV_ADDR 0xffe04000*/
+#define CFG_ENV_ADDR 0xf0040000
+#define CFG_ENV_SIZE 0x4000
#define CFG_ENV_IS_IN_FLASH 1
/*
@@ -96,24 +97,19 @@
#define CONFIG_BOOTDELAY 5
#ifdef CONFIG_MCFFEC
# define CONFIG_ETHADDR 00:e0:0c:bc:e5:60
+#if 0
# define CONFIG_IPADDR 192.162.1.2
# define CONFIG_NETMASK 255.255.255.0
# define CONFIG_SERVERIP 192.162.1.1
# define CONFIG_GATEWAYIP 192.162.1.1
+#endif
# define CONFIG_OVERWRITE_ETHADDR_ONCE
#endif /* CONFIG_MCFFEC */
#define CONFIG_HOSTNAME M5272C3
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
- "loadaddr=10000\0" \
- "u-boot=u-boot.bin\0" \
- "load=tftp ${loadaddr) ${u-boot}\0" \
- "upd=run load; run prog\0" \
- "prog=prot off ffe00000 ffe3ffff;" \
- "era ffe00000 ffe3ffff;" \
- "cp.b ${loadaddr} ffe00000 ${filesize};"\
- "save\0" \
+ "loadaddr=FFC0\0" \
""
#define CFG_PROMPT "-> "
@@ -193,6 +189,8 @@
#define CFG_FLASH_CFI
#ifdef CFG_FLASH_CFI
+#define USE_EXTERNAL_FLASH
+#ifdef USE_EXTERNAL_FLASH
# define CFG_FLASH_CFI_DRIVER 1
# define CFG_FLASH_SIZE 0x1000000 /* Max size that the board might
have */
# define CFG_FLASH_CFI_WIDTH FLASH_CFI_16BIT
@@ -201,8 +199,19 @@
# define CFG_FLASH_PROTECTION /* "Real" (hardware) sectors
protection */
# define CFG_FLASH_CHECKSUM
# define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE }
+#else
+# define CFG_FLASH_CFI_DRIVER 1
+# define CFG_FLASH_SIZE 0x80000 /* Max size that the board might
have */
+# define CFG_FLASH_CFI_WIDTH FLASH_CFI_32BIT
+# define CFG_MAX_FLASH_BANKS 8 /* max number of memory banks */
+# define CFG_MAX_FLASH_SECT 32 /* max number of sectors on one chip */
+# define CFG_FLASH_PROTECTION /* "Real" (hardware) sectors
protection */
+# define CFG_FLASH_CHECKSUM
+# define CFG_FLASH_BANKS_LIST { CFG_INT_FLASH_BASE }
+#endif
#endif
+
/
*-----------------------------------------------------------------------
* Cache Configuration
*/
diff -Nurp u-boot-1.3.1/m68k_config.mk u-boot/m68k_config.mk
--- u-boot-1.3.1/m68k_config.mk 2007-12-06 04:21:19.000000000 -0500
+++ u-boot/m68k_config.mk 2008-02-18 19:14:43.000000000 -0500
@@ -21,5 +21,5 @@
# MA 02111-1307 USA
#
-PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
+PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__ -m528x
PLATFORM_LDFLAGS += -n
diff -Nurp u-boot-1.3.1/Makefile u-boot/Makefile
--- u-boot-1.3.1/Makefile 2007-12-06 04:21:19.000000000 -0500
+++ u-boot/Makefile 2008-01-07 16:18:09.000000000 -0500
@@ -1,4 +1,4 @@
-#
+
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, [email protected].
#
@@ -126,7 +126,8 @@ ifeq ($(ARCH),ppc)
CROSS_COMPILE = ppc_8xx-
endif
ifeq ($(ARCH),arm)
CROSS_COMPILE = arm-linux-
endif
ifeq ($(ARCH),i386)
CROSS_COMPILE = i386-linux-
@@ -141,7 +142,7 @@ ifeq ($(ARCH),nios2)
CROSS_COMPILE = nios2-elf-
endif
ifeq ($(ARCH),m68k)
-CROSS_COMPILE = m68k-elf-
+CROSS_COMPILE = m68k-uclinux-
endif
ifeq ($(ARCH),microblaze)
CROSS_COMPILE = mb-
-
allon