|
本帖最后由 hackpascal 于 2017-12-17 22:23 编辑
很早之前说过要做 RTL8196C 支持,
对,确实做了,但是发现 RTL8196C 性能太差了,而且问题很多。
做了 Breed 支持,但是却无法支持原厂固件,因为原厂 bootcode 大小小于 64KB,甚至不到 32KB,而 Breed 却有 80KB 多。因此刷入 Breed 可能会破坏原厂固件的数据,反过来原厂固件也可能直接破坏 Breed。
做了 LEDE 支持。全部代码重写,花了不少时间。但是没有无线驱动支持,一是开源的 mac80211 驱动 rtl_wifi 不支持 RTL8192DR,二是它要消耗大量内存,32MB 内存根本不够用。另一个就是原厂的 rtl8192cd 驱动一团糟,根本没法移植。
现在因为工作了,更不可能有大量时间来搞了,因此就把 Breed 放出来,同时放出 LEDE 源码,有兴趣的坛友可以自行修改编译,也欢迎提供 pull request。
已弃坑,不要指望继续更新了
Breed for RTL8196C:内存容量自适应
一个专用版,AU HOME SPOT CUBE,不支持原厂固件,只能使用楼主做的 LEDE!
一个 Blank 版,可以自定义复位键。
波特率 38400,可以修改。
不支持修改 MAC 地址,因为楼主也不知道 MAC 地址在哪。启动固件请使用 cvimg 命令而不是 boot 命令!
特别提醒:只有在原厂固件的 Bootloader 分区大于等于 128KB 时,才能使用 Breed 启动原厂固件!
LEDE for RTL8196C:
源码地址 https://github.com/hackpascal/lede-rtl8196c 分支为 realtek
除了无线驱动,其它的功能都正常。
以太网驱动的 MAC 地址目前是硬编码的,写在 dev-eth.c 中,请根据需求自行修改。
支持一个 mach:AU HOME SPOT CUBE,支持从原厂固件或 bootcode 中刷入,兼容原厂固件。
factory 固件支持从原厂 bootcode 启动,不能通过 LEDE 刷入。
sysupgrade 固件则只能通过 LEDE 更新!
Breed 截图:
LEDE 截图:
LEDE 串口输出:
- Boot and Recovery Environment for Embedded Devices
- Copyright (C) 2017 HackPascal <hackpascal@gmail.com>
- Build date 2017-12-10 [git-dd0f76b]
- Version 1.1 (r1153)
- DRAM: 32MB
- Platform: Realtek RTL8196C rev B
- Board: AU HOME SPOT CUBE
- Clocks: CPU: 390MHz, SDRAM: 168MHz, Bus: 200MHz, Ref: 25MHz
- Flash: EON EN25Q64 (8MB) on rtk-spi.0
- rtl-nic: MAC address is invalid, using default settings.
- rtl-nic: Using MAC address 00:07:32:00:00:01
- Waiting for auto-negotiation complete ... OK
- eth0: Realtek RTL8196 built-in switch (Project ID: 61150000)
- Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0
- Press any key to interrupt autoboot ... 0
- Trying to boot cvimg from 0x0009e000 in flash bank 0 ...
- Load Address: 80500000
- Data Size: 3773848 Bytes
- Flushing cache ... done.
- Starting kernel at 0x80500000...
- OpenWrt kernel loader for Realtek RTL819X
- Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- Copyright (C) 2017 Weijie Gao <hackpascal@gmail.com>
- Decompressing kernel... done!
- Starting kernel at 80000000...
- [ 0.000000] Linux version 4.4.49 (hackpascal@HackPascalDesk) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3503-a11243578a) ) #0 Wed Feb 15 23:46:29 2017
- [ 0.000000] bootconsole [early0] enabled
- [ 0.000000] CPU0 revision is: 0000cd01 (Lexra LX4380 / RLX4181)
- [ 0.000000] Realtek SoC: Realtek RTL8196C rev B
- [ 0.000000] Determined physical RAM map:
- [ 0.000000] memory: 02000000 [url=home.php?mod=space&uid=162986]@[/url] 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 16kB, linesize 16 bytes.
- [ 0.000000] Primary write-back data cache 8kB, linesize 16 bytes.
- [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
- [ 0.000000] Kernel command line: machtype=AU-HOME-SPOT-CUBE mtdparts=spi0.0:32k(bootloader)ro,-@0x9e000(firmware) console=ttyS0,38400 rootfstype=squashfs,jffs2 noinitrd
- [ 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] Memory: 27940K/32768K available (3343K kernel code, 106K rwdata, 648K rodata, 184K init, 194K bss, 4828K reserved, 0K cma-reserved)
- [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
- [ 0.000000] NR_IRQS:40
- [ 0.000000] Clocks: CPU:390.000MHz, DRAM:168.750MHz, Bus:200.000MHz
- [ 0.000000] clocksource: RTL819X TC1: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 1194537775 ns
- [ 0.000036] sched_clock: 28 bits at 100MHz, resolution 10ns, wraps every 1342177275ns
- [ 0.026215] Calibrating delay loop... 388.30 BogoMIPS (lpj=1941504)
- [ 0.107415] pid_max: default: 32768 minimum: 301
- [ 0.123415] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
- [ 0.145548] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
- [ 0.179459] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
- [ 0.215117] NET: Registered protocol family 16
- [ 1.305323] realtek-pci realtek-pci.0: PCIe link is down
- [ 1.323076] registering PCI controller with io_map_base unset
- [ 1.343579] MIPS: machine is AU HOME SPOT CUBE
- [ 1.416141] PCI host bridge to bus 0000:00
- [ 1.429966] pci_bus 0000:00: root bus resource [mem 0x19000000-0x19ffffff]
- [ 1.452933] pci_bus 0000:00: root bus resource [io 0x18c00000-0x18dfffff]
- [ 1.475898] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
- [ 1.498573] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
- [ 1.528767] clocksource: Switched to clocksource RTL819X TC1
- [ 1.554516] NET: Registered protocol family 2
- [ 1.572008] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
- [ 1.595437] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
- [ 1.616747] TCP: Hash tables configured (established 1024 bind 1024)
- [ 1.638335] UDP hash table entries: 256 (order: 0, 4096 bytes)
- [ 1.657971] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
- [ 1.679814] NET: Registered protocol family 1
- [ 1.723737] futex hash table entries: 256 (order: -1, 3072 bytes)
- [ 1.744562] Crashlog allocated RAM at address 0x1f00000
- [ 1.843588] squashfs: version 4.0 (2009/01/31) Phillip Lougher
- [ 1.863224] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
- [ 1.909583] io scheduler noop registered
- [ 1.922872] io scheduler deadline registered (default)
- [ 1.941008] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
- [ 1.964453] console [ttyS0] disabled
- ÿ[ 1.996792] serial8250.0: ttyS0 at MMIO 0x18002000 (irq = 15, base_baud = 12500000) is a 16550A
- [ 2.025902] console [ttyS0] enabled
- [ 2.025902] console [ttyS0] enabled
- [ 2.049180] bootconsole [early0] disabled
- [ 2.049180] bootconsole [early0] disabled
- [ 2.092381] m25p80 spi0.0: found en25q64, expected m25p80
- [ 2.110574] m25p80 spi0.0: en25q64 (8192 Kbytes)
- [ 2.126128] 2 cmdlinepart partitions found on MTD device spi0.0
- [ 2.145958] Creating 2 MTD partitions on "spi0.0":
- [ 2.162066] 0x000000000000-0x000000008000 : "bootloader"
- [ 2.187626] 0x00000009e000-0x000000800000 : "firmware"
- [ 2.218292] 2 cvimg-fw partitions found on MTD device firmware
- [ 2.237939] 0x00000009e000-0x0000001e0284 : "kernel"
- [ 2.263272] 0x0000001e0284-0x000000800000 : "rootfs"
- [ 2.288340] mtd: device 3 (rootfs) set to be root filesystem
- [ 2.307532] 1 squashfs-split partitions found on MTD device rootfs
- [ 2.328287] 0x000000438000-0x000000800000 : "rootfs_data"
- [ 2.359967] eth0: Realtek RE865X NIC at 0xb8010000, irq 6
- [ 2.395821] libphy: rtl865x_mdio: probed
- [ 2.510405] NET: Registered protocol family 10
- [ 2.542933] NET: Registered protocol family 17
- [ 2.558289] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
- [ 2.600391] 8021q: 802.1Q VLAN Support v1.8
- [ 2.636749] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
- [ 2.661580] Freeing unused kernel memory: 184K (80402000 - 80430000)
- [ 4.659155] init: Console is alive
- [ 6.288723] kmodloader: loading kernel modules from /etc/modules-boot.d/*
- [ 6.495424] usbcore: registered new interface driver usbfs
- [ 6.514449] usbcore: registered new interface driver hub
- [ 6.532849] usbcore: registered new device driver usb
- [ 6.569811] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
- [ 6.596118] ehci-platform: EHCI generic platform driver
- [ 6.614054] ehci-platform ehci-platform: EHCI Host Controller
- [ 6.633515] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
- [ 6.660336] ehci-platform ehci-platform: irq 4, io mem 0x18021000
- [ 6.699101] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
- [ 6.725187] hub 1-0:1.0: USB hub found
- [ 6.740006] hub 1-0:1.0: 1 port detected
- [ 6.764544] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
- [ 6.789993] ohci-platform: OHCI generic platform driver
- [ 6.807918] ohci-platform ohci-platform: Generic Platform OHCI controller
- [ 6.830810] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
- [ 6.857711] ohci-platform ohci-platform: irq 4, io mem 0x18020000
- [ 6.937958] hub 2-0:1.0: USB hub found
- [ 6.952510] hub 2-0:1.0: 1 port detected
- [ 6.970697] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
- [ 7.006566] init: - preinit -
- [ 8.555612] random: jshn: uninitialized urandom read (4 bytes read, 12 bits of entropy available)
- [ 8.761565] random: jshn: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
- [ 9.865165] random: jshn: uninitialized urandom read (4 bytes read, 14 bits of entropy available)
- [ 10.090437] random: jshn: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
- [ 10.550332] random: jshn: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
- [ 11.991343] random: procd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
- [ 12.074197] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
- [ 12.126965] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
- [ 12.179814] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
- 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
- [ 15.152502] jffs2: notice: (306) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
- [ 15.209862] mount_root: switching to jffs2 overlay
- [ 15.326111] urandom-seed: Seeding with /etc/urandom.seed
- [ 15.697855] procd: - early -
- [ 16.560777] procd: - ubus -
- [ 16.624528] random: ubusd: uninitialized urandom read (4 bytes read, 25 bits of entropy available)
- [ 16.666675] procd: - init -
- Please press Enter to activate this console.
- [ 17.820252] kmodloader: loading kernel modules from /etc/modules.d/*
- [ 17.859265] ip6_tables: (C) 2000-2006 Netfilter Core Team
- [ 17.929815] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
- [ 17.956574] Backport generated by backports.git backports-20160324-13-g24da7d3c
- [ 17.991198] ip_tables: (C) 2000-2006 Netfilter Core Team
- [ 18.035210] nf_conntrack version 0.5.0 (439 buckets, 1756 max)
- [ 18.246151] xt_time: kernel timezone is -0000
- [ 18.418270] PPP generic driver version 2.4.2
- [ 18.442818] NET: Registered protocol family 24
- [ 18.512758] kmodloader: done loading kernel modules from /etc/modules.d/*
- [ 46.748006] device eth0.1 entered promiscuous mode
- [ 46.764197] device eth0 entered promiscuous mode
- [ 46.790725] br-lan: port 1(eth0.1) entered forwarding state
- [ 46.809586] br-lan: port 1(eth0.1) entered forwarding state
- [ 48.808988] br-lan: port 1(eth0.1) entered forwarding state
- [ 79.338996] random: nonblocking pool is initialized
复制代码
Breed 及固件下载地址:
https://pan.baidu.com/s/1pL2yH4J
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|