Hi Juergen,

2014-06-13 8:35 GMT+02:00 Juergen Borleis <j...@pengutronix.de>:
> Hi Guillermo,
>
> On Thursday 12 June 2014 16:31:35 Guillermo Rodriguez wrote:
>> Currently the default env/config file used in barebox for the mini2440 has
>> the following:
>>
>> # use 'dhcp' to do dhcp in barebox and in kernel
>> # use 'none' if you want to skip kernel ip autoconfiguration
>> ip=dhcp
>>
>> Is there a way to have barebox use dhcp, but skip kernel ip
>> autoconfiguration ?
>
> Take a look into the "env/bin/boot" script when Barebox is running. This 
> script
> creates the kernel command line prior booting. And its possible to change it
> according to your needs.

Thank you for the hint.

I looked at this and I would like to propose the following modification
in the /env/bin/_update script. The following check:

        if [ x$ip = xdhcp ]; then
                dhcp
        fi

can be changed to this:

        if [ x$ip = xdhcp -o -z $eth0.ipaddr ]; then
                dhcp
        fi

or perhaps just:

        if [ -z $eth0.ipaddr ]; then
                dhcp
        fi

This makes it possible to keep using the 'ip' variable in /env/config to
indicate which ip config data should be passed to the kernel via bootargs,
however if ip=none and eth0.ipaddr is not explicitly defined, barebox
will still do dhcp when necessary.

What do you think about this?

Guillermo Rodriguez Garcia
guille.rodrig...@gmail.com

Reply via email to