Modify

Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#5719 closed enhancement (fixed)

sysupgrade support for WRT350Nv2 (patches attached)

Reported by: Maddes <maddes_trac@…> Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: sysupgrade orion wrt350nv2 Cc:

Description

sysupgarde support for WRT350Nv2 (Orion) is missing.
Attached are three patches that add it to the current trunk.

# 1/3 "orion_sysupgrade_platform_sh.patch"
Adds the platform specific script include for sysupgrade.
All defaults are used.
Don't forget to add the new folder/file to the repository.

# 2/3 "orion_sysupgrade_image_makefile.patch"
Adds an .img file for WRT350Nv2 target (padded uImage + padded rootfs).

# 3/3 "orion_sysupgrade_mtd.patch"
Adds mtdblock "image" to mtd partitions, some cleanup and adds some explanations for the mtd patch itself.

Has been succesfully tested with flashing different kernel sizes (0x00100000, 0x00120000, 0x001A0000).

Attachments (9)

orion_sysupgrade_platform_sh.patch (713 bytes) - added by Maddes <maddes_trac@…> 8 years ago.
orion_sysupgrade_image_makefile.patch (525 bytes) - added by Maddes <maddes_trac@…> 8 years ago.
orion_sysupgrade_mtd.patch (1.6 KB) - added by Maddes <maddes_trac@…> 8 years ago.
orion_sysupgrade_platform_sh.2.patch (1.1 KB) - added by Maddes <maddes_trac@…> 8 years ago.
Add sanity check to script. Replaces previous patch, so apply to clean/reverted trunk.
orion_sysupgrade_mtd.2.patch (1.6 KB) - added by Maddes <maddes_trac@…> 8 years ago.
Cleaned up mtd patch. Replaces previous path. Apply to clean/reverted trunk.
orion_sysupgrade_platform_sh.3.patch (1.5 KB) - added by Maddes <maddes_trac@…> 8 years ago.
Replaces all previous patches with platform.sh
orion_sysupgrade_mtd_wnr854t.1.patch (682 bytes) - added by Maddes <maddes_trac@…> 8 years ago.
Adds "image" mtd partition for flashing via sysupgrade
orion_sysupgrade_platform_sh.4.patch (1.4 KB) - added by Maddes <maddes_trac@…> 8 years ago.
A line from testing was left over, that caused non-local files from ftp or http places not to work. Sorry.
orion_sysupgrade_platform_sh.5.patch (1.7 KB) - added by Maddes <maddes_trac@…> 8 years ago.
WRT350Nv2 sanity check only possible on locally available files. Replaces all previous platform patches.

Download all attachments as: .zip

Change History (26)

Changed 8 years ago by Maddes <maddes_trac@…>

Changed 8 years ago by Maddes <maddes_trac@…>

Changed 8 years ago by Maddes <maddes_trac@…>

comment:1 Changed 8 years ago by Maddes <maddes_trac@…>

Tests were done with kernel 2.6.30.5.
First part of the patch was created with 2.6.28.10, hence this number in the mtd patch.

comment:2 Changed 8 years ago by Maddes <maddes_trac@…>

Has been tested by several people, some at forum thread https://forum.openwrt.org/viewtopic.php?id=12358&p=16, others by private mail.
Please review and commit to trunk.

comment:3 Changed 8 years ago by Maddes <maddes_trac@…>

Updated the platform.sh script with an eRcOmM sanity check.
This avoids that people can render their router useless when upgrading via sysupgrade.

The new patch replaces the old patch, apply the new patch to a clean/reverted trunk.

Changed 8 years ago by Maddes <maddes_trac@…>

Add sanity check to script. Replaces previous patch, so apply to clean/reverted trunk.

Changed 8 years ago by Maddes <maddes_trac@…>

Cleaned up mtd patch. Replaces previous path. Apply to clean/reverted trunk.

comment:4 Changed 8 years ago by Maddes <maddes_trac@…>

Added cleanup mtd patch.

comment:5 Changed 8 years ago by dallienl

Sysupgrade patch worked without any troubles for me. Used it several times now.

comment:6 Changed 8 years ago by Maddes <maddes_trac@…>

corresponding webupgrade posted in #5970

comment:7 Changed 8 years ago by Maddes <maddes_trac@…>

Recognized that the WRT350Nv2 sanity check prevents other models from working.
How can I find out what machine the script is running on, so the sanity check is only executed on WRT350Nv2?

comment:8 Changed 8 years ago by nilfred@…

Here you are:

# cat /proc/cpuinfo
Processor       : Feroceon rev 0 (v5l)
BogoMIPS        : 332.59
Features        : swp half fastmult edsp
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0

Hardware        : Netgear WNR854T
Revision        : 0000
Serial          : 0000000000000000
# cat /proc/cpuinfo | awk '/Hardware/ {split ($0,A,": "); print A[2]}'
Netgear WNR854T

comment:9 Changed 8 years ago by anonymous

Pipe abuse, my bad:

# awk '/Hardware/ {split ($0,A,": "); print A[2]}' /proc/cpuinfo
Netgear WNR854T

comment:10 Changed 8 years ago by nilfred@…

If you prefer sed instead:

# sed -n /Hardware/s/.*:.//p /proc/cpuinfo
Netgear WNR854T

comment:11 Changed 8 years ago by Maddes <maddes_trac@…>

Updated platform.sh to support multiple hardware and image types (partly adapted from ar71xxx script).
Additionally added sysupgrade support for Netgear WNR854T.

To apply solution to a clean trunk use the following attached patches:

  • orion_sysupgrade_platform_sh.3.patch (general sysupgrade support)
  • orion_sysupgrade_mtd.2.patch (mtd fix for WRT350Nv2 sysupgrade)
  • orion_sysupgrade_mtd_wnr854t.1.patch (mtd fix for WNR854T sysupgrade)
  • orion_sysupgrade_image_makefile.patch (create img file for WRT350Nv2 sysupgrade)

Don't forget to add the new dir and file in trunk to the repository:

  • target/linux/orion/base-files/lib/
  • target/linux/orion/patches/101-openwrt_partition_map_wnr854t.patch

Changed 8 years ago by Maddes <maddes_trac@…>

Replaces all previous patches with platform.sh

Changed 8 years ago by Maddes <maddes_trac@…>

Adds "image" mtd partition for flashing via sysupgrade

Changed 8 years ago by Maddes <maddes_trac@…>

A line from testing was left over, that caused non-local files from ftp or http places not to work. Sorry.

Changed 8 years ago by Maddes <maddes_trac@…>

WRT350Nv2 sanity check only possible on locally available files. Replaces all previous platform patches.

comment:12 Changed 8 years ago by Maddes <maddes_trac@…>

Due to change [18763] only the following patches are required to add to a clean trunk:

  • orion_sysupgrade_platform_sh.5.patch (general sysupgrade support)
  • orion_sysupgrade_mtd.2.patch (mtd fix for WRT350Nv2 sysupgrade)
  • orion_sysupgrade_mtd_wnr854t.1.patch (mtd fix for WNR854T sysupgrade)

comment:13 Changed 8 years ago by Maddes <maddes_trac@…>

Final solution committed in [19166]. Please close.

comment:14 Changed 8 years ago by Maddes <maddes_trac@…>

Please close.

comment:15 Changed 8 years ago by Maddes <maddes_trac@…>

Please close.

comment:16 Changed 8 years ago by kaloz

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

comment:17 Changed 4 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.