Kindly unsubscribe me from this mailing list
Best Regards,
Karthik Swaminathan
Catalog/EEE
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Wednesday, January 28, 2009 3:37 AM
To: [email protected]
Subject: busybox Digest, Vol 42, Issue 37
Send busybox mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.busybox.net/mailman/listinfo/busybox
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of busybox digest..."
Today's Topics:
1. Re: bb-1.13 modutils-24.c (David N. Lombard)
2. Help with Busybox on ARM board (Amandeep Bhullar)
3. Re: Help with Busybox on ARM board (walter harms)
4. Re: fbsplash - text rendering (Bernhard Reutner-Fischer)
5. Re: [patch] Makefile, small (Cristian Ionescu-Idbohrn)
6. Re: bb-1.13 modutils-24.c (Harald K?the)
----------------------------------------------------------------------
Message: 1
Date: Tue, 27 Jan 2009 06:28:50 -0800
From: "David N. Lombard" <[email protected]>
Subject: Re: bb-1.13 modutils-24.c
To: Harald K?the <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1
On Mon, Jan 26, 2009 at 01:16:17PM -0800, Harald K?the wrote:
> Hello,
>
> this patch below hasn't made it to the source yet.
> Without it insmod causes memory corruption of the sec->contents vector
> as reported in nov 08.
>
> >*** glibc detected *** malloc(): memory corruption (fast): 0x10067fc0
> ***
> >Aborted
>
> >insmod: init_module: dbox2_fp: Device or resource
> busy
> >insmod: cannot insert '/lib/modules/2.4.36.6-dbox2/misc/dbox2_fp.o':
> Operation not permitted
>
>
> diff -ur busybox-1.13.2.orig/modutils/modutils-24.c
> busybox-1.13.2/modutils/modutils-24.c
> --- busybox-1.13.2.orig/modutils/modutils-24.c 2008-11-29
> 07:48:56.000000000 +0100
> +++ busybox-1.13.2/modutils/modutils-24.c 2009-01-26
> 21:34:41.000000000 +0100
> @@ -997,8 +997,9 @@
>
> case R_68K_PC8:
> v -= dot;
> - if ((ElfW(Sword))v > 0x7f ||
> - (ElfW(Sword))v < -(ElfW(Sword))0x80) {
> + if ((ElfW(Sword))v > 0x7f
> + || (ElfW(Sword))v < -(ElfW(Sword))0x80
> + ) {
There's a lot of gratuitous reformatting througout this patch!
--
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.
------------------------------
Message: 2
Date: Tue, 27 Jan 2009 11:29:06 -0400
From: Amandeep Bhullar <[email protected]>
Subject: Help with Busybox on ARM board
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello All,
I am running busybox on an Atmel AT91SAM9263 Evaluation kit. Perhaps
because it is minimum version, I can not execute executable files. And
also, I installed arm-linux-g++-4.1 on it and when I run this command it
says it could not be found even though typing arm and pushing tab does
bring up the command indicating the command is in the PATH. Anyways, I
decided to put a more fuller configuration of Busybox on the kit. These
are the steps I am following.
1. I am using Ubuntu in a VMplayer on a Pentium machine. I downloaded
Busybox file "busybox-1.13.2.tar" on the VMPlayer running Ubuntu.
2. tar xvf busybox-1.13.2.tar
3. cd busybox-1.13.2
4. Because I want to run Busybox on an ARM based board, i changed
.config file this this folder. I changed
CONFIG_CROSS_COMPILER_PREFIX="arm-linux-". I have arm-linux-gcc installed.
5. Next I run "make defconfig" and "make" command.
I am not sure what to do next. After make command; I see two files in
the folder : busybox and busybox-unstripped. When I give command "file
busybox" it tells me it is an ELF 32 bit LSB executable, Intel 80386.
Should not it show it as ARM file because i changed the CROSS_COMPILE
option?
Please tell me what to do next ! Every help will be deeply appreciated.
Aman.
------------------------------
Message: 3
Date: Tue, 27 Jan 2009 17:08:07 +0100
From: walter harms <[email protected]>
Subject: Re: Help with Busybox on ARM board
To: Amandeep Bhullar <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Amandeep Bhullar schrieb:
> Hello All,
>
> I am running busybox on an Atmel AT91SAM9263 Evaluation kit. Perhaps
> because it is minimum version, I can not execute executable files. And
> also, I installed arm-linux-g++-4.1 on it and when I run this command it
> says it could not be found even though typing arm and pushing tab does
> bring up the command indicating the command is in the PATH. Anyways, I
> decided to put a more fuller configuration of Busybox on the kit. These
> are the steps I am following.
>
> 1. I am using Ubuntu in a VMplayer on a Pentium machine. I downloaded
> Busybox file "busybox-1.13.2.tar" on the VMPlayer running Ubuntu.
> 2. tar xvf busybox-1.13.2.tar
> 3. cd busybox-1.13.2
> 4. Because I want to run Busybox on an ARM based board, i changed
> .config file this this folder. I changed
> CONFIG_CROSS_COMPILER_PREFIX="arm-linux-". I have arm-linux-gcc installed.
> 5. Next I run "make defconfig" and "make" command.
>
> I am not sure what to do next. After make command; I see two files in
> the folder : busybox and busybox-unstripped. When I give command "file
> busybox" it tells me it is an ELF 32 bit LSB executable, Intel 80386.
> Should not it show it as ARM file because i changed the CROSS_COMPILE
> option?
>
> Please tell me what to do next ! Every help will be deeply appreciated.
>
> Aman.
Hi Aman,
1. please read the documentation more corefully
if you are a developer make yourself comfortable with make,gcc,gdb and friends
there is no need to change .config
use "make menuconfig" to select the settings and programms you need.
"make defconfig" is a first step but you should check for yourself.
after you ran make you will find busybox and busybox-unstripped.
use file to learn
file busybox
busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically
linked (uses shared libs), stripped
file busybox_unstripped
busybox_unstripped: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), not stripped
unstripped means it will contain debuginformation that will be helpful when
using gdb (man gdb)
to run an applet use
./busybox ls
of cause this i only for testing, you will use the install script to setup a
list of links
so you can programms as on every other unix environment.
to make things more easy for you start with you host system (most likely i586)
and try
to understand the busybox. AND then move to a cross compile environment. The
point of using
linux is that you can ran the same environment (here busybox) on your desktop
computer AND
you embedded system.
here you can buy the kit with full linux support:
http://www.emlix.com/bsp-at91sam9263-eval-base.html
re,
wh
ps:
i am not replated to emlix
------------------------------
Message: 4
Date: Tue, 27 Jan 2009 18:02:09 +0100
From: Bernhard Reutner-Fischer <[email protected]>
Subject: Re: fbsplash - text rendering
To: Michele Sanges <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
On Mon, Jan 12, 2009 at 09:30:19PM +0100, Michele Sanges wrote:
> This patch for the fbsplash applet, adds the ability to render text
> messages on top of the displayed image.
>
> The sintax for the new option is the following:
> echo write:this is the message to print > fbfifo
>
> By means of the fbsplash.cfg file it's also possible to specify the
> position, the color and the size of the text displayed.
>
> I also attach a font map file, to use with the -m option if you don't
> want to compile the applet with the hardcoded fonts.
>
> Oh yes, the patch is the same I have sent three or four times last year
> :-) I hope to be more lucky.
You forgot to mention size(1) figures and/or scripts/bloat-o-meter output
for your patch.
While looking over the current fbsplash, i came up with the attached
patch to shrink it (untested):
$ ./scripts/bloat-o-meter _bb_un.oorig busybox_unstripped
function old new delta
fbsplash_main 595 985 +390
fb_drawimage 493 - -493
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 390/-493) Total: -103 bytes
$ size miscutils/fbsplash.o*
text data bss dec hex filename
2019 0 0 2019 7e3 miscutils/fbsplash.o.oorig
1857 0 0 1857 741 miscutils/fbsplash.o.new
Can you please have a look at the patch and perhaps test it?
See below for some comments on your patch..
>diff -urP busybox-1.13.2_originale/include/usage.h
>busybox-1.13.2_fbsplash/include/usage.h
>--- busybox-1.13.2_originale/include/usage.h 2008-11-09 18:28:17.000000000
>+0100
>+++ busybox-1.13.2_fbsplash/include/usage.h 2009-01-12 16:29:40.000000000
>+0100
>@@ -128,7 +128,7 @@
> "bar"
>
> #define fbsplash_trivial_usage \
>- "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
>+ "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD] [-m FONTMAPFILE]"
> #define fbsplash_full_usage "\n\n" \
> "Options:\n" \
> "\n -s Image" \
>@@ -137,8 +137,10 @@
> "\n -i Config file (var=value):" \
> "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \
> "\n BAR_R,BAR_G,BAR_B" \
>+ "\n
>TEXT_LEFT,TEXT_TOP,TEXT_R,TEXT_G,TEXT_B,TEXT_SIZE" \
> "\n -f Control pipe (else exit after drawing image)" \
>- "\n commands: 'NN' (% for progress bar) or 'exit'" \
>+ "\n -m Font map file" \
>+ "\n commands: 'NN' (% for progress bar),
>'write:string to print' or 'exit'"
>
> #define brctl_trivial_usage \
Somebody goofed with the alphabetical ordering in usage.h, it seems.
Can you please have a look if fbsplash's helptext is really in the
correct place here?
>diff -urP busybox-1.13.2_originale/miscutils/Config.in
>busybox-1.13.2_fbsplash/miscutils/Config.in
>--- busybox-1.13.2_originale/miscutils/Config.in 2008-11-09
>18:28:17.000000000 +0100
>+++ busybox-1.13.2_fbsplash/miscutils/Config.in 2009-01-12
>16:32:17.000000000 +0100
>@@ -238,6 +238,34 @@
> "NN" (ASCII decimal number) - percentage to show on progress bar
> "exit" - well you guessed it
>
>+config FBSPLASH_TEXT_RENDERING
>+ bool "text rendering"
>+ default n
>+ depends on FBSPLASH
>+ help
>+ This option adds the ability to print text messages on the
>+ image displayed by the fbsplash applet.
>+ - command for fifo:
>+ "write:string to print" - print the string after the word "write:"
>+
>+choice
>+ prompt "Choose the font map"
>+ depends on FBSPLASH_TEXT_RENDERING
>+ default FONTMAP_HARDCODED
>+
>+config FONTMAP_HARDCODED
there is FBSPLASH missing in that symbol name. Better use
config FBSPLASH_FONTMAP_HARDCODED
>+ bool "hardcoded"
>+ help
>+ The font map is hard-coded to use the default font map.
>+ Adds about 1.6Kb.
>+
>+config FONTMAP_DYNAMICALLY_LOADED
same here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fbsplash-shrink-it-a-little-bit.00.patch
Type: text/x-diff
Size: 2637 bytes
Desc: not available
Url :
http://lists.busybox.net/pipermail/busybox/attachments/20090127/b6af22a8/attachment-0001.bin
------------------------------
Message: 5
Date: Tue, 27 Jan 2009 19:44:46 +0100 (CET)
From: Cristian Ionescu-Idbohrn <[email protected]>
Subject: Re: [patch] Makefile, small
To: [email protected]
Message-ID: <0901271922090.9...@somehost>
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 26 Jan 2009, Rob Landley wrote:
> On Saturday 24 January 2009 08:06:02 Cristian Ionescu-Idbohrn wrote:
> > Emacs does not grok quotes in makefile subs very well, and screws up
> > colorized code :(
> > Similar to the CONFIG_EXTRA_CFLAGS, please accept this patch:
> >
> > --- busybox/Makefile (revision 23984)
> > +++ busybox/Makefile (working copy)
> > @@ -168,6 +168,7 @@
> > CROSS_COMPILE := $(shell grep ^CONFIG_CROSS_COMPILER_PREFIX .config
> > 2>/dev/null) CROSS_COMPILE := $(subst
> > CONFIG_CROSS_COMPILER_PREFIX=,,$(CROSS_COMPILE)) CROSS_COMPILE := $(subst
> > ",,$(CROSS_COMPILE))
> > +#")
> > endif
>
> Do we really want to pollute the code with unexplained workarounds for
> purely cosmetic bugs in a text editor many of us don't use?
Many of _who_?
Did you have a bad day?
Shall we start another flame war and/or text editor investigation?
There's at least one "polluting" "unexplained workaround" already:
Makefile.flags:87:ifneq ($(CONFIG_EXTRA_CFLAGS),)
Makefile.flags:88:CFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_CFLAGS)))
Makefile.flags:89:#"))
Makefile.flags:90:endif
It's not important.
> Did you at least poke the emacs guys and ask them to fix their obvious
> bug?
It used to be worth.
> (Parsing complexity aside, I don't believe quotes span multiple lines in
> make, so the highlighting should have stopped at the end of line
> anyway.)
I actually found one :) Makefile, lines 1194-1201:
define cmd_tags
rm -f $@; \
CTAGSF=`ctags --version | grep -i exuberant >/dev/null && \
echo "-I __initdata,__exitdata,__acquires,__releases \
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
--extra=+f --c-kinds=+px"`; \
$(all-sources) | xargs ctags $$CTAGSF -a
endef
Let's just forget about all that.
Cheers,
--
Cristian
------------------------------
Message: 6
Date: Tue, 27 Jan 2009 23:06:48 +0100
From: Harald K?the <[email protected]>
Subject: Re: bb-1.13 modutils-24.c
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> There's a lot of gratuitous reformatting througout this patch!
Yes I know, that was in the patch I received by Denys if I remember correct.
I cleaned it up, this still works for me:
diff -ur busybox-1.13.2.orig/modutils/modutils-24.c
busybox-1.13.2/modutils/modutils-24.c
--- busybox-1.13.2.orig/modutils/modutils-24.c 2008-11-29
07:48:56.000000000 +0100
+++ busybox-1.13.2/modutils/modutils-24.c 2009-01-26
21:34:41.000000000 +0100
@@ -2150,7 +2154,7 @@
sec->name = name;
sec->idx = newidx;
if (size)
- sec->contents = xmalloc(size);
+ sec->contents = xzalloc(size);
obj_insert_section_load_order(f, sec);
@@ -2165,7 +2169,7 @@
int newidx = f->header.e_shnum++;
struct obj_section *sec;
- f->sections = xrealloc(f->sections, (newidx + 1) * sizeof(sec));
+ f->sections = xrealloc_vector(f->sections, 2, newidx);
f->sections[newidx] = sec = arch_new_section();
sec->header.sh_type = SHT_PROGBITS;
@@ -2175,7 +2179,7 @@
sec->name = name;
sec->idx = newidx;
if (size)
- sec->contents = xmalloc(size);
+ sec->contents = xzalloc(size);
sec->load_next = f->load_order;
f->load_order = sec;
@@ -2571,8 +2575,7 @@
/* Collect the modules' symbols. */
if (nmod) {
- ext_modules = modules = xmalloc(nmod * sizeof(*modules));
- memset(modules, 0, nmod * sizeof(*modules));
+ ext_modules = modules = xzalloc(nmod * sizeof(*modules));
for (i = 0, mn = module_names, m = modules;
i < nmod; ++i, ++m, mn += strlen(mn) + 1) {
struct new_module_info info;
@@ -2652,13 +2655,14 @@
}
-static void new_create_this_module(struct obj_file *f, const char *m_name)
+static void new_create_this_module(struct obj_file *f, const char *m_name)
{
struct obj_section *sec;
sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,
sizeof(struct new_module));
- memset(sec->contents, 0, sizeof(struct new_module));
+ /* done by obj_create_alloced_section_first: */
+ /*memset(sec->contents, 0, sizeof(struct new_module));*/
obj_add_symbol(f, SPFX "__this_module", -1,
ELF_ST_INFO(STB_LOCAL, STT_OBJECT), sec->idx, 0,
@@ -2965,9 +2973,9 @@
if (i == f->header.e_shnum) {
struct obj_section *sec;
+ f->header.e_shnum++;
f->sections = xrealloc_vector(f->sections, 2, i);
f->sections[i] = sec = arch_new_section();
- f->header.e_shnum = i + 1;
sec->header.sh_type = SHT_PROGBITS;
sec->header.sh_flags = SHF_WRITE | SHF_ALLOC;
@@ -3006,12 +3014,9 @@
for (i = 0; i < f->header.e_shnum; ++i) {
struct obj_section *s = f->sections[i];
if (s->header.sh_type == SHT_NOBITS) {
+ s->contents = NULL;
if (s->header.sh_size != 0)
- s->contents = memset(xmalloc(s->header.sh_size),
- 0, s->header.sh_size);
- else
- s->contents = NULL;
-
+ s->contents = xzalloc(s->header.sh_size),
s->header.sh_type = SHT_PROGBITS;
}
}
@@ -3275,14 +3281,13 @@
case SHT_SYMTAB:
case SHT_STRTAB:
case SHT_RELM:
+ sec->contents = NULL;
if (sec->header.sh_size > 0) {
- sec->contents = xmalloc(sec->header.sh_size);
+ sec->contents = xzalloc(sec->header.sh_size);
fseek(fp, sec->header.sh_offset, SEEK_SET);
if (fread(sec->contents, sec->header.sh_size, 1,
fp) != 1) {
bb_perror_msg_and_die("error reading ELF
section data");
}
- } else {
- sec->contents = NULL;
}
break;
------------------------------
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox
End of busybox Digest, Vol 42, Issue 37
***************************************
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox