Chadster766 / McDebian

Linksys WRT3200ACM, WRT1900AC, WRT1900ACS, WRT1200AC and WRT32X Router Debian Implementation
99 stars 14 forks source link

McDebian kernel 4.7.5 update beta testing #18

Closed Chadster766 closed 8 years ago

Chadster766 commented 8 years ago

Please evaluate this McDebian update beta:

Installation instructions for the WRT1900AC V1 from a live McDebian router:

Download Kernel 4.7.5 McDebian firmware and it's corresponding rootfs modules.

cd /
wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/firmwares/McDebian-WRT1900AC-V1-FW_VER1_kernel_4_7_5.img
wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/rootfs-updates/mcdebian-rootfs-update-v4_7_5.gz
tar zxf mcdebian-rootfs-update-v4_7_5.gz

Set the WRT1900AC V1 u-boot kernel envars so u-boot can properly calculate the larger kernels CRC value to avoid a CRC boot error.

Notes:

Make sure that after "tar zxf mcdebian-rootfs-update-v4_7_5.gz" is completed, that running fw_printenv command completes without a CRC error before proceeding.

fw_printenv

fw_setenv pri_kern_size 0x405000
fw_setenv alt_kern_size 0x405000

Erase and write the McDebian Kernel 4.7.5 firmware to both primary and secondary image locations in nand flash.

flash_erase /dev/mtd4 0 0
flash_erase /dev/mtd6 0 0
nandwrite -p /dev/mtd4 McDebian-WRT1900AC-V1-FW_VER1_kernel_4_7_5.img
nandwrite -p /dev/mtd6 McDebian-WRT1900AC-V1-FW_VER1_kernel_4_7_5.img

Remove older McDebian kernel version modules. rm -rf /lib/modules/4.4.16

The new mwlwifi driver for the 5Ghz no longer supports setting "[MAX-MPDU-7991]" so it must be removed if used. sed -i s/"\[MAX-MPDU-7991\]"//g /etc/hostapd/wlan0.conf

Updates:

  1. Kernel updated to 4.7.5
  2. mwlwifi drivers updated to lastest version
  3. Fixed config in /etc/fw_env.config for fw_printenv and fw_setenv
Chadster766 commented 8 years ago

Installation instructions for WRT1900AC V2, WRT1900ACS and WRT1200AC V1 from a live McDebian router.

(For WRT1900ACS use the WRT1900AC V2 firmware)

Download Kernel 4.7.5 McDebian firmware and it's corresponding rootfs modules.

cd /
wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/firmwares/McDebian-WRT1x00AC-Vx-FW_VER1_kernel_4_7_5.img
wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/rootfs-updates/mcdebian-rootfs-update-v4_7_5.gz
tar zxf mcdebian-rootfs-update-v4_7_5.gz

Erase and write the McDebian Kernel 4.7.5 firmware to both primary and secondary image locations in nand flash.

flash_erase /dev/mtd4 0 0
flash_erase /dev/mtd6 0 0
nandwrite -p /dev/mtd4 McDebian-WRT1x00AC-Vx-FW_VER1_kernel_4_7_5.img
nandwrite -p /dev/mtd6 McDebian-WRT1x00AC-Vx-FW_VER1_kernel_4_7_5.img

Remove older McDebian kernel version modules. rm -rf /lib/modules/4.4.16

The new mwlwifi driver for the 5Ghz no longer supports setting "[MAX-MPDU-7991]" so it must be removed if used. sed -i s/"\[MAX-MPDU-7991\]"//g /etc/hostapd/wlan0.conf

In Kernel 4.7.2 the Ethernet interfaces are not reversed like they were in previous Kernel releases but the wlan interfaces still are. Change the McDebian udev script to map the Ethernet interfaces correctly.

sed -i s/ifindex_eth0=2/ifindex_eth0=3/g /etc/systemd/udev-network-interface-rules
sed -i s/ifindex_eth1=3/ifindex_eth1=2/g /etc/systemd/udev-network-interface-rules

I've discovered that models WRT1900ACS V1, WRT1900AC V2 and WRT1200AC V1 have a different mtd mapping for u-boot envars. I'm not sure why but the below change make fw_printenv and fw_setenv work.

Exchanging values 0x20000 and 0x40000 in file /etc/fw_env.config solves the issue for whatever reason :smile: /dev/mtd1 0x0 0x20000 0x40000

Notes:

Increasing the u-boot kernel size envars is only required for the WRT1900AC V1. The rest of the WRT router models u-boot kernel size envars are large enough.

Chadster766 commented 8 years ago

For iptables helper modules like nf_conntrack_pptp to work in the 4.7.5 Kernel you must add net.netfilter.nf_conntrack_helper=1 to /etc/sysctl.conf.

fakemanhk commented 8 years ago

I am getting "bad CRC", what's the possible reason?

_root@MCDEBIAN:/# fwprintenv Warning: Bad CRC, using default environment bootargs= bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm bootdelay=3 baudrate=115200 stdin=serial,cros-ec-keyb stdout=serial,lcd stderr=serial,lcd

Chadster766 commented 8 years ago

What model number of router do you have and what is listed in file /etc/fw_env.config?

fakemanhk commented 8 years ago

I am using 1900V2, I believe the rootfs should be fine for both model? P.S. I am upgrading from 4.4.18

root@MCDEBIAN:/# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
#
# XXX this configuration might miss a fifth parameter for the "Number of
# sectors"

# MTD device name   Device offset   Env. size   Flash sector size
/dev/mtd1       0x0        0x40000      0x20000
Chadster766 commented 8 years ago

In file /etc/fw_env.config swap the values as shown in the 4.7.5 Beta upgrade instructions for the WRT1900AC V2.

The u-boot envars don't need to be changed for the WRT1900AC V2 :smile:

fakemanhk commented 8 years ago

OK, problem fixed, thanks, but the instruction for 1900V2/ACS/1200 is still referring to image of 1900V1, this needs to be changed.

Chadster766 commented 8 years ago

Thanks! :smile:

I changed the WRT1x00AC\S Beta upgrade instructions as requested.

Chadster766 commented 8 years ago

Beta testing completed.

Beta testing results are that update McDebian V4.7.5 is a required update for better wireless and system stability. It resolved an issue I had with some WRT1900AC V1 routers periodically locking up.

https://github.com/Chadster766/McDebian/wiki/X.-McDebian-Updates