Welcome! Log In Create A New Profile

Advanced

[Resolved] stock pogoV4: fw_printenv gives "Bad CRC: using default environment"

Posted by huge 
[Resolved] stock pogoV4: fw_printenv gives "Bad CRC: using default environment"
November 25, 2017 02:24PM
[EDIT2: I should have just read through (or remembered) all the uBoot instructions ... The following completely resolved my question:

Save envs (stock OS might not have fw_printenv, so try blparam): 
fw_printenv > current_envs.txt
or
/usr/local/cloudengines/bin/blparam >  current_envs.txt

Feel free to delete this post (or tell me to) unless you think it will help another stumbler, but just for completeness I'll post my blparams:

/tmp # /usr/local/cloudengines/bin/blparam >  current_envs.txt
/tmp # cat current_envs.txt
bootdelay=1
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
load_nand=nboot 0x800000 0 0x200000
load_nand2=nboot 0x800000 0 0x500000
boot=bootm 0x800000
boot_nand=run load_nand boot || run load_nand2 boot
disaMvPnp=no
ethmtu=1500
usb0Mode=host
nandEcc=1bit
hddPowerCtrl=no
pcieTune=no
ethact=egiga0
ethaddr=00:25:31:04:dc:38
cesvcid=W5SJEAYWNBQKTSW3YLT523HZZA
ceboardver=PPV4A3
ipaddr=192.168.58.233
serverip=192.168.58.188
bootargs=console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=4,2048 rootfstype=ubifs
bootcmd=run boot_nand
/tmp #



]





I apologize because I'm pretty sure I've dealt with this issue before, but I can't remember the (probably trivial) way around it:

Stock PogoPlug V4, I managed to enable SSH via serial connection and am just starting to try to install uBoot. I downloaded the (current, I believe) U-boot flashing utilities and get the following error on fw_printenv:
/tmp # fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
/tmp #

Is this to be expected because I'm on stock? Do I need to be using blparam instead? Are my questions even sensible?


[EDIT: as I suggested in next post, I'm guessing that I can just ignore this and jump to extracting the uBoot archive. If that's right, don't waste your time reading below this line]

For reference:
/tmp # 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.
# Notice, that the "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
/tmp #

/tmp # 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"
/tmp #

/tmp # uname -a
Linux Pogoplug 2.6.31.8 #5 Wed Sep 28 12:09:12 PDT 2011 armv5tel GNU/Linux
/tmp #


/tmp # dmesg
<5>[    0.000000] Linux version 2.6.31.8 (afenn@kt) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #5 Wed Sep 28 12:09:12 PDT 2011
<4>[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
<4>[    0.000000] CPU: VIVT data cache, VIVT instruction cache
<4>[    0.000000] Machine: Feroceon-KW
<4>[    0.000000] Using UBoot passing parameters structure
<4>[    0.000000] Ignoring unrecognised tag 0x41004345
<4>[    0.000000] Memory policy: ECC disabled, Data cache writeback
<7>[    0.000000] On node 0 totalpages: 32768
<7>[    0.000000] free_area_init_node: node 0, pgdat c0413670, node_mem_map c042d000
<7>[    0.000000]   Normal zone: 256 pages used for memmap
<7>[    0.000000]   Normal zone: 0 pages reserved
<7>[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32512
<5>[    0.000000] Kernel command line: console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=4,2048 rootfstype=ubifs
<4>[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
<6>[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.000000] Memory: 128MB = 128MB total
<5>[    0.000000] Memory: 118356KB available (3852K code, 261K data, 124K init, 0K highmem)
<6>[    0.000000] Hierarchical RCU implementation.
<6>[    0.000000] NR_IRQS:128
<4>[    0.000000] Console: colour dummy device 80x30
<6>[    0.000000] Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)
<4>[    0.230000] Mount-cache hash table entries: 512
<6>[    0.230000] CPU: Testing write buffer coherency: ok
<6>[    0.230000] NET: Registered protocol family 16
<6>[    0.230000] Feroceon L2: Enabling L2
<6>[    0.230000] Feroceon L2: Cache support initialised.
<4>[    0.230000]
<4>[    0.230000] CPU Interface
<4>[    0.230000] -------------
<4>[    0.230000] SDRAM_CS0 ....base 00000000, size 128MB
<4>[    0.230000] SDRAM_CS1 ....disable
<4>[    0.230000] SDRAM_CS2 ....disable
<4>[    0.230000] SDRAM_CS3 ....disable
<4>[    0.230000] PEX0_MEM ....base e0000000, size 128MB
<4>[    0.230000] PEX0_IO ....base f2000000, size   1MB
<4>[    0.230000] PEX1_MEM ....no such
<4>[    0.230000] PEX1_IO ....no such
<4>[    0.230000] INTER_REGS ....base f1000000, size   1MB
<4>[    0.230000] NFLASH_CS ....base fa000000, size   2MB
<4>[    0.230000] SPI_CS ....base f4000000, size  16MB
<4>[    0.230000] BOOT_ROM_CS ....no such
<4>[    0.230000] DEV_BOOTCS ....no such
<4>[    0.230000] CRYPT_ENG ....base f0000000, size   2MB
<4>[    0.230000]
<4>[    0.230000]   Marvell Development Board (LSP Version KW_LSP_5.1.3_patch18)-- RD-88F6192A-NAS  Soc: 88F6192 A1 LE
<4>[    0.230000]
<4>[    0.230000]  Detected Tclk 166666667 and SysClk 200000000
<4>[    0.230000] Marvell USB EHCI Host controller #0: c403e740
<4>[    0.730000] PEX0 interface detected Link X1
<7>[    0.730000] pci 0000:00:01.0: reg 10 64bit mmio: [0x40000000-0x4000ffff]
<7>[    0.730000] pci 0000:00:01.0: reg 18 64bit mmio: [0x40010000-0x40010fff]
<7>[    0.730000] pci 0000:00:01.0: reg 20 64bit mmio: [0x40011000-0x40011fff]
<7>[    0.740000] pci 0000:00:01.0: supports D1
<6>[    0.740000] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
<6>[    0.740000] pci 0000:00:01.0: PME# disabled
<6>[    0.740000] PCI: bus0: Fast back to back transfers disabled
<4>[    0.740000] mvPexLocalBusNumSet: ERR. Invalid PEX interface 1
<4>[    0.750000] bio: create slab <bio-0> at 0
<5>[    0.750000] SCSI subsystem initialized
<6>[    0.750000] usbcore: registered new interface driver usbfs
<6>[    0.750000] usbcore: registered new interface driver hub
<6>[    0.750000] usbcore: registered new device driver usb
<6>[    0.750000] NET: Registered protocol family 2
<6>[    0.750000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>[    0.750000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
<6>[    0.750000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
<6>[    0.750000] TCP: Hash tables configured (established 4096 bind 4096)
<6>[    0.750000] TCP reno registered
<6>[    0.750000] NET: Registered protocol family 1
<6>[    0.750000] cpufreq: Init kirkwood cpufreq driver
<7>[    0.750000] cpufreq: High frequency: 800000KHz - Low frequency: 200000KHz
<7>[    0.750000] cpufreq: Setting CPU Frequency to 800000 KHz
<7>[    0.750000] cpufreq: Setting PowerSaveState to off
<6>[    0.760000] XOR registered 4 channels
<6>[    0.760000] XOR 2nd invalidate WA enabled
<4>[    0.760000] cesadev_init(c000d7fc)
<4>[    0.760000] mvCesaInit: sessions=640, queue=64, pSram=f0000000
<6>[    0.760000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
<6>[    0.770000] msgmni has been set to 231
<6>[    0.770000] alg: No test for cipher_null (cipher_null-generic)
<6>[    0.770000] alg: No test for ecb(cipher_null) (ecb-cipher_null)
<6>[    0.770000] alg: No test for digest_null (digest_null-generic)
<6>[    0.770000] alg: No test for compress_null (compress_null-generic)
<6>[    0.780000] alg: No test for stdrng (krng)
<6>[    0.780000] alg: No test for hmac(digest_null) (hmac(digest_null-generic))
<6>[    0.790000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
<6>[    0.790000] io scheduler noop registered
<6>[    0.790000] io scheduler anticipatory registered (default)
<4>[    0.790000] Initializing ths8200_init
<4>[    0.790000] Initializing dove_adi9889_init
<6>[    0.810000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
<6>[    0.810000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
<6>[    0.810000] console [ttyS0] enabled
<4>[    0.820000] Integrated Sata device found
<4>[    0.830000] IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
<6>[    0.850000] scsi0 : Marvell SCSI to SATA adapter
<6>[    0.860000] scsi1 : Marvell SCSI to SATA adapter
<4>[    0.870000] Loading Marvell Ethernet Driver:
<4>[    0.870000]   o Cached descriptors in DRAM
<4>[    0.880000]   o DRAM SW cache-coherency
<4>[    0.880000]   o 1 Giga ports supported
<4>[    0.880000]   o Single RX Queue support - ETH_DEF_RXQ=0
<4>[    0.890000]   o Single TX Queue support - ETH_DEF_TXQ=0
<4>[    0.890000]   o TCP segmentation offload (TSO) supported
<4>[    0.900000]   o Large Receive offload (LRO) supported
<4>[    0.900000]   o Receive checksum offload supported
<4>[    0.910000]   o Transmit checksum offload supported
<4>[    0.910000]   o Network Fast Processing (Routing) supported - (Disabled)
<4>[    0.920000]   o Driver ERROR statistics enabled
<4>[    0.930000]   o Proc tool API enabled
<4>[    0.930000]   o SKB Reuse supported - (Disabled)
<4>[    0.930000]   o SKB Recycle supported - (Disabled)
<4>[    0.940000]   o Rx descripors: q0=128
<4>[    0.940000]   o Tx descripors: q0=532
<4>[    0.950000]   o Loading network interface(s):
<4>[    0.950000]      o register under mv88fx_eth platform
<4>[    0.960000]      o eth0, ifindex = 2, GbE port = 0
<4>[    0.960000]
<4>[    0.960000] mvFpRuleDb (c45b1000): 1024 entries, 4096 bytes
<4>[    0.970000] Counter=0, opIdx=6, overhead=16
<4>[    0.970000] Counter=1, opIdx=2, overhead=0
<4>[    0.980000] Counter=2, opIdx=1, overhead=18
<4>[    0.980000] Counter=3, opIdx=2, overhead=0
<6>[    0.990000] tun: Universal TUN/TAP device driver, 1.6
<6>[    0.990000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
<6>[    1.000000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
<6>[    1.010000] Scanning device for bad blocks
<4>[    1.020000] Bad eraseblock 112 at 0x000000e00000
<4>[    1.030000] Bad eraseblock 321 at 0x000002820000
<4>[    1.070000] Using static partition definition
<5>[    1.070000] Creating 5 MTD partitions on "nand_mtd":
<5>[    1.070000] 0x000000000000-0x000000200000 : "u-boot"
<5>[    1.080000] 0x000000200000-0x000000500000 : "uImage"
<5>[    1.090000] 0x000000500000-0x000000800000 : "uImage2"
<5>[    1.090000] 0x000000800000-0x000001000000 : "failsafe"
<5>[    1.100000] 0x000001000000-0x000008000000 : "root"
<5>[    1.100000] UBI: attaching mtd4 to ubi0
<5>[    1.110000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
<5>[    1.110000] UBI: logical eraseblock size:    126976 bytes
<5>[    1.120000] UBI: smallest flash I/O unit:    2048
<5>[    1.120000] UBI: sub-page size:              512
<5>[    1.130000] UBI: VID header offset:          2048 (aligned 2048)
<5>[    1.140000] UBI: data offset:                4096
<5>[    1.360000] UBI: attached mtd4 to ubi0
<5>[    1.360000] UBI: MTD device name:            "root"
<5>[    1.370000] UBI: MTD device size:            112 MiB
<5>[    1.370000] UBI: number of good PEBs:        895
<5>[    1.380000] UBI: number of bad PEBs:         1
<5>[    1.380000] UBI: max. allowed volumes:       128
<5>[    1.390000] UBI: wear-leveling threshold:    4096
<5>[    1.390000] UBI: number of internal volumes: 1
<5>[    1.400000] UBI: number of user volumes:     1
<5>[    1.400000] UBI: available PEBs:             0
<5>[    1.410000] UBI: total number of reserved PEBs: 895
<5>[    1.410000] UBI: number of PEBs reserved for bad PEB handling: 8
<5>[    1.420000] UBI: max/mean erase counter: 1/0
<5>[    1.420000] UBI: image sequence number: 0
<6>[    1.420000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[    1.430000] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
<6>[    1.440000] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
<5>[    1.450000] UBI: background thread "ubi_bgt0d" started, PID 452
<6>[    1.480000] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
<6>[    1.500000] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
<6>[    1.500000] usb usb1: configuration #1 chosen from 1 choice
<6>[    1.510000] hub 1-0:1.0: USB hub found
<6>[    1.510000] hub 1-0:1.0: 1 port detected
<6>[    1.520000] xhci_hcd 0000:00:01.0: xHCI Host Controller
<6>[    1.520000] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2
<6>[    1.530000] xhci_hcd 0000:00:01.0: irq 9, io mem 0xe0000000
<4>[    1.540000] usb usb2: config 1 interface 0 altsetting 0 endpoint 0x81 has no SuperSpeed companion descriptor
<6>[    1.550000] usb usb2: configuration #1 chosen from 1 choice
<7>[    1.550000] xHCI xhci_add_endpoint called for root hub
<7>[    1.550000] xHCI xhci_check_bandwidth called for root hub
<6>[    1.550000] hub 2-0:1.0: USB hub found
<6>[    1.560000] hub 2-0:1.0: 4 ports detected
<6>[    1.560000] Initializing USB Mass Storage driver...
<6>[    1.560000] usbcore: registered new interface driver usb-storage
<6>[    1.570000] USB Mass Storage support registered.
<6>[    1.580000] usbcore: registered new interface driver ums-datafab
<6>[    1.580000] usbcore: registered new interface driver ums-freecom
<6>[    1.590000] usbcore: registered new interface driver ums-jumpshot
<6>[    1.590000] usbcore: registered new interface driver ums-sddr09
<6>[    1.600000] usbcore: registered new interface driver ums-sddr55
<6>[    1.610000] usbcore: registered new interface driver ums-usbat
<6>[    1.610000] mice: PS/2 mouse device common for all mice
<6>[    1.620000] i2c /dev entries driver
<7>[    1.620000] cpufreq: Setting CPU Frequency to 800000 KHz
<7>[    1.620000] cpufreq: Setting PowerSaveState to off
<6>[    1.630000] sdhci: Secure Digital Host Controller Interface driver
<6>[    1.630000] sdhci: Copyright(c) Pierre Ossman
<5>[    1.640000] mmc0: mvsdio driver initialized, using GPIO 27 for card detection
<6>[    1.650000] usbcore: registered new interface driver usbhid
<6>[    1.650000] usbhid: v2.6:USB HID core driver
<6>[    1.660000] TCP cubic registered
<6>[    1.660000] NET: Registered protocol family 17
<6>[    1.670000] RPC: Registered udp transport module.
<6>[    1.670000] RPC: Registered tcp transport module.
<4>[    1.680000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
<5>[    1.750000] UBIFS: recovery needed
<5>[    2.540000] UBIFS: recovery completed
<5>[    2.550000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
<5>[    2.550000] UBIFS: file system size:   110723072 bytes (108128 KiB, 105 MiB, 872 LEBs)
<5>[    2.560000] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
<5>[    2.570000] UBIFS: media format:       w4/r0 (latest is w4/r0)
<5>[    2.570000] UBIFS: default compressor: lzo
<5>[    2.580000] UBIFS: reserved for root:  0 bytes (0 KiB)
<4>[    2.580000] VFS: Mounted root (ubifs filesystem) on device 0:11.
<6>[    2.590000] Freeing init memory: 124K
<5>[    4.960000] eth0: link down
<5>[    4.970000] eth0: started
<5>[    6.000000] eth0: link up, full duplex, speed 1 Gbps
/tmp #



Edited 2 time(s). Last edit at 11/25/2017 04:46PM by huge.
Re: stock pogoV4: fw_printenv gives "Bad CRC: using default environment"
November 25, 2017 02:53PM
OK ... likely I'm being dense ... can I just ignore this and skip to extracting the uBoot archive?



Edited 1 time(s). Last edit at 11/25/2017 02:54PM by huge.
Re: stock pogoV4: fw_printenv gives "Bad CRC: using default environment"
November 25, 2017 04:32PM
huge,

> OK ... likely I'm being dense ... can I just
> ignore this and skip to extracting the uBoot
> archive?

Yes, you are in stock OS.

Quote

/tmp # fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
/tmp #

Before you flash the default u-boot envs image, that area can not be used with fw_printenv.

But you can use blparams to list them. Even if you cannot list them, it is OK. Go on to the next step.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: stock pogoV4: fw_printenv gives "Bad CRC: using default environment"
November 25, 2017 10:07PM
hughe,

Glad you've resolved it! let me know how it goes with flashing new u-boot and envs images.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: stock pogoV4: fw_printenv gives "Bad CRC: using default environment"
November 26, 2017 04:55AM
bodhi Wrote:
-------------------------------------------------------
> hughe,
>
> Glad you've resolved it! let me know how it goes
> with flashing new u-boot and envs images.

All went fine - I was pleased that (thanks to your buckets of help on other devices) I was able to get this one up and running with ONLY THIS ONE stupid question (that I figured out before you could even answer - don't think that's ever happened before). I was able to deliver a fully functioning Debian + Samba box to my sister so that she can use it as a home server.

I'm now 5-for-7 in getting Pogos up and running Debian. I still have two Mobiles that I can't get a solid serial connection to (I get nice looking text on my screen, and I can interrupt the autoboot with keystrokes if I'm fast enough, but the characters I type are either not transmitted or not interpreted correctly - my screen shows 80% garbage characters and 20% the keys I'm actually typing. But I'll post that in a more appropriate spot if I can't fix it soon.

Thanks again - I didn't need your help on this one, but only because you've given me so much assistance in past installs.
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: