Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1199 - Bad Header Checksum DIR-600 B5E #6472

Closed
openwrt-bot opened this issue Nov 30, 2017 · 5 comments
Closed

FS#1199 - Bad Header Checksum DIR-600 B5E #6472

openwrt-bot opened this issue Nov 30, 2017 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Nov 30, 2017

lucize:

LEDE Master, first flash will boot the device, on reset will error with Bad Header Checksum

lede-ramips-rt305x-dir-610-a1-squashfs-factory.bin

## Booting image at bc050000 ... ..................................................addr:80400000 We have SEAMA, Image Size = 3198916 Verifying Checksum ... Bad Header Checksum. ## Powering up port 0 ~ 3.

Entering HTTP server.

KSEG1ADDR(NetTxPacket) = 0xA1FE7300

NetLoop,call eth_halt !

NetLoop,call eth_init !

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
Start HTTP server on port 80, 192.168.123.23

with Openwrt openwrt-15.05.1-ramips-rt305x-dir-610-a1-squashfs-factory.bin everything is ok

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Nov 30, 2017

lucize:

uboot version

U-Boot 1.1.3 (Jan 21 2011 - 14:45:48) (ALPHA)

SVN revision: 492
Target board: WRG-N49

Board: Ralink APSoC DRAM: 32 MB
spi_wait_nsec: 42
spi device id: ef 40 16 0 0 (40160000)
find flash: W25Q32BV
..============================================
Ralink UBoot Version: 3.5.1.0

ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Jan 21 2011 Time:14:45:48

icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 6, 2018

vbspam:

I can confirm it happens also on my DIR-600 B6E.

U-Boot 1.1.3 (Feb 25 2011 - 14:31:26) (ALPHA)

SVN revision: 499

Target board: WRG-N49

Board: Ralink APSoC DRAM: 32 MB

spi_wait_nsec: 42

spi device id: c2 20 16 c2 20 (2016c220)

find flash: MX25L3205D

..============================================

Ralink UBoot Version: 3.5.1.0


ASIC 5350_MP (Port5<->None)

DRAM_CONF_FROM: Boot-Strapping

DRAM_TYPE: SDRAM

DRAM_SIZE: 256 Mbits

DRAM_WIDTH: 16 bits

DRAM_TOTAL_WIDTH: 16 bits

TOTAL_MEMORY_SIZE: 32 MBytes

Flash component: SPI Flash

Date:Feb 25 2011 Time:14:31:26

============================================

icache: sets:256, ways:4, linesz:32 ,total:32768

dcache: sets:128, ways:4, linesz:32 ,total:16384

Powering down port 0 ~ 3.

Please choose the operation:

1: Load system code to SDRAM via TFTP.

2: Load system code then write to Flash via TFTP.

3: Boot system code via Flash (default).

4: Entr boot command line interface.

7: Load Boot Loader code then write to Flash via Serial.

9: Load Boot Loader code then write to Flash via TFTP.

A: Load Runtime code then write to Flash via Serial.

\0x08\0x08\0x08 0

3: System Boot system code via Flash.

Booting image at bc050000 ...

......................................................addr:80400000

We have SEAMA, Image Size = 3428292

Verifying Checksum ...

Bad Header Checksum.

Powering up port 0 ~ 3.

Entering HTTP server.

KSEG1ADDR(NetTxPacket) = 0xA1FE74C0

NetLoop,call eth_halt !

NetLoop,call eth_init !

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!

Using Eth0 (10/100-M) device

Start HTTP server on port 80, 192.168.0.1

Running ...

\0x00

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 6, 2018

vbspam:

Sorry for spamming with long logs. Here is full record of:

  • Failed boot "Wrong checksum"
  • Flashing of "lede-17.01.4-ramips-rt305x-dir-610-a1-squashfs-factory.bin"
  • First boot after flash, which is OK
  • Failed boot "Wrong checksum" after reboot.

dcache: sets:128, ways:4, linesz:32 ,total:16384

Powering down port 0 ~ 3.

Please choose the operation:

1: Load system code to SDRAM via TFTP.

2: Load system code then write to Flash via TFTP.

3: Boot system code via Flash (default).

4: Entr boot command line interface.

7: Load Boot Loader code then write to Flash via Serial.

9: Load Boot Loader code then write to Flash via TFTP.

A: Load Runtime code then write to Flash via Serial.

\0x08\0x08\0x08 0

3: System Boot system code via Flash.

Booting image at bc050000 ...

......................................................addr:80400000

We have SEAMA, Image Size = 3428292

Verifying Checksum ...

Bad Header Checksum.

Powering up port 0 ~ 3.

Entering HTTP server.

KSEG1ADDR(NetTxPacket) = 0xA1FE74C0

NetLoop,call eth_halt !

NetLoop,call eth_init !

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!

Using Eth0 (10/100-M) device

Start HTTP server on port 80, 192.168.0.1

Running ...

Got ARP REQUEST, return our IP

mpfd_decode: UPLOADED, upsize = 3301428

SEAMA ==========================================

magic : 5ea3a417

meta size : 36 bytes

meta data : signature=wrgn59_dlob.hans_dir610

meta data :

meta data :

image size : 0 bytes

================================================

SEAMA ==========================================

magic : 5ea3a417

meta size : 36 bytes

meta data : dev=/dev/mtdblock/2

meta data : type=firmware

meta data :

meta data :

image size : 3301316 bytes

checksum : 701AAA72BB6EA38245ABA6D912984CB9

digest : 701AAA72BB6EA38245ABA6D912984CB9

Selected !!!

================================================

Copy SEAMA with header (from 0x80100030).

raspi_erase_write: offs:50000, count:326004

raspi_erase: offs:50000 len:320000

..................................................

raspi_write: to:50000 len:320000

..................................................

...................................................raspi_erase: offs:370000 len:10000

.

raspi_write: to:370000 len:10000

.

.Done!

Copy linux image [3301380 bytes] to Flash offset [0x00050000] ...

U-Boot 1.1.3 (Feb 25 2011 - 14:31:26) (ALPHA)

SVN revision: 499

Target board: WRG-N49

Board: Ralink APSoC DRAM: 32 MB


Software System Reset Occurred


spi_wait_nsec: 42

spi device id: c2 20 16 c2 20 (2016c220)

find flash: MX25L3205D

..============================================

Ralink UBoot Version: 3.5.1.0


ASIC 5350_MP (Port5<->None)

DRAM_CONF_FROM: Boot-Strapping

DRAM_TYPE: SDRAM

DRAM_SIZE: 256 Mbits

DRAM_WIDTH: 16 bits

DRAM_TOTAL_WIDTH: 16 bits

TOTAL_MEMORY_SIZE: 32 MBytes

Flash component: SPI Flash

Date:Feb 25 2011 Time:14:31:26

============================================

icache: sets:256, ways:4, linesz:32 ,total:32768

dcache: sets:128, ways:4, linesz:32 ,total:16384

Powering down port 0 ~ 3.

Please choose the operation:

1: Load system code to SDRAM via TFTP.

2: Load system code then write to Flash via TFTP.

3: Boot system code via Flash (default).

4: Entr boot command line interface.

7: Load Boot Loader code then write to Flash via Serial.

9: Load Boot Loader code then write to Flash via TFTP.

A: Load Runtime code then write to Flash via Serial.

\0x08\0x08\0x08 0

3: System Boot system code via Flash.

Booting image at bc050000 ...

....................................................addr:80400000

We have SEAMA, Image Size = 3301316

Verifying Checksum ...

Uncompressing SEAMA linux.lzma ... OK

Transferring control to Linux (at address ff000000) ...

Giving linux memsize in MB, 32

Starting kernel ...

[ 0.000000] Linux version 4.4.92 (buildbot@debian8) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3556-46e29bd) ) #0 Mon Oct 16 15:21:43 2017
[ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is D-Link DIR-610 A1
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=00048000
[ 0.000000] Readback ErrCtl register=00048000
[ 0.000000] Memory: 28612K/32768K available (2892K kernel code, 132K rwdata, 356K rodata, 196K init, 196K bss, 4156K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 360MHz
[ 0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 10618113593 ns
[ 0.000016] sched_clock: 32 bits at 180MHz, resolution 5ns, wraps every 11930464253ns
[ 0.015683] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[ 0.090902] pid_max: default: 32768 minimum: 301
[ 0.100366] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.113457] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.136707] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.156289] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.168498] pinctrl core: initialized pinctrl subsystem
[ 0.181412] NET: Registered protocol family 16
[ 0.199495] Can't analyze schedule() prologue at 8000acdc
[ 0.240941] rt2880_gpio 10000600.gpio: registering 22 gpios
[ 0.252067] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[ 0.267010] clocksource: Switched to clocksource MIPS
[ 0.279311] NET: Registered protocol family 2
[ 0.289992] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.303888] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.316478] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.329345] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.340983] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.353913] NET: Registered protocol family 1
[ 0.372829] rt-timer 10000100.timer: maximum frequency is 3662Hz
[ 0.386400] Crashlog allocated RAM at address 0x1f00000
[ 0.433609] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.445202] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.470958] io scheduler noop registered
[ 0.478741] io scheduler deadline registered (default)
[ 0.489307] ralink-usb-phy usbphy: invalid resource
[ 0.500155] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.519757] console [ttyS0] disabled
[ 0.526804] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 0.546636] console [ttyS0] enabled
[ 0.546636] console [ttyS0] enabled
[ 0.560420] bootconsole [early0] disabled
[ 0.560420] bootconsole [early0] disabled
[ 0.591950] spi spi0.0: force spi mode3
[ 0.600611] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[ 0.610543] 4 ofpart partitions found on MTD device spi0.0
[ 0.621546] Creating 4 MTD partitions on "spi0.0":
[ 0.631174] 0x000000000000-0x000000030000 : "u-boot"
[ 0.644858] 0x000000030000-0x000000040000 : "devdata"
[ 0.659188] 0x000000040000-0x000000050000 : "factory"
[ 0.673315] 0x000000050000-0x000000400000 : "firmware"
[ 1.127591] 2 seama-fw partitions found on MTD device firmware
[ 1.139334] 0x000000050040-0x00000016c000 : "kernel"
[ 1.152581] 0x00000016c000-0x000000400000 : "rootfs"
[ 1.166403] mtd: device 5 (rootfs) set to be root filesystem
[ 1.178021] 1 squashfs-split partitions found on MTD device rootfs
[ 1.190451] 0x000000376000-0x000000400000 : "rootfs_data"
[ 1.211013] rt3050-esw 10110000.esw: link changed 0x00
[ 1.224876] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 1.242588] rt2880_wdt 10000120.watchdog: Initialized
[ 1.255304] NET: Registered protocol family 10
[ 1.272058] NET: Registered protocol family 17
[ 1.281267] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 1.306519] 8021q: 802.1Q VLAN Support v1.8
[ 1.331527] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[ 1.347917] Freeing unused kernel memory: 196K
[ 3.700198] init: Console is alive
[ 3.707828] init: - watchdog -
[ 5.262226] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 5.408062] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.433488] init: - preinit -
[ 6.822970] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug[ 7.137305] random: procd: uninitialized urandom read (4 bytes read, 11 bits of entropy available)
level
[ 8.627306] rt3050-esw 10110000.esw: link changed 0x04
[ 10.373409] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 10.395511] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 10.591095] procd: - early -
[ 10.597287] procd: - watchdog -
[ 11.256728] procd: - watchdog -
[ 11.263940] procd: - ubus -
[ 11.516950] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.656834] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.675949] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.694269] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.713353] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.731618] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.750348] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.769095] random: ubusd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[ 11.788314] procd: - init -
Please press Enter to activate this console.
[ 12.321996] kmodloader: loading kernel modules from /etc/modules.d/*
[ 12.346209] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 12.381539] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[ 12.397672] Backport generated by backports.git backports-20160324-13-g24da7d3c
[ 12.420515] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 12.446430] nf_conntrack version 0.5.0 (450 buckets, 1800 max)
[ 12.524180] xt_time: kernel timezone is -0000
[ 12.634360] PPP generic driver version 2.4.2
[ 12.648465] NET: Registered protocol family 24
[ 12.705048] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "devdata"
[ 12.719654] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[ 12.735202] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
[ 12.892533] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 14.551274] random: jshn: uninitialized urandom read (4 bytes read, 23 bits of entropy available)
[ 20.958486] rt3050-esw 10110000.esw: link changed 0x00
[ 22.777621] rt3050-esw 10110000.esw: link changed 0x04
[ 25.618151] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 25.647226] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 25.660531] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 32.315780] device eth0.1 entered promiscuous mode
[ 32.326181] device eth0 entered promiscuous mode
[ 32.436647] br-lan: port 1(eth0.1) entered forwarding state
[ 32.447998] br-lan: port 1(eth0.1) entered forwarding state
[ 34.447340] br-lan: port 1(eth0.1) entered forwarding state
[ 34.977379] done.
[ 34.981298] jffs2: notice: (816) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 76.657098] random: nonblocking pool is initialized
[ 88.970627] br-lan: port 1(eth0.1) entered disabled state
[ 89.007267] device eth0.1 left promiscuous mode
[ 89.016614] br-lan: port 1(eth0.1) entered disabled state
[ 89.043588] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[ 89.485980] device eth0 left promiscuous mode
[ 93.788454] reboot: Restarting system

U-Boot 1.1.3 (Feb 25 2011 - 14:31:26) (ALPHA)

SVN revision: 499

Target board: WRG-N49

Board: Ralink APSoC DRAM: 32 MB


Software System Reset Occurred


spi_wait_nsec: 42

spi device id: c2 20 16 c2 20 (2016c220)

find flash: MX25L3205D

..============================================

Ralink UBoot Version: 3.5.1.0


ASIC 5350_MP (Port5<->None)

DRAM_CONF_FROM: Boot-Strapping

DRAM_TYPE: SDRAM

DRAM_SIZE: 256 Mbits

DRAM_WIDTH: 16 bits

DRAM_TOTAL_WIDTH: 16 bits

TOTAL_MEMORY_SIZE: 32 MBytes

Flash component: SPI Flash

Date:Feb 25 2011 Time:14:31:26

============================================

icache: sets:256, ways:4, linesz:32 ,total:32768

dcache: sets:128, ways:4, linesz:32 ,total:16384

Powering down port 0 ~ 3.

Please choose the operation:

1: Load system code to SDRAM via TFTP.

2: Load system code then write to Flash via TFTP.

3: Boot system code via Flash (default).

4: Entr boot command line interface.

7: Load Boot Loader code then write to Flash via Serial.

9: Load Boot Loader code then write to Flash via TFTP.

A: Load Runtime code then write to Flash via Serial.

\0x08\0x08\0x08 0

3: System Boot system code via Flash.

Booting image at bc050000 ...

....................................................addr:80400000

We have SEAMA, Image Size = 3301316

Verifying Checksum ...

Bad Header Checksum.

Powering up port 0 ~ 3.

Entering HTTP server.

KSEG1ADDR(NetTxPacket) = 0xA1FE74C0

NetLoop,call eth_halt !

NetLoop,call eth_init !

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!

Using Eth0 (10/100-M) device

Start HTTP server on port 80, 192.168.0.1

Running ...

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 6, 2018

vbspam:

What I see as suspicious is following log:

SEAMA ==========================================

magic : 5ea3a417

meta size : 36 bytes

meta data : signature=wrgn59_dlob.hans_dir610

meta data :

meta data :

image size : 0 bytes

================================================

See the image size 0 bytes..

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 7, 2018

lucize:

seems that doing a sysupgrade after factory flash before first reboot will keep the device in working condition, maybe someone should put a note on the wiki page so anyone could be informed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant