Wandboard external root (SATA or USB)?

This forum is for supported devices using an ARMv7 Freescale SoC.

Wandboard external root (SATA or USB)?

Postby krovetz » Tue Aug 13, 2013 12:36 am

Does anybody know how to setup a wandboard to have its root be on the external drive?
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Wandboard external root (SATA or USB)?

Postby WarheadsSE » Tue Aug 13, 2013 12:57 am

Assuming you have a USB or SATA (Quad only!), then you need the sd card for the bootloader & config, but just changing it to have root=/dev/sda1 (or appropriate) should be enough.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Wandboard external root (SATA or USB)?

Postby krovetz » Tue Aug 13, 2013 1:48 pm

Where does the config go? It's really nice when that can be done via a boot.scr or uEnv.txt, but I can't find anything like that. Does this machine require a serial connection and manual manipulation of u-boot variables?
Thanks.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Wandboard external root (SATA or USB)?

Postby kmihelich » Tue Aug 13, 2013 3:19 pm

You would need serial at the moment.. I'll update U-Boot to make using an environment easier. Give me a few hours.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Wandboard external root (SATA or USB)?

Postby kmihelich » Tue Aug 13, 2013 5:41 pm

Do an -Syu and you will pull in the new uboot version (2013.07-2). Be sure to say 'y' to flash it to the card. You can then create and set up a /boot/uEnv.txt file like any other platform.

Here is the default U-Boot environment for reference:
$this->bbcode_second_pass_code('', 'baudrate=115200
boot_fdt=no
bootcmd=mmc dev ${mmcdev};if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loaduimage ...;if run loaduimage; then run mmcboot;fi;fi;
bootdelay=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC
ethaddr=00:1f:7b:b0:00:04
ethprime=FEC
fdt_addr=0x11000000
fdt_file=/boot/dtbs/imx6s-wandboard.dtb
fdt_high=0xffffffff
importbootenv=echo Importing environment from mmc (uEnv.txt)...; env import -t $loadaddr $filesize
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x12000000
loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/uEnv.txt
loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${zImage}
mmcargs=setenv bootargs console=${console},${baudrate} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} video=${video}
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz ${loadaddr}; else echo WARN: Cannot load the DT; fi; fi; else bootm ${loadaddr}; fi;
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p1 rw
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} zImage; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz ${loadaddr}; else echo WARN: Cannot load the DT; fi; fi; else bootz ${loadaddr}; fi;
script=/boot/boot.scr
uimage=/boot/uImage
update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${update_sd_firmware_filename}; then setexpr fw_sz ${filesize} / 0x200; setexpr fw_sz ${fw_sz} + 1; mmc write ${loadaddr} 0x2 ${fw_sz}; fi; fi
update_sd_firmware_filename=u-boot.imx
zimage=/boot/zImage')
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Wandboard external root (SATA or USB)?

Postby krovetz » Tue Aug 13, 2013 6:19 pm

Thanks for doing this. I updated uboot and put the following uEnv.txt into both /dev/sda1/boot/uEnv.txt and /dev/mmcblk0p1/boot/uEnv.txt (I'm not sure which is controlling).
$this->bbcode_second_pass_code('', 'extraargs=root=/dev/sda1 rootwait')
and it doesn't seem to get picked up.
$this->bbcode_second_pass_code('', '
[root@wand /]# dmesg | grep root
[ 0.000000] Linux version 3.0.35-2-ARCH (nobody@-root-chroot-copy) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Wed Jul 31 15:54:21 CDT 2013
[ 0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait video=
[ 2.782844] VFS: Mounted root (ext4 filesystem) on device 179:1.')
I've got a USB drive successfully mounting as sda.
$this->bbcode_second_pass_code('', '
[root@wand /]# dmesg | grep sda
[ 3.542575] sd 0:0:0:0: [sda] 118489088 512-byte logical blocks: (60.6 GB/56.5 GiB)
[ 3.556012] sd 0:0:0:0: [sda] Write Protect is off
[ 3.565622] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 3.566339] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 3.604144] sda: sda1 sda2
[ 3.621960] sd 0:0:0:0: [sda] Attached SCSI disk')
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Wandboard external root (SATA or USB)?

Postby kmihelich » Tue Aug 13, 2013 6:20 pm

I didn't put the default environment in a post for my health. Read it, change what needs to be changed in the uEnv.txt.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Wandboard external root (SATA or USB)?

Postby krovetz » Tue Aug 13, 2013 6:38 pm

Got it. Thanks. The following works for me.
$this->bbcode_second_pass_code('', '
[root@wand ~]# cat /boot/uEnv.txt
mmcroot=/dev/sda1 rw
')
uEnv.txt needs to be on the sd card.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm


Return to Freescale

Who is online

Users browsing this forum: No registered users and 4 guests