Other Parts Discussed in Thread: DRA722
专家们好:
如标题所述,我使用TI的am5718作为处理器,sdk版本:ti-processor-sdk-linux-am57xx-evm-04.03.00.05。因为是用于开发网络板,两个千兆以太网口外又用pru1实现了两路以太网口eth2和eth3,现在eth2和eth3已可以通信。板卡设计了spiFlash,现在可以在uboot阶段,通过setenv 命令分别设置了ethaddr,eth1addr,eth2addr,eth3addr, 启动后发现,仅两路cpsw支持的千兆以太网使用了ethaddr和eth1addr,eth2和eth3没有使用环境变量配置的地址。
请问如何让eth2和eth3使用uboot阶段配置的eth2addr和eth3addr地址?
谢谢!
启动打印环境变量日志:
U-Boot SPL 2017.01-00458-g32d3fcd-dirty (Aug 29 2024 - 14:39:47)
DRA722-GP ES2.0
Trying to boot from MMC1
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img
U-Boot 2017.01-00458-g32d3fcd-dirty (Aug 29 2024 - 14:39:47 +0800)
CPU : DRA722-GP ES2.0
Model: TI AM5718 IDK
Board: AM571x IDK, For JRU REV
DRAM: 1 GiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000
Warning: fastboot.board_rev: unknown board revision
1.Card did not respond to voltage select!
ERROR: invalid mmc device
at ../arch/arm/mach-omap2/utils.c:95/omap_mmc_get_part_size()
SCSI: SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
scanning bus for devices...
Found 0 device(s).
Net: Could not get PHY for ethernet@48484000: addr 0
Warning: ethernet@48484000 MAC addresses don't match:
1Address in SROM is 58:2b:0a:24:3d:ca
1Address in environment is c0:27:b9:14:00:aa
eth0: ethernet@48484000
Hit any key to stop autoboot: 0
=> printenv
arch=arm
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am57xx
board_name=beagle_x15
boot_fdt=try
boot_fit=0
bootargs=androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=am57xevmboard
bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 1; fi;if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot; run emmc_android_boot;
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO2,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
dofastboot=0
emmc_android_boot=echo Trying to boot Android from eMMC ...; setenv eval_bootargs setenv bootargs $bootargs; run eval_bootargs; setenv mmcdev 1; setenv fdt_part 3; setenv boot_part 9; setenv machid fe6; mmc dev $mmcdev; mmc rescan; part start mmc ${mmcdev} ${fdt_part} fdt_start; part size mmc ${mmcdev} ${fdt_part} fdt_size; part start mmc ${mmcdev} ${boot_part} boot_start; part size mmc ${mmcdev} ${boot_part} boot_size; mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; mmc read ${loadaddr} ${boot_start} ${boot_size}; bootm $loadaddr $loadaddr $fdtaddr;
emmc_linux_boot=echo Trying to boot Linux from eMMC ...; setenv mmcdev 1; setenv bootpart 1:2; setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
eth1addr=c0:27:b9:14:00:ab
eth2addr=c0:27:b9:14:00:ac
eth3addr=c0:27:b9:14:00:ad
ethaddr=c0:27:b9:14:00:aa
fastboot.cpu=DRA722
fastboot.secure=GP
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=bdf0ebf8
fdtfile=am571x-idk.dtb
findfdt=setenv fdtfile am571x-idk.dtb;dfu_bufsiz=0x10000
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage
fit_loadaddr=0x87000000
idk_lcd=no
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}
partitions_android=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2304K,uuid=${uuid_gpt_bootloader};name=environment,size=256K,uuid=${uuid_gpt_environment};name=misc,size=128K,uuid=${uuid_gpt_misc};name=reserved,size=256K,uuid=${uuid_gpt_reserved};name=efs,size=16M,uuid=${uuid_gpt_efs};name=crypto,size=16K,uuid=${uuid_gpt_crypto};name=recovery,size=40M,uuid=${uuid_gpt_recovery};name=boot,size=10M,uuid=${uuid_gpt_boot};name=system,size=768M,uuid=${uuid_gpt_system};name=vendor,size=256M,uuid=${uuid_gpt_vendor};name=cache,size=256M,uuid=${uuid_gpt_cache};name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};name=userdata,size=-,uuid=${uuid_gpt_userdata}
pxefile_addr_r=0x80100000
ramdisk_addr_r=0x88080000
rdaddr=0x88080000
rootpath=/export/rootfs
scriptaddr=0x80000000
scsidevs=0
serial#=0600c0155a040001
soc=omap5
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial@48020000
stdin=serial@48020000
stdout=serial@48020000
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
usbtty=cdc_acm
vendor=ti
ver=U-Boot 2017.01-00458-g32d3fcd-dirty (Aug 29 2024 - 14:39:47 +0800)
vram=16M
Environment size: 5801/131067 bytes
启动后各路网口mac地址:
root@am57xx-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr C0:27:B9:14:00:AA
inet6 addr: fe80::c227:b9ff:fe14:aa%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6408 (6.2 KiB) TX bytes:6492 (6.3 KiB)
Interrupt:98
eth1 Link encap:Ethernet HWaddr C0:27:B9:14:00:AB
inet6 addr: fe80::c227:b9ff:fe14:ab%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5918 (5.7 KiB) TX bytes:5684 (5.5 KiB)
eth2 Link encap:Ethernet HWaddr 26:06:D6:47:02:76
inet6 addr: fe80::2406:d6ff:fe47:276%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:121 errors:0 dropped:0 overruns:0 frame:0
TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15258 (14.9 KiB) TX bytes:7776 (7.5 KiB)
eth3 Link encap:Ethernet HWaddr 82:57:5C:42:07:B4
inet6 addr: fe80::8057:5cff:fe42:7b4%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15058 (14.7 KiB) TX bytes:7886 (7.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%763860/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:276 errors:0 dropped:0 overruns:0 frame:0
TX packets:276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:22044 (21.5 KiB) TX bytes:22044 (21.5 KiB)