NFS boot with uboot-goflexnet|dockstar and NAND rescue :D

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

NFS boot with uboot-goflexnet|dockstar and NAND rescue :D

Postby Sagittarius » Mon Oct 26, 2015 8:37 am

I have finally managed to boot my GoflexNet and my Dockstars with nfs (but without tftp).

The Goflexnet has the mainline uboot installed : pacman -S uboot-goflexnet (alarm/uboot-goflexnet 2015.07-3)
It also has the rescue mode installed: viewtopic.php?f=30&t=8383

The default uboot environnent has been kept as is.

Only theese first parameters have been added:
$this->bbcode_second_pass_code('', 'fw_setenv plugcomputer 'goflexnet'
fw_setenv net_nfs_server '192.168.0.99'
fw_setenv net_nfs_path '/volume1/sta4'')
So it means 3 parameters to adapt to your personal configuration:
1.- your machine dockstar|goflexnet|other
2.- your nfs server ip address,
3.- the path where resides the root files system of your dockstar|goflexnet|other on your nfs server)

And secondly those generic parameters assuming you use nfs v3 on your nfs server:
$this->bbcode_second_pass_code('', 'fw_setenv net_nfs_root 'root=/dev/nfs rw'
fw_setenv net_nfs_dtbs '/${fdtdir}/${fdtfile}'
fw_setenv net_nfsparam 'v3,rsize=32768,wsize=32768,nolock,tcp'
fw_setenv net_set_bootargs 'setenv serverip $net_nfs_server; setenv bootargs console=$console $net_nfs_root rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path,$net_nfsparam ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:$plugcomputer:eth0:off $mtdparts'
fw_setenv net_boot 'nfs ${fdtaddr} ${net_nfs_server}:${net_nfs_path}${fdtdir}/${fdtfile}; nfs ${loadaddr} ${net_nfs_server}:${net_nfs_path}${bootdir}/${bootfilez}; echo; echo ** Kernel Boot Arguments: $bootargs; echo;bootz ${loadaddr} - ${fdtaddr}'
fw_setenv net_bootcmd 'run net_set_bootargs; run net_boot'')

Then, with netconsole : nc -l -u -p 6666 you can interrupt the boot process ant type: run net_bootcmd

Then it should display:$this->bbcode_second_pass_code('', '
GoFlexNet> run net_bootcmd
run net_bootcmd
Using egiga0 device
File transfer via NFS from server 192.168.0.99; our IP address is 192.168.0.104
Filename '/volume1/sta4/boot/dtbs/kirkwood-goflexnet.dtb'.
Load address: 0x800000
Loading: ###
done
Bytes transferred = 11609 (2d59 hex)
Using egiga0 device
File transfer via NFS from server 192.168.0.99; our IP address is 192.168.0.104
Filename '/volume1/sta4/boot/zImage'.
Load address: 0x810000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#########################
done
Bytes transferred = 2786440 (2a8488 hex)

** Kernel Boot Arguments: console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.0.99:/volume1/sta4,v3,rsize=32768,wsize=32768,nolock,tcp ip=192.168.0.104:192.168.0.99:::goflexnet:eth0:off mtdparts=orion_nand:1M(u-boot),-(rootfs)

Kernel image @ 0x810000 [ 0x000000 - 0x2a8488 ]
## Flattened Device Tree blob at 00800000
Booting using the fdt blob at 0x800000')

Finally, after having checked that your plugcomputer boots perfectly via NFS, you can modify the line:
$this->bbcode_second_pass_code('', 'bootcmd=run startboot;run bootubi')
to (please double-check the syntax):
$this->bbcode_second_pass_code('', 'bootcmd=run startboot;run net_bootcmd;run bootubi')
with
$this->bbcode_second_pass_code('', ' fw_setenv bootcmd 'run startboot;run net_bootcmd;run bootubi'')

and then everything is fine :D :D :D
It works great since core/linux-kirkwood-dt 4.2.6-1



EDIT - old message part -------------------------------------------
Well not completely :(
Why ?
Because it does not work with default fdt archlinux kernel. It might be a config parameter in kernel level autoconfiguration option "Networking options" to enable root NFS support to work with NFS mounted root filesystems:
$this->bbcode_second_pass_code('', 'CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_IP_PNP=y
CONFIG_ROOT_NFS=y')

However for testing purposes, it works if you install on you machine theese files (dtb, kernel zImage, kernel modules):
$this->bbcode_second_pass_code('', 'http://www.xilka.com/sheeva/kernel/4/4.2/4.2.4/release/1/kirkwood-4.2.4-zImage
http://www.xilka.com/sheeva/kernel/4/4.2/4.2.4/release/1/kirkwood-goflexnet-4.2.4.dtb
http://www.xilka.com/sheeva/kernel/4/4.2/4.2.4/release/1/kirkwood-4.2.4-Modules.tar.gz')

Copy kirkwood-4.2.4-zImage to yournfsroot/boot/zImage, kirkwood-goflexnet-4.2.4.dtb to yournfsroot/boot/dtbs/kirkwood-goflexnet.dtb and extract properly kirkwood-4.2.4-Modules.tar.gz, they should reside in yournfsroot/lib/modules.

There are existing files for various kirkwood platforms available here: http://www.xilka.com/sheeva/kernel/4/4. ... release/1/

Nevertheless, it would be much better to be able to nfsboot with default archlinuxarm kernel or did I miss something ?
Last edited by Sagittarius on Thu Nov 12, 2015 7:48 pm, edited 11 times in total.
Dockstar / GoFlexNet booting on NFS / Odroid C1+ / Odroid C2
Sagittarius
 
Posts: 61
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: NFS boot with uboot-goflexnet and NAND rescue

Postby moonman » Tue Oct 27, 2015 5:41 am

Seems NFS support is built as modules and not built into kernel. You can experiment with initrd that will contain necessary modules or submit a PR on github.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: NFS boot with uboot-goflexnet and NAND rescue

Postby moonman » Tue Oct 27, 2015 6:41 am

Should be fixed in 4.2.5-2.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: NFS boot with uboot-goflexnet and NAND rescue

Postby Sagittarius » Tue Oct 27, 2015 10:02 am

Good news moonman.
Thank you for the feedback.
Dockstar / GoFlexNet booting on NFS / Odroid C1+ / Odroid C2
Sagittarius
 
Posts: 61
Joined: Mon Nov 14, 2011 9:21 pm
Location: France

Re: NFS boot with uboot-goflexnet and NAND rescue

Postby Sagittarius » Wed Nov 11, 2015 8:40 pm

Thanks to the developpers :D

NFS boot works great with core/linux-kirkwood-dt 4.2.6-1

Thank you again.
Dockstar / GoFlexNet booting on NFS / Odroid C1+ / Odroid C2
Sagittarius
 
Posts: 61
Joined: Mon Nov 14, 2011 9:21 pm
Location: France


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 7 guests