Divested-WRT: No-nonsense hardened builds for Linksys WRT series

Wow it really is merged… This needs to make it into 23.0x. Between this and kernel 5.15 mostly fixing the switch (VLAN confusion aside) the mvebu target will live a new life in 2023.

3 Likes

if the developer from dd wrt added it to his firmware, I guess we can do the same here?

Yes, of course. I assume from the authors github that the work was based against some home cooked Debian-On-WRT1900AC-V1. I took a cursory look when compile failed, not over whelming, but will require someone who wants to spin those cycles on getting AMSDU fix (mostly??) on the DIW SW mwlwifi in to the OpenWrt source.

2 Likes

The commits were accepted by kaloz into his mwlwifi repo yesterday. Since OpenWrt pulls the driver from there wouldn't these commits be in the snapshot builds automatically starting today? I'll install a snapshot build later this week to see.

1 Like

No, it requires a PR (patch) to be submitted to OpenWrt to get the latest code from the upstream repo. And as stated, it does not build with a current master pull; there be work to do. git log mwlwifi history.

2 Likes

I usually backup, factory reset and import settings after installing software, using unbound. I believe remembering not being able to save settings via gui

I always sysupgrade via gui and keep settings, haven't lost anything in years.

I use a wrt32x, and like you, have not been able to keep settings after a sysupgrade. I always have to reload my config from backup after flashing even if keep settings is ticked. Adds 5 to 10 mins to the flashing process.

@mrtomtom @ghoffman

maybe try a sysupgrade (with keep set) from cli and see if any errors are printed?
also perhaps have logread -f for kmsg in a second terminal

1 Like

it fails form the cli without error messages.
the network closes early int eh sysupgrade process so the second terminal would have to be a serial log - which i will gather and post.
the procesxs works fine on 22.03.2, or on oem firmware, but not on recent snapshot builds.

all this is reported in this thread: Wrt32x / snapshot sysupgrade - config not saved

@mrtomtom - for how long has this been failing for you on your wrt32x? did it work with builds from last year?

I've not been using my wrt32x for a couple of years since v19. I don't remember if the issue was present then. I moved back and straight onto divested builds as of a couple of months ago.

Would be great to get it sorted!

@SkewedZeppelin -
can you post your mtd map here? do you have a syscfg partition? to be clear this is wrt32x not wrt3200acm.

I’ve had a couple of PM’s surrounding divblock.sh, and some recent posts on the forum.

Back when I adopted divblock, I wrote a small script to populate the /etc/config/divblock-exclusions file either from a whitelist file with multiple URL’s to be whitelisted if file path was provided as argument, else falls into interactive mode to allow the user to enter each whitelisted URL individually. On exit it reloads divblock.sh.

Frankly, I stopped using it after about a month. The number of blocked sites, (from my browsing habits at least) didn’t warrant the cycles needed. Far easier to vi /etc/config/divblock-exclusions and just append the blocked site to it as needed.

In any event, I’ll put it out for anyone that finds it useful.

  • copy it to /etc/whitelist.sh
  • to invoke it cd /etc and then ./whitelist.sh
  • follow the prompts
Summary
#!/bin/ash

#       Copyright 2021-2023 RuralRoots GPLv2


# Define output file
output_file="/etc/config/divblock-exclusions"


# Check if file path was provided as argument
if [ $# -eq 1 ] && [ -f "$1" ]; then
  batched_whitelist="$1"
  printf "\n+++ Reading from batch whitelist file: $batched_whitelist +++\n\n"

# Read each line in the batch input file, escape dots(.), force case to lower, surround URL with "/" delimiter, and write to output file
while read input_url; do
  modified_url=$(echo /"$input_url"/ | awk '{print tolower($0)}' | sed 's/\./\\./g')
  echo "$modified_url" >> "$output_file"
done < "$batched_whitelist"

printf "\n+++ Finished writing escaped url's to $output_file +++\n\n"

# Cleanup and Exit

  rm -r $batched_whitelist  
  logger -s -t DIVBLOCK:BATCH "reloading divblock.sh on update of $output_file"
  /etc/init.d/divblock.sh reload 2> /dev/null
  printf "\n+++\t\tD O N E\t\t+++\n\n"
  exit

else
  printf "\n+++ batch whitelist file not found or no file path provided. Switching to Interactive Mode +++\n\n"
fi

while true; do
   echo "Please enter url to whitelist or Done to Stop:"
   read input_url
   if [ "$input_url" = "Done" ]; then       
        break
   fi

    # Escape dots(.) in the input URL, surround it with "/" delimiter, change case to lower, write to ouput file
    modified_url="/$(echo "$input_url" | awk '{print tolower($0)}' | sed 's/\./\\./g')/"

    # Output the modified url to divblock-exclusions file
    echo "$modified_url" >> "$output_file"      
done

printf "\n+++ Finished writing escaped url's to $output_file +++\n\n"

# Reload divblock

logger -s -t DIVBLOCK:INTERACTIVE "reloading divblock.sh on update of $output_file"
/etc/init.d/divblock.sh reload 2> /dev/null
printf "\n+++\t\tD O N E\t\t+++\n\n"
exit
3 Likes

Snapshot r22302 and up has the mwlwifi update. I did a Attended Sysupgrade, unplugged my WiFi AP, and turned the WRT3200 radios back on.

24 hours later...no device disconnects!!! And speed tests are good!!

When I did the upgrade... "kmod-mwifiex-sdio" was reinstalled. I removed the package as per the openwrt.org/toh/linksys/wrt3200acm page.

2 Likes

Are you sure?

Hey George? How good are speeds? Stability?

Pretty sure....

"kmod-mwlwifi 5.15.98+2020-02-06-a2fd00bb-3 » 5.15.102+2020-02-06-a2fd00bb-3 ~83.83 KiB Marvell 88W8864/88W8897/88W8964/88W8997 wireless driver"

I rebooted to Snapshot r22295 (Linux 5.15.98) and that was one of 65 kmod packages available.

If I'm wrong something else fixed the radios. 48 hours and and still stable. I haven't put away my WiFi AP yet but will if still good next week. One thing for sure...I'm holding on to this r22302 (Linux 5.15.102) Snapshot.

1 Like

48 hours and still stable NO disconnects. I have a 800Mbps download speed from my ISP. WiFi is around 300Mbps with SQM enabled. Both of my Roku devices are now giving me fairly consistent download speeds.

Can I simply flash the factory img from here https://divested.dev/unofficial-openwrt-builds/mvebu-linksys/20230320-00/divested-wrt-snapshot-r22333+15-cff40ef122-mvebu-cortexa9-linksys_wrt3200acm-squashfs-factory.img

over the existing openwrt build 22.03.2 on my WRT3200ACM? Does it have luci in it? Or should I flash the sysupgrade image?

Cheers
Spart

Factory image is not for sys upgrade.
Take the sys upgrade format to upgrade.

BTW, the 22.03.3 is not available for the 3200acm or at least not really stable.

1 Like