summaryrefslogtreecommitdiff
path: root/target/linux/at91-2.6/image/u-boot/ubclient
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/at91-2.6/image/u-boot/ubclient')
-rw-r--r--target/linux/at91-2.6/image/u-boot/ubclient/Makefile2
-rw-r--r--target/linux/at91-2.6/image/u-boot/ubclient/ubpar.c15
2 files changed, 14 insertions, 3 deletions
diff --git a/target/linux/at91-2.6/image/u-boot/ubclient/Makefile b/target/linux/at91-2.6/image/u-boot/ubclient/Makefile
index c79260e450..f8ff67cd18 100644
--- a/target/linux/at91-2.6/image/u-boot/ubclient/Makefile
+++ b/target/linux/at91-2.6/image/u-boot/ubclient/Makefile
@@ -6,7 +6,7 @@ crc32.c:
ln -s ../lib_generic/crc32.c ./
%.o: %.c
- $(CC) -I ../include $(CFLAGS) $(EXTRA_FLAGS) -c -o $@ $^
+ $(CC) -I ../include $(CFLAGS) $(EXTRA_FLAGS) -DLAN_IP=$(LAN_IP) -DLAN_SERVERIP=$(LAN_SERVERIP) -c -o $@ $^
ubpar: ubpar.o crc32.o
$(CC) -o $@ $^
diff --git a/target/linux/at91-2.6/image/u-boot/ubclient/ubpar.c b/target/linux/at91-2.6/image/u-boot/ubclient/ubpar.c
index 228a578a61..3f6c070017 100644
--- a/target/linux/at91-2.6/image/u-boot/ubclient/ubpar.c
+++ b/target/linux/at91-2.6/image/u-boot/ubclient/ubpar.c
@@ -29,6 +29,17 @@ extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned int);
#define ENV_CRC ~0
#endif
+#ifdef LAN_IP
+ #warning LAN_IP
+#else
+ #warning LAN_IP NOT DEFINED
+#endif
+#ifdef LAN_SERVERIP
+ #warning LAN_SERVERIP
+#else
+ #warning LAN_SERVERIP NOT DEFINED
+#endif
+
static char *environment[] = {
"bootdelay=3\0"
"baudrate=115200\0"
@@ -41,8 +52,8 @@ static char *environment[] = {
"flash=run fbargs; bootm 0xc0042000\0"
"bootargs=setenv bootargs root=/dev/mtdblock3 ro init=/etc/preinit console=/dev/ttyS0,115200,mem=32M\0"
"bootcmd=bootm 0xc0042000\0"
- "ipaddr=10.0.1.73\0"
- "serverip=10.0.1.210\0"
+ "ipaddr=" MK_STR(LAN_IP) "\0"
+ "serverip=" MK_STR(LAN_SERVERIP) "\0"
"\0"
};