OpenWrt Forum Archive

Topic: WP543 & WP546 Complex LUCI firmware update problem

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have openwrt Attitude_adjustment version. After compilation I do not have sysupgrade.bin image in the /bin folder. I could not find any information on how to create one. But according to some sources in order to compile the right image I should modify /target/linux/ar71xx/image/make file.
I addes the last line $(call Sysupgrade/RKuImage,$(1),$(2))
define Image/Build/MyLoader
    $(call PatchKernelLzma,$(2),$(3))
    -$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
        -p0x030000:0xf0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
        -p0x120000:0:::rootfs:$(KDIR)/root.$(1) \
        $(call imgname,$(1),$(2))-$(5)-factory.img       
          $(call Sysupgrade/RKuImage,$(1),$(2))
endef
using LUCi i tried to upgrade the firmware, although it says it is upgrading but there are no changes. Please help or direct me to the right direction. Did i include the code correctly?
$(call Sysupgrade/RKuImage,$(1),$(2))

also, after building sysupgrade.bin image, I should be able to flash firmware using LUci. I added few lines in platform.sh

platform_check_image() {

local board=$(ar71xx_board_name)
    local magic="$(get_magic_word "$1")"
    local magic_long="$(get_magic_long "$1")"

    [ "$ARGC" -gt 1 ] && return 1

    case "$board" in
wp543 | \
        wp546 | \
..........
}

platform_do_upgrade() {

local board=$(ar71xx_board_name)

    case "$board" in

wp543 | \
wp546 | \

....

}

however I am not sure if that what needs to be done to solve update process using Luci.


let me know

And does tftp loading work? Where did you get patch info for AA for wp546?

It waits on 192.168.168.1 for an upload via tftp for 5 sec. at startup,
the patches are available on request from http://www.compex.com.sg/ .
All applies well to OpenWrt r38305, only thing is

--- target/linux/ar71xx/image/Makefile    (revision 38345)
+++ target/linux/ar71xx/image/Makefile    (working copy)
@@ -396,12 +398,48 @@
 
 define Image/Build/MyLoader
     $(call PatchKernelLzma,$(2),$(3))
-    -$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
-        -p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-        -p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
+    $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
+        -p0x030000:0xf0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
+        -p0x120000:0:::rootfs:$(KDIR)/root.$(1) \
         $(call imgname,$(1),$(2))-$(5)-factory.img
 endef

'sysupgrade' doesn't work yet.
Couldn't support for this rather nice wp546 board be officially integrated ? ..or, how can i submit the necessary patches?

(Last edited by chrysx on 9 Oct 2013, 11:00)

Probably 3 ways how create sysupgrade.
first https://forum.openwrt.org/viewtopic.php?id=45823, but this way doesn't support if partition table was changed like here:

-        -p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-        -p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
+    $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
+        -p0x030000:0xf0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
+        -p0x120000:0:::rootfs:$(KDIR)/root.$(1) \

Second way create one firmware partition,

Index: trunk/target/linux/ar71xx/image/Makefile
===================================================================
--- trunk/target/linux/ar71xx/image/Makefile    (revision 38267)
+++ trunk/target/linux/ar71xx/image/Makefile    (working copy)
@@ -409,8 +409,9 @@
 
 define Image/Build/MyLoader
     -$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
-        -p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-        -p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
+        -p0x030000:0x100000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
+        -p0x130000:0:::rootfs:$(KDIR)/root.$(1) \
+        -p0x030000:0:::firmware \
         $(call imgname,$(1),$(2))-$(5)-factory.img
 endef
 

And create Sysupgrade/RKuImage image, but you need to select size of you flash (compex makes boards from 2mb to 16mb), and add platform_do_upgrade to default platform upgrade.

I am used the first one, but it works well until was need to change partition table. https://dev.openwrt.org/ticket/14096

edited:
Last way: Copy firmware update from new CompexWRT firmware. they use own procedure and own written program, all based OpenWRT. Last CompexWRT firmware is available on Compex website. (Failsafe mode gives you root permitions:))

(Last edited by neryba on 9 Oct 2013, 11:45)

The discussion might have continued from here.