Welcome! Log In Create A New Profile

Advanced

2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug

Posted by bodhi 
Here is the log

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:29:52)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0

(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
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: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            91 MiB
UBI: number of good PEBs:        728
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
** Bad device usb 0 **
** Bad device usb 1 **
** Bad device usb 2 **
** Bad device usb 3 **
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS:   get_fl_mem: unknown device type, using raw offset!
get_fl_mem: unknown device type, using raw offset!
     <repeats lots of times>
get_fl_mem: unknown device type, using raw offset!
 done.

find_inode failed for name=uboot-original-mtd0.kwb

load: Failed to find inode

### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
resetting ...


U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:29:52)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  3

Also, I tried booting off the USB stick with Debian and that worked though it hadn't before!
unmesh,

Booting Debian looks good, and you've confirmed it. You can't boot into Pogo OS (when there is no USB plugged in) because the mtd partiton that houses the orginal u-boot has error.

If you want to do boot Pogo OS, you have to find a original copy of the mtd (rootfs) and the orginal u-boot image copy somewhere, reflash mtd, and copy the u-boot image file back in.

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> @sunfire,
>
> Looking back to
> [url=http://forum.doozan.com/read.php?3,12381,1742
> 0#msg-17420]the upload post[/url]:
>
> [quote]This is because the envs location this
> U-Boot uses is 0xC0000. There is nothing in that
> location yet. Feel free to set the envs to boot
> into Debian just like you have done for stock
> u-boot before, but don't save with saveenv. Just
> cut/paste the old envs to set them here for
> booting.[/quote]
>
> The reason was stock u-boot is limited in
> scripting capability (so the awkward way to set
> bootargs). Because the new u-boot provides hush
> shell scripting, with the new u-boot, the envs
> should be set this way:
>
> [code]
> [b]set_bootargs_usb=console=ttyS0,115200[/b]
> mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en
> v),0x80000(key_store),0x80000(info),0xA00000(etc),
> 0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ker
> nel_2),0x2FC0000(rootfs2)
> bootcmd_usb=mw.l f1010100 0020c000; [b]setenv
> bootargs $set_bootargs_usb[/b]; usb start;
> ext2load usb 0:1 $[b]loadaddr[/b] /boot/uImage;
> ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm
> $[b]loadaddr[/b] 0x01100000
> bootcmd=run bootcmd_usb
> arcNumber=4495
> mainlineLinux=yes
> machid=118f
> [/code]
>
> After you set them in serial console, go ahead and
> save them with
> [code]
> saveenv
> [/code]
>
> UPDATE:
>
> Reading DavideDG posts, I recall one more thing:
> the variables should have no parantheses (I am not
> at my box so I can't cut/paste mine here).


Hi Bodhi,

thanks, without parantheses it works.

But the watchdog is not disabled?

-sunfire
bodhi Wrote:
-------------------------------------------------------
> unmesh,
>
> Booting Debian looks good, and you've confirmed
> it. You can't boot into Pogo OS (when there is no
> USB plugged in) because the mtd partiton that
> houses the orginal u-boot has error.
>
> If you want to do boot Pogo OS, you have to find a
> original copy of the mtd (rootfs) and the orginal
> u-boot image copy somewhere, reflash mtd, and copy
> the u-boot image file back in.

I found the image for the Dockstar that supposedly has the same electronics and am willing to try it. How would I reflash it?

My environment variables as seen from the serial console are as follows:

arcNumber=2097
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:25:31:04:57:A4
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
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
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
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
stderr=serial
stdin=serial
stdout=serial
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
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
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
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
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_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_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2342/131068 bytes
@sunfire,

Yes, the watchdog is disabled whe u-boot starts.

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> @sunfire,
>
> Yes, the watchdog is disabled whe u-boot starts.

@bodhi

But it is still restarting after cold start.

I set bootdelay to 20, this solved the problem.

But i thought the disabled watchdog stops the restart problem.

-sunfire
@sunfire,

Restart could be caused by reasons other than watchdog. Please post the serial boot log when it restarted.

-bodhi
===========================
Forum Wiki
bodhi's corner
@unmesh,

It's best if you create a new thread for this.

And list the info about where you got the mtd images, what do they look like (size,...date...) and what command was used to dumpt these mtds to files. It is not possible to suggest how to do it without the information.

-bodhi
===========================
Forum Wiki
bodhi's corner
@bodhi

It shows nothing special in serial boot log.

You hear a "beep" and it interrupts the boot process and start new.

-sunfire
sunfire,

There is no way for me to tell what's wrong without the entire serial boot log :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Hey i have debian working on my pogo v4, and wanted to try openwrt, build an image from trunk and put it on a usb.

this all works except for the fact that openwrt uses different names for calling the kernel images.

i have worked around getting uImage to work (simply rename it)

but im not getting uInitrd to work, keeps giving me these errors:

## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   ARM OpenWrt Linux-3.14.18
   Created:      2014-09-15  10:37:51 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3110966 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
No Linux ARM Ramdisk Image
Ramdisk image is corrupt or invalid

i tried renaming a bunch of files, no luck. any suggestions on how to proceed?

Edit:

scrap that, i did not do enough research, openwrt does not use a uInitrd file, so not containing it will simply skip it and move to boot.




Edited 2 time(s). Last edit at 09/15/2014 06:05AM by Tripleflix.
Hi:

I followed all the steps and successfully flashed this 2014.07 uBoot to my Pogoplug V4-03-01.

Serial console (need to solder again) and Netconsole works fine

I want to run OpenWRT but no success at all. I got message:

EXT4-fs (sda1): couldn't mount as ext3 duw to features incompatibilites.
.
.
.
No filesystem could mount root, tried: ext3.

This USB memory stick boots correctly in my Dockstar and GoFlexNET with davygravy's uBoot.

I formated the USB as ext2 and ext3. I also tried an SD with ext3. Nothing.

Anybody who has successfully run OpenWRT with this uBoot and can help me would be appreciated.
Juan C. Galvez,

In serial console, get the output of printenv and the boot log from begining until the above rootfs mounting error, and post here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Thank you Bodhi for your reply.

I am not going to be able to do that until week end. As soon as I can get it I will post here.
@bodhi,

here is my serial log before auto restart:

U-Boot 2013.10-tld-1 (Aug 29 2014 - 22:07:26)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_??
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0

Reset IDE: Bus 0: OK Bus 1: ....OK
  Device 0: Model: SAMSUNG HD642JJ  Firm: 1AA01113 Ser#: S1AFJ9AQA11133
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 610480.3 MB = 596.1 GB (1250263728 x 512)
  Device 1: Model: SAMSUNG HD204UI  Firm: 1AQ10001 Ser#: S2H7J9KB502996
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
2756040 bytes read in 1006 ms (2.6 MiB/s)
6353610 bytes read in 2295 ms (2.6 MiB/s)
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-3.16.0-kirkwood-tld-2
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2755976 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.16.0-kirkwood-tld-2
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6353546 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.16.0-kirkwood-tld-2 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: ZyXEL NSA325 2-Bay Power Media Server
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c07c303c, node_mem_map dfbfb000
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 131072 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 505272K/524288K available (5441K kernel code, 397K rwdata, 1840K rodata, 257K init, 299K bss, 19016K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc07248b0   (7283 kB)
[    0.000000]       .init : 0xc0725000 - 0xc0765444   ( 258 kB)
[    0.000000]       .data : 0xc0766000 - 0xc07c975c   ( 398 kB)
[    0.000000]        .bss : 0xc07c975c - 0xc08144dc   ( 300 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns
[    8.649252] Console: colour dummy device 80x30
[    8.649276] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    8.739053] pid_max: default: 32768 minimum: 301
[    8.739152] Security Framework initialized
[    8.739208] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    8.739223] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    8.739924] Initializing cgroup subsys devices
[    8.739974] Initializing cgroup subsys freezer
[    8.739997] Initializing cgroup subsys net_cls
[    8.740036] Initializing cgroup subsys blkio
[    8.740118] CPU: Testing write buffer coherency: ok
[    8.740506] Setting up static identity map for 0x5273f0 - 0x527448
[    8.742472] devtmpfs: initialized
[    8.745562] prandom: seed boundary self test passed
[    8.748561] prandom: 100 self tests passed
[    8.748581] pinctrl core: initialized pinctrl subsystem
[    8.748996] regulator-dummy: no parameters
[    8.749478] NET: Registered protocol family 16
[    8.749795] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    8.750816] cpuidle: using governor ladder
[    8.750838] cpuidle: using governor menu
[    8.750938] Kirkwood: MV88F6282-Rev-A1, TCLK=200000000.
[    8.750957] Feroceon L2: Enabling L2
[    8.750987] Feroceon L2: Cache support initialised.
[    8.751463] initial MPP regs: 01111111 00003311 00001100 00000000 00000000 00000000 00000000
[    8.751487]   final MPP regs: 01111111 00003311 00001100 00000000 00000000 00000000 00000000
[    8.752466] Kirkwood PCIe port 0: link up
[    8.752475] PCI: bus0 uses PCIe port 0
[    8.752628] PCI host bridge to bus 0000:00
[    8.752644] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    8.752654] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
[    8.752662] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    8.752694] pci 0000:00:00.0: [11ab:6282] type 00 class 0x058000
[    8.752720] pci 0000:00:00.0: reg 0x10: [mem 0xd0000000-0xd00fffff 64bit pref]
[    8.752734] pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x1fffffff]
[    8.752781] pci 0000:00:00.0: supports D1 D2
[    8.752948] pci 0000:00:01.0: [1033:0194] type 00 class 0x0c0330
[    8.752981] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    8.753089] pci 0000:00:01.0: PME# supported from D0 D3hot
[    8.753301] PCI: bus0: Fast back to back transfers disabled
[    8.753315] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    8.753346] pci 0000:00:01.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    8.780299] vgaarb: loaded
[    8.780571] usbcore: registered new interface driver usbfs
[    8.780630] usbcore: registered new interface driver hub
[    8.780728] usbcore: registered new device driver usb
[    8.781502] Switched to clocksource orion_clocksource
[    8.811823] NET: Registered protocol family 2
[    8.812612] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    8.812667] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    8.812718] TCP: Hash tables configured (established 4096 bind 4096)
[    8.812772] TCP: reno registered
[    8.812782] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    8.812802] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    8.812971] NET: Registered protocol family 1
[    8.813247] RPC: Registered named UNIX socket transport module.
[    8.813256] RPC: Registered udp transport module.
[    8.813262] RPC: Registered tcp transport module.
[    8.813267] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    8.813317] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    8.813381] PCI: CLS 32 bytes, default 32
[    8.813608] Unpacking initramfs...
[    9.213504] Freeing initrd memory: 6200K (c1101000 - c170f000)
[    9.213606] NetWinder Floating Point Emulator V0.97 (double precision)
[    9.214521] futex hash table entries: 256 (order: -1, 3072 bytes)
[    9.214575] audit: initializing netlink subsys (disabled)
[    9.214623] audit: type=2000 audit(0.560:1): initialized
[    9.215309] zbud: loaded
[    9.215525] VFS: Disk quotas dquot_6.5.2
[    9.215568] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    9.216001] NFS: Registering the id_resolver key type
[    9.216051] Key type id_resolver registered
[    9.216058] Key type id_legacy registered
[    9.216078] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    9.216089] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    9.216221] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    9.216465] msgmni has been set to 998
[    9.216589] Key type big_key registered
[    9.218442] alg: No test for stdrng (krng)
[    9.218536] bounce: pool size: 64 pages
[    9.218589] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    9.218603] io scheduler noop registered
[    9.218614] io scheduler deadline registered
[    9.218756] io scheduler cfq registered (default)
[    9.219091] mv_xor mv_xor.0: Marvell shared XOR driver
[    9.251562] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    9.291553] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    9.291688] mv_xor mv_xor.1: Marvell shared XOR driver
[    9.331554] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[    9.371551] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[    9.371885] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    9.372629] console [ttyS0] disabled
[    9.392674] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[   10.105410] console [ttyS0] enabled
[   10.110000] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[   10.116405] nand: Eon NAND 128MiB 3,3V 8-bit
[   10.120688] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[   10.126382] Scanning device for bad blocks
[   10.135831] Bad eraseblock 100 at 0x000000c80000
[   10.145738] Bad eraseblock 200 at 0x000001900000
[   10.198677] Creating 9 MTD partitions on "orion_nand":
[   10.203914] 0x000000000000-0x000000100000 : "uboot"
[   10.209155] 0x000000100000-0x000000180000 : "uboot_env"
[   10.214725] 0x000000180000-0x000000200000 : "key_store"
[   10.220246] 0x000000200000-0x000000280000 : "info"
[   10.225400] 0x000000280000-0x000000c80000 : "etc"
[   10.230395] 0x000000c80000-0x000001680000 : "kernel_1"
[   10.235867] 0x000001680000-0x000004640000 : "rootfs1"
[   10.241240] 0x000004640000-0x000005040000 : "kernel_2"
[   10.246719] 0x000005040000-0x000008000000 : "rootfs2"
[   10.252766] libphy: Fixed MDIO Bus: probed
[   10.267595] libphy: orion_mdio_bus: probed
[   10.271843] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   10.281361] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:50:43:00:02:02
[   10.290384] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.296977] ehci-pci: EHCI PCI platform driver
[   10.301493] ehci-orion: EHCI orion driver
[   10.305619] orion-ehci orion-ehci.0: EHCI Host Controller
[   10.311057] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   10.318770] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   10.341534] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   10.347617] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   10.354456] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.361722] usb usb1: Product: EHCI Host Controller
[   10.366619] usb usb1: Manufacturer: Linux 3.16.0-kirkwood-tld-2 ehci_hcd
[   10.373363] usb usb1: SerialNumber: orion-ehci.0
[   10.378591] hub 1-0:1.0: USB hub found
[   10.382423] hub 1-0:1.0: 1 port detected
[   10.387046] mousedev: PS/2 mouse device common for all mice
[   10.701616] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.853029] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[   10.859771] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   10.866960] usb 1-1: Product: USB2.0 Hub
[   10.871706] hub 1-1:1.0: USB hub found
[   10.875776] hub 1-1:1.0: 4 ports detected
[   11.161904] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[   11.292032] usb 1-1.3: New USB device found, idVendor=04fc, idProduct=0c15
[   11.298937] usb 1-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[   11.306303] usb 1-1.3: Product: USB Mass Storage
[   11.310943] usb 1-1.3: Manufacturer: OTB-HDD-NT68320
[   11.315943] usb 1-1.3: SerialNumber: 0123456789
[   11.401525] rtc-mv rtc-mv: internal RTC not ticking
[   11.406571] i2c /dev entries driver
[   11.410512] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[   11.417896] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[   11.424901] orion_gpio_is_valid: invalid GPIO 12
[   11.430447] hidraw: raw HID events driver (C) Jiri Kosina
[   11.436154] drop_monitor: Initializing network drop monitor service
[   11.442647] TCP: cubic registered
[   11.445978] NET: Registered protocol family 17
[   11.450566] Key type dns_resolver registered
[   11.455421] registered taskstats version 1
[   11.461555] rtc-pcf8563 0-0051: setting system clock to 2014-09-21 13:16:56 UTC (1411305416)
[   11.470698] PM: Hibernation image not present or could not be loaded.
[   11.478177] Freeing unused kernel memory: 256K (c0725000 - c0765000)
Loading, please wait...
[   11.542269] udevd[57]: starting version 175
[   11.620931] xhci_hcd 0000:00:01.0: xHCI Host Controller
[   11.676443] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2
[   11.740749] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[   11.767526] SCSI subsystem initialized
[   11.784239] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.791494] usb usb2: Product: xHCI Host Controller
[   11.808928] libata version 3.00 loaded.
[   11.816195] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   11.834437] sata_mv sata_mv.0: version 1.28
[   11.838687] sata_mv sata_mv.0: cannot get optional clkdev
[   11.867653] usb usb2: Manufacturer: Linux 3.16.0-kirkwood-tld-2 xhci_hcd
[   11.885896] scsi0 : usb-storage 1-1.3:1.0
[   11.897037] sata_mv sata_mv.0: slots 32 ports 2
[   11.901771] usbcore: registered new interface driver usb-storage
[   11.908899] usbcore: registered new interface driver uas
[   11.918661] usb usb2: SerialNumber: 0000:00:01.0
[   11.942975] hub 2-0:1.0: USB hub found
[   11.950063] scsi1 : sata_mv
[   11.961807] hub 2-0:1.0: 2 ports detected
[   11.965897] scsi2 : sata_mv
[   11.968956] ata1: SATA max UDMA/133 irq 21
[   11.980589] xhci_hcd 0000:00:01.0: xHCI Host Controller
[   11.985987] ata2: SATA max UDMA/133 irq 21
[   11.990214] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 3
[   11.998871] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[   12.005870] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.013165] usb usb3: Product: xHCI Host Controller
[   12.018079] usb usb3: Manufacturer: Linux 3.16.0-kirkwood-tld-2 xhci_hcd
[   12.024839] usb usb3: SerialNumber: 0000:00:01.0
[   12.030432] hub 3-0:1.0: USB hub found
[   12.034272] hub 3-0:1.0: 2 ports detected
[   12.491545] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   12.511740] ata1.00: ATA-7: SAMSUNG HD642JJ, 1AA01113, max UDMA7
[   12.517774] ata1.00: 1250263728 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   12.541726] ata1.00: configured for UDMA/133
[   12.561831] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD642JJ  1113 PQ: 0 ANSI: 5
[   12.890983] scsi 0:0:0:0: Direct-Access     SAMSUNG  HM641JI               PQ: 0 ANSI: 2
[   12.923294] sd 1:0:0:0: [sda] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
[   12.932458] sd 0:0:0:0: [sdb] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
[   12.940728] sd 1:0:0:0: [sda] Write Protect is off
[   12.945680] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   12.950925] sd 0:0:0:0: [sdb] Write Protect is off
[   12.955782] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   12.964910] sd 0:0:0:0: [sdb] Mode Sense: 38 00 00 00
[   12.972197] sd 0:0:0:0: [sdb] No Caching mode page found
[   12.977721] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[   12.987497]  sda: sda1 sda2 sda3 sda4
[   12.994192] sd 1:0:0:0: [sda] Attached SCSI disk
[   13.071548] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   13.091739] ata2.00: ATA-8: SAMSUNG HD204UI, 1AQ10001, max UDMA/133
[   13.098039] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   13.121726] ata2.00: configured for UDMA/133
[   13.141778] scsi 2:0:0:0: Direct-Access     ATA      SAMSUNG HD204UI  0001 PQ: 0 ANSI: 5
[   13.151132] sd 2:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[   13.159839] sd 2:0:0:0: [sdc] Write Protect is off
[   13.164676] sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[   13.169838] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   13.183945]  sdc: sdc1
[   13.187662] sd 2:0:0:0: [sdc] Attached SCSI disk
[   13.358778]  sdb: sdb1
[   13.367555] sd 0:0:0:0: [sdb] Attached SCSI disk
[   13.411038] sd 1:0:0:0: Attached scsi generic sg0 type 0
[   13.422035] sd 0:0:0:0: Attached scsi generic sg1 type 0
[   13.428361] sd 2:0:0:0: Attached scsi generic sg2 type 0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   13.913948] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[   13.920857] EXT4-fs (sda2): write access will be enabled during recovery
[   13.951777] EXT4-fs (sda2): recovery complete
[   13.956371] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   15.328499] systemd-udevd[272]: starting version 204
. ok
[....] Synthesizing the initial hotplug events...[   15.531470] input: gpio-keys as /devices/platform/gpio-keys/input/input0
done.
[   15.649114] nsa3xx-hwmon nsa3xx-hwmon: initialized
[   15.734315] random: nonblocking pool is initialized
[....] Waiting for /dev to be fully populated...[   15.839024] alg: hash: Test 3 failed for mv-sha1
[   15.843865] 00000000: 10 bf d7 00 71 0b bb 83 3a 26 d0 97 13 05 99 f5
[   15.850331] 00000010: 3a 92 53 3c
[   15.990887] alg: hash: Test 1 failed for mv-hmac-sha1
[   15.999602] 00000000: 0c aa 9f d5 37 c3 79 3a 91 d9 21 5f 42 2b 2c 24
[   16.015581] 00000010: b7 c3 16 0c
done.
[ ok ] Setting parameters of disc: (none).
[....] Activating swap...[   17.196382] Adding 1048572k swap on /dev/sda3.  Priority:-1 extents:1 across:1048572k FS
done.
[   17.294265] EXT4-fs (sda2): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.20.1
rootfs: clean, 60043/2048000 files, 492784/8192000 blocks
done.
[   17.533045] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[ ok ] Loading kernel modules...done.
[ ok ] Cleaning up temporary files... /tmp /lib/init/rw.
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.20.1
boot was not cleanly unmounted, check forced.
boot: 25/30720 files (24.0% non-contiguous), 46738/122880 blocks
data: recovering journal
data: clean, 700382/36954112 files, 32567631/147797760 blocks
fsck died with exit status 1
done.
[....] Mounting local filesystems...[   21.561865] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
[   21.631719] fuse init (API version 7.23)
done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....


It restarts not allways at the same point .
Sometimes when the network is configured and sometimes while fsck.

-sunfire
@sunfire,

I did not see anything wrong in your boot log. So hard to say what went wrong. However, to have a peace of mind, you can verify that the watchdog has been killed by doing this:

- boot with serial and stop it at the count down.
- and stay at the prompt for more than 30 seconds (executing some commands or just wait at the prompt).
- after 30 seconds, if the watchdog is still alive, it will kick in and reset the box.
- after waiting at the prompt long enough, you can do things like ide reset, usb restart,… and wait again to see if the watchdog come back.
- then boot. If the box resets, then please capture the log and post here.

I don't think the kernel did anything to reactivate the watchdog (but it does try to kill it again in startup). And I know we killed it in u-boot already. So if you could cause it to run again, then we have a bug somewhere!

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> @sunfire,
>
> I did not see anything wrong in your boot log. So
> hard to say what went wrong. However, to have a
> peace of mind, you can verify that the watchdog
> has been killed by doing this:
>
> - boot with serial and stop it at the count down.
> - and stay at the prompt for more than 30 seconds
> (executing some commands or just wait at the
> prompt).
> - after 30 seconds, if the watchdog is still
> alive, it will kick in and reset the box.
> - after waiting at the prompt long enough, you can
> do things like ide reset, usb restart,… and wait
> again to see if the watchdog come back.
> - then boot. If the box resets, then please
> capture the log and post here.
>
> I don't think the kernel did anything to
> reactivate the watchdog (but it does try to kill
> it again in startup). And I know we killed it in
> u-boot already. So if you could cause it to run
> again, then we have a bug somewhere!


@bodhi

When i stop the countdown after cold start, and enter boot command it starts without any problem.

Now with bootdelay 20 in u-boot enviroment it starts also without problems.

But with bootdelay smaller than 20 it reboots while booting.

Something must execute the reboot?

-sunfire
@sunfire,

With bootdelay less than 20, does it always reset after the kernel is loaded, i.e. during the rootfs mounting? when it reset what did the output look like? it has to show something, such as u-boot banner, can you post it?

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> @sunfire,
>
> With bootdelay less than 20, does it always reset
> after the kernel is loaded, i.e. during the
> rootfs mounting? when it reset what did the output
> look like? it has to show something, such
> as u-boot banner, can you post it?

I tested bootdelay 10 and 20, and only 20 works.

It always reset after mount the partitions or init the network.

After reset it show the normal u-boot banner:

U-Boot 2013.10-tld-1 (Aug 29 2014 - 22:07:26)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_??
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0

and it starts again, reset again and again and again.
It's like groundhog day :)
That's the watchdog alright.
Darn :)

Warhead, so is it possible that the watchdog was temporarily resurrected somehow when the kernel start booting? Our GPIO setting in u-boot was unset somehow?

-bodhi
===========================
Forum Wiki
bodhi's corner
It's just as likely that you have only temporarily disabled it with that mashing of the GPIO.
WarheadsSE Wrote:
-------------------------------------------------------
> It's just as likely that you have only temporarily
> disabled it with that mashing of the GPIO.

So should we try smashing it again at the point where u-boot exit to buy some more time. Kludgy, but it might be necessary if we can't permanently disable it, can we? I recall you were thinking about doing something with the PHY.

-bodhi
===========================
Forum Wiki
bodhi's corner
sunfire,

Quote

I tested bootdelay 10 and 20, and only 20 works.

It always reset after mount the partitions or init the network.

After reset it show the normal u-boot banner:

U-Boot 2013.10-tld-1 (Aug 29 2014 - 22:07:26)
ZyXEL NSA325 2-Bay Power Media Server

SoC: Kirkwood 88F6282_??
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0

and it starts again, reset again and again and again.
It's like groundhog day :)

Based on what you experienced, I think your HDD must have taken a long time to spin up, mount, fsck… And the bootdelay 20 has helped in that it gets the HDD to a ready state that it could survive the watchdog that probably has been re-activated while kernel is finishing mounting the roofs.

I know from testing that you could stop u-boot and sit at the prompt, you can take all days and don't see the watchdog. So it looks like I will need to investigate why and at what point the GPIO was reset to enable it running again.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 09/26/2014 02:54AM by bodhi.
All,

On further thought, I think this is best to handle this in kernel initrd.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 09/25/2014 07:11PM by bodhi.
@WarheadsSE,

My conclusion is somehow something caused the watchdog to run again, even it was turned off in kernel nsa325_setup. Perhaps we need a module to wack it again?

-bodhi
===========================
Forum Wiki
bodhi's corner
@bodhi

Perhaps what is happening is that the uboot is tripping it off. Then the kernel is tripping it back on? Consider it like a momentary push button. Trip on, Trip off, repeat. Can you test against a kernel _without_ the logic to trip it?
@WarheadsSE,

I'd assumed the GPIO was set, not toggling. But I'll try that.

-bodhi
===========================
Forum Wiki
bodhi's corner
@WarheadsSE,

It seems your suggestion is what has happened :) I rebuilt the kernel without the GPIO tripping code and then booted a few times without seeing the watchdog. The total boot time, with a USB 4TB HDD attached, varied from 32 to 41 seconds. I purposely caused unclean shutdowns to get fsck on rootfs to get it delay that much. But of course, only sunfire can verify this for sure!

-bodhi
===========================
Forum Wiki
bodhi's corner
@sunfire,

Please try new kernel and let me know.

-bodhi
===========================
Forum Wiki
bodhi's corner
Sorry, you can't reply to this topic. It has been closed.