[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] changing ip with bootargs unpossible ?



Hi Guillaume,

ggastebois@xxxxxxxxxx wrote:

>>> I try to change ip address at boot time with u-boot parameter
>>> bootargs=$bootargs ip=target_ip:server_ip:gw_ip:netmask:hostname:eth0:off
>>>
>>> but it doesn't change anything. Did I forget any parameter in kernel
>>> configuration to allow ip in bootargs ?
>>>
>>
>>You may have figured this out already - but you need to enable
>>CONFIG_IP_PNP in the kernel -> network settings.

> Hello, thank you for answer, but it doesn't work !
> 
> in my .config :
>         CONFIG_IP_PNP=y
>         #CONFIG_IP_PNP_DHCP is not set
>         CONFIG_IP_PNP_BOOTP=y
>         #CONFIG_IP_PNP_RARP is not set
> 
> my
> bootargs=mtdparts=physmap-flash.0:1M(bitstream),256K(boot),256K(bootenv),256K(config),5M(image),9M(filesystem)
> macaddr=00.0a.35.00.22.01
> ip=192.168.0.11:192.168.0.3:0.0.0.0:255.255.240.0:toto:eth0:off
> 
> and ip remains at 192.168.0.10 as in image generation !

OK, so I think what's happening here is that the default PetaLinux
startup script is overwriting the IP address on bootup.  You can find
this in petalinux-dist/vendors/PetaLogix/common/common.mak,, line 297/298

Here, what's happening is that if you have not elected to use DHCP, tyhe
IP address is being statically set.  You can comment out these two
lines, delete the romfs/etc/rc file, then re-run 'make romfs'.

I'll add this as a future feature, to disable IP address setting on bootup.

Regards,

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/