我在uboot中配置了双以太网,我怎么确定用setenv ipaddr 设置的是哪个网口的ip?能同时设置两个ip吗
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我在uboot中配置了双以太网,我怎么确定用setenv ipaddr 设置的是哪个网口的ip?能同时设置两个ip吗
是的,但是你可以仔细分析下网络这部分初始化代码,只是使能了一个网口。
以SDK 6.0为例,在board-support/u-boot-2013.01.01-psp06.00.00.00/board/ti/am335/board.c文件中,board_eth_init即为初始化的函数。
嗯,我看过这个函数了,但是我看到的是这个函数配置了两个以太网接口,能具体点和我说下吗?怎么看默认的使用的以太网接口
哪里面主要是有个逻辑的判断来区别gpevm,beaglebone,beagleboneblack,starterkit板子,因为各个板子上面的网络配置不一样。没有初始化两个,再好好读读代码,理解理解。
static struct cpsw_platform_data cpsw_data = {
.mdio_base = CPSW_MDIO_BASE,
.cpsw_base = CPSW_BASE,
.mdio_div = 0xff,
.channels = 8,
.cpdma_reg_ofs = 0x800,
.slaves = 1,
.slave_data = cpsw_slaves,
.ale_reg_ofs = 0xd00,
.ale_entries = 1024,
.host_port_reg_ofs = 0x108,
.hw_stats_reg_ofs = 0x900,
.bd_ram_ofs = 0x2000,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
.version = CPSW_CTRL_VERSION_2,
};
这个结构体的slaves值设为1