Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
fe389a82
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe389a82
编写于
8月 28, 2003
作者:
S
stroese
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Added CONFIG_BOOTP_DNS2 and CONFIG_BOOTP_SEND_HOSTNAME to CONFIG_BOOTP_MASK.
上级
d94f92cb
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
74 addition
and
13 deletion
+74
-13
README
README
+24
-0
common/cmd_net.c
common/cmd_net.c
+7
-0
include/cmd_confdefs.h
include/cmd_confdefs.h
+2
-0
include/configs/CPCI405.h
include/configs/CPCI405.h
+4
-6
include/configs/CPCI4052.h
include/configs/CPCI4052.h
+4
-6
include/configs/CPCI405AB.h
include/configs/CPCI405AB.h
+4
-1
include/net.h
include/net.h
+3
-0
net/bootp.c
net/bootp.c
+23
-0
net/net.c
net/net.c
+3
-0
未找到文件。
README
浏览文件 @
fe389a82
...
...
@@ -901,6 +901,29 @@ The following options need to be configured:
4th and following
BOOTP requests: delay 0 ... 8 sec
- DHCP Advanced Options:
CONFIG_BOOTP_MASK
You can fine tune the DHCP functionality by adding
these flags to the CONFIG_BOOTP_MASK define:
CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS
serverip from a DHCP server, it is possible that more
than one DNS serverip is offered to the client.
If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
serverip will be stored in the additional environment
variable "dnsip2". The first DNS serverip is always
stored in the variable "dnsip", when CONFIG_BOOTP_DNS
is added to the CONFIG_BOOTP_MASK.
CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable
to do a dynamic update of a DNS server. To do this, they
need the hostname of the DHCP requester.
If CONFIG_BOOP_SEND_HOSTNAME is added to the
CONFIG_BOOTP_MASK, the content of the "hostname"
environment variable is passed as option 12 to
the DHCP server.
- Status LED: CONFIG_STATUS_LED
Several configurations allow to display the current
...
...
@@ -2118,6 +2141,7 @@ depending the information provided by your boot server:
bootfile - see above
dnsip - IP address of your Domain Name Server
dnsip2 - IP address of your secondary Domain Name Server
gatewayip - IP address of the Gateway (Router) to use
hostname - Target hostname
ipaddr - see above
...
...
common/cmd_net.c
浏览文件 @
fe389a82
...
...
@@ -116,6 +116,13 @@ static void netboot_update_env(void)
setenv
(
"dnsip"
,
tmp
);
}
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
if
(
NetOurDNS2IP
)
{
ip_to_string
(
NetOurDNS2IP
,
tmp
);
setenv
(
"dnsip2"
,
tmp
);
}
#endif
if
(
NetOurNISDomain
[
0
])
setenv
(
"domain"
,
NetOurNISDomain
);
...
...
include/cmd_confdefs.h
浏览文件 @
fe389a82
...
...
@@ -148,6 +148,8 @@
#define CONFIG_BOOTP_BOOTPATH 0x00000010
#define CONFIG_BOOTP_BOOTFILESIZE 0x00000020
#define CONFIG_BOOTP_DNS 0x00000040
#define CONFIG_BOOTP_DNS2 0x00000080
#define CONFIG_BOOTP_SEND_HOSTNAME 0x00000100
#define CONFIG_BOOTP_VENDOREX 0x80000000
...
...
include/configs/CPCI405.h
浏览文件 @
fe389a82
...
...
@@ -69,12 +69,10 @@
#define CONFIG_MII 1
/* MII PHY management */
#define CONFIG_PHY_ADDR 0
/* PHY address */
#if 0 /* test-only */
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
CONFIG_BOOTP_VENDOREX)
#else
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT)
#endif
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
CONFIG_BOOTP_DNS | \
CONFIG_BOOTP_DNS2 | \
CONFIG_BOOTP_SEND_HOSTNAME )
#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
CFG_CMD_DHCP | \
...
...
include/configs/CPCI4052.h
浏览文件 @
fe389a82
...
...
@@ -72,12 +72,10 @@
#define CONFIG_RTC_M48T35A 1
/* ST Electronics M48 timekeeper */
#if 0 /* test-only */
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
CONFIG_BOOTP_VENDOREX)
#else
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT)
#endif
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
CONFIG_BOOTP_DNS | \
CONFIG_BOOTP_DNS2 | \
CONFIG_BOOTP_SEND_HOSTNAME )
#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
CFG_CMD_DHCP | \
...
...
include/configs/CPCI405AB.h
浏览文件 @
fe389a82
...
...
@@ -65,7 +65,10 @@
#define CONFIG_RTC_M48T35A 1
/* ST Electronics M48 timekeeper */
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT)
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
CONFIG_BOOTP_DNS | \
CONFIG_BOOTP_DNS2 | \
CONFIG_BOOTP_SEND_HOSTNAME )
#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
CFG_CMD_DHCP | \
...
...
include/net.h
浏览文件 @
fe389a82
...
...
@@ -275,6 +275,9 @@ typedef struct icmphdr {
extern
IPaddr_t
NetOurGatewayIP
;
/* Our gateway IP addresse */
extern
IPaddr_t
NetOurSubnetMask
;
/* Our subnet mask (0 = unknown)*/
extern
IPaddr_t
NetOurDNSIP
;
/* Our Domain Name Server (0 = unknown)*/
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
extern
IPaddr_t
NetOurDNS2IP
;
/* Our 2nd Domain Name Server (0 = unknown)*/
#endif
extern
char
NetOurNISDomain
[
32
];
/* Our NIS domain */
extern
char
NetOurHostName
[
32
];
/* Our hostname */
extern
char
NetOurRootPath
[
64
];
/* Our root path */
...
...
net/bootp.c
浏览文件 @
fe389a82
...
...
@@ -174,6 +174,11 @@ static void BootpVendorFieldProcess(u8 *ext)
if
(
NetOurDNSIP
==
0
)
{
NetCopyIP
(
&
NetOurDNSIP
,
(
IPaddr_t
*
)(
ext
+
2
));
}
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
if
((
NetOurDNS2IP
==
0
)
&&
(
size
>
4
))
{
NetCopyIP
(
&
NetOurDNS2IP
,
(
IPaddr_t
*
)(
ext
+
2
+
4
));
}
#endif
break
;
case
7
:
/* Log server - Not yet supported */
break
;
...
...
@@ -365,6 +370,9 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t ServerID, IPaddr_t Req
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_VENDOREX)
u8
*
x
;
#endif
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME)
uchar
*
hostname
;
#endif
*
e
++
=
99
;
/* RFC1048 Magic Cookie */
*
e
++
=
130
;
...
...
@@ -402,6 +410,16 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t ServerID, IPaddr_t Req
*
e
++
=
tmp
&
0xff
;
}
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME)
if
(
(
hostname
=
getenv
(
"hostname"
))
)
{
int
hostnamelen
=
strlen
(
hostname
);
*
e
++
=
12
;
/* Hostname */
*
e
++
=
hostnamelen
;
memcpy
(
e
,
hostname
,
hostnamelen
);
e
+=
hostnamelen
;
}
#endif
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_VENDOREX)
if
((
x
=
dhcp_vendorex_prep
(
e
)))
return
x
-
start
;
...
...
@@ -690,6 +708,11 @@ static void DhcpOptionsProcess(uchar *popt)
break
;
case
6
:
NetCopyIP
(
&
NetOurDNSIP
,
(
popt
+
2
));
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
if
(
*
(
popt
+
1
)
>
4
)
{
NetCopyIP
(
&
NetOurDNS2IP
,
(
popt
+
2
+
4
));
}
#endif
break
;
case
12
:
size
=
truncate_sz
(
"Host Name"
,
...
...
net/net.c
浏览文件 @
fe389a82
...
...
@@ -84,6 +84,9 @@
IPaddr_t
NetOurSubnetMask
=
0
;
/* Our subnet mask (0=unknown) */
IPaddr_t
NetOurGatewayIP
=
0
;
/* Our gateways IP address */
IPaddr_t
NetOurDNSIP
=
0
;
/* Our DNS IP address */
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
IPaddr_t
NetOurDNS2IP
=
0
;
/* Our 2nd DNS IP address */
#endif
char
NetOurNISDomain
[
32
]
=
{
0
,};
/* Our NIS domain */
char
NetOurHostName
[
32
]
=
{
0
,};
/* Our hostname */
char
NetOurRootPath
[
64
]
=
{
0
,};
/* Our bootpath */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录