Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-21 Thread Bruno Randolf
On 07/18/2014 06:25 PM, John Crispin wrote:
 4) we make a script that we call after the build on the server that
 repackages the images
 
 how about that ?

Hmmm, I think it should not be done on the server, but as part of the
OpenWRT build - also if I compile locally I would like to get a
sysupgrade image to upgrade from AA to BB... Relying on server scripts
would exclude this possibility, and also make more awkward to maintain
your build server scripts (special cases for rare platforms).

It would be possible to create a special image for upgrade from AA,
something like
openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin, but I
think it's simpler to just add a symlink to the tar.gz in all cases,
like this:

diff --git a/target/linux/au1000/image/Makefile
b/target/linux/au1000/image/Makefile
index 63c0b03..060f87a 100644
--- a/target/linux/au1000/image/Makefile
+++ b/target/linux/au1000/image/Makefile
@@ -63,8 +63,11 @@ define Image/Build
$(CP) $(KDIR)/kernel.flash.srec
$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-flash.srec
$(CP) $(KDIR)/kernel.ram.srec
$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-ram.srec
$(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
$(TMP_DIR)/$(IMG_PREFIX)-root.fs
+   # link for backwards compatibility with Attitude Adjustment
+   ln -sfn $(TMP_DIR)/$(IMG_PREFIX)-root.fs
$(TMP_DIR)/$(IMG_PREFIX)-jffs2-128k.fs
tar -C $(BIN_DIR) -cvzf
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \
-   $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
$(IMG_PREFIX)-root.fs
+   $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
$(IMG_PREFIX)-root.fs \
+   $(IMG_PREFIX)-jffs2-128k.fs
 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
 endif

What do you think? If you agree I will post this as a properly formatted
patch.

bruno
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-21 Thread Bruno Randolf
On 07/21/2014 12:28 PM, Bruno Randolf wrote:
 It would be possible to create a special image for upgrade from AA,
 something like
 openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin, but I
 think it's simpler to just add a symlink to the tar.gz in all cases,

The symlink approach does not work, as dd does not recognize the symlink
and the rootfs is broken afterwards. So IMHO the best solution is to
create a special sysupgrade image for upgrade from 12.09, like
openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin...

diff --git a/target/linux/au1000/image/Makefile
b/target/linux/au1000/image/Makefile
index 63c0b03..56f613b 100644
--- a/target/linux/au1000/image/Makefile
+++ b/target/linux/au1000/image/Makefile
@@ -65,6 +65,10 @@ define Image/Build
$(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
$(TMP_DIR)/$(IMG_PREFIX)-root.fs
tar -C $(BIN_DIR) -cvzf
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \
$(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
$(IMG_PREFIX)-root.fs
+   # backwards compatible image for upgrade from Attitude
Adjustment (12.09)
+   $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
$(TMP_DIR)/$(IMG_PREFIX)-jffs2-128k.fs
+   tar -C $(BIN_DIR) -cvzf
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade-from-12.09.bin \
+   $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
$(IMG_PREFIX)-jffs2-128k.fs
 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
 endif

bruno
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-21 Thread John Crispin
Hi Bruno

i will merge a patch post the rc2 fork that will generate old and new
images int he release branch while not doing so in the dev trunk. i
really dont want any workarounds in trunk

how about that ?

John

On 21/07/2014 15:20, Bruno Randolf wrote:
 On 07/21/2014 12:28 PM, Bruno Randolf wrote:
 It would be possible to create a special image for upgrade from 
 AA, something like 
 openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin, but
 I think it's simpler to just add a symlink to the tar.gz in all
 cases,
 
 The symlink approach does not work, as dd does not recognize the 
 symlink and the rootfs is broken afterwards. So IMHO the best 
 solution is to create a special sysupgrade image for upgrade from 
 12.09, like 
 openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin...
 
 diff --git a/target/linux/au1000/image/Makefile 
 b/target/linux/au1000/image/Makefile index 63c0b03..56f613b 100644 
 --- a/target/linux/au1000/image/Makefile +++ 
 b/target/linux/au1000/image/Makefile @@ -65,6 +65,10 @@ define 
 Image/Build $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs 
 $(TMP_DIR)/$(IMG_PREFIX)-root.fs tar -C $(BIN_DIR) -cvzf 
 $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \ 
 $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR) $(IMG_PREFIX)-root.fs + # 
 backwards compatible image for upgrade from Attitude Adjustment 
 (12.09) +   $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs 
 $(TMP_DIR)/$(IMG_PREFIX)-jffs2-128k.fs +   tar -C $(BIN_DIR) 
 -cvzf $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade-from-12.09.bin \ + 
 $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
 $(IMG_PREFIX)-jffs2-128k.fs ifeq
 ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) $(call Image/Build/Initramfs)
 endif
 
 bruno
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-21 Thread Bruno Randolf
On 07/21/2014 02:22 PM, John Crispin wrote:
 i will merge a patch post the rc2 fork that will generate old and new
 images int he release branch while not doing so in the dev trunk. i
 really dont want any workarounds in trunk
 
 how about that ?

Sounds OK to me. Anyhow there are not so many au1000 users out there and
I guess we can expect them to follow the major OpenWRT releases...

bruno

   John
 
 On 21/07/2014 15:20, Bruno Randolf wrote:
 On 07/21/2014 12:28 PM, Bruno Randolf wrote:
 It would be possible to create a special image for upgrade from 
 AA, something like 
 openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin, but
 I think it's simpler to just add a symlink to the tar.gz in all
 cases,

 The symlink approach does not work, as dd does not recognize the 
 symlink and the rootfs is broken afterwards. So IMHO the best 
 solution is to create a special sysupgrade image for upgrade from 
 12.09, like 
 openwrt-au1000-au1500-jffs2-128k-sysupgrade-from-12.09.bin...

 diff --git a/target/linux/au1000/image/Makefile 
 b/target/linux/au1000/image/Makefile index 63c0b03..56f613b 100644 
 --- a/target/linux/au1000/image/Makefile +++ 
 b/target/linux/au1000/image/Makefile @@ -65,6 +65,10 @@ define 
 Image/Build $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs 
 $(TMP_DIR)/$(IMG_PREFIX)-root.fs tar -C $(BIN_DIR) -cvzf 
 $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \ 
 $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR) $(IMG_PREFIX)-root.fs + # 
 backwards compatible image for upgrade from Attitude Adjustment 
 (12.09) +   $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs 
 $(TMP_DIR)/$(IMG_PREFIX)-jffs2-128k.fs +   tar -C $(BIN_DIR) 
 -cvzf $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade-from-12.09.bin \ + 
 $(IMG_PREFIX)-vmlinux.bin -C $(TMP_DIR)
 $(IMG_PREFIX)-jffs2-128k.fs ifeq
 ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) $(call Image/Build/Initramfs)
 endif

 bruno

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-21 Thread John Crispin


On 21/07/2014 19:27, Bruno Randolf wrote:
 On 07/21/2014 02:22 PM, John Crispin wrote:
 i will merge a patch post the rc2 fork that will generate old
 and new images int he release branch while not doing so in the
 dev trunk. i really dont want any workarounds in trunk
 
 how about that ?
 Sounds OK to me. Anyhow there are not so many au1000 users out
 there and I guess we can expect them to follow the major OpenWRT
 releases...
 
 bruno
 

ok, so be it ... i will cook up a patch ...
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-18 Thread John Crispin


On 17/07/2014 10:55, Bruno Randolf wrote:
 I volunteer to maintain au1000. The only devices I have are MTX-1 
 though, but I believe there are not many other au1000 boards out in
 the wild anyways.
 

good

 I don't know how to fix the sysupgrade issue. Basically the name
 used in AA was wrong
 (ROOTFS_IMG=openwrt-au1000-au1500-jffs2-128k.fs) and this has
 been chnaged to something more generic in BB 
 (ROOTFS_IMG=openwrt-au1000-au1500-root.fs). sysupgrade from BB to
 BB works OK, but the problem is upgrade from AA to BB, where the
 ROOTFS_IMG names in the tar do not match.
 
 The only solutions I can think of are, none of which I find really
 good:
 
 1) Keep on using the old (wrong) name for all image types 2)
 Provide a symlink with the old name for upgrade from AA to BB 3)
 Add backwards compatibility code to /lib/upgrade/platform.sh

4) we make a script that we call after the build on the server that
repackages the images

how about that ?


John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-17 Thread John Crispin


On 16/07/2014 00:07, Hauke Mehrtens wrote:
 On 07/15/2014 07:06 PM, Bruno Randolf wrote:
 Another problem I noted when upgrading from AA to BB on MTX-1:
 
 # sysupgrade -n
 /tmp/openwrt-au1000-au1500-jffs2-128k-sysupgrade.bin tar:
 openwrt-au1000-au1500-jffs2-128k.fs: not found in archive 
 Invalid image contents Image check 'platform_check_image'
 failed.
 
 I needed to change in /lib/upgrade/platform.sh: 
 ROOTFS_IMG=openwrt-au1000-au1500-root.fs
 
 In AA the ROOTFS image was called differently, the name in BB
 makes more sense, but how could we provide a good upgrade path
 from AA to BB?
 
 bruno

Hi Bruno,

au1000 was not updated for BB and as you see there is some work missing.

feel free to send a patch to fix the sysupgrade issue. Once that is
done and if you volunteert to maintain au1000 for BB, then we culd add
it to the list of targets that we build for rc2

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-17 Thread Bruno Randolf
Hi John and all,

On 07/17/2014 08:14 AM, John Crispin wrote:
 au1000 was not updated for BB and as you see there is some work missing.
 
 feel free to send a patch to fix the sysupgrade issue. Once that is
 done and if you volunteert to maintain au1000 for BB, then we culd add
 it to the list of targets that we build for rc2

I volunteer to maintain au1000. The only devices I have are MTX-1
though, but I believe there are not many other au1000 boards out in the
wild anyways.

I don't know how to fix the sysupgrade issue. Basically the name used in
AA was wrong (ROOTFS_IMG=openwrt-au1000-au1500-jffs2-128k.fs) and this
has been chnaged to something more generic in BB
(ROOTFS_IMG=openwrt-au1000-au1500-root.fs). sysupgrade from BB to BB
works OK, but the problem is upgrade from AA to BB, where the ROOTFS_IMG
names in the tar do not match.

The only solutions I can think of are, none of which I find really good:

1) Keep on using the old (wrong) name for all image types
2) Provide a symlink with the old name for upgrade from AA to BB
3) Add backwards compatibility code to /lib/upgrade/platform.sh

Any other ideas?

What are the other things that are missing for au1000 in BB?

bruno
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade to Barrier Breaker on au1000 (MTX-1)

2014-07-15 Thread Hauke Mehrtens
On 07/15/2014 07:06 PM, Bruno Randolf wrote:
 Another problem I noted when upgrading from AA to BB on MTX-1:
 
 # sysupgrade -n /tmp/openwrt-au1000-au1500-jffs2-128k-sysupgrade.bin
 tar: openwrt-au1000-au1500-jffs2-128k.fs: not found in archive
 Invalid image contents
 Image check 'platform_check_image' failed.
 
 I needed to change in /lib/upgrade/platform.sh:
 ROOTFS_IMG=openwrt-au1000-au1500-root.fs
 
 In AA the ROOTFS image was called differently, the name in BB makes more
 sense, but how could we provide a good upgrade path from AA to BB?
 
 bruno

Thank you for the test, I changed the default kernel version to 3.10.44

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel