找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3291|回复: 7

关于解决-歌华链无限重启或只能拔电重启的问题

[复制链接]
发表于 2019-3-23 08:10 | 显示全部楼层 |阅读模式
关于歌华链有很多的硬件版本,常见的是12-V0.3-2018/02/22
Q12-V0.4-2018/03/23


本人恰巧有这2个型号的机器。基本上V0.3版本刷大多数固件都可以正常启动和软重启。
当你发现在breed下刷入大多数固件后设备无法启动;又或是成功启动固件了,但只能拔电源才能重启时,说明你的歌华链是V0.4版本的。
此版本需要做如下补丁,才能正常使用(本人只在Chaos_Calmer 3.18内核下测试成功)。(附件里有适配于CC下的DTS)


歌华链V0.4版本 openwrt CC-3.18.45固件分享(无线驱动backports了18.06.2的mac80211和MT76-2018-10-01-plus版本):
链接:https://pan.baidu.com/s/1KFbTSuLWClaT9VwHhrZOvA
提取码:nxr3


--- a/drivers/mtd/spi-nor/spi-nor.c        2019-03-22 02:23:02.198651000 +0800
+++ b/drivers/mtd/spi-nor/spi-nor.c        2019-03-22 11:39:08.776000000 +0800
@@ -781,7 +781,7 @@
        { "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
-        { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
+        { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
        { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
        { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) },
        { "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) },
--- a/drivers/mtd/spi-nor/spi-nor.c        2019-03-22 13:13:41.940000000 +0800
+++ b/drivers/mtd/spi-nor/spi-nor.c        2019-03-22 20:48:38.028000000 +0800
@@ -908,11 +909,12 @@
        { },
};

-static const struct flash_info *spi_nor_read_id(struct spi_nor *nor)
+static const struct flash_info *spi_nor_read_id(struct spi_nor *nor,
+                                                const char *name)
{
        int                        tmp;
        u8                        id[SPI_NOR_MAX_ID_LEN];
-        const struct flash_info        *info;
+        const struct flash_info        *info, *first_match = NULL;

        tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN);
        if (tmp < 0) {
@@ -923,10 +925,16 @@
        for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) {
                info = &spi_nor_ids[tmp];
                if (info->id_len) {
-                        if (!memcmp(info->id, id, info->id_len))
-                                return &spi_nor_ids[tmp];
+                        if (!memcmp(info->id, id, info->id_len)) {
+                                if (!name || !strcmp(name, info->name))
+                                        return info;
+                                if (!first_match)
+                                        first_match = info;
+                        }
                }
        }
+        if (first_match)
+                return first_match;
        dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %2x, %2x\n",
                id[0], id[1], id[2]);
        return ERR_PTR(-ENODEV);
@@ -1239,7 +1247,7 @@
                info = spi_nor_match_id(name);
        /* Try to auto-detect if chip name wasn't specified or not found */
        if (!info)
-                info = spi_nor_read_id(nor);
+                info = spi_nor_read_id(nor, NULL);
        if (IS_ERR_OR_NULL(info))
                return -ENOENT;

@@ -1250,7 +1258,7 @@
        if (name && info->id_len) {
                const struct flash_info *jinfo;

-                jinfo = spi_nor_read_id(nor);
+                jinfo = spi_nor_read_id(nor, name);
                if (IS_ERR(jinfo)) {
                        return PTR_ERR(jinfo);
                } else if (jinfo != info) {

--- a/drivers/mtd/devices/m25p80.c        2016-10-22 15:30:19.000000000 +0800
+++ b/drivers/mtd/devices/m25p80.c        2016-12-07 19:40:30.000000000 +0800
@@ -321,6 +321,12 @@
static int m25p_remove(struct spi_device *spi)
{
        struct m25p        *flash = spi_get_drvdata(spi);
+        flash->command[0] = SPINOR_OP_EX4B;  // exit 4-byte address mode: 0xe9
+        spi_write(flash->spi, flash->command, 1);
+        flash->command[0] = 0x66;  // enable reset
+        spi_write(flash->spi, flash->command, 1);
+        flash->command[0] = 0x99;  // reset
+        spi_write(flash->spi, flash->command, 1);

        /* Clean up MTD stuff. */
        return mtd_device_unregister(&flash->spi_nor.mtd);
@@ -385,6 +396,7 @@
        .id_table        = m25p_ids,
        .probe        = m25p_probe,
        .remove        = m25p_remove,
+        .shutdown = m25p_remove, // add shutdown method to reset spi flash

        /* REVISIT: many of these chips have deep power-down modes, which
         * should clearly be entered on suspend() to minimize power use.



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
发表于 2019-3-23 08:18 | 显示全部楼层
谜一样的歌华链版本。不刷了,简单用用。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-23 08:31 | 显示全部楼层
我好像没啥问题。。。

点评

无线确实差了点,有线网页打开有时候好像也有缓冲,可能是刷了新3老毛子的关系  详情 回复 发表于 2019-5-7 20:07
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-3-23 17:10 | 显示全部楼层
所以最后真的有不同的硬件版本啊,难怪刷机有人变砖…
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-5-7 20:07 | 显示全部楼层
FLCL 发表于 2019-3-23 08:31
我好像没啥问题。。。

无线确实差了点,有线网页打开有时候好像也有缓冲,可能是刷了新3老毛子的关系
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-5-8 14:39 | 显示全部楼层
251643711 发表于 2019-5-7 20:07
无线确实差了点,有线网页打开有时候好像也有缓冲,可能是刷了新3老毛子的关系

然后刷了潘多拉塞进弱电箱当有线路由去了2333333

点评

哈哈,不肯死心,还是要在测试下,路由是很多  详情 回复 发表于 2019-5-8 14:48
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-5-8 14:48 | 显示全部楼层
FLCL 发表于 2019-5-8 14:39
然后刷了潘多拉塞进弱电箱当有线路由去了2333333

哈哈,不肯死心,还是要在测试下,路由是很多
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-11-7 18:25 | 显示全部楼层
我的看来就是4版本了。刷了breed之后试了好多固件只有潘多拉和高恪能正常启动,看了下扩展名,这两个是bin,老毛子那些是trx,是不是和这个有关呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 13:04

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表