Use uEnv.txt for Testing January 22, 2018 09:25PM |
Registered: 10 years ago Posts: 64 |
cat /boot/uEnv.txt net_dhcp_c=1 net_dhcp_s=1 net_c_ipaddr= net_c_netmask= net_c_gatewayip= net_nfs_path=/srv/nfs/hosts/dockstar net_nfs_dtb=boot/dts/kirkwood-dockstar.dtb net_nfs_initrd=boot/uInitrd net_nfs_kernel=boot/uImage console=ttyS0,115200 autoload=no net_check_dhcp_c=if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address: $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip net_set_c_ip_dhcp=dhcp; echo; echo ** Getting IP Settings by DHCP (net_dhcp_c = 1): net_set_c_ip_stat=setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** Using static IP Settings (net_dhcp_c = 0): net_check_dhcp_s=if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi; echo ** NFS Boot Server: $net_nfs_server; echo net_set_s_ip_dhcp=setenv net_nfs_server $serverip;echo; echo ** Getting NFS Boot Server by DHCP (net_dhcp_s and net_dhcp_c = 1): net_set_s_ip_stat=echo; echo ** Using static NFS Boot Server (net_dhcp_s or net_dhcp_c = 0) : net_load_dtb=echo NFS loading DTB :$net_nfs_server:$net_nfs_path/$net_nfs_dtb ... ; nfs $load_dtb_addr $net_nfs_server:$net_nfs_path/$net_nfs_dtb; echo net_load_initrd=echo NFS loading uInitrd :$net_nfs_server:$net_nfs_path/$net_nfs_initrd ...; nfs $load_initrd_addr $net_nfs_server:$net_nfs_path/$net_nfs_initrd; echo net_load_uimage=echo NFS loading uImage :$net_nfs_server:$net_nfs_path/$net_nfs_kernel ...; nfs $load_uimage_addr $net_nfs_server:$net_nfs_path/$net_nfs_kernel; echo net_bootcmd=run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_bootcmd_exec net_set_bootargs=setenv serverip $net_nfs_server; setenv bootargs console=$console root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:dockstar:eth0:off $mtdparts $custom_params; echo ** Kernel Boot Arguments:; echo ** $bootargs; echo net_bootcmd_exec=run net_load_uimage; if run net_load_initrd; then if run net_load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
run bootcmd_uenv
loading envs from mmc 0 ... 2346 bytes read in 15 ms (152.3 KiB/s) importing envs ...
Re: Use uEnv.txt for Testing January 23, 2018 03:32AM |
Admin Registered: 13 years ago Posts: 19,092 |
Quote
"Section Three" Boot from NFS share
The following link gives the steps necessary to configure your u-boot to boot from the NFS share. Please note though that although it discusses using TFTP in the process, this is not necessary and those steps can be avoided.
Boot your Dockstar/Plug by TFTP/NFS
an example uboot statement kindly provided by the master of u-boot @bodhi is included below for you to amend / modify to match your share description and nfs path
bootcmd_nfs=setenv nfs_server "192.168.0.224"; setenv nfs_path "/srv/nfs/hosts/tldDebian2"; setenv nfs_bootcmd "run nfs_set_bootargs; run nfs_boot"; setenv nfs_ipconfig "192.168.0.229:192.168.0.224:192.168.0.1:255.255.0.0:tldDebian2::off"; setenv nfs_set_bootargs "setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts"; setenv nfs_load_uimage "nfs 0x800000 $nfs_server:$nfs_path/boot/uImage"; setenv nfs_load_uinitrd "nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd"; setenv nfs_load_dtb "nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogo_e02.dtb"; setenv nfs_bootm "bootm 0x800000 0x1100000 0x1c00000"; setenv nfs_boot "run nfs_load_uimage; run nfs_load_uinitrd; run nfs_load_dtb; run nfs_bootm"; echo "Booting NFS root…"; run nfs_bootcmd
Re: Use uEnv.txt for Testing January 23, 2018 12:14PM |
Registered: 10 years ago Posts: 64 |
nfs_load_uimage=nfs 0x800000 $nfs_server:$nfs_path/boot/uImage nfs_load_uinitrd=nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd nfs_load_dtb=nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogo_e02.dtbThese will make the booting process hang up.
Re: Use uEnv.txt for Testing January 23, 2018 02:28PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: Use uEnv.txt for Testing January 23, 2018 06:04PM |
Registered: 10 years ago Posts: 64 |
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700) Pogoplug V4 SoC: Kirkwood 88F6192_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 128 MiB MMC: MVEBU_MMC: 0 In: serial Out: serial Err: serial Net: egiga0 No link on egiga0 ping failed; host 172.16.16.118 is not alive Using egiga0 device ARP Retry count exceeded; starting again ping failed; host 172.16.16.118 is not alive Using egiga0 device ARP Retry count exceeded; starting again ping failed; host 172.16.16.118 is not alive Using egiga0 device ARP Retry count exceeded; starting again ping failed; host 172.16.16.118 is not alive Using egiga0 device ARP Retry count exceeded; starting again ping failed; host 172.16.16.118 is not alive Hit any key to stop autoboot: 0 Pogov4> dhcp BOOTP broadcast 1 *** Unhandled DHCP Option in OFFER/ACK: 252 *** Unhandled DHCP Option in OFFER/ACK: 252 DHCP client bound to address 192.168.1.99 (12 ms) *** Warning: no boot file name; using 'C0A80163.img' Using egiga0 device TFTP from server 192.168.1.1; our IP address is 192.168.1.99 Filename 'C0A80163.img'. Load address: 0x800000 Loading: * TFTP error: 'file /tmp/mnt/sda1/tftpboot/C0A80163.img not found' (1) Not retrying... Pogov4> nfs 0x1c00000 192.168.1.1:/tmp/mnt/sda1/nfs/pogo.hosts/PogoplugV4/boot/dts/kirkwood-pogoplug_v4.dtb *** ERROR: Cannot mount T T T T T T T T T TThe light blinked red continuously so I had to shut the power down.
Pogov4> nfs 0x1c00000 192.168.1.1:/tmp/mnt/sda1/nfs/pogo.hosts/PogoplugV4/boot/dts/kirkwood-pogoplug_v4.dtb ### done Bytes transferred = 10266 (281a hex)
Re: Use uEnv.txt for Testing January 23, 2018 06:56PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: Use uEnv.txt for Testing January 24, 2018 08:16AM |
Registered: 10 years ago Posts: 64 |
# <file system> <mount point> <type> <options> <dump> <pass> /dev/root / nfs noatime,errors=remount-ro 0 1
autoload=no nfs_server=192.168.1.1 nfs_path=/tmp/mnt/sda1/nfs/pogo.hosts/PogoplugV4 tftp_load_uimage=tftp 0x800000 uImage tftp_load_uinitrd=tftp 0x1100000 uInitrd tftp_load_dtb=tftp 0x1c00000 dts/kirkwood-pogoplug_v4.dtb net_bootm=bootm 0x800000 0x1100000 0x1c00000 bootcmd_net=echo "Booting NFS root..."; dhcp; run net_bootcmd net_bootcmd=run nfs_set_ip; run nfs_set_bootargs; run net_boot nfs_set_ip=setenv nfs_ipconfig $ipaddr:$nfs_server:$gatewayip:$netmask:PogoplugV4::off nfs_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts net_boot=run tftp_load_uimage; run tftp_load_uinitrd; run tftp_load_dtb; run net_bootm
Re: Use uEnv.txt for Testing January 24, 2018 10:52AM |
Registered: 10 years ago Posts: 64 |
Re: Use uEnv.txt for Testing January 24, 2018 11:56AM |
Admin Registered: 13 years ago Posts: 19,092 |
> root=/dev/nfs rw >> without the rw, the filesystem is mounted
drwxr-xr-x 25 root root 4096 Feb 24 2015 tldDebian2
Quote
bootcmd_nfs=setenv nfs_server "192.168.0.224"; setenv nfs_path "/srv/nfs/hosts/tldDebian2"; setenv nfs_bootcmd "run nfs_set_bootargs; run nfs_boot"; setenv nfs_ipconfig "192.168.0.229:192.168.0.224:192.168.0.1:255.255.0.0:tldDebian2::off"; setenv nfs_set_bootargs "setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts"; setenv nfs_load_uimage "nfs 0x800000 $nfs_server:$nfs_path/boot/uImage"; setenv nfs_load_uinitrd "nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd"; setenv nfs_load_dtb "nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogo_e02.dtb"; setenv nfs_bootm "bootm 0x800000 0x1100000 0x1c00000"; setenv nfs_boot "run nfs_load_uimage; run nfs_load_uinitrd; run nfs_load_dtb; run nfs_bootm"; echo "Booting NFS root…"; run nfs_bootcmd
Re: Use uEnv.txt for Testing January 24, 2018 12:37PM |
Registered: 10 years ago Posts: 64 |
SiliCAT@RT-AC68U:/tmp/mnt/sda1/nfs/pogo.hosts# ls -l drwxr-xr-x 21 SiliCAT root 4096 Jan 24 13:00 PogoplugV4
autoload=no nfs_server=192.168.1.1 nfs_path=/tmp/mnt/sda1/nfs/pogo.hosts/PogoplugV4 tftp_load_uimage=tftp 0x800000 uImage tftp_load_uinitrd=tftp 0x1100000 uInitrd tftp_load_dtb=tftp 0x1c00000 dts/kirkwood-pogoplug_v4.dtb net_bootm=bootm 0x800000 0x1100000 0x1c00000 bootcmd_net=echo "Booting NFS root..."; dhcp; run net_bootcmd net_bootcmd=run nfs_set_ip; run nfs_set_bootargs; run net_boot nfs_set_ip=setenv nfs_ipconfig $ipaddr:$nfs_server:$gatewayip:$netmask:PogoplugV4:eth0:off nfs_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/nfs rw nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts net_boot=run tftp_load_uimage; run tftp_load_uinitrd; run tftp_load_dtb; run net_bootm bootcmd_exec=run bootcmd_netAnd it works when I add the rw
Re: Use uEnv.txt for Testing January 24, 2018 01:04PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: Use uEnv.txt for Testing January 24, 2018 01:57PM |
Registered: 10 years ago Posts: 64 |
Re: Use uEnv.txt for Testing January 24, 2018 04:08PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: Use uEnv.txt for Testing January 25, 2018 01:19PM |
Registered: 10 years ago Posts: 64 |
Re: Use uEnv.txt for Testing January 26, 2018 08:41AM |
Registered: 10 years ago Posts: 64 |
/srv/nfs-export *(rw,sync,no_subtree_check,no_root_squash)
silicat@pogotest:~$ touch test touch: cannot touch 'test': Read-only file system
autoload=no nfs_server=172.16.16.207 nfs_path=/srv/nfs-export/Testbed/pogoplug.hosts/rootfs/4.4.0/tldDebian2 nfs_load_uimage=nfs 0x800000 $nfs_server:$nfs_path/boot/uImage nfs_load_uinitrd=nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd nfs_load_dtb=nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogoplug_v4.dtb nfs_bootm=bootm 0x800000 0x1100000 0x1c00000 bootcmd_nfs=echo "Booting NFS root..."; dhcp; run nfs_bootcmd nfs_bootcmd=run nfs_set_ip; run nfs_set_bootargs; run nfs_boot nfs_set_ip=setenv nfs_ipconfig $ipaddr:$nfs_server:$gatewayip:$netmask:tldDebian2:eth0:off nfs_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts nfs_boot=run nfs_load_uimage; run nfs_load_uinitrd; run nfs_load_dtb; run nfs_bootm bootcmd_exec=run bootcmd_nfs
Re: Use uEnv.txt for Testing January 26, 2018 09:08AM |
Admin Registered: 13 years ago Posts: 19,092 |
ls -l /srv ls -l /srv/nfs-export
exportfs -s
Re: Use uEnv.txt for Testing January 26, 2018 09:46AM |
Registered: 10 years ago Posts: 64 |
silicat@odroid:/srv/nfs-export/Testbed/pogoplug.hosts/rootfs/4.4.0$ cd silicat@odroid:~$ ls -l /srv total 4 drwxr-xr-x 3 root root 4096 Jan 26 07:46 nfs-export silicat@odroid:~$ ls -l /srv/nfs-export total 4 drwxr-xr-x 3 root root 4096 Jan 26 07:44 Testbed silicat@odroid:~$ ls -l /srv/nfs-export/Testbed/pogoplug.hosts/rootfs/4.4.0/ total 4 drwxr-xr-x 21 root root 4096 Jan 26 08:26 tldDebian2
silicat@odroid:~$ exportfs -s exportfs: invalid option -- 's' usage: exportfs [-afhioruv] [host:/path] silicat@odroid:~$ uname -r 4.14.5-92
Re: Use uEnv.txt for Testing January 26, 2018 02:44PM |
Admin Registered: 13 years ago Posts: 19,092 |
ii libnfsidmap2:armel 0.25-5.1 armel NFS idmapping library ii nfs-common 1:1.3.4-2.1 armel NFS support files common to client and server ii nfs-kernel-server 1:1.3.4-2.1 armel support for NFS kernel server
Re: Use uEnv.txt for Testing January 26, 2018 03:34PM |
Registered: 10 years ago Posts: 64 |
Re: Use uEnv.txt for Testing January 26, 2018 03:57PM |
Admin Registered: 13 years ago Posts: 19,092 |