Re: u-boot & uImage on M5282LITE

"Loren A. Linden Levy" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Organization University of Colorado
Message-ID <[email protected]>
Hi Allon,

So thanks to you I have the internal flash booting a uclinux image for
me! And I am also able to switch back to dBUG. I have another question
for you do you have the network working for a 2.6 kernel? Which
version (date) of uClinux are you using? Which compiler tool chain?
Thanks.


Alex

On Wed, 20 Feb 2008 13:10:38 -0500
Allon Stern <[email protected]> wrote:

> 
> 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

-- 
 -- 
---------------------------------------------
Loren A. Linden Levy
Department of Physics 
390 UCB 
University of Colorado
Boulder, CO   80309-0390
Tel:   303-735-6146 (CU) / +049 040 8998 4789 (DESY) 
Fax:   303-492-3352 (CU) / +049 040 8998 4034 (DESY) 
Cell:  303-332-2768 (U.S.) / +049 (0)151 5496 1831 (Germany)
Email: [email protected]
url:   http://up.colorado.edu/~lindenle
_____________________________________________
---------------------------------------------
This email has been cryptographically signed.
Search for "lindenle" at pgp.mit.edu
to obtain my public key which can be used 
to verify the authenticity of this message.
_____________________________________________
---------------------------------------------
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHvJBxlZX6YS+3ZksRAnDgAJ45NleiyyMeVqxKWatjEmCB/i92RACgoKWa
5gDpQpeLp22uXudZMY9sAJg=
=jZ91
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.