[OpenWrt-Devel] [PATCH] stderr should be a copy of stdout, not stdin

2009-06-25 Thread Ferenc Wagner
Signed-off-by: Ferenc Wagner wf...@niif.hu

diff --git a/package/base-files/files/etc/preinit 
b/package/base-files/files/etc/preinit
index 4e706f1..2dadb36 100755
--- a/package/base-files/files/etc/preinit
+++ b/package/base-files/files/etc/preinit
@@ -59,7 +59,7 @@ dd if=/dev/console of=/dev/null bs=1 count=0 /dev/null 
2/dev/null  {
M1=/dev/console
 }
 
-exec $M0 $M1 20
+exec $M0 $M1 21
 
 echo - preinit -
 echo Press CTRL-C for failsafe

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] proc is already mounted in /etc/preinit, no use doing it again

2009-06-25 Thread Ferenc Wagner
Signed-off-by: Ferenc Wagner wf...@niif.hu

diff --git a/target/linux/brcm-2.4/base-files/etc/preinit.arch 
b/target/linux/brcm-2.4/base-files/etc/preinit.arch
index 25d11d9..18b6ae5 100755
--- a/target/linux/brcm-2.4/base-files/etc/preinit.arch
+++ b/target/linux/brcm-2.4/base-files/etc/preinit.arch
@@ -20,8 +20,6 @@ failsafe() {
ash --login
 }
 
-mount none /proc -t proc
-
 insmod diag
 set_state preinit
 echo '/sbin/hotplug.failsafe'  /proc/sys/kernel/hotplug
diff --git a/target/linux/olpc/base-files/etc/preinit.arch 
b/target/linux/olpc/base-files/etc/preinit.arch
index f29f0d4..91a4569 100644
--- a/target/linux/olpc/base-files/etc/preinit.arch
+++ b/target/linux/olpc/base-files/etc/preinit.arch
@@ -1,2 +1 @@
-mount -t proc none /proc
 grep 'failsafe=' /proc/cmdline  export FAILSAFE=true
diff --git a/target/linux/x86/base-files/etc/preinit.arch 
b/target/linux/x86/base-files/etc/preinit.arch
index 00db8b4..08b25be 100644
--- a/target/linux/x86/base-files/etc/preinit.arch
+++ b/target/linux/x86/base-files/etc/preinit.arch
@@ -1,2 +1 @@
-mount -t proc none /proc
 grep 'failsafe=' /proc/cmdline  /dev/null  export FAILSAFE=true

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] If inserting switch_core failed, do not waste time trying the switch drivers

2009-06-25 Thread Ferenc Wagner
Signed-off-by: Ferenc Wagner wf...@niif.hu

diff --git a/target/linux/brcm-2.4/base-files/etc/preinit.arch 
b/target/linux/brcm-2.4/base-files/etc/preinit.arch
index 18b6ae5..fd73e37 100755
--- a/target/linux/brcm-2.4/base-files/etc/preinit.arch
+++ b/target/linux/brcm-2.4/base-files/etc/preinit.arch
@@ -46,10 +46,12 @@ check_module () {
   return $?
 }
 
-insmod switch-core
-check_module switch-robo || check_module switch-adm  || { 
-  check_module bcm57xx activate_gpio=0x4  cpu_port=8u*
-} || rmmod switch-core
+if insmod switch-core; then
+  check_module switch-robo ||
+  check_module switch-adm  || 
+  check_module bcm57xx activate_gpio=0x4  cpu_port=8u* ||
+  rmmod switch-core
+fi
 
 [ -d /proc/switch/eth0 ]  {
echo 1  /proc/switch/eth0/reset

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Routerstation and madwifi

2009-06-25 Thread David A. Bandel
Folks,

I have recently rebuilt openwrt for several of my architectures (among
them WRAP, ALIX, Gateworks 2348, and the Routerstation).

All seem to work fine except the routerstation.  The routerstation
works fine until Atheros cards are put in, and the cards activate.  I
am using the madwifi drivers.

I have no JTAG cable (no serial cable either).  During boot, I ping
the system.  The network activates, and I get about 7-9 pong packets,
then all activity ceases.

The routerstation boards are fine as long as the Atheros cards aren't
turned on (but also not much good either as these are supposed to be
APs).  Older versions I built (pre-May 19) work.  All newer versions
since exhibit this behavior only on the routerstations.

Can the author of the madwifi svn changes pls review?

Thanx,

David A. Bandel
-- 
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv2] If inserting switch_core failed, do not waste time trying the switch drivers

2009-06-25 Thread Ferenc Wagner
Signed-off-by: Ferenc Wagner wf...@niif.hu

diff --git a/target/linux/brcm-2.4/base-files/etc/preinit.arch 
b/target/linux/brcm-2.4/base-files/etc/preinit.arch
index 18b6ae5..9491056 100755
--- a/target/linux/brcm-2.4/base-files/etc/preinit.arch
+++ b/target/linux/brcm-2.4/base-files/etc/preinit.arch
@@ -46,10 +46,12 @@ check_module () {
   return $?
 }
 
-insmod switch-core
-check_module switch-robo || check_module switch-adm  || { 
-  check_module bcm57xx activate_gpio=0x4  cpu_port=8u*
-} || rmmod switch-core
+if insmod switch-core; then
+  check_module switch-robo ||
+  check_module switch-adm  || 
+  { check_module bcm57xx activate_gpio=0x4  cpu_port=8u*; } ||
+  rmmod switch-core
+fi
 
 [ -d /proc/switch/eth0 ]  {
echo 1  /proc/switch/eth0/reset

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Sysupgrade and uci-defaults

2009-06-25 Thread Frédéric Moulins
Hello,

while testing the atheros sysupgrade hack proposed by JoW, I found out
an unexpected behaviour.

'/etc/uci-defaults/*' scripts are applied in '/etc/init.d/boot',
_after_ '/etc/preinit' restored the sysupgrade configuration backup
(/sysupgrade.tgz).

This means that default values are preferred other custom ones. For
example, if an IP address is configured via menuconfig (preconfig),
which is applied by '/etc/uci-defaults/base-files' script during
'/etc/init.d/boot', it will override an IP address manually configured
and kept during the sysupgrade process (applied by '/etc/preinit').

If I am not mistaken, default UCI configurations should be applied
before the sysupgrade config restoration. 

Is it safe for every arch to move config restore in '/etc/init.d/boot'
or to move apply_uci_config in '/etc/preinit' ?

Which way should be preferred ?


Regards,

fred
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Changes reboot=bios to reboot=acpi on x86 (2)

2009-06-25 Thread Alexander Stadler
 Date: Wed, 24 Jun 2009 08:49:58 -0700 (PDT)
 From: David Richardson rdl...@yahoo.com
 To: OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH] Changes reboot=bios to
   reboot=acpi on  x86
 Message-ID: 553985.69006...@web57904.mail.re3.yahoo.com
 Content-Type: text/plain; charset=iso-8859-1

 On older boards without acpi and without keyboard controllers, this change
 does not yield a reboot method that is equivalent to reboot=bios. ?Vote is
 to not accept this patch. ?

It would propably be the best do add a architecture profile in menuconfig
for VMWare, and make some configurations i.e. reboot=acpi, LSI and
Buslogic SCSI, PIIX, E1000 and PCNet LAN, and some more. If the community
is interested I can post recommended settings. I've done very much on ESX
and Workstation with it.. .


 --- On Wed, 6/24/09, Alexander Stadler sa.mailli...@univie.ac.at wrote:

 From: Alexander Stadler sa.mailli...@univie.ac.at
 Subject: [OpenWrt-Devel] [PATCH] Changes reboot=bios to reboot=acpi on x86
 To: openwrt-devel@lists.openwrt.org
 Date: Wednesday, June 24, 2009, 11:12 AM

 Changes reboot=bios to reboot=acpi on x86.
 I'm doing this because reboot=bios lets paravirtualized maschines hang
 when trieing to reboot (and I would recommend to add acpi when using x86,
 but reboot also works with this option when acpi is not enabled).

 Signed-off-by: Alexander Stadler sa.maillists at univie.ac.at

 --

 diff -urN a/8.09/target/linux/x86/image/menu.lst
 b/8.09/target/linux/x86/image/menu.lst
 --- a/8.09/target/linux/x86/image/menu.lst??? 2009-04-08
 17:00:41.0 +0200
 +++ b/8.09/target/linux/x86/image/menu.lst??? 2009-04-16
 17:55:52.0 +0200
 @@ -6,10 +6,10 @@

  title???OpenWrt
  root? ? (hd0,0)
 -kernel? /boot/vmlinuz @CMDLINE@ noinitrd console=tty0
 console=ttyS0,@baudr...@n8 reboot=bios
 +kernel? /boot/vmlinuz @CMDLINE@ noinitrd console=tty0
 console=ttyS0,@baudr...@n8 reboot=acpi
  boot

  title??? OpenWrt (failsafe)
  root??? (hd0,0)
 -kernel? /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd console=tty0
 console=ttyS0,@baudr...@n8 reboot=bios
 +kernel? /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd console=tty0
 console=ttyS0,@baudr...@n8 reboot=acpi
  boot

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] question regarding sstrip

2009-06-25 Thread Freeman Wang
Hi

 

The tool sstrip in staging_dir/host/bin/ seems to causing some minor
issue on the stripped binaries. Those binaries are able to run properly
and I haven't found any problem. But when I check some of the stripped
libraries I got

 

 

xw...@freeman-lptp1:~/openwrt$ file
./build_dir/ubicom32/root-ubicom32/usr/lib/

libssl.so.0.9.8

./build_dir/ubicom32/root-ubicom32/usr/lib/libssl.so.0.9.8: ELF 32-bit
MSB share

d object, version 1 (SYSV), corrupted section header size

xw...@freeman-lptp1:~/openwrt$ ubicom32-linux-uclibc-readelf -a
./build_dir/ubi

com32/root-ubicom32/usr/lib/libssl.so.0.9.8

 

ELF Header:

  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00

  Class: ELF32

  Data:  2's complement, big endian

  Version:   1 (current)

  OS/ABI:UNIX - System V

  ABI Version:   0

  Type:  DYN (Shared object file)

  Machine:   Ubicom32 32-bit microcontrollers

  Version:   0x1

  Entry point address:   0xbe50

  Start of program headers:  52 (bytes into file)

  Start of section headers:  0 (bytes into file)

  Flags: 0x4002

  Size of this header:   52 (bytes)

  Size of program headers:   32 (bytes)

  Number of program headers: 4

  Size of section headers:   0 (bytes)

  Number of section headers: 0

  Section header string table index: 0 corrupt: out of range

 

There are no sections in this file.

 

There are no sections in this file.

 

This simple change fixes the issue.

 

xw...@freeman-lptp1:~/openwrt$ git diff rules.mk diff --git a/rules.mk
b/rules.mk index 96ff9cb..135609e 100644

--- a/rules.mk

+++ b/rules.mk

@@ -169,7 +169,7 @@ ifneq ($(CONFIG_NO_STRIP),)  else

   RSTRIP:= \

 NM=$(TARGET_CROSS)nm \

-STRIP=$(STRIP) \

+STRIP=$(TARGET_CROSS)strip \

 STRIP_KMOD=$(KERNEL_CROSS)strip --strip-unneeded
--remove-section=.comment

 $(SCRIPT_DIR)/rstrip.sh

 endif

 

However, I did notice that the stripped binaries are slightly smaller,
maybe 1%, when sstrip is used. So I wonder if anybody in this group knew
this 'corrupted' ELF header issue and thinks it is deliberately done so.

 

It seems odd that we use $(TARGET_CROSS)nm but do not use the target
specific strip tool when it is available though, even with a slightly
size benefit. 

 

Thanks

Freeman

 

 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel