恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 26971|回复: 39

【弃坑】Breed/LEDE for RTL8196C

    [复制链接]
发表于 2017-12-10 17:14 | 显示全部楼层 |阅读模式
本帖最后由 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 截图:
Breed-RTL8196C.png

LEDE 截图:
LEDE-RTL8196C.png

LEDE-Switch-RTL8196C.png

LEDE 串口输出:
  1. Boot and Recovery Environment for Embedded Devices
  2. Copyright (C) 2017 HackPascal <hackpascal@gmail.com>
  3. Build date 2017-12-10 [git-dd0f76b]
  4. Version 1.1 (r1153)

  5. DRAM: 32MB
  6. Platform: Realtek RTL8196C rev B
  7. Board: AU HOME SPOT CUBE
  8. Clocks: CPU: 390MHz, SDRAM: 168MHz, Bus: 200MHz, Ref: 25MHz
  9. Flash: EON EN25Q64 (8MB) on rtk-spi.0
  10. rtl-nic: MAC address is invalid, using default settings.
  11. rtl-nic: Using MAC address 00:07:32:00:00:01
  12. Waiting for auto-negotiation complete ... OK
  13. eth0: Realtek RTL8196 built-in switch (Project ID: 61150000)

  14. Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0

  15. Press any key to interrupt autoboot ... 0

  16. Trying to boot cvimg from 0x0009e000 in flash bank 0 ...
  17.     Load Address: 80500000
  18.     Data Size:    3773848 Bytes
  19. Flushing cache ... done.

  20. Starting kernel at 0x80500000...



  21. OpenWrt kernel loader for Realtek RTL819X
  22. Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
  23. Copyright (C) 2017 Weijie Gao <hackpascal@gmail.com>
  24. Decompressing kernel... done!
  25. Starting kernel at 80000000...

  26. [    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
  27. [    0.000000] bootconsole [early0] enabled
  28. [    0.000000] CPU0 revision is: 0000cd01 (Lexra LX4380 / RLX4181)
  29. [    0.000000] Realtek SoC: Realtek RTL8196C rev B
  30. [    0.000000] Determined physical RAM map:
  31. [    0.000000]  memory: 02000000 [url=home.php?mod=space&uid=162986]@[/url] 00000000 (usable)
  32. [    0.000000] Initrd not found or empty - disabling initrd
  33. [    0.000000] Zone ranges:
  34. [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
  35. [    0.000000] Movable zone start for each node
  36. [    0.000000] Early memory node ranges
  37. [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
  38. [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
  39. [    0.000000] Primary instruction cache 16kB, linesize 16 bytes.
  40. [    0.000000] Primary write-back data cache 8kB, linesize 16 bytes.
  41. [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
  42. [    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
  43. [    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
  44. [    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
  45. [    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
  46. [    0.000000] Memory: 27940K/32768K available (3343K kernel code, 106K rwdata, 648K rodata, 184K init, 194K bss, 4828K reserved, 0K cma-reserved)
  47. [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
  48. [    0.000000] NR_IRQS:40
  49. [    0.000000] Clocks: CPU:390.000MHz, DRAM:168.750MHz, Bus:200.000MHz
  50. [    0.000000] clocksource: RTL819X TC1: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 1194537775 ns
  51. [    0.000036] sched_clock: 28 bits at 100MHz, resolution 10ns, wraps every 1342177275ns
  52. [    0.026215] Calibrating delay loop... 388.30 BogoMIPS (lpj=1941504)
  53. [    0.107415] pid_max: default: 32768 minimum: 301
  54. [    0.123415] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  55. [    0.145548] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  56. [    0.179459] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
  57. [    0.215117] NET: Registered protocol family 16
  58. [    1.305323] realtek-pci realtek-pci.0: PCIe link is down
  59. [    1.323076] registering PCI controller with io_map_base unset
  60. [    1.343579] MIPS: machine is AU HOME SPOT CUBE
  61. [    1.416141] PCI host bridge to bus 0000:00
  62. [    1.429966] pci_bus 0000:00: root bus resource [mem 0x19000000-0x19ffffff]
  63. [    1.452933] pci_bus 0000:00: root bus resource [io  0x18c00000-0x18dfffff]
  64. [    1.475898] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
  65. [    1.498573] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
  66. [    1.528767] clocksource: Switched to clocksource RTL819X TC1
  67. [    1.554516] NET: Registered protocol family 2
  68. [    1.572008] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
  69. [    1.595437] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
  70. [    1.616747] TCP: Hash tables configured (established 1024 bind 1024)
  71. [    1.638335] UDP hash table entries: 256 (order: 0, 4096 bytes)
  72. [    1.657971] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
  73. [    1.679814] NET: Registered protocol family 1
  74. [    1.723737] futex hash table entries: 256 (order: -1, 3072 bytes)
  75. [    1.744562] Crashlog allocated RAM at address 0x1f00000
  76. [    1.843588] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  77. [    1.863224] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  78. [    1.909583] io scheduler noop registered
  79. [    1.922872] io scheduler deadline registered (default)
  80. [    1.941008] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
  81. [    1.964453] console [ttyS0] disabled
  82. &#255;[    1.996792] serial8250.0: ttyS0 at MMIO 0x18002000 (irq = 15, base_baud = 12500000) is a 16550A
  83. [    2.025902] console [ttyS0] enabled
  84. [    2.025902] console [ttyS0] enabled
  85. [    2.049180] bootconsole [early0] disabled
  86. [    2.049180] bootconsole [early0] disabled
  87. [    2.092381] m25p80 spi0.0: found en25q64, expected m25p80
  88. [    2.110574] m25p80 spi0.0: en25q64 (8192 Kbytes)
  89. [    2.126128] 2 cmdlinepart partitions found on MTD device spi0.0
  90. [    2.145958] Creating 2 MTD partitions on "spi0.0":
  91. [    2.162066] 0x000000000000-0x000000008000 : "bootloader"
  92. [    2.187626] 0x00000009e000-0x000000800000 : "firmware"
  93. [    2.218292] 2 cvimg-fw partitions found on MTD device firmware
  94. [    2.237939] 0x00000009e000-0x0000001e0284 : "kernel"
  95. [    2.263272] 0x0000001e0284-0x000000800000 : "rootfs"
  96. [    2.288340] mtd: device 3 (rootfs) set to be root filesystem
  97. [    2.307532] 1 squashfs-split partitions found on MTD device rootfs
  98. [    2.328287] 0x000000438000-0x000000800000 : "rootfs_data"
  99. [    2.359967] eth0: Realtek RE865X NIC at 0xb8010000, irq 6
  100. [    2.395821] libphy: rtl865x_mdio: probed
  101. [    2.510405] NET: Registered protocol family 10
  102. [    2.542933] NET: Registered protocol family 17
  103. [    2.558289] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
  104. [    2.600391] 8021q: 802.1Q VLAN Support v1.8
  105. [    2.636749] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
  106. [    2.661580] Freeing unused kernel memory: 184K (80402000 - 80430000)
  107. [    4.659155] init: Console is alive
  108. [    6.288723] kmodloader: loading kernel modules from /etc/modules-boot.d/*
  109. [    6.495424] usbcore: registered new interface driver usbfs
  110. [    6.514449] usbcore: registered new interface driver hub
  111. [    6.532849] usbcore: registered new device driver usb
  112. [    6.569811] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
  113. [    6.596118] ehci-platform: EHCI generic platform driver
  114. [    6.614054] ehci-platform ehci-platform: EHCI Host Controller
  115. [    6.633515] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
  116. [    6.660336] ehci-platform ehci-platform: irq 4, io mem 0x18021000
  117. [    6.699101] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
  118. [    6.725187] hub 1-0:1.0: USB hub found
  119. [    6.740006] hub 1-0:1.0: 1 port detected
  120. [    6.764544] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
  121. [    6.789993] ohci-platform: OHCI generic platform driver
  122. [    6.807918] ohci-platform ohci-platform: Generic Platform OHCI controller
  123. [    6.830810] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
  124. [    6.857711] ohci-platform ohci-platform: irq 4, io mem 0x18020000
  125. [    6.937958] hub 2-0:1.0: USB hub found
  126. [    6.952510] hub 2-0:1.0: 1 port detected
  127. [    6.970697] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
  128. [    7.006566] init: - preinit -
  129. [    8.555612] random: jshn: uninitialized urandom read (4 bytes read, 12 bits of entropy available)
  130. [    8.761565] random: jshn: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
  131. [    9.865165] random: jshn: uninitialized urandom read (4 bytes read, 14 bits of entropy available)
  132. [   10.090437] random: jshn: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
  133. [   10.550332] random: jshn: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
  134. [   11.991343] random: procd: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
  135. [   12.074197] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
  136. [   12.126965] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
  137. [   12.179814] random: mktemp: uninitialized urandom read (6 bytes read, 18 bits of entropy available)
  138. Press the [f] key and hit [enter] to enter failsafe mode
  139. Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  140. [   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.
  141. [   15.209862] mount_root: switching to jffs2 overlay
  142. [   15.326111] urandom-seed: Seeding with /etc/urandom.seed
  143. [   15.697855] procd: - early -
  144. [   16.560777] procd: - ubus -
  145. [   16.624528] random: ubusd: uninitialized urandom read (4 bytes read, 25 bits of entropy available)
  146. [   16.666675] procd: - init -
  147. Please press Enter to activate this console.
  148. [   17.820252] kmodloader: loading kernel modules from /etc/modules.d/*
  149. [   17.859265] ip6_tables: (C) 2000-2006 Netfilter Core Team
  150. [   17.929815] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
  151. [   17.956574] Backport generated by backports.git backports-20160324-13-g24da7d3c
  152. [   17.991198] ip_tables: (C) 2000-2006 Netfilter Core Team
  153. [   18.035210] nf_conntrack version 0.5.0 (439 buckets, 1756 max)
  154. [   18.246151] xt_time: kernel timezone is -0000
  155. [   18.418270] PPP generic driver version 2.4.2
  156. [   18.442818] NET: Registered protocol family 24
  157. [   18.512758] kmodloader: done loading kernel modules from /etc/modules.d/*
  158. [   46.748006] device eth0.1 entered promiscuous mode
  159. [   46.764197] device eth0 entered promiscuous mode
  160. [   46.790725] br-lan: port 1(eth0.1) entered forwarding state
  161. [   46.809586] br-lan: port 1(eth0.1) entered forwarding state
  162. [   48.808988] br-lan: port 1(eth0.1) entered forwarding state
  163. [   79.338996] random: nonblocking pool is initialized
复制代码


Breed 及固件下载地址:
https://pan.baidu.com/s/1pL2yH4J


我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:16 | 显示全部楼层
沙发?         
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:17 | 显示全部楼层
第一次离大神这么近,
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:20 | 显示全部楼层
前排支持!
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:21 | 显示全部楼层
膜拜大神,注意休息
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:22 | 显示全部楼层
H大威武。。。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:28 | 显示全部楼层
你也太牛逼了。。。。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:28 | 显示全部楼层
用的人也不多吧
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:46 | 显示全部楼层
本帖最后由 x1060703191 于 2017-12-10 17:51 编辑

几个月前看到贴吧已经有了8196c的openwrt和lede了 不过由于uboot的原因只能支持很少部分机型而且内存也必须根据uboot来定制 听贴吧的朋友说的 他是用华硕的uboot来弄的 无线也没问题(哦对了他的是8192ce好像 这个au是RTL8192DR)   

H大那个Blank 版的breed是实在是没看懂如何定制复位键  能否等您有点点时间的话 出个详细的教程定制下 感谢

下面的贴吧的朋友弄的
https://tieba.baidu.com/p/5372702372?red_tag=2327219508


对于8196这个感觉只能用原厂或者刷285p固件了 反而可以发挥最好的效果

点评

垃圾的rtl8196c路由适配主流openwrt , here it is 垃圾的rtl8196c路由适配主流openwrt  详情 回复 发表于 2017-12-10 19:27
breed内存容量自适应 改复位键就是设置一个环境变量而已,有什么详细教程可写。。 我这个LEDE可不是其他人移植的那种,使用了大量原厂代码和patch 我这个是依照lede标准重写代码移植的,改一改甚至能提交到lede上  详情 回复 发表于 2017-12-10 17:55
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:49 | 显示全部楼层
以前在github也见过一个RTL的openwrt,也没有详细测试。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 17:55 | 显示全部楼层
前排留名
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2017-12-10 17:55 | 显示全部楼层
x1060703191 发表于 2017-12-10 17:46
几个月前看到贴吧已经有了8196c的openwrt和lede了 不过由于uboot的原因只能支持很少部分机型而且内存也必须 ...

breed内存容量自适应
改复位键就是设置一个环境变量而已,有什么详细教程可写。。
我这个LEDE可不是其他人移植的那种,使用了大量原厂代码和patch
我这个是依照lede标准重写代码移植的,改一改甚至能提交到lede上的

点评

breed的复位键能在ttl下进行配置修改吗  详情 回复 发表于 2019-8-15 11:12
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 18:08 | 显示全部楼层
赶紧支持一下,快来看看
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 18:33 来自手机 | 显示全部楼层
太高端了,我都不晓得说的啥?
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-12-10 18:44 | 显示全部楼层
终于有breed了,能否支持启动285p的固件?
我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )|网站地图

GMT+8, 2022-12-6 22:58

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

| 江苏省互联网有害信息举报中心 举报信箱:js12377@jschina.com.cn 举报电话:025-88802724 | 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797
快速回复 返回顶部 返回列表