9
0
Fork 0

defaultenv: boot/net: Boot initramfs from tftp if present

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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Markus Pargmann 2015-11-11 11:13:42 +01:00 committed by Sascha Hauer
parent eda3453331
commit 2803b258e6
1 changed files with 7 additions and 1 deletions

View File

@ -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