Welcome! Log In Create A New Profile

Advanced

Need help/advice on brand new pogoplugV4

Posted by stef34280 
Need help/advice on brand new pogoplugV4
November 01, 2017 01:48PM
Hi all,

I am working on installing U-Boot and debian on a brand new pogoplug V4
Before flashing new U-Boot, a few lines are worrying me in the logs:

 1.010000] Scanning device for bad blocks
[    1.010000] Bad eraseblock 4 at 0x000000080000
[    1.050000] Bad eraseblock 697 at 0x000005720000

full log from Uboot to login including printenv and help from stock U-Boot is in the attached file.

I am not really shure I can safely flash new U-Boot, any help/advice will be appreciated before I brick it !

I just need to upgrade U-Boot in order to boot from SD card

thanks
Attachments:
open | download - V4.log (20.4 KB)
Re: Need help/advice on brand new pogoplugV4
November 01, 2017 03:54PM
stef34280,

> 1.010000] Scanning device for bad blocks
> [ 1.010000] Bad eraseblock 4 at 0x000000080000
> [ 1.050000] Bad eraseblock 697 at
> 0x000005720000

Warning: what I advise below only applicable to your specific configuration (in case other users read this and would make a wrong assumption when their configuration is different).

You have the Pogo V4, therefore you have a rescue mechanism with serial console using kwboot (should things don't go as we expected). And more importantly, the bad block is the 5th one. So you could flash new u-boot. But let's me ask you a few more questions before you do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 01, 2017 04:08PM
stef34280,

1. You do have serial console. So you should try to run kwboot first to make sure you have a rescue path

https://forum.doozan.com/read.php?3,12381

Quote

Important Note: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

Quote
To download ARM kwboot binary for UART booting at Dropbox

kwboot-2016.05.tar
md5:
76977c5a61544a5707dfa17ae832a3ad
sha256:
25ee4fa8a94372d2d398cac4704e9ee3ca87585c29e72e18323209b7f163209d

kwboot (this is an older version)
md5:
0efd011bdb244436e432a8de33e639a1

Note: you will need a Linux box to run kwboot, it cannot not be run from Windows.


2. According to your bootlog, you are still booting with stock OS? Do you have plan to install the new rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2?

The kernel and rootfs thread:
https://forum.doozan.com/read.php?2,12096

If you intend to run stock OS then don't install new u-boot. It will not work.

3. In stock OS get this output and post here:

cat /proc/mtd
ls -l /dev/mtd*

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 01, 2017 04:10PM
Remember, do not start flashing before I advise you to do that!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 01, 2017 11:24PM
Hi Bodhi and thank you for your help,

Serial console is working

kwboot is working. Had to try a dozen of times before I got a pogoV4 prompt in console (killing and restarting kwboot)

here is th output you asked for:
~ # 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"
~ # ls -l /de
~ # ls -l /dev/mtd*
crw-rw----    1 root     root       90,   0 Feb 26  2008 /dev/mtd0
crw-rw----    1 root     root       90,   2 Feb 26  2008 /dev/mtd1
crw-rw----    1 root     root       90,  20 Feb 26  2008 /dev/mtd10
crw-rw----    1 root     root       90,  22 Feb 26  2008 /dev/mtd11
crw-rw----    1 root     root       90,  24 Feb 26  2008 /dev/mtd12
crw-rw----    1 root     root       90,  26 Feb 26  2008 /dev/mtd13
crw-rw----    1 root     root       90,  28 Feb 26  2008 /dev/mtd14
crw-rw----    1 root     root       90,  30 Feb 26  2008 /dev/mtd15
crw-rw----    1 root     root       90,   4 Feb 26  2008 /dev/mtd2
crw-rw----    1 root     root       90,   6 Feb 26  2008 /dev/mtd3
crw-rw----    1 root     root       90,   8 Feb 26  2008 /dev/mtd4
crw-rw----    1 root     root       90,  10 Feb 26  2008 /dev/mtd5
crw-rw----    1 root     root       90,  12 Feb 26  2008 /dev/mtd6
crw-rw----    1 root     root       90,  14 Feb 26  2008 /dev/mtd7
crw-rw----    1 root     root       90,  16 Feb 26  2008 /dev/mtd8
crw-rw----    1 root     root       90,  18 Feb 26  2008 /dev/mtd9
brw-r--r--    1 root     root       31,   0 Feb 26  2008 /dev/mtdblock0
brw-r--r--    1 root     root       31,   1 Feb 26  2008 /dev/mtdblock1
brw-r--r--    1 root     root       31,   2 Feb 26  2008 /dev/mtdblock2
brw-r--r--    1 root     root       31,   3 Feb 26  2008 /dev/mtdblock3
brw-r--r--    1 root     root       31,   4 Feb 26  2008 /dev/mtdblock4
brw-r--r--    1 root     root       31,   5 Feb 26  2008 /dev/mtdblock5
brw-r--r--    1 root     root       31,   6 Feb 26  2008 /dev/mtdblock6
brw-r--r--    1 root     root       31,   7 Feb 26  2008 /dev/mtdblock7

I do not plan to use stock OS, I plan to use your rootfs (already running on a goflexnet) to make a mpd based music server

I won't flash anything until you tell me to do so :)
Re: Need help/advice on brand new pogoplugV4
November 01, 2017 11:57PM
stef34280,

> kwboot is working. Had to try a dozen of times
> before I got a pogoV4 prompt in console (killing
> and restarting kwboot)

That's the Pogo V4 quirks. A lot of time you need to control-C and then restart until the handshake occurs.


> ~ # cat /proc/mtd 
> dev:    size   erasesize  name
> mtd0: 00200000 00020000 "u-boot"


> I do not plan to use stock OS, I plan to use your
> rootfs (already running on a goflexnet) to make a
> mpd based music server

That will make it much easier.

>
> I won't flash anything until you tell me to do so
> :)

Ok. Now are you in stock OS for Pogo V4 or Debian? You can start flashing in either environment.

But do not reboot. Because of the bad block is 5th block, your execution of flash_erase and nandwrite will show no error (only block 0 to 3 will be used). We need to confirm this to be the the expected result.

Please post the log of your execution of step 6 and 7 for review, before doing step 8.

Quote

6. Erase mtd0
flash_erase /dev/mtd0 0 4
Expected output:
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done

7. Write image to NAND

Among the nandwrite commands below, be extra careful and execute only one nandwrite command corresponding to your platform that you are installing to, using the kwb file that you have extracted in step 5. Please double check to make sure the file is for the correct platform. Especially the similar sounding names (e.g. nsa310s and nsa310 are different u-boots).

nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexhome.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexnet.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.iconnect.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_e02.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_v4.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.sheevaplug.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa320.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa325.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310s.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310.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

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 02, 2017 03:43PM
Hi Bodhi,

before flashing, I have one more question.

I prepared my SD card with a fresh install of your rootfs.

If I do UART boot with the U-boot image from your dropbox (using the -p option) I can't boot into debian (I get an error message "machine type unsupported or so, didn't log it)
The same ocurs if I let the box do autoboot or if I go into the U-Boot prompt and type "boot".

I checked the printenv output and saw the dtb_file variable is set to "/boot/dts/kirkwood-pogo_v4" without extension
typing "setenv dtb_file kirkwood-pogo_v4.dtb" and then boot makes the box boot into debian

Is this normal or maybe my U-Boot file is corrupted, or anything else ?

here is the output of the pritenv command under U-Boot loaded with kwboot:
Pogov4> printenv
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2907/131068 bytes

Thanks a lot
Re: Need help/advice on brand new pogoplugV4
November 02, 2017 03:57PM
stef34280,

Indeed. That was my typo in the internal default envs :) usually we just flash the default envs image, which has the correct name for Pogo E02, so nobody noticed this yet.

Thanks for reporting this. I will make a note and correct it.

Yes, you have fixed it with
setenv dtb_file kirkwood-pogo_v4.dtb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 03, 2017 12:27PM
Hi Bodhi,

I went through all the steps for flashing U-Boot from Debian booted with UART.

Here is the output of steps 6 and 7:

root@debian:/tmp# flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 7f5eaf5c00000064 --  4 % complete 

root@debian:/tmp# nandwrite /dev/mtd0 uboot.2017.07-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
root@debian:/tmp#

Of course I did NOT eboot the box



Edited 1 time(s). Last edit at 11/03/2017 12:28PM by stef34280.
Re: Need help/advice on brand new pogoplugV4
November 03, 2017 05:05PM
stef34280,

> Here is the output of steps 6 and 7:
>
>
> root@debian:/tmp# flash_erase /dev/mtd0 0 4
> Erasing 128 Kibyte @ 7f5eaf5c00000064 --  4 %
> complete 
> 
> root@debian:/tmp# nandwrite /dev/mtd0
> uboot.2017.07-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
> root@debian:/tmp# 
> 
>

That flash_erase output is OK. The later version seems to always output that only much. So you are good to go!

You can reboot. Watch serial console. After it booted into Debian, copy the and post the log here if you'd like me to review it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 03, 2017 10:44PM
Bodhi,

First reboot gave me an error:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
*** Warning - bad CRC, using default environment

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
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

no IDE devices available

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	15124480  	1ae5ab55-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 ide 0 **
device ide 1:1
** Bad device 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 35 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3821592 bytes read in 125 ms (29.2 MiB/s)
loading uInitrd ...
7245696 bytes read in 190 ms (36.4 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4 ...
** File not found /boot/dts/kirkwood-pogoplug_v4 **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 07420000, end 07b08f40 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000f78).

Available machine support:

ID (hex)	NAME
ffffffff	Generic DT based system
ffffffff	Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
I solved it this way:
I had previously made a uEnv.txt file tweaked with all the 'setenv' commands in step 8 (except for netconsole)
I took out the rootfs SD card and copied that file to /boot

With that the box boots fine.
herre is the log
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
*** Warning - bad CRC, using default environment

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
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

no IDE devices available

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	15124480  	1ae5ab55-01	83
loading envs from mmc 0 ...
2790 bytes read in 42 ms (64.5 KiB/s)
importing envs ...

Warning: egiga0 MAC addresses don't match:
Address in SROM is         00:25:31:04:de:09
Address in environment is  52:3b:20:9c:11:51
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 ide 0 **
device ide 1:1
** Bad device 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 35 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3821592 bytes read in 124 ms (29.4 MiB/s)
loading uInitrd ...
7245696 bytes read in 190 ms (36.4 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10284 bytes read in 123 ms (81.1 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 07420000, end 07b08f40 ... OK
   Loading Device Tree to 0741a000, end 0741f82b ... OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Pogoplug v4
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 109428K/131072K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 21644K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000012] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000066] Switching to timer-based delay loop, resolution 6ns
[    0.000765] Console: colour dummy device 80x30
[    0.000815] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.000850] pid_max: default: 32768 minimum: 301
[    0.001145] Security Framework initialized
[    0.001328] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001357] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002643] CPU: Testing write buffer coherency: ok
[    0.004217] Setting up static identity map for 0x100000 - 0x100058
[    0.004614] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.009531] devtmpfs: initialized
[    0.015388] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015428] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.016039] prandom: seed boundary self test passed
[    0.021771] prandom: 100 self tests passed
[    0.021797] pinctrl core: initialized pinctrl subsystem
[    0.023548] NET: Registered protocol family 16
[    0.024285] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026644] cpuidle: using governor ladder
[    0.026755] cpuidle: using governor menu
[    0.027400] Feroceon L2: Enabling L2
[    0.027465] Feroceon L2: Cache support initialised.
[    0.028014] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.035045] No ATAGs?
[    0.048368] vgaarb: loaded
[    0.048833] SCSI subsystem initialized
[    0.049499] usbcore: registered new interface driver usbfs
[    0.049624] usbcore: registered new interface driver hub
[    0.049746] usbcore: registered new device driver usb
[    0.051415] clocksource: Switched to clocksource orion_clocksource
[    0.183747] VFS: Disk quotas dquot_6.6.0
[    0.183866] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.198740] NET: Registered protocol family 2
[    0.199807] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.199850] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.199881] TCP: Hash tables configured (established 1024 bind 1024)
[    0.200012] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.200047] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.200297] NET: Registered protocol family 1
[    0.200885] RPC: Registered named UNIX socket transport module.
[    0.200903] RPC: Registered udp transport module.
[    0.200914] RPC: Registered tcp transport module.
[    0.200924] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.201260] Unpacking initramfs...
[    1.168610] Freeing initrd memory: 7076K
[    1.168816] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.170190] audit: initializing netlink subsys (disabled)
[    1.170897] Initialise system trusted keyrings
[    1.170969] Key type blacklist registered
[    1.171108] audit: type=2000 audit(1.169:1): state=initialized audit_enabled=0 res=1
[    1.171242] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.171341] zbud: loaded
[    1.172867] NFS: Registering the id_resolver key type
[    1.172903] Key type id_resolver registered
[    1.172916] Key type id_legacy registered
[    1.172940] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.172955] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.173242] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.173520] fuse init (API version 7.26)
[    1.174037] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.174438] orangefs_init: module version upstream loaded
[    1.174454] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.551423] random: fast init done
[    9.946489] Key type asymmetric registered
[    9.946513] Asymmetric key parser 'x509' registered
[    9.946614] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    9.946630] io scheduler noop registered
[    9.946643] io scheduler deadline registered
[    9.946757] io scheduler cfq registered (default)
[    9.948011] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 47
[    9.948036] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 49
[    9.948536] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.951336] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    9.951367] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    9.951387] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.951646] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.952145] PCI: bus0: Fast back to back transfers disabled
[    9.952180] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.981505] PCI: bus1: Fast back to back transfers disabled
[    9.981793] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.981824] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe000ffff 64bit]
[    9.981857] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0010000-0xe0010fff 64bit]
[    9.981889] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0011000-0xe0011fff 64bit]
[    9.981917] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.981942] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.982071] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    9.982208] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    9.982934] mv_xor f1060800.xor: Marvell shared XOR driver
[   10.042537] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[   10.042852] mv_xor f1060900.xor: Marvell shared XOR driver
[   10.102563] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[   10.103194] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   10.105115] console [ttyS0] disabled
[   10.105207] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 10416666) is a 16550A
[   10.813265] console [ttyS0] enabled
[   10.829158] loop: module loaded
[   10.833194] sata_mv f1080000.sata: slots 32 ports 2
[   10.842015] scsi host0: sata_mv
[   10.845791] scsi host1: sata_mv
[   10.849257] ata1: SATA max UDMA/133 irq 32
[   10.853416] ata2: SATA max UDMA/133 irq 32
[   10.858987] nand: Could not find valid ONFI parameter page; aborting
[   10.865434] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[   10.871794] nand: Hynix NAND 128MiB 3,3V 8-bit
[   10.876225] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.883802] Scanning device for bad blocks
[   10.888268] Bad eraseblock 4 at 0x000000080000
[   10.950068] Bad eraseblock 697 at 0x000005720000
[   10.981713] 5 cmdlinepart partitions found on MTD device orion_nand
[   10.987954] Creating 5 MTD partitions on "orion_nand":
[   10.993105] 0x000000000000-0x000000200000 : "u-boot"
[   10.999919] 0x000000200000-0x000000500000 : "uImage"
[   11.006763] 0x000000500000-0x000000800000 : "uImage2"
[   11.013689] 0x000000800000-0x000001000000 : "failsafe"
[   11.020747] 0x000001000000-0x000008000000 : "root"
[   11.029899] libphy: Fixed MDIO Bus: probed
[   11.035212] libphy: orion_mdio_bus: probed
[   11.046565] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   11.183083] ata1: SATA link down (SStatus 0 SControl F300)
[   11.532944] ata2: SATA link down (SStatus 0 SControl F300)
[   12.163576] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[   12.172471] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.178999] ehci-pci: EHCI PCI platform driver
[   12.183550] ehci-orion: EHCI orion driver
[   12.187845] orion-ehci f1050000.ehci: EHCI Host Controller
[   12.193394] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   12.201266] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[   12.231463] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   12.237784] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   12.244591] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.251809] usb usb1: Product: EHCI Host Controller
[   12.256673] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[   12.263383] usb usb1: SerialNumber: f1050000.ehci
[   12.269050] hub 1-0:1.0: USB hub found
[   12.272944] hub 1-0:1.0: 1 port detected
[   12.277726] xhci_hcd 0000:01:00.0: xHCI Host Controller
[   12.283072] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[   12.292064] xhci_hcd 0000:01:00.0: hcc params 0x200073a1 hci version 0x100 quirks 0x00080010
[   12.300786] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[   12.307596] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.314821] usb usb2: Product: xHCI Host Controller
[   12.319683] usb usb2: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[   12.326389] usb usb2: SerialNumber: 0000:01:00.0
[   12.331997] hub 2-0:1.0: USB hub found
[   12.335787] hub 2-0:1.0: 2 ports detected
[   12.340519] xhci_hcd 0000:01:00.0: xHCI Host Controller
[   12.345833] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[   12.353418] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[   12.361743] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[   12.368511] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.375739] usb usb3: Product: xHCI Host Controller
[   12.380606] usb usb3: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[   12.388160] usb usb3: SerialNumber: 0000:01:00.0
[   12.393754] hub 3-0:1.0: USB hub found
[   12.397542] hub 3-0:1.0: 2 ports detected
[   12.402689] usbcore: registered new interface driver usb-storage
[   12.409175] mousedev: PS/2 mouse device common for all mice
[   12.691463] usb 2-2: new high-speed USB device number 2 using xhci_hcd
[   12.863583] usb 2-2: New USB device found, idVendor=1307, idProduct=0163
[   12.870263] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   12.877406] usb 2-2: Product: USB Mass Storage Device
[   12.882468] usb 2-2: Manufacturer: USBest Technology
[   12.887431] usb 2-2: SerialNumber: 00000000000381
[   12.893653] usb-storage 2-2:1.0: USB Mass Storage device detected
[   12.900186] scsi host2: usb-storage 2-2:1.0
[   13.441465] rtc-mv f1010300.rtc: internal RTC not ticking
[   13.447108] i2c /dev entries driver
[   13.452489] hidraw: raw HID events driver (C) Jiri Kosina
[   13.458367] drop_monitor: Initializing network drop monitor service
[   13.465017] NET: Registered protocol family 17
[   13.469561] Key type dns_resolver registered
[   13.474875] registered taskstats version 1
[   13.478962] Loading compiled-in X.509 certificates
[   13.483869] zswap: loaded using pool lzo/zbud
[   13.502878] Key type big_key registered
[   13.520367] Key type encrypted registered
[   13.526596] hctosys: unable to open rtc device (rtc0)
[   13.536706] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[   13.927641] scsi 2:0:0:0: Direct-Access     UDISK    PDU15_4G 81I2.0  0.00 PQ: 0 ANSI: 2
[   13.951703] sd 2:0:0:0: [sda] 7897087 512-byte logical blocks: (4.04 GB/3.76 GiB)
[   13.975377] sd 2:0:0:0: [sda] Write Protect is off
[   13.985517] sd 2:0:0:0: [sda] Asking for cache data failed
[   13.991002] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   14.137454] usbcore: registered new interface driver uas
[   14.186473] GPT:Primary header thinks Alt. header is not at the end of the disk.
[   14.200440] GPT:1122303 != 7897086
[   14.207928] GPT:Alternate GPT header not at the end of the disk.
[   14.219092] GPT:1122303 != 7897086
[   14.225630] GPT: Use GNU Parted to correct GPT errors.
[   14.230895]  sda: sda1 sda2
[   14.325129] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   14.374570] mvsdio f1090000.mvsdio: Got CD GPIO
[   14.478197] mmc0: host does not support reading read-only switch, assuming write-enable
[   14.493727] mmc0: new high speed SDHC card at address 1234
[   14.780728] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[   14.789715]  mmcblk0: p1
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.
Warning: fsck not present, so skipping root file system
[   25.316609] EXT4-fs (mmcblk0p1): mounting ext3 file system using the ext4 subsystem
[   25.337110] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok
[....] Synthesizing the initial hotplug events...[   28.009989] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ ok                                             done.
[....] Waiting for /dev to be fully populated...[   28.582502] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   28.637321] marvell-cesa f1030000.crypto: CESA device successfully registered
[   28.670382] orion_wdt: Initial timeout 25 sec
done.
[ ok ] Activating swap:.
[   30.345425] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/mmcblk0p1
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 14534/473280 files, 248208/1890560 blocks
. ok
[   30.662034] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[ ok ] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs[ ok hat location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables...done.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.95 on eth0 to 255.255.255.255 port 67
[   38.611621] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   44.961320] NET: Registered protocol family 10
[   44.969824] Segment Routing with IPv6
DHCPREQUEST of 192.168.1.95 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.95 from 192.168.1.254
bound to 192.168.1.95 -- renewal in 33090 seconds.
done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1334 (syslogd)
. ok
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NFS common utilities: statd idmapd.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1337 (klogd)
. ok
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 debian ttyS0

debian login: [  103.285643] random: crng init done


Something appears now to be unclear to me:
You wrote
Please post the log of your execution of step 6 and 7 for review, before doing step 8.

I understood from that to do all the steps from 1 to 7 before rebooting so I did not made step 8 (flashing default envs)

The box boots fine but the envs seem messed.
Here are differents outputs of pritenv:

fw_printenv booted in debian after U-Boot flash
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootargs=
bootcmd=
bootdelay=2
baudrate=115200
arch=sandbox
cpu=sandbox
board=sandbox
board_name=sandbox
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
root@debian:~#

printenv at the pogov4 prompt in flashed U-Boot
Pogov4> printenv
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2907/131068 bytes
Pogov4>

content of my uEnv.txt
arcNumber=3960
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=00:25:31:04:de:09
if_netconsole=ping $serverip
ipaddr=192.168.1.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15

Thanks for your help



Edited 2 time(s). Last edit at 11/03/2017 10:47PM by stef34280.
Re: Need help/advice on brand new pogoplugV4
November 03, 2017 11:28PM
stef34280,

Quote

> Please post the log of your execution of step 6
> and 7 for review, before doing step 8.

>
> I understood from that to do all the steps from 1
> to 7 before rebooting so I did not made step 8
> (flashing default envs)

You've misunderstood this. Step 8 must be done.

Quote

> The box boots fine but the envs seem messed.

Because the default envs image was not flashed.

Quote

> Warning: Bad CRC, using default environment

The CRC error above is because of that (the envs area in NAND was not flashed, so it has nothing in it, therefore the checksum is bad).

You had the right idea in using uEnv.txt to populate the envs with good values:

arcNumber=3960
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=00:25:31:04:de:09
if_netconsole=ping $serverip
ipaddr=192.168.1.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15

Now to make it stick. You need to either:

1. In Debian, flash the default envs image, starting from step 8 and then do step 9 to 11.

Or

2. Since you have a good uEnv.txt, you can boot with serial console, interrupt serial console, and

run bootcmd_uenv
and list the envs for sanity
printenv
look at these envs to make sure they are what you expected, and then
saveenv

And boot into Debian
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help/advice on brand new pogoplugV4
November 04, 2017 10:17AM
Hi Bodhi,

I went route n°2 and now everyhing is fine !

I thank you very much for your valuable help !

If I can do something for you one day, just ask, I will !
Re: Need help/advice on brand new pogoplugV4
November 04, 2017 03:36PM
stef34280 Wrote:

-------------------------------------------------------
> Hi Bodhi,
>
> I went route n°2 and now everyhing is fine !
>
> I thank you very much for your valuable help !
>
> If I can do something for you one day, just ask, I
> will !

Cool :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: