Pogo E02 Not Starting Without USB

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

Re: Pogo E02 Not Starting Without USB

Postby hydro » Wed Aug 06, 2014 4:52 am

Looks good. Unfortunately the U-Boot you have installed does not provide the fsload command. I've made an edit in my first posting.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: Pogo E02 Not Starting Without USB

Postby dilenjoy » Wed Aug 06, 2014 3:04 pm

So if fsload won't work then does it mean I can't get to the Pogo's defualt OS?

I think doozan's uBoot will support both Pogo OS and Archlinux: //projects.doozan.com/uboot/install_uboot_mtd0.sh. Would I be able to uninstall or replace my uboot with doozan uBoot?

Looking at the script the bootcmd is much different:

$this->bbcode_second_pass_code('', 'bootcmd='nand read.e 0x800000 0x100000 0x200000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'')

If I tried to fw_setenv to this bootcmd will I get back to Pogoplug OS?
dilenjoy
 
Posts: 8
Joined: Tue Jul 29, 2014 6:56 pm

Re: Pogo E02 Not Starting Without USB

Postby hydro » Wed Aug 06, 2014 3:58 pm

$this->bbcode_second_pass_quote('dilenjoy', 'S')o if fsload won't work then does it mean I can't get to the Pogo's defualt OS?

No, it just means U-Boot cannot load the original bootloader from where you have placed it (the NAND). You can setup a TFTP server in your network and make U-Boot load uboot-original-mtd0.kwb from it using the tftp command as described at the bottom of my first posting (adapt and append the commands to bootcmd via fw_setenv). Or put uboot-original-mtd0.kwb on another USB thumb drive and make U-Boot load it from there using the ext2load command (I never tried that).
$this->bbcode_second_pass_quote('dilenjoy', '
')I think doozan's uBoot will support both Pogo OS and Archlinux: //projects.doozan.com/uboot/install_uboot_mtd0.sh. Would I be able to uninstall or replace my uboot with doozan uBoot?

Yes, probably the easiest solution, just run the script. It will tell you that you have to rerun it with the --no-uboot-check option and then you will be asked what device you are using. When it is installed you probably want to change usb_rootfstype via fw_setenv.
$this->bbcode_second_pass_quote('dilenjoy', '
')Looking at the script the bootcmd is much different:
$this->bbcode_second_pass_code('', 'bootcmd='nand read.e 0x800000 0x100000 0x200000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'')

That is the boot command for the uboot-original-mtd0.kwb bootloader to boot Pogoplug OS. It has a separate environment with other variables (e.g. bootargs_root).
$this->bbcode_second_pass_quote('dilenjoy', '
')If I tried to fw_setenv to this bootcmd will I get back to Pogoplug OS?

No it won't. And it also won't boot Arch any more if you replace bootcmd completely (instead of appending it). You would have to restore the bootcmd via serial console. I tried similar commands (after defining $bootargs_root first, of course) from a netconsole to boot Pogoplug OS on the GoFlex Home (in contrast to using fw_setenv this bears no risk, because changes are not permanent), but I didn' manage to.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany
Top

Re: Pogo E02 Not Starting Without USB

Postby dilenjoy » Wed Aug 06, 2014 4:43 pm

Ok thanks. --no-uboot-check ran fine. As you mentioned fw_printenv shows usb_rootfstype is set to ext2 and probably needs to be changed to ext3. Can you confirm if I need to run the command: fw_setenv usb_rootfstype ext3? fw_printenv shows:

$this->bbcode_second_pass_code('', 'usb_root=/dev/sda1
usb_rootfstype=ext2')

/dev/sda1 is on / type ext3
$this->bbcode_second_pass_code('', '[root@alarm tmp]# mount | grep ext
/dev/sda1 on / type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)')

New fw_printenv after new uboot with --no-uboot-check. Anything looks suspicious before I restart?:
$this->bbcode_second_pass_code('', '[root@alarm tmp]# /usr/sbin/fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=xx:xx:xx:xx:xx:xx
arcNumber=2097')

Thanks
dilenjoy
 
Posts: 8
Joined: Tue Jul 29, 2014 6:56 pm

Re: Pogo E02 Not Starting Without USB

Postby hydro » Wed Aug 06, 2014 5:56 pm

I don't exactly know what happens when ethaddr is not properly set (maybe a random address is created causing the router to assign a different IP at each boot), so you better set ethaddr to the MAC that's printed on the bottom side of your Pogo. You can also find it in the output of ip addr ls.
The arcNumber should also be adjusted (I think the install script also informs about it), but there is a tiny bug with this U-Boot and the Pogo E02, that can be solved by setting the machid.
And yes, usb_rootfstype should not be set to ext2, so here are the changes I'd apply before reboot.
$this->bbcode_second_pass_code('', '
fw_setenv ethaddr 01:23:45:67:89:AB # use your MAC instead
fw_setenv machid dd6
fw_setenv usb_rootfstype ext3
')
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: Pogo E02 Not Starting Without USB

Postby dilenjoy » Wed Aug 06, 2014 10:45 pm

That worked! I ran doozan's uboot with --no-boot-check and it installed the new uboot. Looking back, I should have started with that. I also set the following env's using fw_setenv:
$this->bbcode_second_pass_code('', '
fw_setenv machid dd6
fw_setenv usb_rootfstype ext3
fw_setenv arcNumber 2998')

In gist, uboot provided at archlinux.org (instructions using http://archlinuxarm.org/platforms/armv5 ... 2-pinkgray) prevents pogoplug OS boot on USB removal. The uboot provided by doozan supports both as it also supports fsload. I was able to boot to Pogo OS and afterwards I went on reinstalling archlinux using instructions at: http://blog.qnology.com/2013/03/tutoria ... linux.html.

I'll keep Pogoplug's hwbd services disabled in init.d.

Thanks for all your help @hydro. Fun experience.
dilenjoy
 
Posts: 8
Joined: Tue Jul 29, 2014 6:56 pm

Previous

Return to ARMv5

Who is online

Users browsing this forum: Google [Bot] and 15 guests