Re: [OpenWrt-Devel] customizing a firmware

2008-06-18 Thread Gregers Petersen
Jan Hetges wrote:
> On Wed, Jun 18, 2008 at 12:38:10AM -0400, Brian J. Murrell wrote:
>> OK.  So it looks like to upgrade my existing Kamikaze installation, I'm
>> going to need to flash a new firmware onto it with mtd.
>>
>> But I am sure this will not be the last time I want to do this and I
>> really want to avoid having reconfigure from scratch every time.
> 

There is an backup/restore function included in the X-Wrt webif package 
which you might take a look at.

-- 
Gregers Petersen
People-stuff, layer 8 and anthropology
glp on irc

   ___ __
  |   |.-.-.-.|  |  |  |..|  |_
  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
  |___||   __|_|__|__||||__|  ||
   |__| W I R E L E S S   F R E E D O M
  KAMIKAZE (bleeding edge) ---
   * 10 oz Vodka   Shake well with ice and strain
   * 10 oz Triple sec  mixture into 10 shot glasses.
   * 10 oz lime juice  Salute!
  ---

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


Re: [OpenWrt-Devel] customizing a firmware

2008-06-18 Thread Jan Hetges
On Wed, Jun 18, 2008 at 12:38:10AM -0400, Brian J. Murrell wrote:
> OK.  So it looks like to upgrade my existing Kamikaze installation, I'm
> going to need to flash a new firmware onto it with mtd.
> 
> But I am sure this will not be the last time I want to do this and I
> really want to avoid having reconfigure from scratch every time.

iirc there was some work done by Alina and by Felix to backup /etc (or at
least parts of it) on a ramdisk while flashing and writing it back
afterwards. Don't know what happend with that...

 cheers

   --Jan



signature.asc
Description: Digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [GCC4.3 v3 1/3] Initial support for gcc4.3.1

2008-06-18 Thread Luigi 'Comio' Mantellini
Just an important note: the patches are from buildroot git tree
maintained by Bernhard Fischer (thanks!).

On mer, 2008-06-18 at 19:01 +0200, Luigi 'Comio' Mantellini wrote:

> ---
>  toolchain/gcc/Config.in|3 +
>  toolchain/gcc/Config.version   |   18 ++
>  toolchain/gcc/Makefile |   28 ++
>  toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch  |   33 +++
>  .../patches/4.3.1/104-gnuhurd-uclibc-conf.patch|   13 +
>  .../gcc/patches/4.3.1/301-missing-execinfo_h.patch |   11 +
>  toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch |   13 +
>  .../4.3.1/305-libmudflap-susv3-legacy.patch|   49 
>  .../patches/4.3.1/810-arm-softfloat-libgcc.patch   |   29 ++
>  toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch   |  284 
> 
>  .../4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch |   41 +++
>  toolchain/gcc/patches/4.3.1/995-short-enums.diff   |   42 +++
>  .../4.3.1/998-gcc-4.3.0-fix-header.00.patch|   15 +
>  toolchain/gcc/patches/4.3.1/999-cf.patch   |   10 +
>  toolchain/gmp/Makefile |   46 
>  toolchain/mpfr/Makefile|   46 
>  toolchain/uClibc/Makefile  |5 +
>  17 files changed, 686 insertions(+), 0 deletions(-)
>  create mode 100644 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch
>  create mode 100644 
> toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch
>  create mode 100644 
> toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/995-short-enums.diff
>  create mode 100644 
> toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch
>  create mode 100644 toolchain/gcc/patches/4.3.1/999-cf.patch
>  create mode 100644 toolchain/gmp/Makefile
>  create mode 100644 toolchain/mpfr/Makefile
> 


Industrie Dial Face S.p.A.
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI), Italy
Tel.:   +39 02 5167 2813
Fax:+39 02 5167 2459
E-mail: [EMAIL PROTECTED]
GPG fingerprint: 3DD1 7B71 FBDF 6376
1B4A
 B003 175F E979 907E
1650
<>___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [GCC4.3 v3 1/3] Initial support for gcc4.3.1

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 toolchain/gcc/Config.in|3 +
 toolchain/gcc/Config.version   |   18 ++
 toolchain/gcc/Makefile |   28 ++
 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch  |   33 +++
 .../patches/4.3.1/104-gnuhurd-uclibc-conf.patch|   13 +
 .../gcc/patches/4.3.1/301-missing-execinfo_h.patch |   11 +
 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch |   13 +
 .../4.3.1/305-libmudflap-susv3-legacy.patch|   49 
 .../patches/4.3.1/810-arm-softfloat-libgcc.patch   |   29 ++
 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch   |  284 
 .../4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch |   41 +++
 toolchain/gcc/patches/4.3.1/995-short-enums.diff   |   42 +++
 .../4.3.1/998-gcc-4.3.0-fix-header.00.patch|   15 +
 toolchain/gcc/patches/4.3.1/999-cf.patch   |   10 +
 toolchain/gmp/Makefile |   46 
 toolchain/mpfr/Makefile|   46 
 toolchain/uClibc/Makefile  |5 +
 17 files changed, 686 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/995-short-enums.diff
 create mode 100644 
toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/999-cf.patch
 create mode 100644 toolchain/gmp/Makefile
 create mode 100644 toolchain/mpfr/Makefile

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index e712d59..e0aae26 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -36,6 +36,9 @@ choice
depends !LINUX_2_4
bool "gcc 4.2.4"
 
+   config GCC_VERSION_4_3_1
+   depends !LINUX_2_4
+   bool "gcc 4.3.1"
 endchoice
 
 config EABI_SUPPORT
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 6da1e95..90a7d40 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -7,8 +7,26 @@ config GCC_VERSION
default "4.2.2" if GCC_VERSION_4_2_2
default "4.2.3" if GCC_VERSION_4_2_3
default "4.2.4" if GCC_VERSION_4_2_4
+   default "4.3.0" if GCC_VERSION_4_3_0
+   default "4.3.1" if GCC_VERSION_4_3_1
default "4.1.2"
 
+config GCC_VERSION_3_4_X
+   bool
+   default y if GCC_VERSION_3_4_6
+
+config GCC_VERSION_4_1_X
+   bool
+   default y if GCC_VERSION_4_1_2
+
+config GCC_VERSION_4_2_X
+   bool
+   default y if GCC_VERSION_4_2_0 || GCC_VERSION_4_2_1 || 
GCC_VERSION_4_2_2 || GCC_VERSION_4_2_3 || GCC_VERSION_4_2_4
+
+config GCC_VERSION_4_3_X
+   bool
+   default y if GCC_VERSION_4_3_0 || GCC_VERSION_4_3_1
+
 if !TOOLCHAINOPTS
config GCC_VERSION_3_4_6
default y if LINUX_2_4
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index ef5ab22..cd0203f 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -42,6 +42,18 @@ TARGET_LANGUAGES:="c$(if 
$(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INS
 
 EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch 
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
 
+ifeq ($(ARCH),m68k) 
+SOFT_FLOAT_CONFIG_OPTION:= 
+else 
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft 
+endif
+
+#ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+#WITH_GMP_MPFR:=
+#else
+#WITH_GMP_MPFR:=--with-mpfr=$(TOPDIR)/staging_dir/host 
--with-gmp=$(TOPDIR)/staging_dir/host
+#endif
+
 define Stage1/Configure
$(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' 
$(TOOLCHAIN_DIR)/info.mk
$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(PKG_VERSION),' 
$(TOOLCHAIN_DIR)/info.mk
@@ -64,15 +76,30 @@ define Stage1/Configure
--disable-multilib \
$(EXTRA_TARGET) \
$(SOFT_FLOAT_CONFIG_OPTION) \
+   $(WITH_GMP_MPFR) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
);
 endef
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Compile
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc
 endef
+else
+define Stage1/Compile
+   export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc 
all-target-libgcc
+endef
+endif
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Install
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) install-gcc
 ende

[OpenWrt-Devel] [GCC4.3 v3 3/3] Minor fixes

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 toolchain/gcc/Makefile |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index cd0203f..a04c059 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -48,7 +48,7 @@ else
 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft 
 endif
 
-#ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+#ifeq ($(CONFIG_GCC_VERSION_4_3_X),)
 #WITH_GMP_MPFR:=
 #else
 #WITH_GMP_MPFR:=--with-mpfr=$(TOPDIR)/staging_dir/host 
--with-gmp=$(TOPDIR)/staging_dir/host
@@ -81,7 +81,7 @@ define Stage1/Configure
);
 endef
 
-ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+ifeq ($(CONFIG_GCC_VERSION_4_3_X),)
 define Stage1/Compile
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc
 endef
@@ -91,7 +91,7 @@ define Stage1/Compile
 endef
 endif
 
-ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+ifeq ($(CONFIG_GCC_VERSION_4_3_X),)
 define Stage1/Install
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) install-gcc
 endef
-- 
1.5.4.3

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


[OpenWrt-Devel] [GCC4.3 v3 2/3] Compile free (tested on mipsel-2.6)

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 include/target.mk |4 ++--
 toolchain/uClibc/Makefile |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index 8b12395..d9aa2be 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -105,8 +105,8 @@ $(eval $(call shexport,Target/Description))
 include $(INCLUDE_DIR)/kernel-version.mk
 
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
-GENERIC_FILES_DIR := $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_PATCH_DIR ?= $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_FILES_DIR ?= $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
 
 GENERIC_LINUX_CONFIG?=$(firstword $(wildcard 
$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) 
$(GENERIC_PLATFORM_DIR)/config-default))
 LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) 
$(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) 
$(subdir)/config-default)) $(PLATFORM_DIR)/config-$(KERNEL_PATCHVER))
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index a575f56..cd03cef 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -146,8 +146,8 @@ UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C 
$(PKG_BUILD_DIR) \
 define Build/Compile
 
 ifneq ($(CONFIG_GCC_VERSION_4_3_X),)
-   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
-  
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
+   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
+  
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
 endif
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
$(UCLIBC_MAKE) PREFIX= all
-- 
1.5.4.3

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


Re: [OpenWrt-Devel] [gcc4.3] Adding initial support for m68k/coldfire

2008-06-18 Thread Gregers Petersen
Robert P. J. Day wrote:
>   whoa, please don't do that again.  with something that large, just
> post it somewhere and let others download it if they're interested.
> 

I would like to mention that the above was a personal comment from 
Robert P. J. Day - it does not represent the present OpenWrt guidelines 
for submission of patches.


-- 
Gregers Petersen
People-stuff, layer 8 and anthropology
glp on irc

   ___ __
  |   |.-.-.-.|  |  |  |..|  |_
  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
  |___||   __|_|__|__||||__|  ||
   |__| W I R E L E S S   F R E E D O M
  KAMIKAZE (bleeding edge) ---
   * 10 oz Vodka   Shake well with ice and strain
   * 10 oz Triple sec  mixture into 10 shot glasses.
   * 10 oz lime juice  Salute!
  ---

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


Re: [OpenWrt-Devel] [gcc4.3] Adding initial support for m68k/coldfire

2008-06-18 Thread Luigi 'Comio' Mantellini
Please delete my patches. I will send a "compact"  edition without
patchset for coldfire (that doesn't work...).

thanks

luigi


On mer, 2008-06-18 at 11:25 -0400, Robert P. J. Day wrote:

> whoa, please don't do that again.  with something that large, just
> post it somewhere and let others download it if they're interested.
> 
> rday
> --
> 
> 
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry:
> Have classroom, will lecture.
> 
> http://crashcourse.ca  Waterloo, Ontario, CANADA
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Industrie Dial Face S.p.A.
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI), Italy
Tel.:   +39 02 5167 2813
Fax:+39 02 5167 2459
E-mail: [EMAIL PROTECTED]
GPG fingerprint: 3DD1 7B71 FBDF 6376
1B4A
 B003 175F E979 907E
1650
<>___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [gcc4.3] Adding initial support for m68k/coldfire

2008-06-18 Thread Robert P. J. Day

  whoa, please don't do that again.  with something that large, just
post it somewhere and let others download it if they're interested.

rday
--


Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca  Waterloo, Ontario, CANADA

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


Re: [OpenWrt-Devel] [gcc4.3] Initial support for gcc4.3.1

2008-06-18 Thread Luigi 'Comio' Mantellini
Please ignore these patches. I will resend with numbering asap.

Thanks.

luigi

On mer, 2008-06-18 at 17:03 +0200, Luigi 'Comio' Mantellini wrote:

> ---
>  toolchain/gcc/Config.in|3 +
>  toolchain/gcc/Config.version   |   18 ++
>  toolchain/gcc/Makefile |   28 ++
>  toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch  |   33 +++
>  .../patches/4.3.1/104-gnuhurd-uclibc-conf.patch|   13 +
>  .../gcc/patches/4.3.1/301-missing-execinfo_h.patch |   11 +
>  toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch |   13 +
> 
>  
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [gcc4.3 V2 3/5] Avoid generic patches...

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 target/linux/cf547x/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/target/linux/cf547x/Makefile b/target/linux/cf547x/Makefile
index 3b88703..ae98efa 100644
--- a/target/linux/cf547x/Makefile
+++ b/target/linux/cf547x/Makefile
@@ -14,6 +14,8 @@ BOARDNAME:=Generic Coldfire target
 FEATURES:=squashfs
 LINUX_VERSION:=2.6.24
 
+GENERIC_PATCH_DIR:=
+
 include $(INCLUDE_DIR)/target.mk
 
 define Target/Description
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3 V2 5/5] Compile free (tested on mipsel-2.6)

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 include/target.mk |4 ++--
 toolchain/uClibc/Makefile |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index 8b12395..d9aa2be 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -105,8 +105,8 @@ $(eval $(call shexport,Target/Description))
 include $(INCLUDE_DIR)/kernel-version.mk
 
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
-GENERIC_FILES_DIR := $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_PATCH_DIR ?= $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_FILES_DIR ?= $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
 
 GENERIC_LINUX_CONFIG?=$(firstword $(wildcard 
$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) 
$(GENERIC_PLATFORM_DIR)/config-default))
 LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) 
$(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) 
$(subdir)/config-default)) $(PLATFORM_DIR)/config-$(KERNEL_PATCHVER))
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 37bc646..ee5b1d8 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -147,8 +147,8 @@ UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C 
$(PKG_BUILD_DIR) \
 define Build/Compile
 
 ifneq ($(CONFIG_GCC_VERSION_4_3_X),)
-   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
-  
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
+   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
+  
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
 endif
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
$(UCLIBC_MAKE) PREFIX= all
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3 V2 2/5] Fix board name

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 target/linux/cf547x/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/cf547x/Makefile b/target/linux/cf547x/Makefile
index c484362..3b88703 100644
--- a/target/linux/cf547x/Makefile
+++ b/target/linux/cf547x/Makefile
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 ARCH:=m68k
-BOARD:=mc547x
+BOARD:=cf547x
 BOARDNAME:=Generic Coldfire target
 FEATURES:=squashfs
 LINUX_VERSION:=2.6.24
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3 V2 4/5] Initial support for gcc4.3.1

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 toolchain/gcc/Config.in|3 +
 toolchain/gcc/Config.version   |   18 ++
 toolchain/gcc/Makefile |   28 ++
 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch  |   33 +++
 .../patches/4.3.1/104-gnuhurd-uclibc-conf.patch|   13 +
 .../gcc/patches/4.3.1/301-missing-execinfo_h.patch |   11 +
 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch |   13 +
 .../4.3.1/305-libmudflap-susv3-legacy.patch|   49 
 .../patches/4.3.1/810-arm-softfloat-libgcc.patch   |   29 ++
 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch   |  284 
 .../4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch |   41 +++
 toolchain/gcc/patches/4.3.1/995-short-enums.diff   |   42 +++
 .../4.3.1/998-gcc-4.3.0-fix-header.00.patch|   15 +
 toolchain/gcc/patches/4.3.1/999-cf.patch   |   10 +
 toolchain/gmp/Makefile |   46 
 toolchain/mpfr/Makefile|   46 
 toolchain/uClibc/Makefile  |5 +
 17 files changed, 686 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/995-short-enums.diff
 create mode 100644 
toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/999-cf.patch
 create mode 100644 toolchain/gmp/Makefile
 create mode 100644 toolchain/mpfr/Makefile

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index e712d59..e0aae26 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -36,6 +36,9 @@ choice
depends !LINUX_2_4
bool "gcc 4.2.4"
 
+   config GCC_VERSION_4_3_1
+   depends !LINUX_2_4
+   bool "gcc 4.3.1"
 endchoice
 
 config EABI_SUPPORT
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 6da1e95..90a7d40 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -7,8 +7,26 @@ config GCC_VERSION
default "4.2.2" if GCC_VERSION_4_2_2
default "4.2.3" if GCC_VERSION_4_2_3
default "4.2.4" if GCC_VERSION_4_2_4
+   default "4.3.0" if GCC_VERSION_4_3_0
+   default "4.3.1" if GCC_VERSION_4_3_1
default "4.1.2"
 
+config GCC_VERSION_3_4_X
+   bool
+   default y if GCC_VERSION_3_4_6
+
+config GCC_VERSION_4_1_X
+   bool
+   default y if GCC_VERSION_4_1_2
+
+config GCC_VERSION_4_2_X
+   bool
+   default y if GCC_VERSION_4_2_0 || GCC_VERSION_4_2_1 || 
GCC_VERSION_4_2_2 || GCC_VERSION_4_2_3 || GCC_VERSION_4_2_4
+
+config GCC_VERSION_4_3_X
+   bool
+   default y if GCC_VERSION_4_3_0 || GCC_VERSION_4_3_1
+
 if !TOOLCHAINOPTS
config GCC_VERSION_3_4_6
default y if LINUX_2_4
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index ef5ab22..cd0203f 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -42,6 +42,18 @@ TARGET_LANGUAGES:="c$(if 
$(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INS
 
 EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch 
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
 
+ifeq ($(ARCH),m68k) 
+SOFT_FLOAT_CONFIG_OPTION:= 
+else 
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft 
+endif
+
+#ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+#WITH_GMP_MPFR:=
+#else
+#WITH_GMP_MPFR:=--with-mpfr=$(TOPDIR)/staging_dir/host 
--with-gmp=$(TOPDIR)/staging_dir/host
+#endif
+
 define Stage1/Configure
$(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' 
$(TOOLCHAIN_DIR)/info.mk
$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(PKG_VERSION),' 
$(TOOLCHAIN_DIR)/info.mk
@@ -64,15 +76,30 @@ define Stage1/Configure
--disable-multilib \
$(EXTRA_TARGET) \
$(SOFT_FLOAT_CONFIG_OPTION) \
+   $(WITH_GMP_MPFR) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
);
 endef
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Compile
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc
 endef
+else
+define Stage1/Compile
+   export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc 
all-target-libgcc
+endef
+endif
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Install
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) install-gcc
 ende

[OpenWrt-Devel] [gcc4.3] Fix board name

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 target/linux/cf547x/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/cf547x/Makefile b/target/linux/cf547x/Makefile
index c484362..3b88703 100644
--- a/target/linux/cf547x/Makefile
+++ b/target/linux/cf547x/Makefile
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 ARCH:=m68k
-BOARD:=mc547x
+BOARD:=cf547x
 BOARDNAME:=Generic Coldfire target
 FEATURES:=squashfs
 LINUX_VERSION:=2.6.24
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3] Avoid generic patches...

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 target/linux/cf547x/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/target/linux/cf547x/Makefile b/target/linux/cf547x/Makefile
index 3b88703..ae98efa 100644
--- a/target/linux/cf547x/Makefile
+++ b/target/linux/cf547x/Makefile
@@ -14,6 +14,8 @@ BOARDNAME:=Generic Coldfire target
 FEATURES:=squashfs
 LINUX_VERSION:=2.6.24
 
+GENERIC_PATCH_DIR:=
+
 include $(INCLUDE_DIR)/target.mk
 
 define Target/Description
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3] Compile free (tested on mipsel-2.6)

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 include/target.mk |4 ++--
 toolchain/uClibc/Makefile |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index 8b12395..d9aa2be 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -105,8 +105,8 @@ $(eval $(call shexport,Target/Description))
 include $(INCLUDE_DIR)/kernel-version.mk
 
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
-GENERIC_FILES_DIR := $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_PATCH_DIR ?= $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
+GENERIC_FILES_DIR ?= $(GENERIC_PLATFORM_DIR)/files$(shell [ -d 
"$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- 
"-$(KERNEL_PATCHVER)" || true )
 
 GENERIC_LINUX_CONFIG?=$(firstword $(wildcard 
$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) 
$(GENERIC_PLATFORM_DIR)/config-default))
 LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) 
$(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) 
$(subdir)/config-default)) $(PLATFORM_DIR)/config-$(KERNEL_PATCHVER))
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 37bc646..ee5b1d8 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -147,8 +147,8 @@ UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C 
$(PKG_BUILD_DIR) \
 define Build/Compile
 
 ifneq ($(CONFIG_GCC_VERSION_4_3_X),)
-   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
-  
$(TOOLCHAIN_DIR)/lib/gcc/m68k-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
+   ln -sf 
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include-fixed/limits.h
 \
+  
$(TOOLCHAIN_DIR)/lib/gcc/$(ARCH)-linux-uclibc/$(CONFIG_GCC_VERSION)/include/limits.h
 endif
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
$(UCLIBC_MAKE) PREFIX= all
-- 
1.5.4.3

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


[OpenWrt-Devel] [gcc4.3] Initial support for gcc4.3.1

2008-06-18 Thread Luigi 'Comio' Mantellini
---
 toolchain/gcc/Config.in|3 +
 toolchain/gcc/Config.version   |   18 ++
 toolchain/gcc/Makefile |   28 ++
 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch  |   33 +++
 .../patches/4.3.1/104-gnuhurd-uclibc-conf.patch|   13 +
 .../gcc/patches/4.3.1/301-missing-execinfo_h.patch |   11 +
 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch |   13 +
 .../4.3.1/305-libmudflap-susv3-legacy.patch|   49 
 .../patches/4.3.1/810-arm-softfloat-libgcc.patch   |   29 ++
 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch   |  284 
 .../4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch |   41 +++
 toolchain/gcc/patches/4.3.1/995-short-enums.diff   |   42 +++
 .../4.3.1/998-gcc-4.3.0-fix-header.00.patch|   15 +
 toolchain/gcc/patches/4.3.1/999-cf.patch   |   10 +
 toolchain/gmp/Makefile |   46 
 toolchain/mpfr/Makefile|   46 
 toolchain/uClibc/Makefile  |5 +
 17 files changed, 686 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/gcc/patches/4.3.1/100-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/104-gnuhurd-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/301-missing-execinfo_h.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/302-c99-snprintf.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/305-libmudflap-susv3-legacy.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/810-arm-softfloat-libgcc.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/910-mbsd_multi.patch
 create mode 100644 
toolchain/gcc/patches/4.3.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/995-short-enums.diff
 create mode 100644 
toolchain/gcc/patches/4.3.1/998-gcc-4.3.0-fix-header.00.patch
 create mode 100644 toolchain/gcc/patches/4.3.1/999-cf.patch
 create mode 100644 toolchain/gmp/Makefile
 create mode 100644 toolchain/mpfr/Makefile

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index e712d59..e0aae26 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -36,6 +36,9 @@ choice
depends !LINUX_2_4
bool "gcc 4.2.4"
 
+   config GCC_VERSION_4_3_1
+   depends !LINUX_2_4
+   bool "gcc 4.3.1"
 endchoice
 
 config EABI_SUPPORT
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 6da1e95..90a7d40 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -7,8 +7,26 @@ config GCC_VERSION
default "4.2.2" if GCC_VERSION_4_2_2
default "4.2.3" if GCC_VERSION_4_2_3
default "4.2.4" if GCC_VERSION_4_2_4
+   default "4.3.0" if GCC_VERSION_4_3_0
+   default "4.3.1" if GCC_VERSION_4_3_1
default "4.1.2"
 
+config GCC_VERSION_3_4_X
+   bool
+   default y if GCC_VERSION_3_4_6
+
+config GCC_VERSION_4_1_X
+   bool
+   default y if GCC_VERSION_4_1_2
+
+config GCC_VERSION_4_2_X
+   bool
+   default y if GCC_VERSION_4_2_0 || GCC_VERSION_4_2_1 || 
GCC_VERSION_4_2_2 || GCC_VERSION_4_2_3 || GCC_VERSION_4_2_4
+
+config GCC_VERSION_4_3_X
+   bool
+   default y if GCC_VERSION_4_3_0 || GCC_VERSION_4_3_1
+
 if !TOOLCHAINOPTS
config GCC_VERSION_3_4_6
default y if LINUX_2_4
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index ef5ab22..cd0203f 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -42,6 +42,18 @@ TARGET_LANGUAGES:="c$(if 
$(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INS
 
 EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch 
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
 
+ifeq ($(ARCH),m68k) 
+SOFT_FLOAT_CONFIG_OPTION:= 
+else 
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft 
+endif
+
+#ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
+#WITH_GMP_MPFR:=
+#else
+#WITH_GMP_MPFR:=--with-mpfr=$(TOPDIR)/staging_dir/host 
--with-gmp=$(TOPDIR)/staging_dir/host
+#endif
+
 define Stage1/Configure
$(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' 
$(TOOLCHAIN_DIR)/info.mk
$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(PKG_VERSION),' 
$(TOOLCHAIN_DIR)/info.mk
@@ -64,15 +76,30 @@ define Stage1/Configure
--disable-multilib \
$(EXTRA_TARGET) \
$(SOFT_FLOAT_CONFIG_OPTION) \
+   $(WITH_GMP_MPFR) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
);
 endef
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Compile
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc
 endef
+else
+define Stage1/Compile
+   export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) all-gcc 
all-target-libgcc
+endef
+endif
+
+ifeq ($(CONFIG_GCC_VERSION_4_3_1),)
 define Stage1/Install
export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR1) install-gcc
 ende

[OpenWrt-Devel] update to shorewall-lite specific for openwrt

2008-06-18 Thread Brian J. Murrell
Per the conversation thread here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04331.html and specifically in 
this message: http://www.mail-archive.com/[EMAIL PROTECTED]/msg04415.html find 
below the aforementioned patch that will never be integrated into shorewall and 
that we will have to carry forward until busybox is able to handle huge 
integers.

Signed-off-by:  Brian J. Murrell <[EMAIL PROTECTED]>

--- /dev/null   2008-04-20 11:31:37.0 -0400
+++ feeds/packages/net/shorewall-lite/patches/000-bc.patch  2008-06-18 
08:28:00.0 -0400
@@ -0,0 +1,69 @@
+Index: lib.base
+===
+--- before/lib.base(revision 7931)
 after/lib.base (working copy)
+@@ -455,6 +455,14 @@
+ echo $y
+ }
+ 
++addr_comp() {
++test $(bc < $2
++EOF
++) -eq 1
++
++}
++
+ #
+ # Enumerate the members of an IP range -- When using a shell supporting only
+ # 32-bit signed arithmetic, the range cannot span 128.0.0.0.
+@@ -488,19 +496,19 @@
+ first=$(decodeaddr ${1%-*})
+ last=$(decodeaddr ${1#*-})
+ 
+-if [ $first -gt $last ]; then
++if addr_comp $first $last; then
+   fatal_error "Invalid IP address range: $1"
+ fi
+ 
+ l=$(( $last + 1 ))
+ 
+-while [ $first -le $last ]; do
++while addr_comp $last $first; do
+   vlsm=
+   x=31
+   y=2
+   z=1
+ 
+-  while [ $(( $first % $y )) -eq 0 -a $(( $first + $y )) -le $l ]; do
++  while [ $(( $first % $y )) -eq 0 ] && addr_comp $l $(( $first + $y )) ; 
do
+   vlsm=/$x
+   x=$(( $x - 1 ))
+   z=$y
+@@ -527,11 +535,11 @@
+ first=$(decodeaddr ${1%-*})
+ last=$(decodeaddr ${1#*-})
+ 
+-if [ $first -gt $last ]; then
++if addr_comp $first $last; then
+   fatal_error "Invalid IP address range: $1"
+ fi
+ 
+-while [ $first -le $last ]; do
++while ! addr_comp $first $last; do
+   echo $(encodeaddr $first)
+   first=$(($first + 1))
+ done
+@@ -583,8 +591,10 @@
+ in_network() # $1 = IP address, $2 = CIDR network
+ {
+ local netmask=$(ip_netmask $2)
+-
+-test $(( $(decodeaddr $1) & $netmask)) -eq $(( $(decodeaddr ${2%/*}) & 
$netmask ))
++#
++# We compare the values as strings rather than integers to work around 
broken BusyBox ash on OpenWRT
++#
++test $(( $(decodeaddr $1) & $netmask)) = $(( $(decodeaddr ${2%/*}) & 
$netmask ))
+ }
+ 
+ #



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] separate firewall scripts from iptables package

2008-06-18 Thread Brian J. Murrell
This package separates out the firewall scripts from the iptables
package, making it possible to have iptables installed without having to
bring in the firewall scripts.  Useful for say, when you want to use
shorewall-lite rather than the firewall scripts.

Signed-off-by:  Brian J. Murrell <[EMAIL PROTECTED]>

Index: package/iptables/Makefile
===
--- package/iptables/Makefile   (revision 11527)
+++ package/iptables/Makefile   (working copy)
@@ -54,11 +54,19 @@
 
 define Package/iptables
 $(call Package/iptables/Default)
+  TITLE:=netfilter administration tool
+  MENU:=1
+endef
+
+define Package/firewall
+  SECTION:=net
+  CATEGORY:=Base system
   TITLE:=IPv4 firewall administration tool
   MENU:=1
+  DEPENDS:=iptables $(1)
 endef
 
-define Package/iptables/conffiles
+define Package/firewall/conffiles
 /etc/firewall.config
 /etc/firewall.user
 endef
@@ -246,7 +254,7 @@
$(CP) $(PKG_BUILD_DIR)/libiptc/libiptc.a $(1)/usr/lib
 endef
 
-define Package/iptables/install
+define Package/firewall/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/firewall.config $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
@@ -254,6 +262,9 @@
$(INSTALL_BIN) ./files/firewall.user $(1)/etc/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) ./files/firewall.awk $(1)/usr/lib
+endef
+
+define Package/iptables/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/iptables
@@ -303,6 +314,7 @@
$(INSTALL_DIR) $$(1)/etc/l7-protocols; \
$(CP) files/l7/*.pat $$(1)/etc/l7-protocols/
 
+$(eval $(call BuildPackage,firewall))
 $(eval $(call BuildPackage,iptables))
 $(eval $(call BuildPackage,iptables-utils))
 $(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m)))



signature.asc
Description: This is a digitally signed message part
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] customizing a firmware

2008-06-18 Thread Harald Schiöberg
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian J. Murrell wrote:
> OK.  So it looks like to upgrade my existing Kamikaze installation, I'm
> going to need to flash a new firmware onto it with mtd.
> 
> But I am sure this will not be the last time I want to do this and I
> really want to avoid having reconfigure from scratch every time.
> 
> So, I understand that for the new firmware I'm going to build, I can add
> packages (i.e. to the firmware so that I don't have to use ipkg to add
> them after I flash the new firmware) that I had installed since my last
> firmware build/install simply by changing them from "m" to "y" when I
> "make config".  Am I correct, so far?

yup

> 
> Now, there is the issue of all of the configuration I have done since I
> did my last firmware installation.  A very nice, typical example is
> say /etc/config/network.  Of course, that is custom to my installation
> but I'd like to avoid having to reconfigure that every time I install a
> new firmware.
> 
> So I see that in package/base-files/files/etc/config/network is the
> basic network config.  Should I modify that for my local installation,
> so that the firmware I create will have it's network already configured
> for my use?
> 
> This seems a bit un-portable though, and what of other files from other
> packages?  Running around making these "per installation specific"
> changes seems like a bad idea.  Any way to avoid?  Any way to build
> custom firmwares without using these kinds of "source hacks"?
> 
> Indeed, I could simply backup and then restore /etc/config after I have
> done my reflashing, but even then, I'm monkeying around with that
> 192.168.1.1 address again.

for network config: look at menuconfig->"Image configuration"
other than that: source hacks.

you can add a files/ folder to the topdir, everything in it will be
verbatim-copied to the root image (at least that was the case half a
year ago)

> Is there any way for me to see what the filesystem will look like on my
> router after I've reflashed, prior to reflashing?  I want to be able to
> inspect it and make tweaks to my build tree, rebuild the firmware image
> and check again, etc.  

build_dir//root-

> Can I easily mount the firmware's filesystem for
> examination on my build host, or is there a copy of what's in the
> firmware's filesystem in a directory in the build tree somewhere?  i.e.


http://gentoo-wiki.com/Mounting_a_block_device_with_JFFS2

if your target is big-endian, you need jffs2dump to convert the
endianess of the filesystem first.


> Thanx for any questions you would care to answer,
> b.
> 
> 
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


- --
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIWL79Jgyxs71kcx4RAonBAKCvEapH9EGUhn0peBZ3A3q06TmkYwCgysba
b+uTfJ15c/iANsDvYtXeIbQ=
=DbM5
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] customizing a firmware

2008-06-18 Thread Benoît Ganne
> So, I understand that for the new firmware I'm going to build, I can add
> packages (i.e. to the firmware so that I don't have to use ipkg to add
> them after I flash the new firmware) that I had installed since my last
> firmware build/install simply by changing them from "m" to "y" when I
> "make config".  Am I correct, so far?

Yes.

> So I see that in package/base-files/files/etc/config/network is the
> basic network config.  Should I modify that for my local installation,
> so that the firmware I create will have it's network already configured
> for my use?

As these are vanilla config files, I would not touch them, but it should
work.

> This seems a bit un-portable though, and what of other files from other
> packages?  Running around making these "per installation specific"
> changes seems like a bad idea.  Any way to avoid?  Any way to build
> custom firmwares without using these kinds of "source hacks"?

Personally, I wrote a new package, similar to base-files which I called
zz-user-files. I put all my special files in its files/ directory, and
It will overwrite those files in the target firmware at install time. I
called it 'zz-user-files' to be sure that It will be the last installed
package. It's not perfect, but It work very well. (Do not forget to
select 'User-defined files for OpenWrt' in the 'Base system' menu).
Path is attached.

> Is there any way for me to see what the filesystem will look like on my
> router after I've reflashed, prior to reflashing?  I want to be able to
> inspect it and make tweaks to my build tree, rebuild the firmware image
> and check again, etc.  Can I easily mount the firmware's filesystem for
> examination on my build host, or is there a copy of what's in the
> firmware's filesystem in a directory in the build tree somewhere?  i.e.
> staged before building the firmware image.

Yes you should find it in the build_dir//root-/ directory,
eg. build_dir/mipsel/root-ar7/ for AR7 (TI MIPS-based SoC).
If you modify things in it and rebuild, it should be taken into account.

Regards,
Ben.

diff --git a/package/zz-user-files/Makefile b/package/zz-user-files/Makefile
new file mode 100644
index 000..1b36a84
--- /dev/null
+++ b/package/zz-user-files/Makefile
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=user-files
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/user-files
+  SECTION:=base
+  CATEGORY:=Base system
+  DEPENDS:=+base-files
+  TITLE:=User-defined files for OpenWrt
+  URL:=http://openwrt.org/
+  VERSION:=$(PKG_RELEASE)-$(REVISION)
+endef
+
+define Package/user-files/description
+ This package contains user-defined files to add to OpenWrt base filesystem.
+endef
+
+define Build/Prepare
+	mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile/Default
+endef
+
+define Build/Compile
+	$(call Build/Compile/Default)
+endef
+
+define Package/user-files/install
+	$(CP) -af ./files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,user-files))
diff --git a/package/zz-user-files/files/etc/config/network b/package/zz-user-files/files/etc/config/network
new file mode 100644
index 000..a35fd2e
--- /dev/null
+++ b/package/zz-user-files/files/etc/config/network
@@ -0,0 +1,14 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config interface loopback
+	option ifname	lo
+	option proto	static
+	option ipaddr	127.0.0.1
+	option netmask	255.0.0.0
+
+config interface lan
+	option ifname	eth0
+	option type 	bridge
+	option proto	static
+	option ipaddr	192.168.1.1
+	option netmask	255.255.255.0

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