Hi all,

when a firmware image is needed to be adapted, it is interesting to have the 
used
.config file ready to hand. this patch includes the file as 
/etc/freewrt.config.gz
the file is approx. 6 to 7 kBytes of size so won't be too bad for flash space.

Clemens


Index: package/base-files/Config.in
===================================================================
--- package/base-files/Config.in        (Revision 2244)
+++ package/base-files/Config.in        (Arbeitskopie)
@@ -5,3 +5,13 @@
        help
          Basic filesystem layout for FreeWRT.
 
+config FWRT_PACKAGE_CONFIG_IN_ETC
+       prompt "  .config in /etc.................... include gzipped version 
of .config in image"
+       bool
+       default y
+       depends FWRT_PACKAGE_BASE_FILES
+       help
+         Copy the configuration file (.config) of FreeWRT to the image.
+         The file will be found in /etc/freewrt.config.gz. This takes about 
7kBytes of file system
+         space. From this file you can always rebuild the image from source.
+
Index: package/base-files/Makefile
===================================================================
--- package/base-files/Makefile (Revision 2244)
+++ package/base-files/Makefile (Arbeitskopie)
@@ -100,5 +100,8 @@
        -find $(IDIR_BASE_FILES) -type d -name CVS | xargs rm -rf
        -find $(IDIR_BASE_FILES) -type d -name .svn | xargs rm -rf
        -find $(IDIR_BASE_FILES) -name '.#*' | xargs rm -f
+ifneq (${FWRT_PACKAGE_CONFIG_IN_ETC},)
+       $(gzip) -c ${TOPDIR}/.config > $(IDIR_BASE_FILES)/etc/freewrt.config.gz
+endif
 
 include ${TOPDIR}/mk/pkg-bottom.mk
Index: mk/modules.mk
===================================================================
--- mk/modules.mk       (Revision 2244)
+++ mk/modules.mk       (Arbeitskopie)
@@ -402,7 +402,7 @@
 ,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61))
 
 USB_STORAGE_MODULES=drivers/scsi/scsi_mod
-USB_STORAGE_MODULES=drivers/scsi/sd_mod
+USB_STORAGE_MODULES+=drivers/scsi/sd_mod
 USB_STORAGE_MODULES+=drivers/usb/storage/usb-storage
 ifeq ($(KERNEL),2.6)
 USB_STORAGE_MODULES+=drivers/usb/storage/libusual

_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to