[How-To] update DStar/PP/GFlex to new uBoot for kernel>3.2

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

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby pepedog » Mon Oct 29, 2012 4:36 pm

1st post in thread, netconsole
/usr/sbin/fw_setenv usb_custom_params 'loglevel=6 netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/'
There should be a mac address of remote after .4/
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby sambul13 » Mon Oct 29, 2012 5:23 pm

I tried it without MAC, and it seems to work, if one doesn't forget to close the quote (like 4/' ) at the end. ;)
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby moonman » Fri Nov 02, 2012 5:59 am

@pepedog If you specify a mac address all machines will discard packets not addressed to them. With no mac specified all machines will accept all the packets. This setup is somewhat unstable. Sometimes I get output sometimes I don't. What makes it better if the client is wired into the same switch. Wireless is the worst even with igmp proxy enabled.

Edited the guide on the first page to address an issue with USB booting when sata drive is present. Also added ignore_loglevel kernel boot parameter instead of loglevel=6 for a full log
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: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby sambul13 » Fri Nov 02, 2012 7:07 pm

$this->bbcode_second_pass_quote('moonman', 'E')dited the guide...
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv usb_set_bootargs 'setenv bootargs console $console root=/dev/disk/by-label/urootfs rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'')

I tested this approach as one of possible with uInitrd linked in 1st post. While hydro posted earlier how to build uInitrd and mod Uboot env on Dockstar like above, on GoFlex Net it didn't work for me. Here's what works with current kernel after one copies uInitrd to /boot dir on rootfs partition of a USB Thumb and changes the file permissions to 644:

$this->bbcode_second_pass_code('', 'fw_setenv usb_root LABEL=Alarm
fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=Alarm rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'')
Of course, you need to put your own rootfs partition label. The above env and uInitrd together allow to boot GFN from USB Thumb regardless whether SATA drive is attached to GFN or not. I didn't test it with rootfs on a USB HD or SATA drive. If one has rootfs on both SATA and USB, or use USB HD instead of Thumb to boot the OS, to choose which drive to boot from, you may need to set boot priority to SATA or USB, and also possibly correct boot partition label and how its set in env.

For some reason my USB Stick didn't boot initially with the uInitrd present, and shown a number of errors when checking its FS in Gparted, all related to the uInitrd module references in OS components. Once all were fixed, it booted OK. Not sure what the cause was, but for this Thumb the kernel was giving "can't read disk" error on GFN after uInitrd loading by Uboot until FS was fixed, despite Uboot read the disk OK. So if one can't boot from a Thumb with that uInitrd, print and verify your env in Netconsole, then reset power, reinsert the stick or run its FS check. Or follow mentioned hydro's thread to build own uInitrd.
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby Therouanne » Tue Nov 13, 2012 10:35 am

Hello,
My goflex home not boot anymore, I followed this procedure to update the uboot and boot from usb first then sata, I can access via ssh to an environment like 'busybox' with ubit0-6 as prompt (old uboot rescue?) ... Can anyone help me? :?

ubit0-6:/# fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
usb_rootfstype=ext3

ubit0-6:/# fdisk -l
Disk /dev/mtdblock0: 1 MB, 1048576 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock0 doesn't contain a valid partition table
Therouanne
 
Posts: 3
Joined: Thu Oct 25, 2012 6:28 pm

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby moonman » Tue Nov 13, 2012 12:47 pm

When you boot from USB is sata drive in the cradle? Did you carefully read the guide to make sure to do only the steps needed for your setup? Do you have a netconsole or serial setup to see what's going on at boot?
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: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby Therouanne » Thu Nov 15, 2012 10:10 am

I was finally able to boot from usb (without Sata disk), i've update kernel,
i have installed this rescue system http://forum.doozan.com/read.php?4,7915 on mtd1/2 and i have tried to boot from Label to be able to boot USB when sata is connected, but now i only can start to rescue (without usb and sata), when i have updated uboot i've also activated BFQ, netconsole, changed arcnumber to 3338 and added ethaddr variable
I will post netcat's output later, i can't plug my USB device on SSH :D
Sorry for my English,
Thanks!


nc without usb/sata
rpi ~ # nc -lup 6666

U-Boot 2011.12 (Apr 18 2012 - 23:08:20)
Seagate GoFlexNet
0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..

Reset IDE: ide_preinit failed
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-3.3.2-kirkwide
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3627768 Bytes = 3.5 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...


My fw_env:
rescue:~# 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_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_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
sata_device=0:1
sata_root=/dev/sda1
sata_rootfstype=ext3
sata_rootdelay=10
sata_set_bootargs=setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params
sata_boot=ide reset; mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_bootcmd=run sata_set_bootargs; run sata_boot
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset
ncipk=10.10.10.4
serverip=10.10.10.3
preboot=run nc_test nc_start
nc_test=ping $ncip
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_custom_params=loglevel=6 netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq
sata_custom_params=loglevel=6 netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq
arcNumber=3338
ipaddr=10.0.10.6
ncip=10.10.10.5
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_pogo=run bootcmd_rescue
rescue_installed=1
ethaddr=00:10:75:2c:11:7e
usb_set_bootargs=setenv bootargs console $console root=/dev/sda1 rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
rescue:~#
Therouanne
 
Posts: 3
Joined: Thu Oct 25, 2012 6:28 pm

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby moonman » Thu Nov 15, 2012 12:23 pm

Your english is fine :) It would be nice to see netcat with USB and sata sattached. A couple of things:
$this->bbcode_second_pass_quote('', 'u')sb_set_bootargs=setenv bootargs console $console root=/dev/sda1 rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype

should be
$this->bbcode_second_pass_quote('', 'u')sb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype


Thats the default at least and this should work with just a USB drive plugged in (the issue was probably the "=" sign and not /dev/sda1 part as I would think with just USB drive that would work). For booting with sata drive you need to place uInitrd image in /boot directory on you USB drive, then you can change root=/dev/disk/by-label/urootfs. But for this to work, you have to make sure that your USB flash drive has a label urootfs.
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
Top

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby Therouanne » Thu Nov 15, 2012 5:04 pm

Thanks very much Moonman, this now working fine! ;)
Therouanne
 
Posts: 3
Joined: Thu Oct 25, 2012 6:28 pm

Re: [How-To] update DStar/PP/GFlex to new uBoot for kernel>3

Postby shinji257 » Sat Nov 17, 2012 7:42 pm

I have to apologize for the noobishness of my question here.

I just now modded and flashed a PogoPlug v2 (E02). Given that can I go straight to the >3.2 kernels? Are there any potentially show stopping quirks that I should be aware of? Just curious before I go and do something I regret.

Just in case:
$this->bbcode_second_pass_code('', '
[root@alarm ~]# uname -a
Linux alarm 3.1.10-13-ARCH #1 PREEMPT Mon Aug 20 15:46:18 UTC 2012 armv5tel GNU/Linux
[root@alarm ~]# cat /proc/cpuinfo
Processor : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 1191.11
Features : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1

Hardware : Marvell SheevaPlug Reference Board
Revision : 0000
Serial : 0000000000000000
')
shinji257
 
Posts: 8
Joined: Thu Feb 16, 2012 3:43 am

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 15 guests