[PATCH 07/11] defaultenv-2/ip: add dhcp-barebox support
Sascha Hauer
s.hauer at pengutronix.de
Sat Sep 8 10:04:57 EDT 2012
On Fri, Sep 07, 2012 at 02:13:33PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
> defaultenv-2/base/bin/bootargs-ip | 2 ++
> defaultenv-2/base/bin/ifup | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/defaultenv-2/base/bin/bootargs-ip b/defaultenv-2/base/bin/bootargs-ip
> index 2d4486c..caeb5dd 100644
> --- a/defaultenv-2/base/bin/bootargs-ip
> +++ b/defaultenv-2/base/bin/bootargs-ip
> @@ -6,6 +6,8 @@
>
> if [ $ip = dhcp ]; then
> global.linux.bootargs.dyn.ip="ip=dhcp"
> +elif [ $ip = dhcp-barebox ]; then
> + global.linux.bootargs.dyn.ip="ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask::eth0:"
> else
> global.linux.bootargs.dyn.ip="ip=$ipaddr:$serverip:$gateway:$netmask::eth0:"
> fi
> diff --git a/defaultenv-2/base/bin/ifup b/defaultenv-2/base/bin/ifup
> index 37b986c..554c35e 100644
> --- a/defaultenv-2/base/bin/ifup
> +++ b/defaultenv-2/base/bin/ifup
> @@ -52,7 +52,7 @@ if [ "$ip" = static ]; then
> ${interface}.serverip=$serverip
> ${interface}.gateway=$gateway
> ret=0
> -elif [ "$ip" = dhcp ]; then
> +elif [ "$ip" = dhcp -o "$ip" = dhcp-barebox ]; then
> dhcp
> ret=$?
> if [ $ret = 0 -a -n "$serverip" ]; then
The ifup script is used to configure networking for barebox. This is not
the place for configuring kernel behaviour. If you want this add an
option to the bootargs-ip script or add a bootargs-ip-barebox script.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list