On Wed, Jul 16, 2014 at 5:45 PM, John Syn <[email protected]> wrote: > I've attached my uEnv.txt file I use for mounting rootfs over NFS. Not > sure how to work around using two kernels, one built with initrd and > another without initrd support.
How does, this look for a default: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0#nfs_support I was following: https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt Just converting [-] -> [_] The nfs part is triggered by "client_ip" variable, as that should be the most unique thing of any microsd/board. it honors "dtb=" so you can override the default *.dtb ++ "echo Checking if client_ip is set ...;" \ ++ "if test -n ${client_ip}; then " \ ++ "if test -n ${dtb}; then " \ ++ "setenv fdtfile ${dtb};" \ ++ "echo using ${fdtfile} ...;" \ ++ "fi;" \ ++ "gpio set 56; " \ ++ "echo Running nfsboot ...;" \ ++ "run nfsboot;" \ ++ "fi;" \ nfsboot: ++ "nfsboot=echo Booting from ${server_ip} ...; " \ ++ "setenv nfsroot nfsroot=${server_ip}:${root_dir}${nfs_options}; " \ ++ "setenv ip ip=${client_ip}:${server_ip}:${gw_ip}:${netmask}:${hostname}:${device}:${autoconf}; " \ ++ "setenv autoload no; " \ ++ "tftp ${loadaddr} ${bootfile}; " \ ++ "tftp ${fdtaddr} dtbs/${fdtfile}; " \ ++ "run nfsargs; " \ ++ "bootz ${loadaddr} - ${fdtaddr}\0" \ where nfsargs is very close to mmcargs, just with the nfs options: ++ "nfsargs=setenv bootargs console=${console} " \ ++ "${optargs} " \ ++ "${cape_disable} " \ ++ "${cape_enable} " \ ++ "root=/dev/nfs rw" \ ++ "rootfstype=${nfsrootfstype} " \ ++ "nfsroot=${nfsroot} " \ ++ "ip=${ip} " \ ++ "${cmdline}\0" \ Here's the global var's used: server_ip=192.168.1.100 gw_ip=192.168.1.1 netmask=255.255.255.0 hostname= device=eth0 autoconf=off root_dir=/home/userid/targetNFS nfs_options=,vers=3 nfsrootfstype=ext4 rootwait fixrtc So for John's uEnv.txt, this is all that should be needed in boot: /uEnv.txt client_ip=10.100.116.105 server_ip=10.100.116.73 gw_ip=10.100.116.1 root_dir=/home/<userid>/targetNFS Now to test it.. I don't think i broke anything. ;) Regards, -- Robert Nelson http://www.rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
