Update: Got a clean boot
BGA IC
Xtal:1
DDR3 init.
DRAMC init done.
Calculate size.
DRAM size=512MB(supported max size)
Set new TRFC.
ddr-1066
7512DRAMC V1.2.2 (0)
EN751221 at Tue Nov 7 20:42:52 CST 2017 version 1.1 free bootbase
Memory size 512MB
Set SPI Clock to 25 Mhz
spi_nand_probe: mfr_id=0x98, dev_id=0xcb
Using Flash ECC.
Detected SPI NAND Flash : _SPI_NAND_DEVICE_ID_TC58CVG1S3H, Flash Size=0x10000000
bmt pool size: 163
BMT & BBT Init Success
Press any key in 3 secs to enter boot command mode.
.......................
UserName: telecomadmin
Password: ********
bldr> xmdm 80002000 786630
CCCC
*** file: /root/pkt_access/openwrt/linux.bin
$ lsx -vv /root/pkt_access/openwrt/linux.bin
Sending /root/pkt_access/openwrt/linux.bin, 61644 blocks: Give your local XMODEM receive command now.
Bytes Sent:7890560 BPS:7989
Transfer complete
*** exit status: 0 ***
ived len=786680
bldr> jump 80002000
Jump to 80002000
[ 0.000000] Linux version 4.9-ndm-5 (user@5247154d066c) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r8077-7cbbab7246) ) #0 SMP Wed Nov 11 20:09:58 2020
[ 0.000000] ISPRAM0: PA=00350000,Size=00010000,enabled
[ 0.000000] EcoNet SoC: RAM: DDR3 512 MB
[ 0.000000] CPU/SYS frequency: 900/225 MHz
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019558 (MIPS 34Kc)
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 00020000 @ 00000000 (reserved)
[ 0.000000] memory: 1bbe0000 @ 00020000 (usable)
[ 0.000000] memory: 00400000 @ 1bc00000 (reserved)
[ 0.000000] memory: 1bbe0000 @ 00020000 (usable) [100/412]
[ 0.000000] memory: 00400000 @ 1bc00000 (reserved)
[ 0.000000] Wasting 1024 bytes for tracking 32 unused pages
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Detected 1 available secondary CPU(s)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x000000001bbfffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000001bbfffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001bbfffff]
[ 0.000000] percpu: Embedded 12 pages/cpu s17968 r8192 d22992 u49152
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 112776
[ 0.000000] Kernel command line: console=ttyS0,115200
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Writing ErrCtl register=00067c6c
[ 0.000000] Readback ErrCtl register=00067c6c
[ 0.000000] NMI base is 813fc200
[ 0.000000] Memory: 442588K/454656K available (3448K kernel code, 144K rwdata, 664K rodata, 3472K init, 243K bss, 12068K reserved, 0K cma-reserved)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:41
[ 0.000000] hpt: using 200.000 MHz high precision timer
[ 0.000000] clocksource: hpt: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.008002] console [ttyS0] enabled
[ 0.008002] console [ttyS0] enabled
[ 0.014795] bootconsole [early0] disabled
[ 0.014795] bootconsole [early0] disabled
[ 0.022791] Calibrating delay loop... 599.04 BogoMIPS (lpj=1198080)
[ 0.053324] pid_max: default: 32768 minimum: 301
[ 0.058067] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.064535] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.075290] ISPRAM0: PA=00350000,Size=00010000,enabled
[ 0.076140] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.076147] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.076231] CPU1 revision is: 00019558 (MIPS 34Kc)
[ 0.132050] Synchronize counters for CPU 1: done.
[ 0.136839] Brought up 2 CPUs
[ 0.139727] CPU1: update max cpu_capacity 589
[ 0.144090] CPU1: update max cpu_capacity 589
[ 0.145303] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.145320] futex hash table entries: 512 (order: 2, 16384 bytes)
[ 0.164595] NET: Registered protocol family 16
[ 0.567802] PCI host bridge to bus 0000:00
[ 0.571849] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[ 0.578739] pci_bus 0000:00: root bus resource [io 0x1f600000-0x1f60ffff]
[ 0.585472] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.578739] pci_bus 0000:00: root bus resource [io 0x1f600000-0x1f60ffff] [50/412]
[ 0.585472] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.592238] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.602306] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.610299] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.622617] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[ 0.629289] pci 0000:00:01.0: BAR 8: assigned [mem 0x20100000-0x202fffff]
[ 0.636027] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[ 0.642835] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.647784] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
[ 0.654613] pci 0000:02:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
[ 0.661907] pci 0000:02:00.0: BAR 6: assigned [mem 0x20200000-0x2020ffff pref]
[ 0.669031] pci 0000:00:01.0: PCI bridge to [bus 02]
[ 0.674001] pci 0000:00:01.0: bridge window [mem 0x20100000-0x202fffff]
[ 0.681969] clocksource: Switched to clocksource hpt
[ 0.688429] NET: Registered protocol family 2
[ 0.692898] IP idents hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.700252] TCP established hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.707536] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.714525] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.721057] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.726786] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.733266] NET: Registered protocol family 1
[ 0.812038] workingset: timestamp_bits=29 max_order=17 bucket_order=0
[ 0.818598] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.826354] io scheduler noop registered (default)
[ 0.831391] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[ 0.838901] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[ 0.846744] tc3162_uart: UART driver for EN751x SoC, buffer size is 4096 bytes
[ 0.854130] ttyS0 at I/O 0xbfbf0003 (irq = 1, base_baud = 7200) is a TC3162
[ 0.854592] ndmpart: registering the NDM partition parser...
[ 0.854620] EcoNET SPI NAND driver init
[ 0.854645] Set SPI Clock to 50 Mhz
[ 0.854673] Using Flash ECC
[ 0.854685] Detected SPI NAND Flash: TC58CVG1S3H, Flash Size: 256 MB
[ 0.854976] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xcb
[ 0.854983] nand: Toshiba TC58CVG1S3H
[ 0.854994] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.919424] BMT pool size: 163
[ 0.921233] BBT found, bad block count: 3
[ 0.921242] BBT bad block: 3
[ 0.921249] BBT bad block: 1536
[ 0.921256] BBT bad block: 1537
[ 0.921314] BMT & BBT init success
[ 0.926674] ndmpart: di: unknown magic 0x55424923
[ 0.926689] mtd: failed to find partitions; one or more parsers reports errors (-22)
[ 0.927694] tun: Universal TUN/TAP device driver, 1.6
[ 0.927717] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 0.927788] PPP generic driver version 2.4.2
[ 0.927934] PPP MPPE Compression module registered
[ 0.927948] NET: Registered protocol family 24
[ 0.927974] PPTP driver version 0.8.5
[ 0.927948] NET: Registered protocol family 24
[ 0.927974] PPTP driver version 0.8.5
[ 0.929555] nf_conntrack version 0.5.0 (56320 buckets, 112640 max)
[ 0.929993] gre: GRE over IPv4 demultiplexor driver
[ 0.930117] NET: Registered protocol family 10
[ 0.931277] NET: Registered protocol family 17
[ 0.931311] 8021q: 802.1Q VLAN Support v1.8
[ 0.946350] Freeing unused kernel memory: 3472K
[ 0.946374] This architecture does not have kernel memory protection.
[ 0.946382] RNG reseed started
[ 0.946425] cannot get MTD device Config: -19
[ 0.958088] init: Console is alive
[ 0.972789] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 0.973142] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 0.979246] init: - preinit -
[ 1.060623] random: jshn: uninitialized urandom read (4 bytes read)
[ 1.081849] random: jshn: 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
[ 4.189751] procd: - early -
[ 4.740799] procd: - ubus -
[ 4.747511] random: ubusd: uninitialized urandom read (4 bytes read)
[ 4.790943] random: ubusd: uninitialized urandom read (4 bytes read)
[ 4.791428] random: ubusd: uninitialized urandom read (4 bytes read)
[ 4.792290] procd: - init -
Please press Enter to activate this console.
[ 4.924298] kmodloader: loading kernel modules from /etc/modules.d/*
[ 4.927875] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 4.938230] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 4.975870] xt_time: kernel timezone is -0000
[ 4.981559] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 6.139263] random: fast init done
[ 9.034952] IPv6: ADDRCONF(NETDEV_UP): lo: link is not ready
BusyBox v1.28.4 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.9, r8077-7cbbab7246
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#
Notes:
-
[ 0.000000] ISPRAM0: PA=00350000,Size=00010000,enabled
- the 2.6 kernel says this should be 32k not 64k and this kernel has it hard coded to 64k. I don't know anything about ISPRAM or whether this means there will be zero space for CONFIG_TC3162_DMEM, or if it will map addresses off the chip and eventually crash, or if it just doesn't matter and it's better to do it this way.
-
[ 0.136839] Brought up 2 CPUs
- the 2.6 kernel brings up 4 "virtual" CPUs, unclear which is better
-
[ 0.926689] mtd: failed to find partitions; one or more parsers reports errors (-22)
- this needs fixing so that we can load the squashfs and not rely on initramfs
-
[ 0.946425] cannot get MTD device Config: -19
- random number generator, low priority
TODO:
- Probably ethernet, the driver is in the kernel tree so this should be relatively low hanging fruit
- Figure out the MTD situation
- Wifi drivers
- USB (this is another case where the EN7512 differs from the EN7526 and so the kernel is initializing the USB incorrectly)
- Check if EPON drivers exist in this kernel (I'm not sure - didn't check)
- Port the prom and all of the working drivers to stock openwrt kernel-5.15 and stop using this divergent 4.9
- Build a trx "tclinux.bin" file so I can flash to the chip
- Propose patches to OpenWRT
But this weekend I will push my hacky openwrt tree to github and write some instructions for anyone who wants to follow along.