请问怎么能改变网卡的mac地址?
以下是控制串口输出:
TI8148-GP rev 3.0
ARM clk: 1000MHz
DDR clk: 400MHz
I2C: ready
DRAM: 2 GiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net: Detected MAC-ID:00:21:21:83:a7:5d
Hit any key to stop autoboot: 0
Loading file "boot/uImage" from mmc device 0:1 (xxa1)
2480356 bytes read
## Booting kernel from Legacy Image at 81000000 …
Image Name: Linux-2.6.37-VRm-2.01
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2480292 Bytes = 2.4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK
Loading Kernel Image … OK
OK
Starting kernel …
Chris Meng:
你好,
你在uboot停下来,用命令就可以改啊
https://e2e.ti.com/support/embedded/linux/f/354/t/189782
guangxing zhang:
回复 Chris Meng:
感谢你的回复,我是新手,怎么停下来?如果停下来我怎么登陆到linux来执行我的命令?
谢谢
Chris Meng:
回复 guangxing zhang:
你好,
先在uboot里面ctrl+C试试看能否停下来,http://processors.wiki.ti.com/index.php/Change_U-Boot_bootdelay_setting。
如果不行,就直接修改uboot代码里么的bootdelay设置。
这个是Linux的基础问题,建议你可以在网上搜索一下相关内容。
guangxing zhang:
回复 Chris Meng:
我看文章以下方法
方法一:
TI8168_EVM# setenv ethaddr 02:01:03:01:01:01
TI8168_EVM#setenv bootargs 'console=ttyO0,115200n8 root=/dev/ram rw initrd=0x81000000,128M eth=$(ethaddr) mem=512M'
TI8168_EVM#setenv bootcmd 'bootm 0x80800000'
方法二:
Mac address reading logic is done in the arch/arm/mach-omap2/devices.c file. This logic can be modified to have custom mac id from eeprom or i2c so that custom mac id is used in kernel emac driver.
针对我的硬件,两种方法我该怎么做,能详细点吗?
VRmDR3> printenvbootcmd=if mmc rescan 0; then if ext2load mmc 0:1 0x81000000 boot/uImage; then bootm; else echo Kernel not found on eMMC part. 1; fi; else echo eMMC not found!; fibootdelay=1baudrate=115200autoload=yesverify=yesbootargs=console=ttyO0,115200n8 rootwait root=/dev/mmcblk0p1 ro mem=384M@0x80000000 mem=320M@0x9FC00000 vmalloc=1280M ip=off notifyk.vpssm3_sva=0xBF900000stdin=serialstdout=serialstderr=serialethaddr=00:21:21:83:a7:5dethact=cpsw
Environment size: 450/65532 bytes