Denys Vlasenko | 1 May 03:09 2011

Re: New applet: setserial

On Wednesday 27 April 2011 18:21, yuen <at> klacno.sk wrote:
> Patch for prevous code sent. Increases compatility, reduces code, fix typos.

Applied both. Thanks!
--

-- 
vda
Denys Vlasenko | 1 May 03:30 2011

Re: udhcpd - FEATURE_UDHCPC_ARPING broken?

On Tuesday 26 April 2011 10:16, Andreas Fertig wrote:
> Hello,
> 
> I ran into problems lately with using udhcpd with
> ENABLE_FEATURE_UDHCPC_ARPING enabled. Most times the DHCP-client uses
> the IP-address given by the server, but in some cases it was rejected
> with a DHCP-DECLINE message. I checked the code and found that in
> dhcpc.c:1417 the check is performed.
> There is a call to arpping() which checks whether or not the IP given by
> the server is in use.
> 
>    if (!arpping(packet.yiaddr,
>            NULL,
> 	   (uint32_t) 0,
> 	   client_config.client_mac,
> 	   client_config.interface)
>    ) {
>         bb_info_msg("Offered address is in use "
> 	"(got ARP reply), declining");
> 	send_decline(xid, server_addr, packet.yiaddr);
>         ...
> 
> Now look at the second parameter of arpping() which is NULL. If you look
> into the code of arpping.c you can see that this is the parameter
> safe_mac, a pointer in fact.

This is correct.

safe_mac is a MAC of the machine we are trying to give the lease to.
If the machine _already_ has this IP configured, it _will_ respond
(Continue reading)

Cristian Ionescu-Idbohrn | 1 May 10:38 2011
Picon

Re: all these warnings...

On Sat, 30 Apr 2011, Denys Vlasenko wrote:
> On Saturday 30 April 2011 18:34, Cristian Ionescu-Idbohrn wrote:
> > dist: debian unstable (aka sid)
> > gcc-4.6.real (Debian 4.6.0-6) 4.6.1 20110428 (prerelease)
> > BusyBox v1.19.0.git (2011-04-30 18:22:26 CEST) multi-call binary.
> >
> > I'd like to understand what's going on, why, and what I can do about it:
> >
> >   HOSTCC  scripts/kconfig/conf.o
> > scripts/kconfig/conf.c: In function 'conf_string':
> > scripts/kconfig/conf.c:176:20: warning: variable 'help' set but not used
> > [-Wunused-but-set-variable]
>
> Above, variable "help" is not used and can be deleted.
> You can send a patch which fixes it.

Alright.  See attached patch proposals.
3 + 2 + 1 warnings may now be gone, half a gazillion still lurking around ;)

Cheers,

--

-- 
Cristian
_______________________________________________
busybox mailing list
busybox <at> busybox.net
(Continue reading)

Wolfgang Denk | 1 May 14:00 2011
Picon
Picon

[PATCH] Compile options: default to -O2 when -Os is not available

Recent versions of GCC for PowerPC systems suffer from some compiler
bugs which prevent the use of "--enable-target-optspace" in their
configuration, which makes the compiler option "-Os" unavailable;
for reference see

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48278
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053

In the result, BusyBox will be compiled without any optimization
options, which causes a huge binary (1.8 MiB for default configuration
on PPC, built with gcc 54.51 from the Yocto / Poky / OpenEmbedded tool
chains).  This commit changes behaviour so "-O2" gets used as fallback
when "-Os" is not available.  This reduces the image size in above
test to 1.3 MiB.  This is still 10...15% more then what we get with
"-Os", but much better than using no optimization at all.

Signed-off-by: Wolfgang Denk <wd <at> denx.de>
---
 Makefile.flags |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.flags b/Makefile.flags
index 363300b..b3e1371 100644
--- a/Makefile.flags
+++ b/Makefile.flags
 <at>  <at>  -58,14 +58,14  <at>  <at>  CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
 #CFLAGS += $(call cc-option,-Wconversion,)

 ifneq ($(CONFIG_DEBUG),y)
(Continue reading)

Denys Vlasenko | 1 May 14:45 2011

Re: all these warnings...

On Sunday 01 May 2011 10:38, Cristian Ionescu-Idbohrn wrote:
> On Sat, 30 Apr 2011, Denys Vlasenko wrote:
> > On Saturday 30 April 2011 18:34, Cristian Ionescu-Idbohrn wrote:
> > > dist: debian unstable (aka sid)
> > > gcc-4.6.real (Debian 4.6.0-6) 4.6.1 20110428 (prerelease)
> > > BusyBox v1.19.0.git (2011-04-30 18:22:26 CEST) multi-call binary.
> > >
> > > I'd like to understand what's going on, why, and what I can do about it:
> > >
> > >   HOSTCC  scripts/kconfig/conf.o
> > > scripts/kconfig/conf.c: In function 'conf_string':
> > > scripts/kconfig/conf.c:176:20: warning: variable 'help' set but not used
> > > [-Wunused-but-set-variable]
> >
> > Above, variable "help" is not used and can be deleted.
> > You can send a patch which fixes it.
> 
> Alright.  See attached patch proposals.
> 3 + 2 + 1 warnings may now be gone, half a gazillion still lurking around ;)

Applied, thanks
--

-- 
vda
Rich Felker | 1 May 16:01 2011

Re: [PATCH] Compile options: default to -O2 when -Os is not available

On Sun, May 01, 2011 at 02:00:27PM +0200, Wolfgang Denk wrote:
> chains).  This commit changes behaviour so "-O2" gets used as fallback
> when "-Os" is not available.  This reduces the image size in above
> test to 1.3 MiB.  This is still 10...15% more then what we get with
> "-Os", but much better than using no optimization at all.

Why not -O1?

Rich
Lukas Huba | 1 May 16:22 2011
Picon

[PATCH] portmap: new applet

Hi BusyBox,

I have created new applet portmap (request from TODO list). This applet was mediumly tested.

Typical use:
  `portmap`            : Run and listen to all interfaces
  `portmap -h a.b.c.d` : Run and listen to ip a.b.c.d
  `portmap -p`         : Run and listen to all interface and allow SET and UNSET procedures from port >= 1024
  `portmap -r`         : Run and listen to all interface and allow SET and UNSET procedures from any host

Code stats:
  include/applets.src.h |    1 +
  include/usage.src.h   |    8 ++
  networking/Config.src |   16 ++++
  networking/Kbuild.src |    1 +
  networking/portmap.c  |  214 +++++++++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 240 insertions(+), 0 deletions(-)
  create mode 100644 networking/portmap.c

Size stats:
  function                                             old     new   delta
  check_security                                         -     513    +513
  portmap_main                                           -     423    +423
  _pmapproc                                              -     390    +390
  _pmapproc_set                                          -     320    +320
  _pmapproc_unset                                        -     272    +272
  .rodata                                             1985    2215    +230
  create_and_bind_or_die                                 -     215    +215
  xsocket_type                                           -     190    +190
  _pmapproc_getport                                      -     102    +102
(Continue reading)

Wolfgang Denk | 1 May 16:58 2011
Picon
Picon

Re: [PATCH] Compile options: default to -O2 when -Os is not available

Dear Rich Felker,

In message <20110501140118.GF277 <at> brightrain.aerifal.cx> you wrote:
> On Sun, May 01, 2011 at 02:00:27PM +0200, Wolfgang Denk wrote:
> > chains).  This commit changes behaviour so "-O2" gets used as fallback
> > when "-Os" is not available.  This reduces the image size in above
> > test to 1.3 MiB.  This is still 10...15% more then what we get with
> > "-Os", but much better than using no optimization at all.
> 
> Why not -O1?

The -O1 image is ~ 1.5% bigger than the -O2 one
(1278063 versus 1258658 byes for defconfig for PowerPC).

Best regards,

Wolfgang Denk

--

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd <at> denx.de
At the source of every error which is blamed on the computer you will
find at least two human errors, including the error of blaming it  on
the computer.
Marek Polacek | 1 May 17:24 2011
Picon

Re: [PATCH] portmap: new applet

Some quick notes inline.

On 05/01/2011 04:22 PM, Lukas Huba wrote:
>   ------------------------------------------------------------------------------
>   (add/remove: 18/0 grow/shrink: 4/0 up/down: 2875/0)          Total: 2875 bytes
>      text	   data	    bss	    dec	    hex	filename
>     29947	   1674	   8320	  39941	   9c05	busybox_old
>     34547	   1806	   8336	  44689	   ae91	busybox_unstripped

I'd say the .bss growth is needlessly too big.

>  include/applets.src.h |    1 +
>  include/usage.src.h   |    8 ++
>  networking/Config.src |   16 ++++
>  networking/Kbuild.src |    1 +
>  networking/portmap.c  |  213 +++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 239 insertions(+), 0 deletions(-)
>  create mode 100644 networking/portmap.c
> 

It is no longer needed to modify those files.  You should put all these
information into the portmap.c file, see for instance the util-linux/rev.c.

> diff --git a/networking/portmap.c b/networking/portmap.c
> new file mode 100644
> index 0000000..6dc2f5e
> --- /dev/null
> +++ b/networking/portmap.c
>  <at>  <at>  -0,0 +1,213  <at>  <at> 
> +/* vi: set sw=4 ts=4: */
(Continue reading)

Lukas Huba | 1 May 19:12 2011
Picon

Re: [PATCH] portmap: new applet

Marek, thanks for notes.

Modified patch:

Signed-off-by: Lukas Huba <huba.lukas <at> centrum.cz>
---
 include/applets.src.h |    1 +
 include/usage.src.h   |    8 ++
 networking/Config.src |   16 +++
 networking/Kbuild.src |    1 +
 networking/portmap.c  |  247 +++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 273 insertions(+), 0 deletions(-)
 create mode 100644 networking/portmap.c

diff --git a/include/applets.src.h b/include/applets.src.h
index 133f376..e92f215 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
 <at>  <at>  -283,6 +283,7  <at>  <at>  IF_PIPE_PROGRESS(APPLET(pipe_progress, BB_DIR_BIN, BB_SUID_DROP))
 IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
 IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill))
 IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP))
+IF_PORTMAP(APPLET(portmap, BB_DIR_SBIN, BB_SUID_DROP))
 IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv))
 IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf))
 IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP))
diff --git a/include/usage.src.h b/include/usage.src.h
index d836093..a94df3c 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
(Continue reading)


Gmane