Welcome! Log In Create A New Profile

Advanced

Problem booting Pogo v4

Posted by Strix 
Re: Problem booting Pogo v4
January 05, 2017 04:52PM
kwboot is how it is booting. If I don't use it the pogo doesn't boot.
strix@atlas-2:~/kwboot/kwboot-tool$ sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2016.05-tld-1.pogo_v4.mtd0.kwb -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [+++++++++++++++++xmodem: Bad message
strix@atlas-2:~/kwboot/kwboot-tool$ sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2016.05-tld-1.pogo_v4.mtd0.kwb -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [+++++++++++++++++xmodem: Bad message
strix@atlas-2:~/kwboot/kwboot-tool$ sudo ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2016.05-tld-1.pogo_v4.mtd0.kwb -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 27 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 68 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK

no USB devices available

no IDE devices available

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     63              31117842        00000000-01     83
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device size - ide 0 **
device ide 1:1
** Bad device size - ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 1121 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3232368 bytes read in 1511 ms (2 MiB/s)
loading uInitrd ...
6533698 bytes read in 1888 ms (3.3 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10266 bytes read in 1823 ms (4.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.8.3-kirkwood-tld-1
   Created:      2016-12-15  16:00:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3232304 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.8.3-kirkwood-tld-1
   Created:      2016-12-15  16:00:53 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6533634 Bytes = 6.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 074d3000, end 07b0e202 ... OK
   Loading Device Tree to 074cd000, end 074d2819 ... OK
Using machid 0xf78 from environment

Starting kernel ...

I'm guessing I messed up flashing u-boot which is why it won't boot on it's own?
Do I need to try installing/flashing uboot again?
Re: Problem booting Pogo v4
January 05, 2017 05:57PM
Strix,


> kwboot is how it is booting. If I don't use it the
> pogo doesn't boot.

> I'm guessing I messed up flashing u-boot which is
> why it won't boot on it's own?
> Do I need to try installing/flashing uboot again?

Ah. I see. That's why your u-boot envs look good when running kwboot. The envs were populated correctly.

OK. Then the next step is booting into Debian and reflash only u-boot image. No need to go through entire precedure. kwboot again like before. And log in as root.

1. Verify mtd layout

cat /proc/mtd
Expected output:
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"

2. Erase 4 blocks on mtd0
flash_erase /dev/mtd0 0 4

Expected output:
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

3. Flash u-boot image

nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb

Expected output:
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

And then reboot. This time, only connect a normal serial console running putty/picocom/screen. Watch the serial console output for any thing abnormal (if not sure, post the serial console log here).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Problem booting Pogo v4
January 05, 2017 06:24PM
I get this error when I try to flash_erase
root@mnemosyne:~# flash_erase /dev/mtd0 0 4
flash_erase: error!: /dev/mtd0
             error 13 (Permission denied)

Re: Problem booting Pogo v4
January 05, 2017 07:12PM
Strix,

Perhaps something is different about the Pogo V4 in the later kernels.

cat /proc/cmdline
cat /proc/mtd
ls -l  /proc/device-tree/mbus\@f1000000/nand\@012f/partition\@0/
ls -l /boot/dts/kirkwood-pogoplug_v4.dtb

If my guess is right, I'll recompile a new DTB for you to try it.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Problem booting Pogo v4
January 05, 2017 07:38PM
Strix,

cd /boot/dts
mv kirkwood-pogoplug_v4.dtb kirkwood-pogoplug_v4.dtb.old

Dowload this attached DTB file and put it in this /boot/dts folder.

wget http://forum.doozan.com/file.php?2,file=1246,filename=kirkwood-pogoplug_v4.dtb

And then
sync

and reboot.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 01/05/2017 07:39PM by bodhi.
Attachments:
open | download - kirkwood-pogoplug_v4.dtb (10 KB)
Re: Problem booting Pogo v4
January 05, 2017 09:00PM
root@mnemosyne:~# cat /proc/cmdline
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

root@mnemosyne:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"

root@mnemosyne:~# ls -l  /proc/device-tree/mbus\@f1000000/nand\@012f/partition\@0/
total 0
-r--r--r-- 1 root root  7 Jan  5 17:38 label
-r--r--r-- 1 root root 10 Jan  5 17:38 name
-r--r--r-- 1 root root  0 Jan  5 17:38 read-only
-r--r--r-- 1 root root  8 Jan  5 17:38 reg

root@mnemosyne:~# ls -l /boot/dts/kirkwood-pogoplug_v4.dtb
-rw-r--r-- 1 root root 10266 Dec 16 18:47 /boot/dts/kirkwood-pogoplug_v4.dtb


New dtb allowed me to flash uboot
root@mnemosyne:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"
root@mnemosyne:~# flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 60000 -- 100 % complete
root@mnemosyne:~# nandwrite /dev/mtd0 uboot/uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000


Seems like everything is good now. Pogo is booting normally.

Was there a problem with the dtb file I was using?
Is there anything I should keep in mind for future upgrades?
Re: Problem booting Pogo v4
January 05, 2017 09:21PM
Strix Wrote:
-------------------------------------------------------
>
> root@mnemosyne:~# cat /proc/cmdline
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10
> orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(fa
> ilsafe),112M(root)
> 
> root@mnemosyne:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00200000 00020000 "u-boot"
> mtd1: 00300000 00020000 "uImage"
> mtd2: 00300000 00020000 "uImage2"
> mtd3: 00800000 00020000 "failsafe"
> mtd4: 07000000 00020000 "root"
> 
> root@mnemosyne:~# ls -l 
> /proc/device-tree/mbus\@f1000000/nand\@012f/partit
> ion\@0/
> total 0
> -r--r--r-- 1 root root  7 Jan  5 17:38 label
> -r--r--r-- 1 root root 10 Jan  5 17:38 name
> -r--r--r-- 1 root root  0 Jan  5 17:38 read-only
> -r--r--r-- 1 root root  8 Jan  5 17:38 reg
> 
> root@mnemosyne:~# ls -l
> /boot/dts/kirkwood-pogoplug_v4.dtb
> -rw-r--r-- 1 root root 10266 Dec 16 18:47
> /boot/dts/kirkwood-pogoplug_v4.dtb
> 
>
>
>
> New dtb allowed me to flash uboot
>
> root@mnemosyne:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00200000 00020000 "u-boot"
> mtd1: 00300000 00020000 "uImage"
> mtd2: 00300000 00020000 "uImage2"
> mtd3: 00800000 00020000 "failsafe"
> mtd4: 07000000 00020000 "root"
> root@mnemosyne:~# flash_erase /dev/mtd0 0 4
> Erasing 128 Kibyte @ 60000 -- 100 % complete
> root@mnemosyne:~# nandwrite /dev/mtd0
> uboot/uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
> Writing data to block 0 at offset 0x0
> Writing data to block 1 at offset 0x20000
> Writing data to block 2 at offset 0x40000
> Writing data to block 3 at offset 0x60000
> 
>
>
>
> Seems like everything is good now. Pogo is booting
> normally.
>
> Was there a problem with the dtb file I was
> using?
> Is there anything I should keep in mind for future
> upgrades?

Thanks for testing Strix! Good to see it's working.

No, it's apparently a change in the way the DTB is loaded in the newer kernel driver (So it seems).

Keep this version for use in the kernel 4.9 if you upgrade. I will need to release updated DTBs for boxes that are affected.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Problem booting Pogo v4
January 05, 2017 09:32PM
Awesome, glad I was able to help out.

Thanks for walking me through all this.
Re: Problem booting Pogo v4
January 06, 2017 12:06AM
Hi Strix,

> Awesome, glad I was able to help out.

Indeed, users have reported this similar problem but I thought it was something else. Live testing with serial console log has made it more apparent for me to understand the cause.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
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: