mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] defaultenv-2: centralize nfs commands for 'net'
@ 2019-01-19  0:50 Vivien Didelot
  2019-01-21  8:38 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Vivien Didelot @ 2019-01-19  0:50 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov, Vivien Didelot

Setting the nfsroot variable as well as the kernel bootargs for the
interface used to reach the server is specific to nfs, which are used
only if there's no initramfs to load from tftp. Move these statements
within the condition.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
 defaultenv/defaultenv-2-base/boot/net | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
index b0fe4f584..5bd077d80 100644
--- a/defaultenv/defaultenv-2-base/boot/net
+++ b/defaultenv/defaultenv-2-base/boot/net
@@ -12,13 +12,11 @@ if [ -f "${oftree}" ]; then
 	global.bootm.oftree="$oftree"
 fi
 
-nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
-
-ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
-
 initramfs="${path}/${global.user}-initramfs-${global.hostname}"
 if [ -f "${initramfs}" ]; then
 	global.bootm.initrd="$initramfs"
 else
+	nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+	ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
 	global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
 fi
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] defaultenv-2: centralize nfs commands for 'net'
  2019-01-19  0:50 [PATCH] defaultenv-2: centralize nfs commands for 'net' Vivien Didelot
@ 2019-01-21  8:38 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-01-21  8:38 UTC (permalink / raw)
  To: Vivien Didelot; +Cc: Andrey Smirnov, barebox

On Fri, Jan 18, 2019 at 07:50:39PM -0500, Vivien Didelot wrote:
> Setting the nfsroot variable as well as the kernel bootargs for the
> interface used to reach the server is specific to nfs, which are used
> only if there's no initramfs to load from tftp. Move these statements
> within the condition.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> ---
>  defaultenv/defaultenv-2-base/boot/net | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
> index b0fe4f584..5bd077d80 100644
> --- a/defaultenv/defaultenv-2-base/boot/net
> +++ b/defaultenv/defaultenv-2-base/boot/net
> @@ -12,13 +12,11 @@ if [ -f "${oftree}" ]; then
>  	global.bootm.oftree="$oftree"
>  fi
>  
> -nfsroot="/home/${global.user}/nfsroot/${global.hostname}"

Applied with some fixup. We have nfsroot="${nfsserver}:/..." now.

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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-21  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-19  0:50 [PATCH] defaultenv-2: centralize nfs commands for 'net' Vivien Didelot
2019-01-21  8:38 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox