[U-Boot-Users] Re: [Pacth]Some fixes on RPXlite DW

Sam Song samsongshu at yahoo.com.cn
Tue Aug 31 04:19:35 CEST 2004


 Sam Song <samsongshu at yahoo.com.cn> wrote:
> Hi,
> 
> I got a nudge from some folk chatting with Wolfgang 
> about RESET and did this patch. All for RPXlite_DW
> board.
> 
> * Patch by Sam Song, 21 August 2004:
>   - Add RESET support for RPXlite_DW board
>   - Adjust CPU:BUS frequency rato 1:1 when core
> frequency less than 50MHz

OK, I give up this patch for it as updated as follows
and all against CVS:

* Patch by Sam Song, 31 August 2004:
   - Updating RPXlite_DW board on RESET/PREBOOT

Index: board/RPXlite_dw/README
===================================================================
RCS file:
/cvsroot/u-boot/u-boot/board/RPXlite_dw/README,v
retrieving revision 1.1
diff -p -u -r1.1 README
--- board/RPXlite_dw/README	9 Jun 2004 21:04:49 -0000
1.1
+++ board/RPXlite_dw/README	31 Aug 2004 01:58:04 -0000
@@ -2,9 +2,9 @@
 After following the step of Yoo. Jonghoon and
Wolfgang Denk,
 I ported u-boot on RPXlite DW version board:
RPXlite_DW or LITE_DW.
 
-There are three differences between the Yoo-ported
RPXlite and the RPXlite_DW.
+There are at least three differences between the
Yoo-ported RPXlite and the RPXlite_DW.
 
-Board(in U-BOOT)	version(in EmbeddedPlanet)	CPU	SDRAM
FLASH
+Board(in U-Boot)	version(in EmbeddedPlanet)	CPU	SDRAM
FLASH
 RPXlite				RPXlite CW		850	16MB	4MB
 RPXlite_DW			RPXlite DW		823e	64MB	16MB
 
@@ -17,6 +17,7 @@ It has the following three features:
 The default setting is 48MHz.To get a 64MHz
u-boot,just add
 '64' in make command,like
 
+make distclean
 make RPXlite_DW_64_config
 make all
 
@@ -28,19 +29,21 @@ didn't use EEPROM for ENV is that
Planet
 home.Because of the possibility of using two
firewares on this board,I didn't
 'disturb' EEPROM.To get NVRAM support,you may use the
following build command:
 
+make distclean
 make RPXlite_DW_NVRAM_config
 make all
 
 3. LCD panel support
 
-To support the Platform better,I added LCD
panel(NL6448BC20-08) function.But bewear of
-the fact that once you build this support and program
it to FLASH,you should make sure
-you put workable kernel and ramdisk at the right
place in FLASH or through NFS.
-Otherwise, you must erase this fireware manually via
BDI2000 or ICE tools.So this
-function is used for deployment and demo only.Pls
look before you leap.
+To support the Platform better, I added LCD
panel(NL6448BC20-08) function.
+For the convenience of debug, CONFIG_PERBOOT was
supported. So you just
+perss ENTER if you want to get a serial console in
boot count down.
+Then you can switch to LCD and serial console freely
just typing 
+'run lcd' or 'run ser'. They are only vaild when
CONFIG_LCD was enabled.
 
 To get a LCD support u-boot,you can do the following:
 
+make distclean
 make RPXlite_DW_LCD_config
 make all
 
@@ -68,7 +71,7 @@ make RPXlite_DW_64_LCD_config
 
 The boot process by "make RPXlite_DW_config" could
be:
 
-U-Boot 1.1.1 (Jun  8 2004 - 11:16:30)
+U-Boot 1.1.2 (Aug 29 2004 - 15:11:27)
 
 CPU:   PPC823EZTnnB2 at 48 MHz: 16 kB I-Cache 8 kB
D-Cache
 Board: RPXlite_DW
@@ -84,6 +87,64 @@ u-boot>
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+A word on the U-Boot enviroment variable setting and
usage :
+
+In the beginning, you could just need very simple
defult environment variable setting,
+like[include/configs/RPXlite.h] :
+
+#define CONFIG_BOOTCOMMAND                           
                          \
+        "bootp; "                                    
                          \
+        "setenv bootargs root=/dev/nfs rw
nfsroot=$(serverip):$(rootpath) "     \
+       
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;
"   \
+        "bootm"
+
+This is enough for kernel NFS test. But as debug
process goes on, you would expect 
+to save some time on environment variable setting and
u-boot/kernel updating.
+So the default environment variable setting would
become more complicated. Just like
+the one I did in include/configs/RPXlite_DW.h.
+
+Two u-boot commands, ku and uu, should be careful to
use. They were designed to update
+kernel and u-boot image file respectively. You must
tftp your image to default address 
+'100000' and then use them correctly. Yeah, you can
create your own command to do this
+job. :-) The example u-boot image updating process
could be :
+
+u-boot>t 100000 RPXlite_DW_LCD.bin
+Using SCC ETHERNET device
+TFTP from server 172.16.115.6; our IP address is
172.16.115.7
+Filename 'RPXlite_DW_LCD.bin'.
+Load address: 0x100000
+Loading: #############################
+done
+Bytes transferred = 144700 (2353c hex)
+u-boot>run uu
+Un-Protect Flash Sectors 0-4 in Bank # 1
+Erase Flash Sectors 0-4 in Bank # 1
+.... done
+Copy to Flash... done
+ff000000: 27051956 552d426f 6f742031 2e312e32   
'..VU-Boot 1.1.2
+ff000010: 20284175 67203239 20323030 34202d20    
(Aug 29 2004 -
+ff000020: 31353a32 303a3238 29000000 00000000   
15:20:28).......
+ff000030: 00000000 00000000 00000000 00000000   
................
+ff000040: 00000000 00000000 00000000 00000000   
................
+ff000050: 00000000 00000000 00000000 00000000   
................
+ff000060: 00000000 00000000 00000000 00000000   
................
+ff000070: 00000000 00000000 00000000 00000000   
................
+ff000080: 00000000 00000000 00000000 00000000   
................
+ff000090: 00000000 00000000 00000000 00000000   
................
+ff0000a0: 00000000 00000000 00000000 00000000   
................
+ff0000b0: 00000000 00000000 00000000 00000000   
................
+ff0000c0: 00000000 00000000 00000000 00000000   
................
+ff0000d0: 00000000 00000000 00000000 00000000   
................
+ff0000e0: 00000000 00000000 00000000 00000000   
................
+ff0000f0: 00000000 00000000 00000000 00000000   
................
+u-boot updating finished
+u-boot>
+
+Also for environment updating, 'run eu' could let you
erase OLD default environment variable
+and then use the working u-boot environment setting.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 I'd like to extend my heartfelt gratitute to kind
people for helping me work it out.
 I would particually thank Wolfgang Denk for his nice
help.
 
@@ -93,4 +154,4 @@ Sam Song, samsongshu at yahoo.com.cn
 Institute of Electrical Machinery and Controls
 Shanghai University
 
-June 8,2004
+August 29,2004
Index: include/configs/RPXlite_DW.h
===================================================================
RCS file:
/cvsroot/u-boot/u-boot/include/configs/RPXlite_DW.h,v
retrieving revision 1.2
diff -p -u -r1.2 RPXlite_DW.h
--- include/configs/RPXlite_DW.h	19 Jun 2004 21:19:13
-0000	1.2
+++ include/configs/RPXlite_DW.h	31 Aug 2004 01:58:21
-0000
@@ -60,18 +60,20 @@
 #define CONFIG_BAUDRATE		9600	/* console default
baudrate = 9600bps	*/
 
 #ifdef	CONFIG_LCD
-#define CONFIG_BOOTDELAY	12	/* autoboot after 12
seconds	*/
+#define CONFIG_BOOTDELAY	6	/* autoboot after 12
seconds	*/
 #else
 #define CONFIG_BOOTDELAY	-1	/* autoboot disabled		*/
 #endif
 
+/* pre-boot commands */
+#define CONFIG_PREBOOT          "setenv stdout
serial;setenv stdin serial"
+
 #undef	CONFIG_BOOTARGS
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
-	"nfsargs=setenv bootargs console=ttyS0,9600
root=/dev/nfs rw "	\
-		"nfsroot=$(serverip):$(rootpath)\0"			\
-	"ramargs=setenv bootargs console=tty0
console=ttyS0,9600 "	\
-		"root=/dev/ram rw\0"					\
+	"nfsargs=setenv bootargs console=tty0
console=ttyS0,9600 "	\
+		"root=/dev/nfs rw
nfsroot=$(serverip):$(rootpath)\0"	\
+	"ramargs=setenv bootargs console=tty0 root=/dev/ram
rw\0"	\
 	"addip=setenv bootargs $(bootargs) "				\
 		"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"
\
 		":$(hostname):$(netdev):off panic=1\0"			\
@@ -82,9 +84,19 @@
 	"net_nfs=tftp 200000 $(bootfile);run nfsargs
addip;bootm\0"	\
 	"gatewayip=172.16.115.254\0"					\
 	"netmask=255.255.255.0\0"					\
-	"kernel_addr=ff880000\0"					\
-	"ramdisk_addr=ff980000\0"					\
-	""
+	"kernel_addr=ff040000\0"					\
+	"ramdisk_addr=ff200000\0"					\
+	"ku=era $(kernel_addr) ff1fffff;cp.b 100000
$(kernel_addr) "	\
+		"$(filesize);md $(kernel_addr);"			\
+		"echo kernel updating finished\0"			\
+	"uu=protect off 1:0-4;era 1:0-4;cp.b 100000 ff000000
"		\
+		"$(filesize);md ff000000;"				\
+		"echo u-boot updating finished\0"			\
+	"eu=protect off 1:6;era 1:6;reset\0"				\
+	"lcd=setenv stdout lcd;setenv stdin lcd\0"			\
+	"ser=setenv stdout serial;setenv stdin serial\0"		\
+	"verify=no"
+	
 #define CONFIG_BOOTCOMMAND	"run flash_self"
 
 #define CONFIG_LOADS_ECHO	1	/* echo on for serial
download	*/
@@ -178,6 +190,8 @@
 #define CFG_ENV_SIZE		0x8000	/* Total Size of
Environment Sector	*/
 #endif
 
+#define CFG_RESET_ADDRESS	((ulong)((((immap_t
*)CFG_IMMR)->im_clkrst.res)))
+	

/*-----------------------------------------------------------------------
  * Cache Configuration
  */
@@ -249,9 +263,12 @@
  * power management and some other internal clocks
  */
 #define SCCR_MASK	SCCR_EBDF00
-/* Up to 64MHz system clock, we use 1:2 SYSTEM/BUS
ratio */
+/* Up to 48MHz system clock, we use 1:1 SYSTEM/BUS
ratio */
+#if defined(RPXlite_64MHz)
 #define CFG_SCCR	( SCCR_TBS | SCCR_EBDF01 )  /*
%%%SCCR:0x02020000 */
-
+#else
+#define CFG_SCCR        ( SCCR_TBS | SCCR_EBDF00 ) 
/* %%%SCCR:0x02000000 */
+#endif

/*-----------------------------------------------------------------------
  * PCMCIA stuff
 
*-----------------------------------------------------------------------



_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/




More information about the U-Boot mailing list