初级会员
- 积分
- 57
- 金钱
- 57
- 注册时间
- 2020-3-26
- 在线时间
- 16 小时
|
3金钱
用什么方式修改uboot自动启动时tftp server 的IP地址?实际ip地址不是下面红色的(192.168.124.1),实际应该是(192.168.124.4)我在环境变量中都改成了 192.168.124.4 但是u-boot启动时还是去(192.168.124.1 )找文件。
U-Boot 2016.03 (May 30 2020 - 15:35:43 +0800)
CPU: Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 56C
Reset cause: POR
Board: MX6ULL 14x14 EVK
I2C: ready
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Display: ATK-LCD-4.3-480x272 (480x272)
Video: 480x272x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc0 is current device
Net: FEC1
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0 **
** No partition table - mmc 0 **
Booting from net ...
FEC1 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 43
*** Unhandled DHCP Option in OFFER/ACK: 43
DHCP client bound to address 192.168.124.2 (842 ms)
Using FEC1 device
TFTP from server 192.168.124.1; our IP address is 192.168.124.2
Filename 'zImage'.
Load address: 0x80800000
Loading: T
Abort
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
*** Unhandled DHCP Option in OFFER/ACK: 43
*** Unhandled DHCP Option in OFFER/ACK: 43
DHCP client bound to address 192.168.124.2 (2186 ms)
Using FEC1 device
TFTP from server 192.168.124.1; our IP address is 192.168.124.2
Filename 'imx6ull-14x14-emmc-4.3-480x272-c.dtb'.
Load address: 0x83000000
Loading: *
Abort
Bad Linux ARM zImage magic!
以下是环境变量
=> print
baudrate=115200
board_name=EVK
board_rev=14X14
boot_fdt=try
bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.124.4:,v3,tcp
bootcmd=run findfdt;mmc dev ${mmcdev};mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
bootdelay=1
bootfile=imx6ull-14x14-emmc-4.3-480x272-c.dtb
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
dnsip=192.168.124.4
ethact=FEC1
ethaddr=00:04:9F:04:dd:55
ethprime=FEC
fdt_addr=0x83000000
fdt_file=imx6ull-14x14-emmc-4.3-480x272-c.dtb
fdt_high=0xffffffff
fileaddr=83000000
filesize=97a7
findfdt=if test $fdt_file = undefined; then if test $board_name = EVK && test $board_rev = 9X9; then setenv fdt_file imx6ull-9x9-evk.dtb; fi; if test $board_name = EVK && test $board_rev = 14X14; then setenv fdt_file imx6ull-14x14-evk.dtb; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi; fi;
gatewayip=192.168.124.4
get_cmd=dhcp
image=zImage
initrd_addr=0x83800000
initrd_high=0xffffffff
ip_dyn=yes
ipaddr=192.168.124.2
loadaddr=0x80800000
loadbootscript=fatload mmc ${mmcdev}{mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}{mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}{mmcpart} ${loadaddr} ${image}
logo_file=alientek.bmp
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.file=/fat g_mass_storage.ro=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" clk_ignore_unused
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}{nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
netmask=255.255.255.0
panel=ATK-LCD-4.3-480x272
script=boot.scr
serverip=192.168.124.4
splashimage=0x88000000
splashpos=m,m
Environment size: 2869/8188 bytes
|
最佳答案
查看完整内容[请看2#楼]
搞定了因为定义了ip_dyn=yes, 所以会去dhcp获取文件,把定义成ip_dyn=no,就从tftp获取了
=> setenv ip_dyn no
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
|