Added config parameters for u-boot client IP address as well as TFTP server IP address.

SVN-Revision: 7632
lede-17.01
Hamish Guthrie 2007-06-14 13:46:24 +00:00
parent 8ed6f00352
commit ff17ac5ec3
5 changed files with 61 additions and 9 deletions

View File

@ -1,8 +1,3 @@
config AT91_ROMBOOT
bool "Build romboot loader"
depends LINUX_2_6_AT91
default y
config AT91_DFBOOT
bool "Build dataflashboot loader"
depends LINUX_2_6_AT91
@ -16,9 +11,25 @@ config AT91_UBOOT
config UBOOT_TARGET
string "U-Boot Board Configuration"
depends LINUX_2_6_AT91
depends AT91_UBOOT
default "vlink"
help
For all supported boards there are reqdy-to-use default
For all supported boards there are ready-to-use default
configurations available; just type "<board_name>".
config UBOOT_IPADDR
string "IP Address for U-Boot"
depends LINUX_2_6_AT91
depends AT91_UBOOT
default "192.168.0.178"
help
IP address of device to be used in U-Boot
config UBOOT_SERVERIP
string "IP Address of TFTP server"
depends LINUX_2_6_AT91
depends AT91_UBOOT
default "192.168.0.232"
help
IP address of TFTP server for U-Boot

View File

@ -22,13 +22,19 @@ PKG_CAT:=bzcat
include $(INCLUDE_DIR)/package.mk
UBOOT_CONFIG=$(strip $(subst ",, $(CONFIG_UBOOT_TARGET)))
LAN_IP=$(strip $(CONFIG_UBOOT_IPADDR))
LAN_SERVERIP=$(strip $(subst ",, $(CONFIG_UBOOT_SERVERIP)))
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIG)_config
export CROSS_COMPILE=$(TARGET_CROSS); \
export LAN_IP=$(LAN_IP); \
export LAN_SERVERIP=$(LAN_SERVERIP); \
$(MAKE) -C $(PKG_BUILD_DIR)
mkdir -p $(PKG_BUILD_DIR)/ubclient
$(CP) ./ubclient/* $(PKG_BUILD_DIR)/ubclient
export LAN_IP=$(LAN_IP); \
export LAN_SERVERIP=$(LAN_SERVERIP); \
$(MAKE) -C $(PKG_BUILD_DIR)/ubclient \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -Dtarget_$(BOARD)=1"

View File

@ -0,0 +1,24 @@
--- u-boot-1.1.4.old/tools/Makefile 2007-06-13 13:35:59.000000000 +0200
+++ u-boot-1.1.4/tools/Makefile 2007-06-14 15:33:04.000000000 +0200
@@ -153,7 +153,7 @@
$(STRIP) $@
ubparams.o: ubparams.c
- $(CC) -g $(CFLAGS) -c $<
+ $(CC) -g $(CFLAGS) -DLAN_IP=$(LAN_IP) -DLAN_SERVERIP=$(LAN_SERVERIP) -c $<
envcrc.o: envcrc.c
$(CC) -g $(CFLAGS) -c $<
--- u-boot-1.1.4.old/tools/ubparams.c 2007-06-13 13:35:59.000000000 +0200
+++ u-boot-1.1.4/tools/ubparams.c 2007-06-14 15:31:55.000000000 +0200
@@ -44,8 +44,8 @@
"bootargs=setenv bootargs root=/dev/mtdblock3 ro init=/etc/preinit console=/dev/ttyS0,115200,mem=32M\0"
"bootcmd=bootm 0xc0042000\0"
"ethaddr=00:30:49:00:00:01\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"
"serial#=MX070205484\0"
"\0"
};

View File

@ -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 $@ $^

View File

@ -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"
};