Modify

Opened 7 years ago

Closed 7 years ago

Last modified 2 years ago

#5652 closed defect (fixed)

sysupgrade saving of configuration doesn't work

Reported by: Daniel Dickinson <crazycshore@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version:
Keywords: Cc:

Description

sysupgrade save the configuration in sysupgrade.tgz but that file never gets restored on reboot after flashing a new firmware image, so configuration changes are always lost across firmware upgrades.

The attached patch fixes the offending failing component which is mtd -j. It was a simple C coding error in with sizeof(#define) was taken when sizeof returns the size of a type not an object. Since the #define was a byte string the size was 1 instead of 4 (the length of the JFFS2 DEADC0DE marker). I replace sizeof with another define for the length of the marker.

Attachments (3)

sysupgrade-mtd.patch (1.3 KB) - added by Daniel Dickinson <crazycshore@…> 7 years ago.
sysupgrade-mtd.2.patch (2.6 KB) - added by Daniel Dickinson <crazycshore@…> 7 years ago.
sysupgrade-mtd.3.patch (427 bytes) - added by Daniel Dickinson <crazycshore@…> 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by Daniel Dickinson <crazycshore@…>

comment:1 Changed 7 years ago by Daniel Dickinson <crazycshore@…>

The patch is wrong. It doesn't solve the problem, it just causes the jffs2 not be overwritten

Changed 7 years ago by Daniel Dickinson <crazycshore@…>

comment:2 Changed 7 years ago by Daniel Dickinson <crazycshore@…>

The new patch fixes the problem (which was as described in the original ticket) correctly. It seems there was a -1 from length of the jffs2_eof marker, which was incorrect and which I had not corrected in the previous patch.

Changed 7 years ago by Daniel Dickinson <crazycshore@…>

comment:3 Changed 7 years ago by Daniel Dickinson <crazycshore@…>

Ok, now that I have found, with Felix's help, the actual cause of the problem, here is the patch that changes the minimum necessary for the fix. It affects only one line of mtd.c

comment:4 Changed 7 years ago by nbd

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

fixed in r17522

comment:5 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.