rssnsj / openwrt-hc5x61

OpenWrt Patch for HiWiFi HC5661 / HC5761 / HC5861
http://rssn.cn/roms/
587 stars 174 forks source link

HC5861: 以CC分支最后版本编译的固件无法驱动5G WiFi #139

Closed scp-r closed 5 years ago

scp-r commented 6 years ago

如题,尝试使用较新版本OpenWRT编译,刷机重启后其他正常,但是没有5G WiFi,wifi配置界面显示“Wireless is disabled or not associated”,ifconfig -a没有rai0。

编译过程:

  1. OS:Ubuntu 17.10 x64,gcc 7.2.0, git 2.14.1

  2. 因为OpenWRT官方svn关闭,所以修改Makefile中的

    svn co svn://svn.openwrt.org/openwrt/branches/chaos_calmer $(openwrt_dir) -r46893

    改为

    git clone https://github.com/openwrt/chaos_calmer $(openwrt_dir)
  3. 版本变动导致原有的patch文件失效,需要修改

    然后修改01-hiwifi-hc5x61.patch

    • 第一个(01-led)的243改为247

    • 02-network中,233改为242,283改为292,285改为294

    • 第三个t/l/ramips/b/e/diag.sh:69改为72

    • 第四个t/lr/b/l/ramips.sh,不修改

    • 第五个target/linux/ramips/base-files/lib/upgrade/platform.sh,56改成57

    • dts部分不用改

    • target/linux/ramips/image/Makefile,第一处866改成900,第二处899,903改934,938

    • 余下的不用改,另外两个patch删除(因为不需要ss)

  4. 参考https://github.com/rssnsj/network-feeds,删掉配置文件里多余的包(不需要)

  5. git的依赖检查有问题,修改openwrt/include/prereq-build.mk的第148行,修改git clone 2>&1 | grep -- --recursivegit verison

  6. 写个patch修复automake的正则错误,位于openwrt-ramips/tools/automake/patches/010-automake-port-to-Perl-5.22-and-later.patch

    --- a/bin/automake.in
    +++ a/bin/automake.in   
    @@ -3880,7 +3880,7 @@ sub substitute_ac_subst_variables_worker
     sub substitute_ac_subst_variables
     {
       my ($text) = @_;
    -  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
    +  $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
     return $text;
     }
    
  7. 当前配置文件基于3.10内核,执行make menuconfig升级配置内容,并启用asix88179(个人需要USB网卡).

  8. 最后执行make

编译完成后可以找到固件文件,刷机后可以开机,但是没有5G WiFi