easyddup a simple upgrade/downgrade utility

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Goto page Previous  1, 2, 3 ... , 13, 14, 15  Next
Author Message
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 286

PostPosted: Thu Jan 13, 2022 21:42    Post subject: Reply with quote
Gitlab/github came up on page 7 and even page 2 of this thread... sorry still too much hassle.
Sponsor
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 219

PostPosted: Fri Jan 14, 2022 0:20    Post subject: Reply with quote
yoyoma2 wrote:
@fizikz:

I never noticed if the download link remains the same after a new version is uploaded. I do use the "Upload new version" button as opposed to deleting and adding the attachment so it may preserve the link. Let us know if your script still works after the next upgrade.

Ok, I'll try to remember.

yoyoma2 wrote:
As for automated upgrades easyddup doesn't really use a version number other than printing one in the help and log file but it has never been changed.

Crazy idea: If your easyddup directory is shared with samba, you could delete .preventUpdate in there from your PC. Your update script in a cron job could do nothing if .preventUpdate is there, otherwise upgrade and regenerate .preventUpdate. Not an automatic update but as easy as deleting a file when you see a new version you want.

My thought was not so much about automated upgrades but a similar functionality to "easyddup -c" but for easyddup itself. Kind of like "easyddup -sc" to self-check for updates, and possibly "easyddup -su" to self update. Hopefully with better flags.

yoyoma2 wrote:
Gitlab/github came up on page 7 and even page 2 of this thread... sorry still too much hassle.

In a way it might be a bit of hassle, but in another way it could reduce hassle by allowing others to merge their suggestions instead of having you do everything. Also easier version control, issue tracking, etc.

@yoyoma2 I think you had mentioned you'd be ok with someone creating a repo and adding you as a maintainer? @IONK maybe you'd be interested to do that?
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 561

PostPosted: Fri Jan 14, 2022 0:33    Post subject: Reply with quote
No sorry I'm not capable to do that.
_________________
▫ RSS feed for DD-WRT releases (2022): https://politepol.com/fd/BU5UpNmf6NRW
easyddup - A simple upgrade/downgrade utility by yoyoma2
veekay
DD-WRT User


Joined: 09 Mar 2009
Posts: 75

PostPosted: Mon Jan 17, 2022 18:35    Post subject: Reply with quote
Can any of this be used to reformat settings from one piece of hardware to another? I was pointed here due to a reference to nvram-save and exporting settings.
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 219

PostPosted: Mon Jan 17, 2022 18:52    Post subject: Reply with quote
veekay wrote:
Can any of this be used to reformat settings from one piece of hardware to another? I was pointed here due to a reference to nvram-save and exporting settings.

There is a migration mode in nvram-save for the purpose of transfering settings to another router. It excludes some variables, but I'm not sure which, or how well it works.

See the Quickstart.txt for some clues. Ultimately, reading the relevant sections of the scripts is the best way to understand.
veekay
DD-WRT User


Joined: 09 Mar 2009
Posts: 75

PostPosted: Mon Jan 17, 2022 18:56    Post subject: Reply with quote
fizikz wrote:


See the Quickstart.txt for some clues. Ultimately, reading the relevant sections of the scripts is the best way to understand.


doh, thanks. For whatever reason after reading through the posts I didn't notice the actual download at the bottom. I thought everything was done directly with commands.
RouterMan421
DD-WRT Novice


Joined: 20 Jan 2022
Posts: 1

PostPosted: Thu Jan 20, 2022 0:28    Post subject: Re: easyddup a simple upgrade/downgrade utility Reply with quote
Thanks, this is really useful!

yoyoma2 wrote:
WARNING: This is a beta version (updating firmware by any method has some risks).

Former Kong users know ddup. Here is easyddup, written from scratch, for BrainSlayer builds.

Features:

o Menu driven firmware download
o Secure https firmware download
o Automatic hardware identification (usually: see -r option)
o Caching of previous downloads
o Option to erase nvram or not
o Preserve basic settings (LAN and username/password)
o Possibity to save & automatically restore user settings
o Possibity to get email notifications of new builds
o Supports FAT and ext USB storage
o In place installation even if subnet not 192.168.1.x
o Store some basic settings in an ini file
o Multi-part setting for faster curl downloads

HELP NEEDED: The file nvram-dd-wrt.ini lists the user settings variables that are stored in the restore point. When you find settings that you regularly enter manually that are missing let me know and I'll add them or better yet make the changes and I'll integrate them. There will be a lot missing at first...

Credits:

Uses a modified version of this no longer maintained project. That project seemed to be quite a time saver as discussed here. The included QuickStart.txt file is from that project.

Used multipart curl download script from here and the progress reporting from here.

Got the basic idea and 50% of the easyddup name from Kong's ddup but no code.

Help:

easyddup -h

Easy ddd-wrt update Utility
easyddup.sh Version 0.9
Options: -h this help msg
-c Return count of available versions (does nothing)
-d Downgrade (default is to upgrade)
-f Force download even if build is cached
-m maxcount Search at most maxcount versions ahead/behind current
-n No firmware will be written but everything else is done
-p cache Path to local build cache (default ./fwcache)
-q Quiet (use with -c to check for updates silently)
-r rev Specify revision folder suffix (BRICK DANGER!!!)
-R rev Opposite of -r, revision suffix to strip
-w wipe individual cache items or -W to wipe all
-y xxxx Use year xxxx (default is current year)

Install:

mkdir -p /path/to/where/easyddup/subdirectory/is/wanted
cd /path/to/where/easyddup/subdirectory/is/wanted
cp /my/downloads/easyddup.tgz .
tar zxvf easyddup.tgz

The easyddup subdirectory is created and contains the required files.

Run:

You should already have a BrainSlayer build installed. (can sort of work from Kong).
You need USB storage so beginners might want to read this guide.

To upgrade:

easyddup.sh

To downgrade:

easyddup.sh -d

To restore user settings:
After initial reboot, enable USB support and run nvram-restore-latest.sh or the restore script with the date/time of your choice. Reboot and your settings are back.

Tips:
o You can answer q to any prompt to quit
o Read the warning about passwords in QuickStart.txt
o Turning on multi-part curl may speed up downloads considerably
JavaOops
DD-WRT Novice


Joined: 02 Jan 2016
Posts: 17

PostPosted: Sun May 15, 2022 17:18    Post subject: easyddup Reply with quote
willing to try this, but want to make sure my settings are intact after.

1. does it automatically restore the settings?
2. does it save and restore my wiregaurd setup?
3. will it upgrade from 32bit version and choose a 64bit version as one router I have is a an ap/client bridge and using a 32bit version.

I have saved off my oet nvram settings just in case and hope that is all I need to reload if it all goes wrong.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 286

PostPosted: Mon May 16, 2022 3:04    Post subject: Reply with quote
1. easyddup will ask if you want to erase nvram. If you say no, then your settings are maintained. Don't say yes unless nvram-save is confirmed to save/restore all the settings you care about (see below).

2. easyddup uses nvram-save discussed here to save some settings to a script. You have to run that generated script to restore those settings. The wireguard settings variables are not in the provided sample nvram-dd-wrt.ini.sample yet but they could be added.

3. You can use the easyddup -n argument to go through the motions to see which build is downloaded but no upgrade will be performed.

Note: nvram-save can be run independently of easyddup to add missing variables to nvram-dd-wrt.ini.

1) create a dd-wrt backup
2) run nvram-save
3) change/delete some/all settings
4) run the new restore script
5) check for missing GUI settings
6) Add missing variables to nvram-dd-wrt.ini and goto 2
7) If you give up or have problems restore backup from 1
JavaOops
DD-WRT Novice


Joined: 02 Jan 2016
Posts: 17

PostPosted: Mon May 16, 2022 4:47    Post subject: Reply with quote
Thanks for the info. I have saved off the oet nvram settings to a file and then to my laptop.

I am gathering question 3 is not an option then.

JavaOops
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 286

PostPosted: Mon May 16, 2022 14:50    Post subject: Reply with quote
Try running easyddup.sh -n to see if you can get the version you want (with -n nothing is done so you can play with it harmlessly). If the automatic hardware detection doesn't guide you to the version you want (64bit), look at easyddup.ini.sample for the lines below where you can force a specific folder in your easyddup.ini from this list.
Code:
# Override automatic router hardware detection
#EDDUP_HARDWARE_FOLDER="broadcom_K3X"
JavaOops
DD-WRT Novice


Joined: 02 Jan 2016
Posts: 17

PostPosted: Tue May 17, 2022 20:25    Post subject: Updated nvram-dd-wrt.ini Reply with quote
For those who have fireguard setup, I added the oet nvram parameters to the nvram-dd-wrt.ini file

[Setup - Tunnels]
oet1_bloop
oet_tunnels
oet1_rem0
oet1_endpoint0
oet1_rem
oet1_private
oet1_peers
oet1_namep0
oet1_multicast
oet1_bridged
oet1_peerpk0
oet1_ka0
oet1_killswitch
oet1_mtu
oet1_netmask
oet1_pbr
oet1_en
oet1_dns_ipaddr
oet1_psk0
oet1_firewallin
oet1_isolation
oet1_port
oet1_dns_redirect
oet1_ip0
oet1_dns0
oet1_hwaddr
oet1_peerkey0
oet1_proto
oet1_nat
oet1_id
oet1_label
oet1_aip0
oet1_usepsk0
oet1_ipaddr
oet1_natout
oet1_aip_rten0
oet1_public
oet1_local
oet1_txq
oet1_mit
bat_oet1_bridge

This is just the oet parms. hopefully nothing else needed.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 286

PostPosted: Wed May 18, 2022 3:18    Post subject: Reply with quote
If you confirm that you can delete the tunnel from the GUI and later run the nvram-restore script and things work after reboot, I'll add your [Setup - Tunnels] section to the nvram-dd-wrt.ini.sample file.

Thanks for sharing.
Cobra1582
DD-WRT User


Joined: 29 Nov 2011
Posts: 75

PostPosted: Sun Jul 10, 2022 21:58    Post subject: Reply with quote
Hi if I choose option (2) netgear-r8000-webflash.bin

it says it going to burn "factory-to-dd-wrt.chk" is that normal should it not be the bin?

Code:

Current build: 47381
Select a build to install (or Q): 49
Selected 07-09-2022-r49467

Files in build 07-09-2022-r49467 for Netgear R8000

1)      factory-to-dd-wrt.chk c
2)      netgear-r8000-webflash.bin

Select a firmware file to install (or Q): 2
Selected factory-to-dd-wrt.chk
Using locally cached file.

WARNING THIS COULD BRICK YOUR ROUTER!!!

File to burn: ./fwcache/07-09-2022-r49467/netgear-r8000/factory-to-dd-wrt.chk
Erase nvram y/n ? n
Save user settings restore point y/n ? y
Saving user settings restore point...
Burning ./fwcache/07-09-2022-r49467/netgear-r8000/factory-to-dd-wrt.chk
WARNING: DO NOT INTERRUPT...
WAIT FOR BURN TO COMPLETE (at least 5 minutes)
Skipping firmware burn.
Skipping reboot.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 286

PostPosted: Mon Jul 11, 2022 2:41    Post subject: Reply with quote
New version (July 10th).

Upgrade recommended for all users unless you are sure no subdirectories are present in your router's download folder.

Changes:

Some routers like the netgear r8000 have a subdirectory "experimental_driver" that was confusing easyddup. Subdirectories are now properly ignored.

Thanks @Cobra1582 for the bug report. Very good catch!

If the files in a subdirectory are indeed the ones you want for a given router, just use the EDDUP_HARDWARE_FOLDER keyword in your easyddup.ini for example:

Code:
EDDUP_HARDWARE_FOLDER="netgear-r8000/experimental_driver"
Goto page Previous  1, 2, 3 ... , 13, 14, 15  Next Display posts from previous:    Page 14 of 15
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum