LINUX.ORG.RU

bcm63xx как заставить загрузчик cfe увидеть увеличенный объем spi flash

 , ,


0

1

Имеется старый роутер Starnet AR800. SPI flash SST25VF032B. SoC Broadcom BCM63281. Wi-Fi bcm4313. DDR2 Hunix 64MB.

Если считать дамп с 4мб чипа и залить в 16мб (w25q128), то cfe зависает перед выводом информации о flash (название, размер).

Что нужно отредактировать в дампе чтобы cfe увидел flash чип?

Также рассматриваю вариант вытащить загрузчик из дампа похожего роутера имеющего 16мб flash (я не смог найти дампы в интернете), или другое решение проблемы.

Вывод с 16мб

HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN


CFE version 1.0.37-106.5 for BCM96328 (32bit,SP,BE)
Build Date: Wed Dec 29 15:47:48 CST 2010 (wanghuaijia@txcpyjeb)
Copyright (C) 2000-2009 Broadcom Corporation.


Вывод с 4мб

HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN


CFE version 1.0.37-106.5 for BCM96328 (32bit,SP,BE)
Build Date: Wed Dec 29 15:47:48 CST 2010 (wanghuaijia@txcpyjeb)
Copyright (C) 2000-2009 Broadcom Corporation.

HS Serial flash device: name SST25VF032B, id 0xbf4a size 4096KB
Total Flash size: 4096K with 64 sectors
FLASH_BASE                         = 0xb8000000

fInfo->flash_rootfs_start_offset   = 0x00010000

fInfo->flash_meta_start_blk        = 63

fInfo->flash_syslog_start_blk      = 0
fInfo->flash_syslog_number_blk     = 0
fInfo->flash_syslog_length         = 0x0

fInfo->flash_backup_psi_start_blk  = 0
fInfo->flash_backup_psi_number_blk = 0

sp startAddr                        = 0xb83f8000
fInfo->flash_scratch_pad_start_blk  = 63
fInfo->flash_scratch_pad_number_blk = 1
fInfo->flash_scratch_pad_length     = 0x2000
fInfo->flash_scratch_pad_blk_offset = 0x8000

psi startAddr                      = b83fa000
fInfo->flash_persistent_start_blk  = 63
fInfo->flash_persistent_number_blk = 1
fInfo->flash_persistent_length     = 0x6000
fInfo->flash_persistent_blk_offset = 0xa000

Chip ID: BCM6328B0, MIPS: 320MHz, DDR: 320MHz, Bus: 160MHz
Main Thread: TP0
Memory Test Passed
Total Memory: 67108864 bytes (64MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.1.1:ffffff00
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id (0-3)                    : 96328A600
Number of MAC Addresses (1-32)    : 11
Base MAC Address                  : 00:1a:a9:b3:6a:03
PSI Size (1-64) KBytes            : 24
Enable Backup PSI [0|1]           : 0
System Log Size (0-256) KBytes    : 0
Main Thread Number [0|1]          : 0
User's PSI Size (0-64) KBytes     : 0
Voice Board Configuration (0-4)   :

*** Press 'j' or 'J' to stop auto run (1 seconds) ***
Auto run second count down: 0
Booting from only image (0xb8010000) ...
Code Address: 0x80A00000, Entry Address: 0x80a00000
LZMA: Prossible old LZMA format, trying to decompress..
Decompression OK!
Entry at 0x80a00000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
0 buffers found.
Closing DMA Channels.
Starting program at 0x80a00000
[    0.000000] Linux version 4.14.162 (builder@buildhost) (gcc version 7.5.0 (Op                                                                                                                                                             enWrt GCC 7.5.0 r10860-a3ffeb413b)) #0 Mon Jan 6 16:47:09 2020
[    0.000000] Detected Broadcom 0x6328 CPU revision b0
[    0.000000] CPU frequency is 320 MHz
[    0.000000] 64MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-106.5
[    0.000000] bcm63xx_nvram: nvram checksum failed, contents may be invalid (ex                                                                                                                                                             pected 00000000, got c8d0cfe7)
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a075 (Broadcom BMIPS4350)
[    0.000000] board: board name: 963281TAN
[    0.000000] MIPS: machine is Broadcom bcm963281TAN reference board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16                                                                                                                                                              bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] random: get_random_bytes called from 0x804c6738 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: rootfstype=squashfs,jffs2 noinitrd console=t                                                                                                                                                             tyS0,115200
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 58540K/65536K available (4071K kernel code, 197K rwdata,                                                                                                                                                              548K rodata, 1256K init, 209K bss, 6996K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_i                                                                                                                                                             dle_ns: 11945377789 ns
[    0.000018] sched_clock: 32 bits at 160MHz, resolution 6ns, wraps every 13421                                                                                                                                                             772796ns
[    0.008125] Calibrating delay loop... 319.74 BogoMIPS (lpj=639488)
[    0.050490] pid_max: default: 32768 minimum: 301
[    0.055758] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.062616] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.077669] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                                                                                                                                             x_idle_ns: 7645041785100000 ns
[    0.087739] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.094202] pinctrl core: initialized pinctrl subsystem
[    0.102488] NET: Registered protocol family 16
[    0.341676] registering PCI controller with io_map_base unset
[    0.385353] PCI host bridge to bus 0000:00
[    0.389620] pci_bus 0000:00: root bus resource [mem 0x10f00000-0x10ffffff]
[    0.396682] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.403664] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.410650] pci_bus 0000:00: No busn resource found for root bus, will use [b                                                                                                                                                             us 00-ff]
[    0.419476] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), rec                                                                                                                                                             onfiguring
[    0.428249] pci 0000:01:00.0: enabling Extended Tags
[    0.434041] pci 0000:00:00.0: BAR 8: assigned [mem 0x10f00000-0x10ffffff]
[    0.441070] pci 0000:01:00.0: BAR 0: assigned [mem 0x10f00000-0x10f03fff 64bi                                                                                                                                                             t]
[    0.448600] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.453695] pci 0000:00:00.0:   bridge window [mem 0x10f00000-0x10ffffff]
[    0.468945] clocksource: Switched to clocksource MIPS
[    0.477103] NET: Registered protocol family 2
[    0.483540] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.490829] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.497421] TCP: Hash tables configured (established 1024 bind 1024)
[    0.504503] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.510624] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.517585] NET: Registered protocol family 1
[    0.531285] Crashlog allocated RAM at address 0x3f00000
[    0.540488] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.560230] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.566268] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT                                                                                                                                                             Y) (c) 2001-2006 Red Hat, Inc.
[    0.606887] io scheduler noop registered
[    0.610950] io scheduler deadline registered (default)
[    0.617879] bcm6328-pinctrl 10000080.pin-controller: registered at mmio b0000                                                                                                                                                             080
[    0.626981] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[    0.633802] 10000100.serial: ttyS0 at MMIO 0x10000100 (irq = 36, base_baud =                                                                                                                                                              1562500) is a bcm63xx_uart
[    0.643553] console [ttyS0] enabled
[    0.643553] console [ttyS0] enabled
[    0.650698] bootconsole [early0] disabled
[    0.650698] bootconsole [early0] disabled
[    0.677904] m25p80 spi1.0: sst25vf032b (4096 Kbytes)
[    0.684353] bcm63xxpart: nvram checksum failed, contents may be invalid (expe                                                                                                                                                             cted 00000000, got c8d0cfe7)
[    0.694248] bcm63xxpart: Partition 0 is CFE offset 0 and length 10000
[    0.700852] bcm63xxpart: Partition 1 is nvram offset 3f0000 and length 10000
[    0.708105] bcm63xxpart: Partition 2 is linux offset 10000 and length 3e0000
[    0.715438] 3 bcm63xxpart partitions found on MTD device spi1.0
[    0.721541] Creating 3 MTD partitions on "spi1.0":
[    0.726461] 0x000000000000-0x000000010000 : "CFE"
[    0.733067] 0x0000003f0000-0x000000400000 : "nvram"
[    0.739767] 0x000000010000-0x0000003f0000 : "linux"
[    0.752412] parser_imagetag: rootfs: CFE image tag found at 0x0 with version                                                                                                                                                              6, board type 963281TAN
[    0.761870] parser_imagetag: Partition 0 is kernel offset 100 and length 18d3                                                                                                                                                             cc
[    0.769372] parser_imagetag: Partition 1 is rootfs offset 18d4cc and length 2                                                                                                                                                             52b34
[    0.777158] parser_imagetag: Spare partition is offset 340004 and length 9fff                                                                                                                                                             c
[    0.784668] 2 bcm963xx-imagetag partitions found on MTD device linux
[    0.791213] Creating 2 MTD partitions on "linux":
[    0.796044] 0x000000000100-0x00000018d4cc : "kernel"
[    0.802790] 0x00000018d4cc-0x0000003e0000 : "rootfs"
[    0.809630] mtd: device 4 (rootfs) set to be root filesystem
[    0.819370] 1 squashfs-split partitions found on MTD device rootfs
[    0.825789] 0x000000340000-0x0000003e0000 : "rootfs_data"
[    0.835136] libphy: Fixed MDIO Bus: probed
[    0.881999] b53_common: found switch: BCM63xx, rev 0
[    0.887801] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.897085] PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
[    0.902973] bcma-pci-bridge 0000:01:00.0: bus0: Found chip with id 0x4313, re                                                                                                                                                             v 0x01 and package 0x08
[    0.912445] bcma-pci-bridge 0000:01:00.0: bus0: Core 0 found: ChipCommon (man                                                                                                                                                             uf 0x4BF, id 0x800, rev 0x24, class 0x0)
[    0.923417] bcma-pci-bridge 0000:01:00.0: bus0: Core 1 found: IEEE 802.11 (ma                                                                                                                                                             nuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[    0.934490] bcma-pci-bridge 0000:01:00.0: bus0: Core 2 found: PCIe (manuf 0x4                                                                                                                                                             BF, id 0x820, rev 0x11, class 0x0)
[    0.945067] bcma-pci-bridge 0000:01:00.0: bus0: Using fallback SPROM failed (                                                                                                                                                             err -2)
[    0.953042] bcma-pci-bridge 0000:01:00.0: bus0: No SPROM available
[    0.976558] bcma-pci-bridge 0000:01:00.0: bus0: Bus registered
[    0.985198] NET: Registered protocol family 10
[    0.998013] Segment Routing with IPv6
[    1.002003] NET: Registered protocol family 17
[    1.006671] bridge: filtering via arp/ip/ip6tables is no longer available by                                                                                                                                                              default. Update your scripts to load br_netfilter if you need this.
[    1.020026] 8021q: 802.1Q VLAN Support v1.8
[    1.035357] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.059546] Freeing unused kernel memory: 1256K
[    1.064211] This architecture does not have kernel memory protection.
[    1.073004] random: fast init done
[    2.218726] init: Console is alive
[    2.222621] init: - watchdog -
[    2.764492] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.898503] kmodloader: done loading kernel modules from /etc/modules-boot.d/                                                                                                                                                             *
[    2.916683] init: - preinit -
[    4.355705] random: jshn: uninitialized urandom read (4 bytes read)
[    4.451511] random: jshn: uninitialized urandom read (4 bytes read)
[    4.708748] random: jshn: uninitialized urandom read (4 bytes read)
[    5.631230] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    5.637862] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[    5.644557] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[    5.781477] urandom_read: 2 callbacks suppressed
[    5.781492] random: procd: uninitialized urandom read (4 bytes read)
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 level
[    6.500996] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.250986] jffs2: notice: (361) jffs2_build_xattr_subsystem: complete buildi                                                                                                                                                             ng xattr subsystem, 2 of xdatum (0 unchecked, 2 orphan) and 2 of xref (2 dead, 0                                                                                                                                                              orphan) found.
[    9.270509] mount_root: switching to jffs2 overlay
[    9.323516] overlayfs: upper fs does not support tmpfile.
[    9.348372] urandom-seed: Seeding with /etc/urandom.seed
[    9.592775] procd: - early -
[    9.596123] procd: - watchdog -
[   10.340661] procd: - watchdog -
[   10.344505] procd: - ubus -
[   10.499595] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.630561] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.638120] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.646941] procd: - init -
Please press Enter to activate this console.
[   11.850075] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.113710] urngd: v1.0.0 started.
[   12.132147] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.176571] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.221456] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   12.434740] xt_time: kernel timezone is -0000
[   12.478766] PPP generic driver version 2.4.2
[   12.494862] NET: Registered protocol family 24
[   12.521256] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.676127] random: crng init done
[   12.679636] random: 1 urandom warning(s) missed due to ratelimiting
[   27.081838] br-lan: port 1(eth0.1) entered blocking state
[   27.087435] br-lan: port 1(eth0.1) entered disabled state
[   27.093558] device eth0.1 entered promiscuous mode
[   27.098513] device eth0 entered promiscuous mode
[   27.127760] br-lan: port 1(eth0.1) entered blocking state
[   27.133351] br-lan: port 1(eth0.1) entered forwarding state
[   27.139441] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   27.974251] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

дамп 4мб flash с openwrt



Последнее исправление: hrenacher228 (всего исправлений: 1)