As for "how does the zImage file get into /update to start with?" If I'm not
mistaken then after image upload freecom update procedure nonactive
partition is mounted at "/update"

-----Original Message-----
From: Rod Whitby [mailto:r...@whitby.id.au] 
Sent: Wednesday, March 18, 2009 3:10 PM
To: zintis.peters...@e-mail.lv
Cc: OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH] create FSG-3 image upgradeable from
Freecom firmware web interface

Zintis wrote:
> This patch creates FSG-3 image upgradeable from Freecom firmware web
> interface.

Excellent.

> Signed-off-by: Zintis Petersons <zintis.peters...@abcsolutions.lv>
> 
> diff -ruN ixp4xx.orig/harddisk/base-files/sbin/updating
> ixp4xx/harddisk/base-files/sbin/updating

Your patch is wrapped.  Please fix this for the resubmit, so that I can
apply it automatically.

> --- ixp4xx.orig/harddisk/base-files/sbin/updating     1970-01-01
> 03:00:00.000000000 +0300
> +++ ixp4xx/harddisk/base-files/sbin/updating  2009-03-14
> 08:05:12.000000000 +0200

Is this file needed for the initial web-upgrade image, or is it a
convenience script, and how does the zImage file get into /update to
start with?  If it's a convenience script, perhaps split it into a
separate patch.

> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +
> +# new kernel into flash
> +SIZE=$(ls -l /update/zImage)
> +set a$SIZE
> +erase /dev/mtd1 0 12 1 >/dev/null 2>&1
> +dd if=/update/zImage of=/dev/mtd1 bs=$5 count=1
> +rm -rf /update/zImage
> +
> +exit 0
> diff -ruN ixp4xx.orig/image/encode_crc/encode_crc.c
> ixp4xx/image/encode_crc/encode_crc.c
> --- ixp4xx.orig/image/encode_crc/encode_crc.c 1970-01-01
> 03:00:00.000000000 +0300
> +++ ixp4xx/image/encode_crc/encode_crc.c      2009-03-14
> 07:24:15.000000000 +0200

Thanks for writing encode_crc - I was too lazy to do so myself last time
I looked at this.

> diff -ruN ixp4xx.orig/image/Makefile ixp4xx/image/Makefile
> --- ixp4xx.orig/image/Makefile        2009-02-19 14:12:38.000000000 +0200
> +++ ixp4xx/image/Makefile     2009-03-14 11:59:59.000000000 +0200
> @@ -20,6 +20,15 @@
>               -p -o $(BIN_DIR)/openwrt-nslu2-$(1)-16mb.bin
>  endef
>  
> +define Image/Build/fsg3
> +     $(CP) $(BIN_DIR)/openwrt-fsg3-zImage $(TARGET_DIR)/zImage
> +     rm -rf $(TARGET_DIR)/{var,jffs,rom}
> +     $(INSTALL_DIR) $(TARGET_DIR)/var
> +     $(TAR) cfz $(BIN_DIR)/openwrt-$(BOARD)-$(2).bin --owner=root
> --group=root -C $(TARGET_DIR)/ .
> +     $(MAKE) -C encode_crc
> +     ./encode_crc/encode_crc $(BIN_DIR)/openwrt-$(BOARD)-$(2).bin
> +endef
> +

Why do you use $(BOARD) rather than $(1) ?

>  define Build/Compile
>       mkdir -p $(BIN_DIR)
>       $(MAKE) -C apex \
> @@ -58,6 +67,7 @@
>      $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
>       dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img
> bs=131072 conv=sync
>       $(call Image/Build/slug,$(1))
> +     $(call Image/Build/fsg3,$(1),fsg3-webupgrade,$(1))
>  endef

Why are the last two arguments needed?  Can the final binary just be
called openwrt-fsg3-$(1).bin just like in the nslu2 case?

-- Rod

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to