Welcome! Log In Create A New Profile

Advanced

Pogoplug E02 - Warning - readenv() failed, using default environment

Posted by droidbox 
Pogoplug E02 - Warning - readenv() failed, using default environment
December 16, 2014 03:36PM
Hi,

my second Pogo has this Error:
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
u-boot>> saveenv 
Saving Environment to NAND...
Erasing Nand...
Skipping bad block at  0x000c0000                                          

Writing to Nand... FAILED!

Can I repair this?

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 16, 2014 04:39PM
@droidbox,

You can't completely repair this. The bad block is at the env location for this u-boot version. And also is for my u-boot build images. It's a common location we've chosen for these Kirkwood boxes.

However, there is a work around that will allow you to boot successfully. I'll post the instruction later today.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 16, 2014 04:52PM
Hi Bodhi.

This is really nice. Thank you very much in advance.

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 16, 2014 06:39PM
droidbox,

You are running Jeff/davygravy u-boot build so I need to see the default envs. Please interrupt serial console and print out your u-boot envs:
u-boot>> printenv

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



Edited 1 time(s). Last edit at 12/16/2014 08:28PM by bodhi.
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 17, 2014 01:42PM
Hey bodhi.
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
u-boot>> printenv
arcNumber=2097
baudrate=115200
bootcmd=run bootcmd_usb; usb stop; run bootcmd_pogo; reset
bootcmd_pogo=fsload uboot-original-mtd0.kwb; go 0x800200
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:78:7c:00
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
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2

Environment size: 1012/131068 bytes

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 17, 2014 02:12PM
Hey bodhi.

I have run on a new Pogoplug the follow steps
setenv ipaddr 192.168.100.248                       
setenv serverip 192.168.100.113

tftp 0x800000 uboot.mtd0.kwb-2011.12-pogo_e02-L2Coff
go 0x800200

## Ergebnis muss so aussehen
## Load address: 0x800000
## Loading: #################################################################
##          ######################################
## done
## Bytes transferred = 524288 (80000 hex)


b. Erase and flash; execute

nand erase 0x0 0x80000
nand write.e 0x800000 0x0 0x80000

## Ergebnis muss so aussehen
##
## CE>> nand erase 0x0 0x80000
##
## NAND erase: device 0 offset 0x0, size 0x80000
## Erasing at 0x60000 -- 100% complete.
## OK
## CE>> nand write.e 0x800000 0x0 0x80000
##
## NAND write: device 0 offset 0x0, size 0x80000
## 
## Writing data at 0x7f800 -- 100% complete.
##  524288 bytes written: OK

reset
After this steps, the new pogoplug have the same error:
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
NAND read from offset c0000 failed -74
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
u-boot>> printenv 
arcNumber=2097
baudrate=115200
bootcmd=run bootcmd_usb; usb stop; run bootcmd_pogo; reset
bootcmd_pogo=fsload uboot-original-mtd0.kwb; go 0x800200
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:64:ed:b2
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
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2

Environment size: 1012/131068 bytes

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 18, 2014 12:38AM
droidbox,

These are the relevant default envs:
arcNumber=2097
bootcmd=run bootcmd_usb; usb stop; run bootcmd_pogo; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=/dev/sda1
usb_rootfstype=ext2

So download the latest rootfs (3.17). And then put it on an EXT2 USB drive, following the instruction. And boot with it. Please capture serial console output and post here.

Your bad block is right at the envs location, so this current u-boot won't help in setting any env. My latest u-boot build won't be able to help either. Your defaut envs are good enough to allow booting single USB drive formatted with EXT2.

My future u-boot release will allow full customization without using the NAND env block. But I need to find time to release it :) The most time consuming part were done (I'm running it or a couple months), but I still need to write instruction for the new features.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 18, 2014 07:58AM
Hi Bodhi,

thanks a lot. I test it at the next weekend.

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 20, 2014 09:27AM
Hi, here the output
SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
NAND read from offset c0000 failed -74
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... EHCI timed out on TD - token=0x80008d80

      USB device not accepting new address (error=2)
3 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: .......  read_nand_cached: error reading nand off 0x1860000 size 8192 bytes                                                 done.
find_inode failed for name=uboot-original-mtd0.kwb
load: Failed to find inode
### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
## Starting application at 0x00800200 ...

Nothing else.

With a debian 7 stick it boot.

droidbox



Edited 1 time(s). Last edit at 12/20/2014 11:02AM by droidbox.
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 20, 2014 11:38AM
Hi, i have install the 3.17 kernel on my booting debian stick. now i see this message
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2822232 bytes read
Loading file "/boot/dts/kirkwood-pogo_e02.dtb" from usb device 0:1 (usbda1)
10228 bytes read
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2822232 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
5545918 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822168 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5545854 Bytes = 5.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

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

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.

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 20, 2014 11:55AM
Okay and the next test with
cp -a zImage-3.17.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.17.0-kirkwood-tld-1 -d /boot/initrd.img-3.17.0-kirkwood-tld-1 /boot/uInitrd

it stop at
U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
23282 bytes read
## Error: "load_dtb" not defined
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
23282 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
5545956 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    23218 Bytes = 22.7 KiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5545892 Bytes = 5.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...
droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 20, 2014 04:08PM
droidbox,

cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
should be
cat dts/kirkwood-pogo_e02.dtb  >> zImage.fdt

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 20, 2014 04:15PM
droidbox Wrote:
-------------------------------------------------------
> Hi, i have install the 3.17 kernel on my booting
> debian stick. now i see this message
>
> WARNING: Caches not enabled
> NAND:  128 MiB
> In:    serial
> Out:   serial
> Err:   serial
> Net:   egiga0
> 88E1116 Initialized on egiga0
> Hit any key to stop autoboot:  0 
> (Re)start USB...
> USB:   Register 10011 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 3 USB Device(s) found
>        scanning bus for storage devices... 1
> Storage Device(s) found
> Loading file "/boot/uImage" from usb device 0:1
> (usbda1)
> 2822232 bytes read
> Loading file "/boot/dts/kirkwood-pogo_e02.dtb"
> from usb device 0:1 (usbda1)
> 10228 bytes read
> Loading file "/boot/uImage" from usb device 0:1
> (usbda1)
> 2822232 bytes read
> Loading file "/boot/uInitrd" from usb device 0:1
> (usbda1)
> 5545918 bytes read
> ## Booting kernel from Legacy Image at 00800000
> ...
>    Image Name:   Linux-3.17.0-kirkwood-tld-1
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    2822168 Bytes = 2.7 MiB
>    Load Address: 00008000
>    Entry Point:  00008000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at
> 01100000 ...
>    Image Name:   initramfs-3.17.0-kirkwood-tld-1
>    Image Type:   ARM Linux RAMDisk Image (gzip
> compressed)
>    Data Size:    5545854 Bytes = 5.3 MiB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> OK
> 
> Starting kernel ...
> 
> Uncompressing Linux... done, booting the kernel.
> 
> Error: unrecognized/unsupported machine ID (r1 =
> 0x00000831).
> 
> 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.
> 
>
>
> droidbox

I think you'll need to stick with one method of booting. Either with embeded DTB, or with separate DTB. The instruction mentioned that :) So choose one and get it booted first.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
December 22, 2014 12:47AM
droidbox,

The new u-boot version would solve your problem with the bad NAND block at 0x000c0000:
http://forum.doozan.com/read.php?3,12381

See the instruction in section B and D. Basically, you need to copy the file uboot.2014.07-tld-2.environment to uEnv.txt and put it in /boot directory.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
March 05, 2015 04:25AM
Hey bodhi,

root@debian:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 05b00000 00020000 "data"
root@debian:~# less /etc/fw_env.config 
-bash: less: command not found
root@debian:~# cat /etc/fw_env.config 
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid; in this case the redundant
# environment sector is assumed present.
# Note that "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0               0xc0000         0x20000         0x20000
root@debian:~# fw_printenv > current_envs.txt
Too few good blocks within range
root@debian:~# cat current_envs.txt 
root@debian:~# dmesg | grep -i 'bad'
[   21.730274] Scanning device for bad blocks
[   21.735103] Bad eraseblock 6 at 0x0000000c0000
[   21.801789] Bad eraseblock 592 at 0x000004a00000
root@debian:~# fw_printenv 
Too few good blocks within range

Unfortunately it does not work. Is there another way to repair the unit.

droidbox
Re: Pogoplug E02 - Warning - readenv() failed, using default environment
March 05, 2015 02:36PM
droidbox,

Did you use the uEnv.txt to boot into Debian sucessfully?

-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: