With my two patches I was trying to create an openwrt image that user can flash from freecom web interface and start to use without modifying anything (keep it simple). I do not know how many openwrt users use Apex. Not me. I must admit that I am not very much interested to play with fsg-3 as I have running DT2 with openwrt. I have just a small interest to use fsg as my development platform to test openwrt kernel 2.6 applications (usb drivrs etc.) that i'm interested to run on DT2.
This what I can say about web image creation and flash to fsg: 1) as you can see, firmware is an archive that is encoded with encode_crc. 2) after uploading to fsg from freecom interface, upload.cgi checks crc value, then unpacks the archive to a new partition and looks for /sbin/update script and executes it. This is why we need the update script. My update script actually updates only kernel mtd partition. I guess that it is possible to include Apex and fconfig tool in firmware and adjust update script to modify redboot and mtd partition layout. 3) Upload.cgi modifies redboot config (look at upload.cgi script source) to set up correct active partition. After releasing patches I noticed that router very often hangs if there is no serial console attached. I guess this is the problem that was described on openfsg forum. Whis old openwrt release my tutorial was OK, but with new releases it looks like something is wrong with init scripts and output redirect. I do not need to write anything in serial console. Just if it is not attached, my router doesnt boot from redboot or hangs somewhere it init scripts. I use Openwrt Revision: 14564. As I'm not sure what you would like to apply for openwrt, I attached all changes in one patch. Is it ok? I would like to ask you if you could split orion platform target in the same way as you did it for ixp4xx platform target. Then I could release dt2 support too. I do need a separate patch directory for dt2, separate kernel-config file and separate base-files dir. Currently I have a separate target dt2. If you could help, I'm ready to release dt2 support for openwert. It would be possible to upgrade from freecom web interface. -----Original Message----- From: Rod Whitby [mailto:[email protected]] Sent: Wednesday, March 18, 2009 3:10 PM To: [email protected] 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 <[email protected]> > > 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
fstg3-webimage.patch
Description: Binary data
_______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
