Welcome! Log In Create A New Profile

Advanced

Upgrading from old chained uboot on dockstar

Posted by JohnXX 
JohnXX
Upgrading from old chained uboot on dockstar
September 22, 2013 07:24AM
So, I've got a dockstar that I installed Debian Lenny on quite a while ago. I used the old instructions back when they were the recommended method to install. I used a little USB HDD to run Debian and at some point it died. After I confirmed that it was dead, I tried to boot into regular Seagate dockstar system on flash and discovered that it also wasn't booting. I set it aside for a while, but recently managed to get an old Lenny install going again by manually unpacking it to a USB stick and booting it. What I'd like to do is get a relatively recent Debian booting, but I think I need a newer uboot for that. Since all the uboot install directions floating around recommend installing it from the Seagate Dockstar environment, I need some advise on where to go next.

Short version
Current situation:
  1. Installed Debian Lenny using old chained uboot installation method
  2. Seagate Dockstar environment won't boot anymore
  3. I can still boot into Lenny
Goal: Get a newer version of uboot installed so I can get a newer version of Debian booting from USB stick
Re: Upgrading from old chained uboot on dockstar
September 22, 2013 03:44PM
JohnXX,

Have you take a look at Jeffs uBoot installation instruction here?
http://projects.doozan.com/uboot/

I never have the chained uBoot installed, so can't guarantee that it will work. However, if your mtd0 is what the Dockstar usually allocate then I think it wil work. You could post your output of the following commands here and we'll take a look.

cat /proc/mtd
cat /etc/fw_env.config
dmesg

With the new uBoot, you can boot Lenny. And also can upgrade to a newer kernel here:
http://forum.doozan.com/read.php?2,12096

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Upgrading from old chained uboot on dockstar
September 22, 2013 10:57PM
debian:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 0fb00000 00020000 "root"
debian:~# cat /etc/fw_env.config 
cat: /etc/fw_env.config: No such file or directory
debian:~# dmesg
Linux version 2.6.33 (kelly@speedy) (gcc version 4.4.3 (Sourcery G++ Lite er) ) #2 PREEMPT Tue Mar 2 14:27:17 MST 2010
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c0577ed0, node_mem_map c064b000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext2
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 123348KB available (5096K code, 1028K data, 144K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:114
Console: colour dummy device 80x30
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Cache support initialised.
initial MPP regs: 01111111 11113322 00001111 00100000 00000000 00000000 00000000
  final MPP regs: 01111111 11113322 00001111 00000000 00000000 00000000 00000000
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: 00
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 964, nTxLock = 7719
msgmni has been set to 241
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 298 at 0x000002540000
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000010000000 : "root"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:10:75:1a:34:a1
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
usb 1-1: new high speed USB device using orion-ehci and address 2
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.4: new high speed USB device using orion-ehci and address 3
scsi0 : usb-storage 1-1.4:1.0
rtc-mv rtc-mv: internal RTC not ticking
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: plug:green:health
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
Gating clock of unused units
before: 0x00df03dd
 after: 0x00c7c1d9
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Waiting 10sec before mounting root device...
scsi 0:0:0:0: Direct-Access     LaCie    XtremKey          Dev PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] 15316320 512-byte logical blocks: (7.84 GB/7.30 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 38 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
VFS: Mounted root (ext2 filesystem) on device 8:1.
Freeing init memory: 144K
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: location a
sata_mv sata_mv.0: location b
sata_mv sata_mv.0: location c
sata_mv sata_mv.0: location e
sata_mv sata_mv.0: location f
sata_mv sata_mv.0: location g
sata_mv sata_mv.0: slots 32 ports 2
scsi1 : sata_mv
scsi2 : sata_mv
ata1: SATA max UDMA/133 irq 21
ata2: SATA max UDMA/133 irq 21
ata1: SATA link down (SStatus 0 SControl F300)
ata2: SATA link down (SStatus 0 SControl F300)
uncorrectable error : 
end_request: I/O error, dev mtdblock1, sector 0
Buffer I/O error on device mtdblock1, logical block 0
uncorrectable error : 
end_request: I/O error, dev mtdblock1, sector 8
Buffer I/O error on device mtdblock1, logical block 1
uncorrectable error : 
end_request: I/O error, dev mtdblock1, sector 16
Buffer I/O error on device mtdblock1, logical block 2
uncorrectable error : 
end_request: I/O error, dev mtdblock1, sector 24
Buffer I/O error on device mtdblock1, logical block 3
uncorrectable error : 
end_request: I/O error, dev mtdblock1, sector 0
Buffer I/O error on device mtdblock1, logical block 0
uncorrectable error : 
end_request: I/O error, dev mtdblock0, sector 1920
Buffer I/O error on device mtdblock0, logical block 240
uncorrectable error : 
end_request: I/O error, dev mtdblock0, sector 1920
Buffer I/O error on device mtdblock0, logical block 240
uncorrectable error : 
end_request: I/O error, dev mtdblock0, sector 2032
Buffer I/O error on device mtdblock0, logical block 254
uncorrectable error : 
end_request: I/O error, dev mtdblock0, sector 2040
Buffer I/O error on device mtdblock0, logical block 255
uncorrectable error : 
end_request: I/O error, dev mtdblock0, sector 2032
Buffer I/O error on device mtdblock0, logical block 254
NET: Registered protocol family 10
ADDRCONF(NETDEV_UP): eth0: link is not ready
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev mtdblock2.
UBIFS error (pid 1741): ubifs_get_sb: cannot open "/dev/mtdblock2", error -22
Empty flash at 0x00de8e44 ends at 0x00de9000
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000000: 0x0012 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000004: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000008: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0200000c: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000010: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000014: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000018: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0200001c: 0xf014 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000020: 0x00e0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02000024: 0x0140 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020000: 0x3005 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020004: 0x2004 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020008: 0x3004 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020010: 0x005e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020014: 0x0050 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020018: 0xc4bc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0202001c: 0x7000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020020: 0x0022 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020024: 0x1000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02020028: 0x2050 instead
Further such events for this erase block will not be printed
Empty flash at 0x02022bc0 ends at 0x02022be4
Empty flash at 0x02022be8 ends at 0x02022c00
Empty flash at 0x02022c04 ends at 0x02022c10
Empty flash at 0x02022c18 ends at 0x02022c1c
Empty flash at 0x02029eb8 ends at 0x02029ec4
Empty flash at 0x02029edc ends at 0x02029ee0
Empty flash at 0x0202aeb8 ends at 0x0202aebc
Empty flash at 0x0202b2c4 ends at 0x0202b2c8
Empty flash at 0x0202b700 ends at 0x0202b704
Empty flash at 0x0202b7f0 ends at 0x0202b7f4
Empty flash at 0x0202b880 ends at 0x0202b884
Empty flash at 0x0202b8c8 ends at 0x0202b8cc
Empty flash at 0x0202ba18 ends at 0x0202ba20

The lines about FAT and UBIFS are because I tried to mount /dev/mtdblock1 without specifying a type and the specified a type (incorrectly) of 'ubifs'. After that I mounted it as jffs2 and it looks like it mounted successfully. I checked dmesg, found the errors, and remounted it as a read-only to avoid corrupting it.

I actually did see the uboot installation instructions already, but I wanted to double check since the page for the automated installer seems to suggest it should be run from the Seagate Dockstar distro with no USB devices plugged in.
Re: Upgrading from old chained uboot on dockstar
September 23, 2013 01:00AM
JohnXX,

> I actually did see the uboot installation
> instructions already, but I wanted to double check
> since the page for the automated installer seems
> to suggest it should be run from the Seagate
> Dockstar distro with no USB devices plugged in.

Yes, the installation instruction was written for people who have not installed the new uBoot and Debian, and they would run it from inside stock OS (on NAND, with no USB devices). Your mtd setting and dmesg indicate you can update uBoot. While you're in Debian, you can run Jeff's script and it will recognize that you have an older uBoot, so it will install the new uBoot. And the result will be 4 mtd partitions instead of 3 mtd partitions as you currently have.

After the new uBoot installation is done, you can verify your uBoot envs by looking at fw_env.config (If you don't have this file, then create one like this) :

cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

And then double check with
fw_printenv

If things look good then reboot. Or better yet, before rebooting while you're still in Debian, use a new USB stick and put the rootfs I've posted above on it, just in case.

The new uBoot should boot you Debian Lenny stick. But it it does not, then use the new stick to boot, and then fix your Debian Lenny stick, or continue using the new rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/23/2013 01:29AM by bodhi.
Re: Upgrading from old chained uboot on dockstar
September 23, 2013 02:49AM
I had to use --no-check-uboot to get the uboot installer to flash uboot. Then I turned on netconsole. I had nothing of use on my Lenny install, so I just made a new wheezy install using your rootfs. After rebooting, netconsole works, but I don't see anything after Starting kernel and the machine doesn't appear to be getting itself a DHCP address. I think I can troubleshoot from here since I do have netconsole access. It's possible that my arcNumber is wrong?

Update 1: It just didn't come up with the right MAC address. so it wasn't on the IP I thought it would be on. I'll figure out how to set that (aka RTFM) and then all should be well. Thanks so much for your help!

Update 2: Just in case I need to reference this again, or in case someone else is trying to do the same thing. I set the MAC address back to what was printed on the label on the bottom of the device:
fw_setenv ethaddr 00:10:75:1a:34:a1

Now it gets its old DHCP lease!



Edited 2 time(s). Last edit at 09/23/2013 03:20AM by JohnXX.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: