The stock u-boot that come with the board does not support the onboard network card DM9000. This makes booting from tftp image impossible and cause much inconvenience.
To fix this, patch the source and recompile u-boot.
First, install the cross compiler cross-4.2.2-eabi.tar.bz2 supplied by the vendor:
mkdir -p /usr/local/arm tar -C /usr/local/arm -jxvf cross-4.2.2-eabi.tar.bz2
Extract the vendor supplied u-boot 1.1.6 source code.
Patch these files:
include/configs/smdk6410.hdrivers/dm9000x.c and dm9000x.hinclude/net.h
Download the patched files.
Extract the files to replace existing ones.
Modify cpu/s3c64xx/s3c6410/speed.c, if you want to replace the OEM banner.
# cpu/s3c64xx/s3c6410/speed.c
...
int print_cpuinfo(void)
{
printf("****************************************\r\n");
printf("** u-boot 1.1.6 **\r\n");
printf("** Updated for TE6410 Board **\r\n");
printf("** Version 1.0 (10-01-15) **\r\n");
printf("** OEM: Forlinx Embedded **\r\n");
printf("** Web: http://www.witech.com.cn **\r\n");
printf("****************************************\r\n");
...
After applied the patched files:
make clean make smdk6410_config make
Burn the resulting u-boot.bin to flash.
Diff for include/configs/smdk6410.h:
--- uboot1.1.6/include/configs/smdk6410.h 2010-01-08 15:44:14.000000000 +0800 +++ uboot1.1.6-forlinx/include/configs/smdk6410.h 2010-11-02 20:05:16.000000000 +0800 @@ -91,16 +91,13 @@ /* * Hardware drivers */ -//#define CONFIG_DRIVER_SMC911X 1 /* we have a SMC9115 on-board */ +#define CONFIG_DRIVER_DM9000 1 +#define CONFIG_DRIVER_DM9000_NO_EEPROM 1 +#define CONFIG_DM9000_USE_16BIT 1 +#define CONFIG_DM9000_BASE 0x18000300 +#define DM9000_IO CONFIG_DM9000_BASE +#define DM9000_DATA (CONFIG_DM9000_BASE+4) -#ifdef CONFIG_DRIVER_SMC911X -#undef CONFIG_DRIVER_CS8900 -#define CONFIG_DRIVER_SMC911X_BASE 0x18800300 -#else -#define CONFIG_DRIVER_CS8900 0 /* we have a CS8900 on-board */ -#define CS8900_BASE 0x18800300 -#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -#endif /* * select serial console configuration
Diff for include/net.h:
--- uboot1.1.6/include/net.h 2006-12-06 08:22:13.000000000 +0800
+++ uboot1.1.6-forlinx/include/net.h 2010-11-02 20:35:04.000000000 +0800
@@ -435,6 +435,31 @@
memcpy((void*)to, (void*)from, sizeof(ulong));
}
+
+/**
+ * is_zero_ether_addr - Determine if give Ethernet address is all zeros.
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Return true if the address is all zeroes.
+ */
+static inline int is_zero_ether_addr(const u8 *addr)
+{
+ return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
+}
+
+/**
+ * is_multicast_ether_addr - Determine if the Ethernet address is a multicast.
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Return true if the address is a multicast address.
+ * By definition the broadcast address is also a multicast address.
+ */
+static inline int is_multicast_ether_addr(const u8 *addr)
+{
+ return (0x01 & addr[0]);
+}
+
+
/* Convert an IP address to a string */
extern void ip_to_string (IPaddr_t x, char *s);