[U-Boot-Users] Compile Error : kb9202 board!

Wolfgang Denk wd at denx.de
Thu Mar 8 21:31:13 CET 2007


In message <250873.85581.qm at web36510.mail.mud.yahoo.com> you wrote:
>
> i do a make kb9202_config. an error occurs when i do a
> make

This board seems to be unmaintained. A patch that might fix your
problem was sent to my private address by some, but when I asked the
guys to go the offical way (i. e. submit it to the mailing list) I
never heard anything again.

I'll attach the patch below - Peter, maybe you can have a look at it,
please.

| Hello,
| Will you please submit the enclosed patch for KwikByte KB9202B board?
| Thank you,
| KwikByte Dev Team
| 
| 
| CHANGELOG:
| 	Changes apply to KB920x boards
| 	- Fixed build error caused by bad value for CFG_MALLOC_LEN.
| 	- Added late init function to set the MAC for the kernel.
| 	- Updated board defines for additional SDRAM (64MB).
| 	Patch by KB920x Dev Team (kb9200_dev at kwikbyte.com), 03 Oct 2006

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"When people are least sure, they are often most dogmatic."
- John Kenneth Galbraith

-------------- next part --------------
diff -urN u-boot/board/kb9202/kb9202.c u-boot.new/board/kb9202/kb9202.c
--- u-boot/board/kb9202/kb9202.c	2006-04-05 15:08:49.000000000 -0700
+++ u-boot.new/board/kb9202/kb9202.c	2006-10-03 13:50:52.000000000 -0700
@@ -31,6 +31,8 @@
 #include <at91rm9200_net.h>
 #include <lxt971a.h>
 
+extern int eth_init (bd_t * bd);
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
@@ -64,6 +66,19 @@
 	return 0;
 }
 
+int board_late_init (void)
+{
+	/* make sure MAC is set */
+#ifdef CONFIG_DRIVER_ETHER
+#if (CONFIG_COMMANDS & CFG_CMD_NET)
+	if (getenv ("ethaddr")) {
+		return (eth_init(gd->bd));
+	}
+#endif
+#endif
+	return 0;
+}
+
 #ifdef CONFIG_DRIVER_ETHER
 #if (CONFIG_COMMANDS & CFG_CMD_NET)
 
diff -urN u-boot/include/configs/kb9202.h u-boot.new/include/configs/kb9202.h
--- u-boot/include/configs/kb9202.h	2005-10-05 16:23:26.000000000 -0700
+++ u-boot.new/include/configs/kb9202.h	2006-10-03 13:35:25.000000000 -0700
@@ -38,9 +38,10 @@
 #define CONFIG_ARM920T		1	/* This is an ARM920T Core	*/
 #define CONFIG_AT91RM9200	1	/* It's an Atmel AT91RM9200 SoC	*/
 /* Only define one of the following, based on board type		*/
-/* #define	CONFIG_KB9200		1	 KwikByte KB9202 board	*/
-/* #define	CONFIG_KB9201		1	 KwikByte KB9202 board	*/
-#define	CONFIG_KB9202		1	/* KwikByte KB9202 board	*/
+/* #define	CONFIG_KB9200		1	 KwikByte KB9200 board	*/
+/* #define	CONFIG_KB9201		1	 KwikByte KB9201 board	*/
+/* #define	CONFIG_KB9202		1	 KwikByte KB9202 board	*/
+#define CONFIG_KB9202B		1	/* KwikByte KB9202B board	*/
 
 #define	CONFIG_KB920x		1	/* Any KB920x board		*/
 #undef  CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
@@ -54,10 +55,17 @@
 
 #define	CFG_LONGHELP
 
+#define	BOARD_LATE_INIT
+
+#ifdef CONFIG_KB9202B
+#define	CONFIG_BOOTARGS	"console=ttyS0,115200 noinitrd root=/dev/mtdblock0 rootfstype=jffs2 mem=64M"
+#define	CONFIG_BOOTCOMMAND	"bootm 0x10000000"
+#endif
+
 /*
  * Size of malloc() pool
  */
-#define CFG_MALLOC_LEN	(CFG_ENV_SIZE + 128*1024)
+#define CFG_MALLOC_LEN	(128*1024)
 #define CFG_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE 115200
@@ -75,14 +83,16 @@
 
 #undef	CONFIG_MODEM_SUPPORT		/* disable modem initialization stuff */
 
-#define CONFIG_BOOTDELAY	3
+#define CONFIG_BOOTDELAY	1
 #define CONFIG_ENV_OVERWRITE	1
 
 #define CONFIG_COMMANDS		\
 		       ((CONFIG_CMD_DFL | \
 		        CFG_CMD_I2C | \
+		        CFG_CMD_EEPROM | \
 			CFG_CMD_PING | \
-			CFG_CMD_DHCP ) & \
+			CFG_CMD_DHCP | \
+			CFG_CMD_JFFS2) & \
 		      ~(CFG_CMD_BDI | \
 			CFG_CMD_FPGA | \
 			CFG_CMD_MISC))
@@ -92,17 +102,21 @@
 
 #define CONFIG_NR_DRAM_BANKS 1
 #define PHYS_SDRAM 0x20000000
+#ifdef CONFIG_KB9202B
+#define	PHYS_SDRAM_SIZE	0x4000000  /* 64 megs */
+#else
 #define PHYS_SDRAM_SIZE 0x2000000  /* 32 megs */
+#endif
 
 #define CFG_MEMTEST_START		PHYS_SDRAM
-#define CFG_MEMTEST_END			CFG_MEMTEST_START + PHYS_SDRAM_SIZE - (512*1024)
+#define CFG_MEMTEST_END			CFG_MEMTEST_START + 0x1000000
 
 #define CONFIG_DRIVER_ETHER
 #define CONFIG_NET_RETRY_COUNT		20
 
 #define CFG_FLASH_BASE			0x10000000
 
-#ifdef CONFIG_KB9202
+#if defined(CONFIG_KB9202) || defined(CONFIG_KB9202B)
 #define PHYS_FLASH_SIZE			0x1000000
 #else
 #define PHYS_FLASH_SIZE			0x200000
@@ -115,9 +129,9 @@
 
 #define	CFG_ENV_IS_IN_EEPROM
 
-#ifdef CONFIG_KB9202
-#define CFG_ENV_OFFSET			0x3E00
-#define CFG_ENV_SIZE			0x0200
+#if defined(CONFIG_KB9202) || defined(CONFIG_KB9202B)
+#define CFG_ENV_OFFSET			0x2000
+#define CFG_ENV_SIZE			0x2000
 #else
 #define CFG_ENV_OFFSET			0x1000
 #define CFG_ENV_SIZE			0x1000


More information about the U-Boot mailing list