Denis Vlasenko | 20 Nov 02:16 2006

Re: DHCP paket size udhcp 0.9.9-pre

On Saturday 18 November 2006 21:46, Jim Wright wrote:
> On Nov 18, 2006, at 1:55 PM, Denis Vlasenko wrote:
> 
> >> The mail you cite above sounds like it's using the standalone version
> >> and not the busybox version. Please clarify.
> 
>  From what I can tell, this was from the busybox version.
> 
> 
> > I just checked. We emit correctly sized packets.
> 
> Are these correctly sized packets now less than 576 bytes?  I tested  
> here with Busybox 1.0 and 1.2.1, packet sizes from both versions were  
> 590 bytes, which is causing these packets to be discarded by my ISP.

Okay. udhcpc sends packets using this code
(the only place where I see sendto() in udhcp subdirectory):

int udhcp_raw_packet(struct dhcpMessage *payload,
                uint32_t source_ip, int source_port,
                uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex)
{
        int fd;
        int result;
        struct sockaddr_ll dest;
        struct udp_dhcp_packet packet;
...
        result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0,
                        (struct sockaddr *) &dest, sizeof(dest));

(Continue reading)

Denis Vlasenko | 20 Nov 02:20 2006

Re: [PATCH] ifup segfaulting on mistaken 'interfaces' file

On Sunday 19 November 2006 22:36, Petr Stetiar wrote:
> Hi,
> 
> I've just faced ifup segfault on mistaken 'interfaces' file.
> 
> # cat interfaces.bad
> iface eth0 inet
> 	address 192.168.0.50
> 	netmask 255.255.255.0
> 
> It's missing static method on first line, should be 'iface eth0 inet static'
> 
> # ifup -a
> Segmentation fault
> 
> With patch applied:
> # ifup -a
> ifup: unknown method "(null)"
> 
> 
> -- ynezz

Applied, thanks
--
vda 
Denis Vlasenko | 20 Nov 02:39 2006

Life without /sbin/init

The tarball at the following URL:

http://busybox.net/~vda/example_fs/example.tar.bz2

contains a stripped down system which
does not have /sbin/init. Put it on whatever
partition, and boot from it, specifying
"init=/init" kernel parameter.

It will provide you with seven gettys on vt2..vt8,
nmeter on vt9, top on vt10, klog on vt11, and syslog on vt12.
There are two user accounts: "root" and "user".

This tarball is mostly a quick and dirty
example taken from my desktop system.

It is intended to demonstrate that /sbin/init is
overdesigned. There is no real reasons why stuff
like getty is run by init. There is also no real reasons
why reboot/poweroff is done by init. And if you
remove those two tasks, init does almost nothing.

If you will examine the tarball, you will see that
gettys and nmeter/top/klog/syslog is controlled by
runsvdir, and can be selectively stopped/started by sv.
On real system, I just add more /var/service/something
directories with stuff I would like to run
(apache, sshd, samba, nfs.....).

You will also find that reboot/poweroff are shell scripts,
(Continue reading)

Rob Landley | 20 Nov 06:36 2006
Picon

Re: Mount and ext3 issues with Busybox 1.2.2.1

On Friday 17 November 2006 4:31 pm, Denis Vlasenko wrote:
> On Thursday 16 November 2006 23:16, Jim Gifford wrote:
> > I've taken this step a little further, instead of using my dynamic 
> > linked version, I tried to build busybox statically. The same errors 
> > occur. Then I also tried using a glibc static linked version, again the 
> > same failure.
> 
> Are you using busybox's mke2fs? If yes, try using "standard" one.
> 
> I think that having specialized filesystem utilities in busybox
> is a mistake. Filesystems are critical to people's data.
> Bugfixes to them are critical. Bugs can be particularly deadly
> ("busybox's e2fsck ate my disk!!!").

Actually, mke2fs and tune2fs aren't brain surgery.  The ones we have are 
_crap_, but I was in the process of writing new ones when I burned out, and 
the two of them together probably wouldn't have totaled 1000 lines.  The 
current monstrosity is constructed as a set of nested libraries that nobody 
ever re-uses.  (There's a uuid generation library.  Yes really.  It can be 
replaced with about 5 lines of C, I know this because I did it.  Posted it 
here even, check the archives...)

As for e2fsck, that's actually not as bad as it looks.  Again, current 
implementation is horrible, but in general if you keep in mind that if you 
can't be sure you've fixed it, don't mess with it (and don't sign off on it 
as fixed either), then you at least won't make things worse.

I hope to get around to doing all this in toybox someday.  (At the moment I'm 
still debugging my new command line parsing infrastructure before 
implementing a gazillion small simple commands like "setsid"...)
(Continue reading)

liu.renfeng | 20 Nov 08:56 2006
Picon

The different between run the command by ./ and by busybox

According to the docs, It seems we need to run the programe by "./busybox ls" for example, but when I try "./ls" it aslo works. So my question is is there any different between these two method to run the programe. 
 
 

Best Regards,

Robin

 

Tel: +86-27-8761-7326 Ext: 309

2006-11-20
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
liu.renfeng | 20 Nov 09:07 2006
Picon

Re: Re: How to port just part of the busybox to arm

At last I compile it successfully, but there is another problem, when I run the busybox I get the following error message:
 
[root <at> localhost bin]# ./busybox udhcpc
udhcpc (v1.2.2) started
script /usr/share/udhcpc/default.script failed: No such file or directory
Sending discover...
Sending select for 192.168.200.205...
Lease of 192.168.200.205 obtained, lease time 1800
script /usr/share/udhcpc/default.script failed: No such file or directory
 
 
I find out there really has no /usr/share/udhcpc/default.script in my system. I find no default.script in busybox either.
 

Best Regards,

Robin

 

Tel: +86-27-8761-7326 Ext: 309

2006-11-20
发件人: Erik Hovland
发送时间: 2006-11-17 15:44:16
收件人: busybox
抄送:
主题: Re: How to port just part of the busybox to arm
 
On Fri, Nov 17, 2006 at 03:10:13PM +0800, liu.renfeng wrote:
> Dear Sir,
> I am adding a DHCP client to the arm system and I find that the busybox has the function of DHCP client, so I am wondering how to porting this part to my system.
> Your kindly support would be highly appreciated.
 
busybox has a config system. Type 'make menuconfig' and select only what
is needed to build the DHCP client.
 
E
 
-- 
Erik Hovland
mail: erik <at> hovland.org
PGP/GPG public key available on request
 
_______________________________________________
busybox mailing list
busybox <at> busybox.net
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
KokHow.Teh | 20 Nov 09:28 2006

RE: The different between run the command by ./ and by busybox

 > According to the docs, It seems we need to run the programe by "./busybox ls" for example, but when I try "./ls" it aslo works. So my question is is there any different between these two method to run the programe. 
 
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
liu.renfeng | 20 Nov 09:40 2006
Picon

Re: RE: The different between run the command by ./ and by busybox

Thanks for your quickly reply.
I know that FAQ told us to run program like "./busybox [appletname] [options]"
but what I asked is the difference between that and to run programe like "./ appletname option". I don't do any operation like  "mv busybox ls" and then "./ls -l".
 

Best Regards,

Robin

 

Tel: +86-27-8761-7326 Ext: 309

2006-11-20
发件人: KokHow.Teh <at> infineon.com
发送时间: 2006-11-20 16:28:38
收件人: liu.renfeng <at> gmail.com; busybox <at> busybox.net
抄送:
主题: RE: The different between run the command by ./ and by busybox
 
 > According to the docs, It seems we need to run the programe by "./busybox ls" for example, but when I try "./ls" it aslo works. So my question is is there any different between these two method to run the programe. 
 
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
Roberto A. Foglietta | 20 Nov 10:05 2006
Picon

Re: RE: The different between run the command by ./ and by busybox

2006/11/20, liu.renfeng <liu.renfeng <at> gmail.com>:
>
>
> Thanks for your quickly reply.
> I know that FAQ told us to run program like "./busybox [appletname]
> [options]"
> but what I asked is the difference between that and to run programe like "./
> appletname option". I don't do any operation like  "mv busybox ls" and then
> "./ls -l".

 you should do that

 ./executable-name

 to run a program in the current directory when the current directory
is not in the PATH enviroment. So this

 ./busybox ls

 works because you call busybox with "ls" as parameter and this

 ./ls

 could works only if there are a link which point to busybox

 mv busybox ls
 ln -s busybox ls

 try to do this

 ./ls -al

 in the path in which both "./busybox ls" and "./ls" works

 Cheers,
--

-- 
/roberto
liu.renfeng | 20 Nov 10:21 2006
Picon

Re: Re: RE: The different between run the command by ./ and by busybox

Thanks for your kindly explain, I am clear now.
 

Best Regards,

Robin

 

Tel: +86-27-8761-7326 Ext: 309

2006-11-20
发件人: Roberto A. Foglietta
发送时间: 2006-11-20 17:05:07
收件人: liu.renfeng; busybox <at> busybox.net
抄送:
主题: Re: RE: The different between run the command by ./ and by busybox
 
2006/11/20, liu.renfeng  <liu.renfeng <at> gmail.com >:
>
>
> Thanks for your quickly reply.
> I know that FAQ told us to run program like "./busybox [appletname]
> [options]"
> but what I asked is the difference between that and to run programe like "./
> appletname option". I don't do any operation like  "mv busybox ls" and then
> "./ls -l".
 
 you should do that
 
 ./executable-name
 
 to run a program in the current directory when the current directory
is not in the PATH enviroment. So this
 
 ./busybox ls
 
 works because you call busybox with "ls" as parameter and this
 
 ./ls
 
 could works only if there are a link which point to busybox
 
 mv busybox ls
 ln -s busybox ls
 
 try to do this
 
 ./ls -al
 
 in the path in which both "./busybox ls" and "./ls" works
 
 
 Cheers,
-- 
/roberto
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Gmane