-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think we should also update the Makefile for the images. As far as I know the Makefile only creates an image for one of the rootfs types. I can provide a patch if you don't have the time to do so.
Best Regards Philipp On 30.10.2013 08:24, Bastian Bittorf wrote: > [platform/au1000/sysupgrade] fix sysupgrade when changing rootfs > from jffs2 to squashfs and visa versa > > till now only jffs2 was possible and sysupgrade refuses to change > fs-type, because of bad/invalid content in sysupgrade-file. > manually overriding works, so i made this patch. upgrade tested > from r36088 to r38570. (jffs2 to squashfs). > > Signed-off-by: Bastian Bittorf <bitt...@bluebottle.com> --- > .../au1000/base-files/lib/upgrade/platform.sh | 25 > +++++++++++++------ 1 files changed, 17 insertions(+), 8 > deletions(-) > > diff --git a/target/linux/au1000/base-files/lib/upgrade/platform.sh > b/target/linux/au1000/base-files/lib/upgrade/platform.sh index > 85ab213..e2c8687 100644 --- > a/target/linux/au1000/base-files/lib/upgrade/platform.sh +++ > b/target/linux/au1000/base-files/lib/upgrade/platform.sh @@ -1,19 > +1,28 @@ KERNEL_IMG="openwrt-au1000-au1500-vmlinux.bin" > -ROOTFS_IMG="openwrt-au1000-au1500-jffs2-128k.fs" > +ROOTFS_IMG_JFFS2="openwrt-au1000-au1500-jffs2-128k.fs" > +ROOTFS_IMG_SQASH="openwrt-au1000-au1500-squashfs.fs" > > platform_check_image() { [ "$ARGC" -gt 1 ] && return 1 case > "$(get_magic_word "$1")" in 6f70) - ( get_image "$1" | tar > -tf - > $KERNEL_IMG >/dev/null && \ - get_image "$1" | tar -tf - > $ROOTFS_IMG >/dev/null) || { - echo "Invalid > image contents" - > return 1 - } - return 0;; + > if get_image "$1" | tar -tf - > "$KERNEL_IMG" >/dev/null ; then + if get_image > "$1" | tar -tf > - "$ROOTFS_IMG_JFFS2" >/dev/null ; then + > ROOTFS_IMG="$ROOTFS_IMG_JFFS2" + return > 0 + elif get_image > "$1" | tar -tf - "$ROOTFS_IMG_SQASH" >/dev/null ; then + > ROOTFS_IMG="$ROOTFS_IMG_SQASH" + return > 0 + fi + fi + + > echo "Invalid image contents, needing kernel + ( jffs2 or squashfs > )" + return 1 + ;; *) echo "Invalid image type" > - return 1;; + > return 1 + ;; esac } > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJScLqnAAoJEFUqJM/vAMbxKYgP/iCaiGwdv7MdFd2Ok20i2aJ6 kP8tF8uvlCw93Igzcwq7yF6wqAQPIkPKV5UN1oyIDzvF5SFDLC5f8lvm+kubg94u fsGb4CpQH5dj0T3FXGyA3otrOUsmrVzqynSNgqX7HGnrFGGn/kP3fbDKpU7T6kHl P3eOBQOgdXcvodROGmOtnpM0nO9XSFDt7zLc+mlabGhRCobLAYnCfGABfpvgW2d2 wZf17UMQl2aqE7KgqlzLbyQ19CF3mwUcZNX5Ho34Vqu7HGU6rE0l+6Ipec/I6irJ 5IU5Irdk6/zn1urn1/GED9HSzfdoeFrRFjYPFU4YxHXnDTt7rYnSGfONY1mVUBe9 zMQlkmAk0Itl9l4BhJ9wP6/VRju6x+RuqGU805Xm8f4fXOjvEAuz8MDZiUq5i2Z5 +lrpSxG+bOgqo9dm2yqPNYjh9l2fLk5kRT+LGBZaNUGZ4SkSCm1v8dCBwza2dmxc 17foV8lEIDHUWqd+iVx7B070Fd6B4Xh0l+UK16RKkTjVMtREXeEjX3JD9H1YDTvg QqNgfn8uULRrhLgrtqOCr5Ir9M+hbZlBpWaz12sA1wD5Uq1lWsMWcXxKKjdvlCUw rqvZNT+F1e7NGTAZBV+QKL/DsmbLwL4MzEmE2LevNO6SjzY4x4E93kIWsVBe53ki 9XcG3dzjuUxN2lDvPdBd =w0Ea -----END PGP SIGNATURE----- _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel