Modify

Opened 2 years ago

Closed 2 years ago

#21371 closed defect (fixed)

ar71xx sysupgrade broken in trunk since r47878 for non-nand devices

Reported by: hnyman Owned by: developers
Priority: highest Milestone: Designated Driver (Trunk)
Component: base system Version: Trunk
Keywords: ar71xx sysupgrade Cc: hannu.nyman@…

Description

r47878 broke the sysupgrade for non-nand ar71xx devices.

If a non-nand ar71xx device tries sysupgrade from a firmware revision 47878 or later, the user gets a warning about invalid file in Luci or the following error at the system console:

/sbin/sysupgrade: .: line 10: can't open '/lib/upgrade/nand.sh'

The reason is explained in https://lists.openwrt.org/pipermail/openwrt-devel/2015-December/037958.html

r7878 inserted a new file /lib/upgrade/merakinand.sh, which contains a nand-specific script sourcing. "normal" ar71xx devices now fail due to that missing script.

If you have installed the broken ar71xx firmware with revision r47878-current, the easy fix is to manually edit /lib/upgrade/merakinand.sh file in the live router and remove the line 10 containing ". /lib/upgrade/nand.sh". Below is the same patch for source repo:

--- target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh
+++ target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh
@@ -7,7 +7,6 @@
 #
 . /lib/ar71xx.sh
 . /lib/functions.sh
-. /lib/upgrade/nand.sh
 
 get_magic_at() {
     local mtddev=$1

The file /lib/upgrade/merakinand.sh can be also deleted, as it is not needed by other devices.

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r47889

comment:2 Changed 2 years ago by haminhcine@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Any chance of a step by step solution? Thanks

comment:3 Changed 2 years ago by hnyman

Easiest is probably to delete the whole file /lib/upgrade/merakinand.sh:

  • login into router console with ssh
  • rm /lib/upgrade/merakinand.sh

Then sysupgrade should work normally.

comment:4 Changed 2 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.