easyddup a simple upgrade/downgrade utility

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 19, 20, 21  Next
Author Message
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 965

PostPosted: Sat Apr 10, 2021 4:44    Post subject: Reply with quote
msj100 wrote:
Try changing the surrounding quotation marks for EMAILCRED from double quotes to single quotes - ie:

EMAILCRED='password_with_metacharacters_here'
thanks, I will try tonight or tomorrow.
msj100 wrote:
I tried to upgrade my Asus RT-16N (currently running v3.0-r41379 big) - however, because there's no RT-16N specific device directory, it fails:

Current build: 41379
Select a build to install (or Q): 34
Selected 04-09-2021-r46316
./easyddup.sh: line 209: files: No builds found in folder asus-rt-n16


..the directory I need to use is the (generic) broadcom_K3X - full path:

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2021/04-09-2021-r46316/broadcom_K3X/dd-wrt.v24-46316_NEWD-2_K3.x-big-RT-N16.trx

..however, easyddup.ini does not accommodate this 'broadcom exception' at the moment.
(UPDATED)quick hack while waiting for yoyoma2:
- in easyddup.sh: add line EDDUP_AUTO_SELECT_FILE=$(echo_auto_select_filename) after line 190
- in easyddup.ini: add function below
Code:
echo_auto_select_filename(){
   echo "dd-wrt.v24-$(echo "$selection" | grep -E '\d{5}' -o)_NEWD-2_K3.x-big-RT-N16.trx"
}

tested able to detect & auto select fw file but not tested burning yet

_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)


Last edited by IONK on Sun Apr 11, 2021 6:55; edited 4 times in total
Sponsor
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sat Apr 10, 2021 12:25    Post subject: Reply with quote
IONK wrote:
quick hack while waiting for yoyoma2:
- in easyddup.sh: add line board=broadcom_K3X after line 22
- in easyddup.ini: EDDUP_AUTO_SELECT_FILE="dd-wrt.v24-46316_NEWD-2_K3.x-big-RT-N16.trx"

tested able to detect & auto select fw file but not tested burning yet


Thanks for the workaround - might give it a shot later this weekend.

Am assuming the SSH connection used to perform the upgrade survives writing the new firmware image, erasing nvram and then restoring nvram settings? Anything to be careful of here?

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Sun Apr 11, 2021 2:39    Post subject: Reply with quote
Changes (April 10th)

Added EDDUP_HARDWARE_FOLDER in easyddup.ini.sample to allow overriding automatic router hardware detection (pick correctly or possibly brick your router). Also put single quotes around EMAILCRED in checknewversion.ini.sample. Thanks @IONK and @msj100 for the contributions.

Comments:

The ssh download uses curl to first store the file locally then no network is used during the burn.

The erasing of nvram is optional and as dd-wrt becomes more and more stable/mature, many users skip it especially if upgrading from a very recent build.

The optional "Save & Restore basic settings" restores lan settings and username/password immediately after burning. This allows burning in place with erase nvram even if you use a subnet different than dd-wrt's default LAN subnet.

The optional "Save user settings restore point" only creates an nvram backup. If you want to restore settings later after rebooting, you have to run the restore script manually.

@IONK is the easyddup power user and can give better tips than I.
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 965

PostPosted: Sun Apr 11, 2021 6:47    Post subject: Reply with quote
msj100 wrote:
Thanks for the workaround - might give it a shot later this weekend.
sorry I just realize that the fw file name has the build number on it. I've updated the post above. This method requires editing easyddup.sh, but I don't know any other way to avoid it. Let's see if yoyoma2 can give some advice.
_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sun Apr 11, 2021 11:59    Post subject: Reply with quote
yoyoma2 wrote:
Changes (April 10th)

Added EDDUP_HARDWARE_FOLDER in easyddup.ini.sample to allow overriding automatic router hardware detection (pick correctly or possibly brick your router). Also put single quotes around EMAILCRED in checknewversion.ini.sample. Thanks @IONK and @msj100 for the contributions.

Comments:

The ssh download uses curl to first store the file locally then no network is used during the burn.

The erasing of nvram is optional and as dd-wrt becomes more and more stable/mature, many users skip it especially if upgrading from a very recent build.

The optional "Save & Restore basic settings" restores lan settings and username/password immediately after burning. This allows burning in place with erase nvram even if you use a subnet different than dd-wrt's default LAN subnet.

The optional "Save user settings restore point" only creates an nvram backup. If you want to restore settings later after rebooting, you have to run the restore script manually.

@IONK is the easyddup power user and can give better tips than I.


Thanks for the feedback.

I had a quick look at the easyddup.sh script and made a couple of modifications.

Essentially, if the program can't locate the model directory, it checks to see if the script is being run on a Broadcom router and if so, attempts to auto-select the correct image under the (generic) broadcom directories.

Have attached a revised copy of your script and screenshots of it running on a version 2 and version 3 kernel.

Please let me know what you think.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Sun Apr 11, 2021 13:22    Post subject: Reply with quote
With the hundreds of router model, router revision, distribution type, kernel combinations; that approach will become a maintenance nightmare. As I stated earlier, I use the community build and thus don't install/upgrade with easyddup so my maintenance contributions to easyddup are and will remain minimal.

If someone creates a gitlab project (@rkboni used gitlab on the community build) I'll link to it in the OP and development would continue there. Keep in mind that enthusiasm wanes and projects become abandonned (e.g. @al_c and yamon, @rkboni is no longer active on the community build...).
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 965

PostPosted: Sun Apr 11, 2021 13:28    Post subject: Reply with quote
yoyoma2 wrote:
With the hundreds of router models, router revision, distribution type, kernel combinations; that approach will become a maintenance nightmare. As I stated earlier, I use the community build and thus don't install/upgrade with easyddup so my maintenance contributions to easyddup are and will remain minimal.

If someone creates a gitlab project (@rkboni used gitlab on the community build) I'll link to it in the OP and development would continue there. Keep in mind that enthusiasm wanes and projects become abandonned (e.g. yamon).
If someone creates a gitlab project, will you become the maintainer?

p/s: I feel like a fool spending all day struggling with shell script while other people can get it done in no time.

_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sun Apr 11, 2021 13:56    Post subject: Reply with quote
yoyoma2 wrote:
With the hundreds of router model, router revision, distribution type, kernel combinations; that approach will become a maintenance nightmare. As I stated earlier, I use the community build and thus don't install/upgrade with easyddup so my maintenance contributions to easyddup are and will remain minimal.

If someone creates a gitlab project (@rkboni used gitlab on the community build) I'll link to it in the OP and development would continue there. Keep in mind that enthusiasm wanes and projects become abandonned (e.g. @al_c and yamon, @rkboni is no longer active on the community build...).


Fair enough.

The only reason I proposed the changes is because the generic broadcom directory is a fairly unique use case - most of the other 'hundreds of router model' live in their own unique directories under the release directory - however, not to worry - I can feel my enthusiasm has waned already.

Guess I'll stick with the manual upgrade process.

Thanks for your clarification.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Sun Apr 11, 2021 15:19    Post subject: Reply with quote
A wildcard/filter feature in the EDDUP_AUTO_SELECT_FILE would allow automatic upgrades even when a build number is in the filename and would be general and low maintenance.

The gitlab project creator can invite & grant maintainer privileges to as many users as they wish. The hassle of owning/maintaining a gitlab project isn't something I wish to take on.

@IONK: I'm not a shell scripting person and find that googling usually finds examples of what I want to do and copy/paste/tweak...
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Wed Apr 14, 2021 13:23    Post subject: Reply with quote
IONK wrote:
sorry I just realize that the fw file name has the build number on it. ... Let's see if yoyoma2 can give some advice.
Just added variable selected_revision which can be used in EDDUP_AUTO_SELECT_FILE (April 14th version). Added an example of use in easyddup.ini.sample. Note the single quotes now around the filename in EDDUP_AUTO_SELECT_FILE since we must delay expansion until selected_revision has been initialized.

Code:
# Automatically select a firmware file
# If filename contains a build number, use ${selected_revision} as shown below
#EDDUP_AUTO_SELECT_FILE='asus_rt-ac56u-firmware.trx'
#EDDUP_AUTO_SELECT_FILE='dd-wrt.v24-${selected_revision}_NEWD-2_K3.x_mega_f7d7301.bin'
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 965

PostPosted: Wed Apr 14, 2021 18:39    Post subject: Reply with quote
thanks for the update.
just curious, why not using wildcard/filter as you mentioned previously?

_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Wed Apr 14, 2021 19:59    Post subject: Reply with quote
Just laziness. Adding the variable was only two lines and gets the job done. Always thinking about maintenance costs also.
xraive
DD-WRT User


Joined: 08 Mar 2016
Posts: 134

PostPosted: Thu Apr 22, 2021 15:59    Post subject: Reply with quote
Hi I'm trying run this script on the Linksys EA8500 and it doesn't work. Any plans to include devices that have two partitions. See error log below.

Code:
root@Router2:/jffs/etc/easyddup# sh easyddup.sh

All dd-wrt upgrade builds available online for 2021

1)      04-19-2021-r46395        <--- current

Current build: 46395
Select a build to install (or Q): 1
********************************************************
***** WARNING: BUILD SELECTED IS ALREADY INSTALLED *****
********************************************************
Selected 04-19-2021-r46395

Files in build 04-19-2021-r46395 for Linksys EA8500

1)      dd-wrt-webupgrade.bin
2)      factory-to-ddwrt.img

Select a firmware file to install (or Q): 1
Selected dd-wrt-webupgrade.bin
Build not in local cache or -f option, downloading...
Downloading https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2021/04-19-2021-r46395/linksys-ea8500/dd-wrt-webupgrade.bin ...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.6M  100 22.6M    0     0   142k      0  0:02:42  0:02:42 --:--:--  171k
Downloaded file OK.
ERROR: This script can only handle one linux partition, found 2.
Quitting
root@Router2:/jffs/etc/easyddup#


Thanks for the great work!
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 372

PostPosted: Fri Apr 23, 2021 4:21    Post subject: Reply with quote
Uploaded a new version (April 22nd) that adds EDDUP_TARGET_PARTITION support to easyddup.ini (see easyddup.ini.sample for details).

I do not have a router with multiple partitions so I can't test this. If you look at the code for write, it seems that it ignores the target partition argument and intelligently/automatically alternates between linux and linux2 so it should work.

WARNING: Enable at own risk (it's disabled by default). Users experienced with more than one firmware partition can chime in.
00diabolic
DD-WRT User


Joined: 17 Aug 2011
Posts: 78

PostPosted: Wed Apr 28, 2021 18:05    Post subject: Can I use this to compare settings between 2 NVram bkups? Reply with quote
Hi,

Looking at this mainly focusing updates but I have been trying to find a way to compare 2 NVram backup bin files.

Can I load this up and simply output the INI files to compare settings between 2 build numbers? When I tried this with CSV conversion the settings were in different locations and could not be compared easily. I'm assuming a settings INI backup from build XYZ will have settings in your INI in a different location than Build ZWB? OR does your app standardize the ini settings backup across brainslayer builds?
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 19, 20, 21  Next Display posts from previous:    Page 7 of 21
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