mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] defaultenv: boot/net: Boot initramfs from tftp if present
@ 2015-11-11 10:13 Markus Pargmann
  2015-12-01  8:27 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Pargmann @ 2015-11-11 10:13 UTC (permalink / raw)
  To: barebox

Use an 'initramfs' file if it exists instead of nfsroot. This offers the
possibility to quickly boot complete filesystems as initramfs without
the need to flash an SD-card or similar. If the initramfs does not
exist, it uses the default nfsroot mechanism.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---

Changes in v2:
- Changed variable name to 'initramfs' to make clear that this is intended to
  be used for initramfs. initrd is possible but requires additional linux
  bootargs
- Removed the hardcoded 'rdinit' bootarg

 defaultenv/defaultenv-2-base/boot/net | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
index ced2fadba212..af096410b7b2 100644
--- a/defaultenv/defaultenv-2-base/boot/net
+++ b/defaultenv/defaultenv-2-base/boot/net
@@ -11,4 +11,10 @@ fi
 
 nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
 bootargs-ip
-global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
+
+initramfs="${path}/${global.user}-initramfs-${global.hostname}"
+if [ -f "${initramfs}" ]; then
+	global.bootm.initrd="$initramfs"
+else
+	global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
+fi
-- 
2.6.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 v2] defaultenv: boot/net: Boot initramfs from tftp if present
  2015-11-11 10:13 [PATCH v2] defaultenv: boot/net: Boot initramfs from tftp if present Markus Pargmann
@ 2015-12-01  8:27 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-12-01  8:27 UTC (permalink / raw)
  To: Markus Pargmann; +Cc: barebox

On Wed, Nov 11, 2015 at 11:13:42AM +0100, Markus Pargmann wrote:
> Use an 'initramfs' file if it exists instead of nfsroot. This offers the
> possibility to quickly boot complete filesystems as initramfs without
> the need to flash an SD-card or similar. If the initramfs does not
> exist, it uses the default nfsroot mechanism.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
> 
> Changes in v2:
> - Changed variable name to 'initramfs' to make clear that this is intended to
>   be used for initramfs. initrd is possible but requires additional linux
>   bootargs
> - Removed the hardcoded 'rdinit' bootarg
> 
>  defaultenv/defaultenv-2-base/boot/net | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Applied, thanks

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:[~2015-12-01  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 10:13 [PATCH v2] defaultenv: boot/net: Boot initramfs from tftp if present Markus Pargmann
2015-12-01  8:27 ` Sascha Hauer

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