Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to disable the DHCP requests after the Kernel was loaded. Using freescale imx25 dev-board in standard config. In u-boot, I find two lines ip=dhcp:

MX25 U-Boot > pri
bootdelay=3
baudrate=115200
loadaddr=0x80800000
netdev=eth0
ethprime=smc911x-0
uboot=u-boot.bin
uboot_addr=0xa0000000
kernel=uImage
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
load_uboot=tftpboot ${loadaddr} ${uboot}
ethact=smc911x-0
bootargs_nand=setenv bootargs ${bootargs} root=/dev/mtdblock2 ip=dhcp rootfstype=jffs2
bootcmd_nand=run bootargs_base bootargs_nand; nand read ${loadaddr} 0x100000 0x1d2000;bootm
bootcmd=run bootcmd_nand
serverip=192.168.0.5
ipaddr=192.168.0.100
stdin=serial
stdout=serial
stderr=serial

If I do:

set bootargs_nand=setenv bootargs ${bootargs} root=/dev/mtdblock2 ip=192.168.0.100 rootfstype=jffs2

It does not work and my boot environment seems to be completely damaged.

How can I assign a fixed IP address without changing other parameters?

share|improve this question
add comment

1 Answer

Your command:

set bootargs_nand=setenv bootargs ${bootargs} root=/dev/mtdblock2
      ip=192.168.0.100 rootfstype=jffs2

will not work as it is.

It should at least be:

setenv bootargs_nand 'setenv bootargs ${bootargs} root=/dev/mtdblock2
       ip=192.168.0.100 rootfstype=jffs2'

without an = sign, and using single quotes to prevent expansion of ${bootargs} until the bootargs_nand command is actually run.

To make the IP setting more flexible, you should also specify ip=${ipaddr} within that command rather than explicitly using the actual address. The Uboot environment value will be substituted.

This answer is preliminary until these defects have been corrected.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.