Re: [uClinux-dev] out-of-date libgmp / building for M5208

2015-12-09 Thread David McCullough

Andrew Cagney wrote the following:
> On 8 December 2015 at 07:03, Greg Ungerer <g...@uclinux.org> wrote:
> > Hi Andrew,
> >
> > On 08/12/15 04:23, Andrew Cagney wrote:
> >>
> >> The libgmp bundled with uClinux, by default, doesn't build for the
> >> M5208 - the m68k assembler uses instructions dropped from early
> >> Coldfires.
> >> The hack I'm using locally is to configure with --host=none (I got
> >> this trick second hand from somewhere).
> >>
> >> Anyway I noticed that libgmp is, er, a little out-of-date.  The latest
> >> version has --disable-assembly which looks to be a cleaner way to
> >> handle the assembler problem.
> >> (How to decide when to configure with that option is an open question,
> >> a Kconfig option).
> >>
> >> As anyone looked at updating this; or to turn the question round, is
> >> there anything needed in the existing version that would prevent this?
> >
> >
> > Nothing stopping updating as far as I know.
> >
> > Can I suggest that if you do decide to update it that you convert
> > it to automake building.
> 
> Yes, that's the plan.  I've noticed that the framework's improved
> significantly over the years and I've been able to drop some of my
> local hacks.
> 
> > The trend over the last couple of years
> > is that if we are updating a package then convert it. There
> > are quite a few examples to follow in the lib directory. Just
> > look for directories that contain a "makefile" and optionally a
> > patches directory and not much else.
> 
> Any pointers for how to handle --disable-assembly configure option?
> For instance, since libreswan requires libgmp, it would have:
>select LIB_LIBGMP
> but libreswan doesn't know if --disable-assembly is required, that
> would be set by a vendor/platform files?

Yep,  make that part of the libgmp setup.  If you switch to automake you
can add that option to a Kconfig in the libgmp directory,  again,  there
are quite a few examples in the tree.  some have their own Kconfig files:

grep -l automake lib/*/makefile user/*/makefile

ls lib/*/Kconfig user/*/Kconfig

to find them all.

Cheers,
Davidm

-- 
David McCullough,  dav...@spottygum.com,   Ph: 0410 560 763
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] elf2flt error with ARM Cortex-R4 toolchain

2012-07-23 Thread David McCullough

Jivin Pankaj DEV lays it down ...
 Hey,
 
 I downloaded latest sources for elf2flt from 
 http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/elf2flt/
 But they are exactly the same as from blackfin.
 
 but there are working ARM toolchains out there with elf2flt included
 Could you provide me any link/pointer for any ARM-CortexR4  toolchain with 
 elf2flt included ?

Codesourcery traditionally did this quite well.  They have since been bought
by Mentor and I have no experience with them myself:


http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

Maybe do some googling ;-)

Cheers,
Davidm

 -Original Message-
 From: David McCullough [mailto:david_mccullo...@mcafee.com] 
 Sent: Friday, July 20, 2012 10:23 AM
 To: Pankaj DEV
 Cc: uclinux-dev@uclinux.org
 Subject: Re: elf2flt error with ARM Cortex-R4 toolchain
 
 
 Jivin Pankaj DEV lays it down ...
  Hello,
  
  I am using ARM-Versatile Cortex-R4 platform and I have toolchain build with 
  following components? versions :
  
  1.   GNU GCC : 4.6.3 20120301
  2.   GNU Binutils - 2.20.51.20100809
  3.   uClibc-nptl-0.9.33-66
  
  To build the user application binary (FLAT), I downloaded the 
  following(latest) version of ELF2FLT package from 
  http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=summary
  
  2011-04-04
  
  David McCullough 
  http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=search;
  s=David+McCullough;st=author
  
  The GNU linker uses -v as a shortcut to --version,... 
  http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=commit;
  h=40f0d175e0847d922faa85cc18ec01f2129bb2b9
 
 
 My only question is why you are using the blackfin version of elf2flt for an 
 ARM system ?  It may be fine,  I don't really know,  but its primary purpose 
 would be blackfind support I suspect ;-)
 
 I haven't played with elf2flt for a long time,  but there are working ARM 
 toolchains out there with elf2flt included.  Build your ARM tool chain, then 
 try this version of elf2flt:
 
   http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/elf2flt/
 
 Otherwise,  hopefully someone on the list is currently using something and 
 can help you,
 
 Cheers,
 Davidm
 
 
 
 
  I was able to build the package properly and install it in my existing 
  (above) toolchain, but now when I try to build a simple (hello) C user 
  program using ?Wl,-elf2flt options, I am getting following errors :
  
  a.   
  /root/distro-armv7r/STLinux-2.4/devkit/armv7r_uclibc/arm-cortex-linux-uclibcgnueabi/bin/ld.real:
   section .junk loaded at [,001f] overlaps section .text loaded 
  at [,011f]
  
  b.  
  /root/distro-armv7r/STLinux-2.4/devkit/armv7r_uclibc/arm-cortex-linux-uclibcgnueabi/bin/ld.real:
   BFD (GNU Binutils - STMicroelectronics/Linux Base) 2.20.51.20100809 
  assertion fail ../../bfd/elf32-arm.c:13377
  
   
  
  Any Idea ? 
  
   
  
  My doubt : 
  
  Is ELF2FLT package compatible with the above mentioned versions of 
  GCC/Binutils/uClibc for ARM-R4 used ? 
  
  If anybody has tried to build a toolchain for ARM with this ELF2FLT 
  package, can u help us with the versions of GCC/Binutils/uClibc ? 
  
  Or may be if anyone knows any working ARM-CortexR4 working toolchain 
  containing ELF2FLT ?
  
   
  
  Regards
  
  Pankaj Dev
  
  
 
 -- 
 David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
 McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] elf2flt error with ARM Cortex-R4 toolchain

2012-07-19 Thread David McCullough

Jivin Pankaj DEV lays it down ...
 Hello,
 
 I am using ARM-Versatile Cortex-R4 platform and I have toolchain build with 
 following components? versions :
 
 1.   GNU GCC : 4.6.3 20120301
 2.   GNU Binutils - 2.20.51.20100809
 3.   uClibc-nptl-0.9.33-66
 
 To build the user application binary (FLAT), I downloaded the 
 following(latest) version of ELF2FLT package from 
 http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=summary 
 
 2011-04-04
 
   David McCullough 
 http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=search;s=David+McCullough;st=author
  
 
   The GNU linker uses -v as a shortcut to --version,... 
 http://blackfin.uclinux.org/git/?p=users/vapier/elf2flt.git;a=commit;h=40f0d175e0847d922faa85cc18ec01f2129bb2b9
  


My only question is why you are using the blackfin version of elf2flt for
an ARM system ?  It may be fine,  I don't really know,  but its primary
purpose would be blackfind support I suspect ;-)

I haven't played with elf2flt for a long time,  but there are working ARM
toolchains out there with elf2flt included.  Build your ARM tool chain, then
try this version of elf2flt:

http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/elf2flt/

Otherwise,  hopefully someone on the list is currently using something and
can help you,

Cheers,
Davidm




 I was able to build the package properly and install it in my existing 
 (above) toolchain, but now when I try to build a simple (hello) C user 
 program using ?Wl,-elf2flt options, I am getting following errors :
 
 a.   
 /root/distro-armv7r/STLinux-2.4/devkit/armv7r_uclibc/arm-cortex-linux-uclibcgnueabi/bin/ld.real:
  section .junk loaded at [,001f] overlaps section .text loaded at 
 [,011f]
 
 b.  
 /root/distro-armv7r/STLinux-2.4/devkit/armv7r_uclibc/arm-cortex-linux-uclibcgnueabi/bin/ld.real:
  BFD (GNU Binutils - STMicroelectronics/Linux Base) 2.20.51.20100809 
 assertion fail ../../bfd/elf32-arm.c:13377
 
  
 
 Any Idea ? 
 
  
 
 My doubt : 
 
 Is ELF2FLT package compatible with the above mentioned versions of 
 GCC/Binutils/uClibc for ARM-R4 used ? 
 
 If anybody has tried to build a toolchain for ARM with this ELF2FLT package, 
 can u help us with the versions of GCC/Binutils/uClibc ? 
 
 Or may be if anyone knows any working ARM-CortexR4 working toolchain 
 containing ELF2FLT ?
 
  
 
 Regards
 
 Pankaj Dev
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] something is wrong

2012-04-26 Thread David McCullough

Jivin Stuart Small lays it down ...
 The list used to be a lot more active.  Hopefully its renewed interest in the 
 project.

The list servers have been broken for a while on and off,  thus the lack of
traffic.

Thanks to Michael Durrant at Arcturus we have things back working again :-)
So expect more traffic now things are back working,

Cheers,
Davidm

 
 
 2012/4/26 Juan Pablo C?rdova Echeverr?a jpcordo...@gmail.com
 
 
   Same here.
 
 JP
 
   El abr 26, 2012 4:09 p.m., Martin Mensch martin.men...@gmx.de 
 escribi?:
   
 
   Hi, something seems to be wrong with this list.
   I am subscribed for months now an didn't get anything except a 
 monthly (?) password reminder. I guess I set this behaviour in my profile. 
 But now I seem to get everything.
   Did you change something lately?

   Martin

 
   ___
   uClinux-dev mailing list
   uClinux-dev@uclinux.org
   http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
   This message was resent by uclinux-dev@uclinux.org
   To unsubscribe see:
   http://mailman.uclinux.org/mailman/options/uclinux-dev
   
 
 
   ___
   uClinux-dev mailing list
   uClinux-dev@uclinux.org
   http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
   This message was resent by uclinux-dev@uclinux.org
   To unsubscribe see:
   http://mailman.uclinux.org/mailman/options/uclinux-dev
   
 
 
 

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev


-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt: do not alias -v to --verbose

2011-04-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The GNU linker uses -v as a shortcut to --version, not --verbose.  So atm,
 if you run `ld -v` to get the linker version, ld-elf2flt throws out a lot
 of verbose debugging information.  So drop the -v checking in ld-elf2flt
 to keep from breaking systems that parse the linker version.

Applied,

Thanks,
Davidm

 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  ld-elf2flt.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/ld-elf2flt.c b/ld-elf2flt.c
 index 6b8853e..b8b02fd 100644
 --- a/ld-elf2flt.c
 +++ b/ld-elf2flt.c
 @@ -453,7 +453,7 @@ static void parse_args(int argc, char **argv)
   } else if (streq(arg, -r) || streq(arg, -Ur)) {
   flag_final = 0;
   append_option(other_options, arg);
 - } else if (streq(arg, -v) || streq(arg, --verbose)) {
 + } else if (streq(arg, --verbose)) {
   flag_verbose = 1;
   append_option(other_options, arg);
   } else if (streqn(arg, -m)) {
 -- 
 1.7.4.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Shared libraries + CVS

2011-03-31 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Thu, Mar 31, 2011 at 7:33 PM, Paul McGougan wrote:
  And finally, uclinux.org CVS seems way out-of-date compared to the latest
  uClinux-dist releases, has the public source control gone away altogether,
  or just moved elsewhere?
 
 the public cvs has never really been a public cvs.  more like when a
 new tarball is released, the contents were checked into cvs.  it's a
 sham !

Thats right,  it was never a public CVS for contributions,  it was meant
as a way to reduce peoples downloads by only getting what had changed.
It also hasn't been updates for a long time and could be turned off IMO,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Shared libraries + CVS

2011-03-31 Thread David McCullough

Jivin Paul McGougan lays it down ...
 On 1/04/2011 9:33 AM, Paul McGougan wrote: 
 
   I tracked the issue back to a change that's been made to uClibc between 
 version 0.9.26 and 0.9.27 (so this problem would appear to affect every 
 uClinux-dist since 2005?), where part of the makefile rules for building 
 shared library code appears to have been removed, namely code including this 
 from uClibc/Makefile:
 
 So after some more checking I found that even though that makefile code was 
 removed in the 0.9.27 branch of uClibc, I checked a later uClinux-dist 
 (20070130) that includes uClibc 0.9.27 and the makefile rules appear in the 
 uClinux-dist version of uClibc.
 
 So I guess the uClinux-dist guys added these rules back in themselves for the 
 uClinux-dist version of uClibc?
 
 And if so, was this stopped in later uClinux-dist releases for a reason, or 
 just by oversight?

It would have been lost as part of a merge of a newer uClibc,  this stuff
always seemed to be a moving target and caused pain during merges.  My
guess,  it got lost by accident and no one picked up on it as it wasn't
being used.

Should be easy enoug to graft in what you had working/have found to get it
back working again.

Someone else would have to confirm because I haven't even looked sideways at
this stuff forever,  but I think shared lib support is/was broken in 2.6 ?
Might be why it's gone unnoticed ?  

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Changing e-mail

2011-03-28 Thread David McCullough

Jivin Simon V Chamlian lays it down ...
 
 Hi,
  
 Is there a way to change my e-mail address?

You can try here:

https://mailman.uclinux.org/mailman/listinfo/uclinux-dev

or just unsubscribe and resubscribe ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] elf2flt patch on mingw

2011-02-15 Thread David McCullough

Jivin Stanislav Meduna lays it down ...
 Hi,
 
 the attached patch is needed for the recent elf2flt
 on MinGW builds. The stat() cannot cope with directories
 ending with the directory separator.

Applied,

Thanks,
Davidm

 diff -uNr elf2flt-orig/ld-elf2flt.c elf2flt/ld-elf2flt.c
 --- elf2flt-orig/ld-elf2flt.c 2010-08-17 06:25:26 +0200
 +++ elf2flt/ld-elf2flt.c  2011-01-14 16:25:17 +0100
 @@ -506,13 +507,15 @@
  Make bindir point to the bin dir for bin/TARGET_ALIAS-foo.
  Make tooldir point to the bin dir for TARGET_ALIAS/bin/foo.  */
   if (streqn(elf2flt_progname, TARGET_ALIAS)) {
 - tmp = concat(argv0_dir, ../ TARGET_ALIAS /bin/, NULL);
 - if (stat(tmp, buf) == 0  S_ISDIR(buf.st_mode))
 - tooldir = tmp;
 + tmp = concat(argv0_dir, ../ TARGET_ALIAS /bin, NULL);
 + if (stat(tmp, buf) == 0  S_ISDIR(buf.st_mode)) {
 + tooldir = concat(tmp, /, NULL);
 + }
   } else {
 - tmp = concat(argv0_dir, ../../bin/, NULL);
 - if (stat(tmp, buf) == 0  S_ISDIR(buf.st_mode))
 - bindir = tmp;
 + tmp = concat(argv0_dir, ../../bin, NULL);
 + if (stat(tmp, buf) == 0  S_ISDIR(buf.st_mode)) {
 + bindir = concat(tmp, /, NULL);
 + }
   }
  
   /* Typically ld-elf2flt is invoked as `ld` which means error

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev


-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt.ld: give .note.ABI-tag its own output section

2010-12-16 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Wednesday, December 15, 2010 20:40:14 David McCullough wrote:
  I thought that if it's not needed in the flat file,  perhaps you should
  have put it lower in the ld script like the .debug sections etc,  that way
  it will not get pushed into the text/data of the flat executable but should
  still be in the elf file for debugging etc ?
 
 i tried that originally, but kept getting linker errors.  i think it's 
 because 
 the section has the alloc (A) flag on it since on ELF systems, it does get 
 loaded and possibly checked at runtime.  to get the FLAT file to discard it, 
 i 

Ok.

 think we'd have to be a little more tricky ?  perhaps create a new program 
 header named discard and have the elf2flt utility always ignore the last 
 program header ?


If you are happy with it where it is then I won't complain ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt.ld: give .note.ABI-tag its own output section

2010-12-16 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 On Thursday, December 16, 2010 16:56:56 David McCullough wrote:
   On Wednesday, December 15, 2010 20:40:14 David McCullough wrote:
I thought that if it's not needed in the flat file,  perhaps you should
have put it lower in the ld script like the .debug sections etc,  that
way it will not get pushed into the text/data of the flat executable
but should still be in the elf file for debugging etc ?
   
   i tried that originally, but kept getting linker errors.  i think it's
   because the section has the alloc (A) flag on it since on ELF systems,
   it does get loaded and possibly checked at runtime.  to get the FLAT
   file to discard it, i
  
  Ok.
  
   think we'd have to be a little more tricky ?  perhaps create a new
   program header named discard and have the elf2flt utility always
   ignore the last program header ?
  
  If you are happy with it where it is then I won't complain ;-)
 
 i would love to get it discarded from the FLAT file, but i cant think of any 
 simple answers.  if you have better ideas, we can take a look ...

Pretty sure you tried this one:


Index: elf2flt.ld.in
===
RCS file: /var/cvs/elf2flt/elf2flt.ld.in,v
retrieving revision 1.5
diff -u -1 -r1.5 elf2flt.ld.in
--- elf2flt.ld.in   16 Dec 2010 01:37:41 -  1.5
+++ elf2flt.ld.in   16 Dec 2010 23:52:42 -
@@ -138,3 +138,2 @@
 
-   .note.ABI-tag : { *(.note.ABI-tag) }  flatmem
.eh_frame_hdr : { *(.eh_frame_hdr) }  flatmem
@@ -209,2 +208,3 @@
.debug_varnames  0 : { *(.debug_varnames) }
+   .note.ABI-tag 0 : { *(.note.ABI-tag) }
 }


Another option may be to leave it out,  then add a .note.ABI-tag using
objcopy as part of the ld-elf2flt processing.  Bit of a hack I know,  but
gets it out of the flatfile,  also gives you control over what goes into the
.note.ABI-tag in terms of kernel versions etc.

Actually,  that probably won't work as you said linker errors.  How about
using a copy of the XYZ.elf file in ld-elf2flt that has the .note.ABI-tag
removed ?

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt.ld: give .note.ABI-tag its own output section

2010-12-15 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The .note.ABI-tag section exists to indicate to other projects (like gdb
 or library loaders) information about the target OS.  It doesn't actually
 contain anything that is used at runtime.  So while the current linker
 script gathers this into the .data section, the final FLAT doesn't include
 anything from it.  But tools expect to find a dedicated section in ELFs
 which the current section merge prevents.
 
 So give .note.ABI-tag its own output section so gdb can locate and use it.
 This shouldn't change the FLAT files produced in any way.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  elf2flt.ld.in |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/elf2flt.ld.in b/elf2flt.ld.in
 index 6871ae9..c7e01a6 100644
 --- a/elf2flt.ld.in
 +++ b/elf2flt.ld.in
 @@ -81,7 +81,6 @@ R_RODAT *(.gnu.linkonce.r*)
   *(__libc_atexit)
   *(__libc_subinit)
   *(__libc_subfreeres)
 - *(.note.ABI-tag)
  
   /* microblaze-specific read-only small data area
  and associated locating symbols */
 @@ -137,6 +136,7 @@ TOR:  @symbol_pre...@__dtor_end__ = .;
   PROVIDE (@symbol_pre...@__fini_array_end = .);
   }  flatmem :data
  
 + .note.ABI-tag : { *(.note.ABI-tag) }  flatmem
   .eh_frame_hdr : { *(.eh_frame_hdr) }  flatmem
   .eh_frame : { KEEP(*(.eh_frame)) }  flatmem
   .gcc_except_table : {

Applied.

I thought that if it's not needed in the flat file,  perhaps you should
have put it lower in the ld script like the .debug sections etc,  that way
it will not get pushed into the text/data of the flat executable but should
still be in the elf file for debugging etc ?

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Get RT73 driver to work on 2.4 or try to move to 2.6? ARM7 from Nuvoton

2010-10-20 Thread David McCullough

Jivin Philippe De Muyter lays it down ...
 On Wed, Oct 20, 2010 at 11:53:58AM +0200, Sima Baymani wrote:
  Hi David (and everyone else)!
  
  Just to make sure I understand, I have some questions to clarify to myself
  how it works and what my options are.
  
  - the RT73 is a Ralink wifi-unit. According to Ralink, it should work on
  Linux 2.4 and 2.6. Does that (generally) mean that Linux 2.4 and 2.6 have
  those vendor patches/fixes but uClinux does not?
 
 That could also mean that ralink provides drivers on a CD or on its website
 that you must compile for your kernel.

Which is almost certainly the case here,  at least in my experience
with the rt73 driver :-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Get RT73 driver to work on 2.4 or try to move to 2.6? ARM7 from Nuvoton

2010-10-20 Thread David McCullough
.
   
   Seems like the USB support in the kernel may be missing some vendor 
 patches
   or fixes that would allow it to see the device you have plugged in.
   
 
   
I have also downloaded usbutils (and libusb which seemed to be 
 needed?) but not yet tried to compile it into my kernel. I tried to figure 
 out which version to use for 2.4, but did not find any specifics, so I'm 
 starting with the latest. Any advice on that?
   
   
   
   No,  not sure you need it,  the proc entry is probably enough for now.
   
   Cheers,
   Davidm
   
 
 
 
   
Thanks for the help so far,
Sima
   
On Fri, Oct 15, 2010 at 7:49 AM, David McCullough 
 david_mccullo...@mcafee.com wrote:
   
   
   
  Jivin Sima Baymani lays it down ...
   David, thanks a lot for your input.
  
  
   On Thu, Oct 14, 2010 at 6:28 AM, David McCullough 
 david_mccullo...@mcafee.com wrote:
  
  
  
 Jivin Sima Baymani lays it down ...
  
  Hi all,
  I've been lurking a bit on this list since I got a 
 uClinux project in my lap this summer. I've fiddled a bit with Linux, but 
 this is my first uClinux project and I've not worked this deep with linux 
 drivers before even though I'm familiar with working low level.
  And now to the question! I know this is ancient 2.4, 
 but this is what I have to work with. I don't expect answers but am grateful 
 for any advice or thoughts you might have.
 
  Platform: ARM7 from Nuvoton, more precisely called 
 NUC745.
  uClinux version: 2.4.20
  The product is a webcam with ethernet and wifi, a 
 clone of one of the FOSCAM cameras, produced by Apexis. I need to do a lot of 
 changes in the software and the programs on it. They will not share their 
 source code even though I _know_ they have used uClinux and other open source 
 software under GPL. I got the uClinux-source from a BSP somewhere else. The 
 BSP source runs fine with ethernet working. My problem is that I need wifi to 
 work as well. The driver I have is the RT73 driver from Ralink. Apexis use 
 the same driver but I don't know how much they had to change it to work.
 
  I have managed to add the driver to the kernel build 
 and it seems to be loaded (full logs at end of email):
  usb.c: registered new driver hub
  add a static ohci host controller device
  : USB OHCI at membase 0xfff05000, IRQ 15
  hc_alloc_ohci
  usb-ohci.c: AMD756 erratum 4 workaround
  hc_reset
  usb.c: new USB bus registered, assigned bus number 1
  Product: USB OHCI Root Hub
  SerialNumber: fff05000
  hub.c: USB hub found
  hub.c: 2 ports detected
  -RT73-7usb_rtusb_init-- //usb_rtusb_init is the 
 module_init function though this is a compiled in driver
  SIMA in da house!
  usb.c: registered new driver rt73
  
  
 This only tells you the driver was registered.  There 
 doesn't seem to be any
 device detected that matches the rt73 driver.
  
  
  
   I've had the same thoughts but had no idea how to debug, good 
 to know I was on the right track. The BSP does not have any lsusb program to 
 compile in, neither standalone nor in busybox. I will look into if I can get 
 lsusb in the build some other way.
  
   I'm not sure how to talk to the device otherwise, is it with 
 some kind of ioctl-call? I don't know anything about this, but it's what I 
 have stumbled over that makes some sense.
   What I'm thinking is that the manufacturer kick-starts the 
 device somehow by making some kind of HW-configuration - but I have no idea 
 where to start there. Would it be something like
   ioctl(DEV_ADDR, DEV_OPERATION)? What should I be looking for?
   
   
   
  Go looking under /proc/bus/usb
   
   
   
  SIMA - Registered RT73 driver!
  Usb device driver by ns24 zswan designed successfully!
  Initializing USB Mass Storage driver...
  usb.c: registered new driver usb-storage
  USB Mass Storage support registered.
 
  But when I get to the prompt neither ifconfig nor 
 iwconfig list any wireless interfaces. If I compare to the original boot log, 
 it looks like hub.c does a bit

Re: [uClinux-dev] Get RT73 driver to work on 2.4 or try to move to 2.6? ARM7 from Nuvoton

2010-10-19 Thread David McCullough
   

 I:  If#= 1 Alt= 4 #EPs= 1 Cls=0e(unk. ) Sub=02 Prot=00 Driver=(none)  

 E:  Ad=81(I) Atr=05(Isoc) MxPS= 600 Ivl=1ms   

 I:  If#= 1 Alt= 5 #EPs= 1 Cls=0e(unk. ) Sub=02 Prot=00 Driver=(none)  

 E:  Ad=81(I) Atr=05(Isoc) MxPS= 800 Ivl=1ms   

 I:  If#= 1 Alt= 6 #EPs= 1 Cls=0e(unk. ) Sub=02 Prot=00 Driver=(none)  

 E:  Ad=81(I) Atr=05(Isoc) MxPS= 956 Ivl=1ms  
 
 from what I can see, the wifi-device is not there (but the camera is...). The 
 wifi does not appear after some time either. Any thoughts on how to proceed?

Until the device ID shows up not much more will happen.

Seems like the USB support in the kernel may be missing some vendor patches
or fixes that would allow it to see the device you have plugged in.

 
 I have also downloaded usbutils (and libusb which seemed to be needed?) but 
 not yet tried to compile it into my kernel. I tried to figure out which 
 version to use for 2.4, but did not find any specifics, so I'm starting with 
 the latest. Any advice on that? 


No,  not sure you need it,  the proc entry is probably enough for now.

Cheers,
Davidm



 
 Thanks for the help so far,
 Sima
 
 On Fri, Oct 15, 2010 at 7:49 AM, David McCullough 
 david_mccullo...@mcafee.com wrote:
 
 
 
   Jivin Sima Baymani lays it down ...
David, thanks a lot for your input.
   
   
On Thu, Oct 14, 2010 at 6:28 AM, David McCullough 
 david_mccullo...@mcafee.com wrote:
   
   
   
  Jivin Sima Baymani lays it down ...
   
   Hi all,
   I've been lurking a bit on this list since I got a uClinux 
 project in my lap this summer. I've fiddled a bit with Linux, but this is my 
 first uClinux project and I've not worked this deep with linux drivers before 
 even though I'm familiar with working low level.
   And now to the question! I know this is ancient 2.4, but this 
 is what I have to work with. I don't expect answers but am grateful for any 
 advice or thoughts you might have.
  
   Platform: ARM7 from Nuvoton, more precisely called NUC745.
   uClinux version: 2.4.20
   The product is a webcam with ethernet and wifi, a clone of 
 one of the FOSCAM cameras, produced by Apexis. I need to do a lot of changes 
 in the software and the programs on it. They will not share their source code 
 even though I _know_ they have used uClinux and other open source software 
 under GPL. I got the uClinux-source from a BSP somewhere else. The BSP source 
 runs fine with ethernet working. My problem is that I need wifi to work as 
 well. The driver I have is the RT73 driver from Ralink. Apexis use the same 
 driver but I don't know how much they had to change it to work.
  
   I have managed to add the driver to the kernel build and it 
 seems to be loaded (full logs at end of email):
   usb.c: registered new driver hub
   add a static ohci host controller device
   : USB OHCI at membase 0xfff05000, IRQ 15
   hc_alloc_ohci
   usb-ohci.c: AMD756 erratum 4 workaround
   hc_reset
   usb.c: new USB bus registered, assigned bus number 1
   Product: USB OHCI Root Hub
   SerialNumber: fff05000
   hub.c: USB hub found
   hub.c: 2 ports detected
   -RT73-7usb_rtusb_init-- //usb_rtusb_init is the 
 module_init function though this is a compiled in driver
   SIMA in da house!
   usb.c: registered new driver rt73
   
   
  This only tells you the driver was registered.  There doesn't 
 seem to be any
  device detected that matches the rt73 driver.
   
   
   
I've had the same thoughts but had no idea how to debug, good to know 
 I was on the right track. The BSP does not have any lsusb program to compile 
 in, neither standalone nor in busybox. I will look into if I can get lsusb in 
 the build some other way.
   
I'm not sure how to talk to the device otherwise, is it with some 
 kind of ioctl-call? I don't know anything about this, but it's what I have 
 stumbled over that makes some sense.
What I'm thinking is that the manufacturer kick-starts the device 
 somehow by making some kind of HW-configuration - but I have no idea where to 
 start there. Would it be something like
ioctl(DEV_ADDR, DEV_OPERATION)? What should I be looking for?
   
   
   
   Go looking under /proc/bus/usb
   
 
 
   SIMA - Registered RT73 driver!
   Usb device driver

Re: [uClinux-dev] Get RT73 driver to work on 2.4 or try to move to 2.6? ARM7 from Nuvoton

2010-10-14 Thread David McCullough

Jivin Sima Baymani lays it down ...
 David, thanks a lot for your input.
 
 
 On Thu, Oct 14, 2010 at 6:28 AM, David McCullough 
 david_mccullo...@mcafee.com wrote:
 
 
 
   Jivin Sima Baymani lays it down ...
   
Hi all,
I've been lurking a bit on this list since I got a uClinux project in 
 my lap this summer. I've fiddled a bit with Linux, but this is my first 
 uClinux project and I've not worked this deep with linux drivers before even 
 though I'm familiar with working low level.
And now to the question! I know this is ancient 2.4, but this is what 
 I have to work with. I don't expect answers but am grateful for any advice or 
 thoughts you might have.
   
Platform: ARM7 from Nuvoton, more precisely called NUC745.
uClinux version: 2.4.20
The product is a webcam with ethernet and wifi, a clone of one of the 
 FOSCAM cameras, produced by Apexis. I need to do a lot of changes in the 
 software and the programs on it. They will not share their source code even 
 though I _know_ they have used uClinux and other open source software under 
 GPL. I got the uClinux-source from a BSP somewhere else. The BSP source runs 
 fine with ethernet working. My problem is that I need wifi to work as well. 
 The driver I have is the RT73 driver from Ralink. Apexis use the same driver 
 but I don't know how much they had to change it to work.
   
I have managed to add the driver to the kernel build and it seems to 
 be loaded (full logs at end of email):
usb.c: registered new driver hub
add a static ohci host controller device
: USB OHCI at membase 0xfff05000, IRQ 15
hc_alloc_ohci
usb-ohci.c: AMD756 erratum 4 workaround
hc_reset
usb.c: new USB bus registered, assigned bus number 1
Product: USB OHCI Root Hub
SerialNumber: fff05000
hub.c: USB hub found
hub.c: 2 ports detected
-RT73-7usb_rtusb_init-- //usb_rtusb_init is the module_init 
 function though this is a compiled in driver
SIMA in da house!
usb.c: registered new driver rt73
   
   
   This only tells you the driver was registered.  There doesn't seem to 
 be any
   device detected that matches the rt73 driver.
   
 
 
 I've had the same thoughts but had no idea how to debug, good to know I was 
 on the right track. The BSP does not have any lsusb program to compile in, 
 neither standalone nor in busybox. I will look into if I can get lsusb in the 
 build some other way.
 
 I'm not sure how to talk to the device otherwise, is it with some kind of 
 ioctl-call? I don't know anything about this, but it's what I have stumbled 
 over that makes some sense.
 What I'm thinking is that the manufacturer kick-starts the device somehow by 
 making some kind of HW-configuration - but I have no idea where to start 
 there. Would it be something like
 ioctl(DEV_ADDR, DEV_OPERATION)? What should I be looking for?


Go looking under /proc/bus/usb


SIMA - Registered RT73 driver!
Usb device driver by ns24 zswan designed successfully!
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
   
But when I get to the prompt neither ifconfig nor iwconfig list any 
 wireless interfaces. If I compare to the original boot log, it looks like 
 hub.c does a bit of probing that my log doesn't have:
   
hub.c: connect-debounce failed, port 1 disabled
new USB device :80fc8004-fed640
hub.c: new USB device 1, assigned address 2
probing sonix288 usb camera ...
dvm camera registered as video0
new USB device :80fc8604-fed640
hub.c: new USB device 2, assigned address 3
idVendor = 0x148f, idProduct = 0x2573
   
trying to set up the wireless interfaces gives me this:
/ ifconfig rausb0 inet 192.168.5.135 up
   
   
   How long after boot ?  Sometimes it takes a while for the usb devices to
   appear,  but if you waited at least 15-20 seconds,  it isn't going to
   show :-)
   
 
 
 I've waited that long and more, and it doesn't pop up =/
 It seems like I'm missing something, some code I might lack or daemon I don't 
 have perhaps?
  
 
   You need to get lsusb or look at the appropriate /proc files and see if
   the wireless USB is actually appearing.
   
 
 
 Unfortunately no lsusb, unless I find out how to get it into my build myself. 
 I've had a look in the /proc files but not found anything relevant, any ideas 
 on what kind of files I shall look for? would it be usb-files or net files or 
 wireless files?
 
 I understand all of this is very dependent on the implementation of the 
 driver, but any directions for me are welcome as it makes it easier for me to 
 start untangling the mess =)
 At least I will know where it's not, and can proceed with new ideas

Re: [uClinux-dev] Get RT73 driver to work on 2.4 or try to move to 2.6? ARM7 from Nuvoton

2010-10-13 Thread David McCullough
 command shell (version 1.1.1)

 /
 
  APEXIS BOOT LOG--
 Linux version 2.4.20-uc0 (r...@maverick-linux) (gcc version 3.0) #1091 ?? 
 12?? 10 09:18:28 CST 2009
 Processor: Winbond W90N745 revision 1
 Architecture: W90N745
 On node 0 totalpages: 4096
 zone(0): 0 pages.
 zone(1): 4096 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/rom0 rw
 Calibrating delay loop... 39.83 BogoMIPS
 Memory: 16MB = 16MB total
 Memory: 14344KB available (1469K code, 287K data, 40K init)
 Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
 Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
 Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
 Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
 Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
 POSIX conformance testing by UNIFIX
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 PTZ Driver has been installed successfully.
 Winbond W90N745 Serial driver version 1.0 (2005-08-15) with no serial options 
 enabled
 ttyS00 at 0xfff8 (irq = 9) is a W90N745
 Winbond W90N7451 Serial driver version 1.0 (2005-08-15) with no serial 
 options enabled
 ttyS00 at 0xfff80100 (irq = 10) is a W90N7451
 I2C Bus Driver has been installed successfully.
 Blkmem copyright 1998,1999 D. Jeff Dionne
 Blkmem copyright 1998 Kenneth Albanowski
 Blkmem 1 disk images:
 0: 7F0E-7F1853FF [VIRTUAL 7F0E-7F1853FF] (RO)
 W19B320BTT Flash Detected
 01 eth0 initial ok!
 which:0
 PPP generic driver version 2.4.2
 Linux video capture interface: v1.00
 Winbond Audio Driver v1.0 Initialization successfully.
 usb.c: registered new driver hub
 add a static ohci host controller device
 : USB OHCI at membase 0xfff05000, IRQ 15
 hc_alloc_ohci
 usb-ohci.c: AMD756 erratum 4 workaround
 hc_reset
 usb.c: new USB bus registered, assigned bus number 1
 hub.c: USB hub found
 hub.c: 2 ports detected
 usb.c: registered new driver audio
 audio.c: v1.0.0:USB Audio Class driver
 usb.c: registered new driver serial
 usbserial.c: USB Serial Driver core v1.4
 
  _ _
 |__  /   _|  _ \  / \  / ___|
   / / | | | | | |/ _ \ \___ \
  / /| |_| | |_| / ___ \ ___) |
 /\__, |/_/   \_\/
  |___/
 ZD1211B - version 2.24.0.0
 usb.c: registered new driver zd1211b
 main_usb.c: VIA Networking Wireless LAN USB Driver 1.20.04
 usb.c: registered new driver vntwusb
 usb.c: registered new driver rt73
 dvm usb cam driver 0.0.0.0 by Maverick Gao in 2006-8-12
 usb.c: registered new driver dvm
 dvm usb cam driver 0.1 for sonix288 by Maverick Gao in 2009-4-20
 usb.c: registered new driver dvm usb cam driver for sonix288
 NET4: Linux TCP/IP 1.0 for NET4.0
 IP Protocols: ICMP, UDP, TCP
 IP: routing cache hash table of 512 buckets, 4Kbytes
 TCP: Hash tables configured (established 1024 bind 2048)
 VFS: Mounted root (romfs filesystem) readonly.
 Freeing init memory: 40K
 BINFMT_FLAT: bad magic/rev (0x6e74202d, need 0x4)
 BINFMT_FLAT: bad magic/rev (0x6e74202d, need 0x4)
 Shell invoked to run file: /bin/init
 Command: 
 Command: mount -t proc none /proc
 Command: mount -t ramfs none /usr
 Command: mount -t ramfs none /swap
 Command: mount -t ramfs none /var/run
 Command: mount -t ramfs none /etc
 Command: mount -t ramfs none /flash
 Command: mount -t ramfs none /home
 Command: mount -t ramfs none /tmp
 Command: 
 Command: camera
 no support
 [8]
 Command: 
 Command: #need to wait for connection to get up before we try downloading
 Command: sleep 40
 hub.c: connect-debounce failed, port 1 disabled
 new USB device :80fc8004-fed640
 hub.c: new USB device 1, assigned address 2
 probing sonix288 usb camera ...
 dvm camera registered as video0
 new USB device :80fc8604-fed640
 hub.c: new USB device 2, assigned address 3
 idVendor = 0x148f, idProduct = 0x2573 
 aw version is 0.22.2.14
 aw version is 20.8.2.26
 
 Wait for auto-negotiation complete...OK
 100MB - FULL
 video0 opened
 1
 1
 1
 1
 1
 1
 unknown command
 __pthread_initial_thread_bos:35c000
 manage pid:15
 2
 2
 2
 2
 2
 2
 audio_dev.state not AU_STATE_RECORDING
 wb_audio_start_record
 inet_sr.c INET_rinput 321
 action===1
 options==33
 inet_sr.c INET_setroute 75
 *args===255.255.255.255
 *args===netmask
 *args===eth0
 [27]
 
 

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev


-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman

Re: [uClinux-dev] [PATCH] ld-elf2flt.c: fix runtime relocatable support

2010-08-16 Thread David McCullough
 argc, char *argv[])
  
   xmalloc_set_program_name(elf2flt_progname);
  
 - tmp = xmalloc(len + 16);
 - memcpy(tmp, argv0, len);
 - while (len  tmp[len - 1] != '-'  !IS_DIR_SEPARATOR(tmp[len - 1]))
 - len--;
 - tmp[len] = 0;
 -
 - linker = concat(tmp, ld.real, have_exe, NULL);
 - elf2flt = concat(tmp, elf2flt, have_exe, NULL);
 - nm = concat(tmp, nm, have_exe, NULL);
 - objdump = concat(tooldir, /../../bin/, TARGET_ALIAS, -objdump, 
 have_exe, NULL);
 - objcopy = concat(tooldir, /../../bin/, TARGET_ALIAS, -objcopy, 
 have_exe, NULL);
 + linker = concat(tooldir, ld.real, have_exe, NULL);
 + elf2flt = concat(tooldir, elf2flt, have_exe, NULL);
 + nm = concat(tooldir, nm, have_exe, NULL);
 + objdump = concat(bindir, TARGET_ALIAS -objdump, have_exe, NULL);
 + objcopy = concat(bindir, TARGET_ALIAS -objcopy, have_exe, NULL);
  
   if (stat(ldscriptpath, buf) || !S_ISDIR(buf.st_mode))
 - ldscriptpath = concat(tooldir, /../lib, NULL);
 + ldscriptpath = concat(tooldir, ../lib, NULL);
  
   parse_args(argc, argv);
  
   if (flag_verbose) {
   fprintf(stderr, argv[0]  = '%s'\n, argv[0]);
 + fprintf(stderr, bindir   = '%s'\n, bindir);
   fprintf(stderr, tooldir  = '%s'\n, tooldir);
   fprintf(stderr, linker   = '%s'\n, linker);
   fprintf(stderr, elf2flt  = '%s'\n, elf2flt);
 -- 
 1.7.2
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt.c: fix runtime relocatable support

2010-08-16 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Tue, Aug 17, 2010 at 12:26 AM, David McCullough wrote:
  Applied,
 
 damn; your new mcafee overlords making you fast or something ? :)

Oops,  sorry about that ;-)

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Tips on checking that application can run on uClinux?

2010-06-26 Thread David McCullough

Jivin Gilles Ganault lays it down ...
 Hello
 
 I'm a self-taught programmer, and have absolutely no experience
 working with embedded appliances.
 
 I was wondering...
 
 1. How do you check that a Linux application can run OK on uClinux,
 especially with an MMU-less CPU like the Blackfin
 
 2. What makes it easy/hard/impossible to port a Linux application to
 such configuration?
 
 from what I understood, problematic issues are the lack of fork(),
 MMU-less CPU's require that the application manage its own memory to
 avoid RAM being fragmented, etc.

A little old,  but most of what you need to know is here:

http://www.linuxjournal.com/article/7221

And there is plenty more on the web to read if you need it :-)

On blackfin you also get fdpic for binaries/executbales/libs,  which give
you even more options under uClinux.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] flthdr: improve default print due to no args

2010-06-22 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The current code misses checking a few args in order to determine the
 default print mode (ktrace/l1stack/...).  Rather than update a list
 that people easily forget, rework the code to generically detect that
 no arguments have been specified.

Applied,

Thanks,
Davidm

 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  flthdr.c |8 +---
  1 files changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/flthdr.c b/flthdr.c
 index 0485107..dfc9107 100644
 --- a/flthdr.c
 +++ b/flthdr.c
 @@ -326,11 +326,12 @@ usage(char *s)
  int
  main(int argc, char *argv[])
  {
 - int c;
 + int c, noargs;
   char *ofile = NULL, *ifile;
  
   elf2flt_progname = argv[0];
  
 + noargs = 1;
   while ((c = getopt(argc, argv, pPdzZrRuUkKs:o:)) != EOF) {
   switch (c) {
   case 'p': print = 1;break;
 @@ -353,6 +354,7 @@ main(int argc, char *argv[])
   usage(invalid option);
   break;
   }
 + noargs = 0;
   }
  
   if (optind = argc)
 @@ -361,9 +363,9 @@ main(int argc, char *argv[])
   if (ofile  argc - optind  1)
   usage(-o can only be used with a single file);
  
 - if (!print  !docompress  !ramload  !stacksize) /* no args == 
 print */
 + if (!print  noargs) /* no args == print */
   print = argc - optind; /* greater than 1 is short format */
 - 
 +
   for (c = optind; c  argc; c++) {
   ifile = argv[c];
   if (!ofile)
 -- 
 1.7.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [microblaze-uclinux] Re: [Uclinux-dist-devel] [PATCH 1/2 v2] FLAT: split the stack data alignments

2010-06-01 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Thu, May 27, 2010 at 04:24, Michal Simek wrote:
  Mike Frysinger wrote:
  The stack and data have different alignment requirements, so don't force
  them to wear the same shoe. ??Increase the data alignment to match that
  which the elf2flt linker script has always been using: 0x20 bytes. ??Not
  only does this bring the kernel loader in line with the toolchain, but
  it also fixes a swath of gcc tests which try to force larger alignment
  values but randomly fail when the FLAT loader fails to deliver.
 
  Signed-off-by: Mike Frysinger vap...@gentoo.org
 
  Solve the problem on Microblaze:
 
  Tested-by: Michal Simek mon...@monstr.eu
 
  Who will add it to mainline?
 
 if we can get the misc nommu peeps to agree on this (looking mostly at
 David [McCullough] and Greg), then akpm will most likely expedite the
 merge.  i like to think they're the best FLAT experts out there ;).

Did the latest patch include the changes Paul requested.

It looks like it to me,  I've just been a bit distracted.  If so I'll send
in an Ack.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH 1/2 v2] FLAT: split the stack data alignments

2010-06-01 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The stack and data have different alignment requirements, so don't force
 them to wear the same shoe.  Increase the data alignment to match that
 which the elf2flt linker script has always been using: 0x20 bytes.  Not
 only does this bring the kernel loader in line with the toolchain, but
 it also fixes a swath of gcc tests which try to force larger alignment
 values but randomly fail when the FLAT loader fails to deliver.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Acked-by: David McCullough david_mccullo...@mcafee.com

Cheers,
Davidm

 ---
 v2
   - split changes  document better
 
  fs/binfmt_flat.c |   23 +++
  1 files changed, 15 insertions(+), 8 deletions(-)
 
 diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
 index 49566c1..b865622 100644
 --- a/fs/binfmt_flat.c
 +++ b/fs/binfmt_flat.c
 @@ -56,15 +56,22 @@
  #endif
  
  /*
 - * User data (stack, data section and bss) needs to be aligned
 - * for the same reasons as SLAB memory is, and to the same amount.
 - * Avoid duplicating architecture specific code by using the same
 - * macro as with SLAB allocation:
 + * User data (data section and bss) needs to be aligned.
 + * We pick 0x20 here because it is the max value elf2flt has always
 + * used in producing FLAT files, and because it seems to be large
 + * enough to make all the gcc alignment related tests happy.
 + */
 +#define FLAT_DATA_ALIGN  (0x20)
 +
 +/*
 + * User data (stack) also needs to be aligned.
 + * Here we can be a bit looser than the data sections since this
 + * needs to only meet arch ABI requirements.
   */
  #ifdef ARCH_SLAB_MINALIGN
 -#define FLAT_DATA_ALIGN  (ARCH_SLAB_MINALIGN)
 +#define FLAT_STACK_ALIGN (ARCH_SLAB_MINALIGN)
  #else
 -#define FLAT_DATA_ALIGN  (sizeof(void *))
 +#define FLAT_STACK_ALIGN (sizeof(void *))
  #endif
  
  #define RELOC_FAILED 0xff00ff01  /* Relocation incorrect 
 somewhere */
 @@ -129,7 +136,7 @@ static unsigned long create_flat_tables(
  
   sp = (unsigned long *)p;
   sp -= (envc + argc + 2) + 1 + (flat_argvp_envp_on_stack() ? 2 : 0);
 - sp = (unsigned long *) ((unsigned long)sp  -FLAT_DATA_ALIGN);
 + sp = (unsigned long *) ((unsigned long)sp  -FLAT_STACK_ALIGN);
   argv = sp + 1 + (flat_argvp_envp_on_stack() ? 2 : 0);
   envp = argv + (argc + 1);
  
 @@ -876,7 +883,7 @@ static int load_flat_binary(struct linux_binprm * bprm, 
 struct pt_regs * regs)
   stack_len = TOP_OF_ARGS - bprm-p; /* the strings */
   stack_len += (bprm-argc + 1) * sizeof(char *); /* the argv array */
   stack_len += (bprm-envc + 1) * sizeof(char *); /* the envp array */
 - stack_len += FLAT_DATA_ALIGN - 1;  /* reserve for upcoming alignment */
 + stack_len += FLAT_STACK_ALIGN - 1;  /* reserve for upcoming alignment */
   
   res = load_flat_file(bprm, libinfo, 0, stack_len);
   if (IS_ERR_VALUE(res))
 -- 
 1.7.1
 
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH 2/2 v2] FLAT: tweak default stack alignment

2010-06-01 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The recent commit 1f0ce8b3dd667dca7 which moved the ARCH_SLAB_MINALIGN
 default into the global header inadvertently broke FLAT for a bunch of
 systems.  Blackfin systems now fail on any FLAT exec with:
 Unable to read code+data+bss, errno 14
 When your /init is a FLAT binary, obviously this can be annoying ;).
 
 This stems from the alignment usage in the FLAT loader.  The behavior
 before was that FLAT would default to ARCH_SLAB_MINALIGN only if it was
 defined, and this was only defined by arches when they wanted a larger
 alignment value.  Otherwise it'd default to pointer alignment.  Arguably,
 this is kind of hokey that the FLAT is semi-abusing defines it shouldn't.
 
 But let's ignore that and simply ignore min alignment values of 0.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Acked-by: David McCullough david_mccullo...@mcafee.com

Cheers,
Davidm

 ---
 v2
   - split changes  document better
 
  fs/binfmt_flat.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
 index b865622..4959a0a 100644
 --- a/fs/binfmt_flat.c
 +++ b/fs/binfmt_flat.c
 @@ -68,7 +68,7 @@
   * Here we can be a bit looser than the data sections since this
   * needs to only meet arch ABI requirements.
   */
 -#ifdef ARCH_SLAB_MINALIGN
 +#if defined(ARCH_SLAB_MINALIGN)  ARCH_SLAB_MINALIGN != 0
  #define FLAT_STACK_ALIGN (ARCH_SLAB_MINALIGN)
  #else
  #define FLAT_STACK_ALIGN (sizeof(void *))
 -- 
 1.7.1
 
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] run busybox's depmod.pl separately from the kernel

2010-05-30 Thread David McCullough

Jivin Jate Sujjavanich lays it down ...
 In the modules_install target, the current top level Makefile sets DEPMOD to 
 user/busybox/depmod.pl. The latest 2.4/2.6 kernels try to run this perl 
 script as depmod, but it's not compatible with the kernel's argument format.
 
 This proposed patch disables the kernel's DEPMOD and runs the busybox script 
 separately.

Are you having problems with a kernel included with the uClinux-dist or one
that you have plgged in ?

It's just that we don't seem to be seeing this error here.

Can you elaborate of what the failure is or give us an error log ?

Thanks,
Davidm

 --- Makefile  11 May 2009 20:18:42 -  1.14
 +++ Makefile  28 May 2010 14:44:57 -
 @@ -202,7 +202,8 @@
  modules_install:
   . $(LINUXDIR)/.config; if [ $$CONFIG_MODULES = y ]; then \
   [ -d $(ROMFSDIR)/lib/modules ] || mkdir -p 
 $(ROMFSDIR)/lib/modules; \
 - $(MAKEARCH_KERNEL) -C $(LINUXDIR) INSTALL_MOD_PATH=$(ROMFSDIR) 
 DEPMOD=../user/busybox/examples/depmod.pl modules_install; \
 + $(MAKEARCH_KERNEL) -C $(LINUXDIR) INSTALL_MOD_PATH=$(ROMFSDIR) 
 DEPMOD=true modules_install; \
 + user/busybox/examples/depmod.pl -b $(ROMFSDIR)/lib/modules -F 
 $(LINUXDIR)/System.map; \
   rm -f $(ROMFSDIR)/lib/modules/*/build; \
   find $(ROMFSDIR)/lib/modules -type f -name *o | xargs -r 
 $(STRIP) -R .comment -R .note -g; \
   fi

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] FLAT: fix unmap len in load error path

2010-05-28 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The data chunk is mmaped with 'len' which remains unchanged, so use that
 when unmapping in the error path rather than trying to recalculate (and
 incorrectly so) the value used originally.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Acked-by: David McCullough david_mccullo...@mcafee.com

Cheers,
Davidm

 ---
  fs/binfmt_flat.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
 index 4959a0a..f7a4059 100644
 --- a/fs/binfmt_flat.c
 +++ b/fs/binfmt_flat.c
 @@ -596,7 +596,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   if (IS_ERR_VALUE(result)) {
   printk(Unable to read data+bss, errno %d\n, 
 (int)-result);
   do_munmap(current-mm, textpos, text_len);
 - do_munmap(current-mm, realdatastart, data_len + extra);
 + do_munmap(current-mm, realdatastart, len);
   ret = result;
   goto err;
   }
 -- 
 1.7.1
 
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt: tweak verbose output

2010-05-11 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The sed debug showed incorrect syntax for deletions, and the program exec
 debug missed output redirection.

Applied,

Thanks,
Davidm


 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  ld-elf2flt.c |4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
 
 diff --git a/ld-elf2flt.c b/ld-elf2flt.c
 index 227c90b..707e9e1 100644
 --- a/ld-elf2flt.c
 +++ b/ld-elf2flt.c
 @@ -120,6 +120,8 @@ execute(const char *command, const char *output, const 
 options_t *options, ...)
   fprintf(stderr, Invoking:);
   for (ix = 0; ix != opts.num - 1; ix++)
   fprintf(stderr,  '%s', opts.options[ix]);
 + if (output)
 + fprintf(stderr,   '%s', output);
   fprintf(stderr, \n);
   }
  
 @@ -173,7 +175,7 @@ do_sed(const sed_commands_t *sed, const char *name_in, 
 const char *name_out)
   if (replacement)
   fprintf(stderr, \t-e 's/%s/%s/' \\\n, 
 pattern, replacement);
   else
 - fprintf(stderr, \t-e 'd/%s/' \\\n, pattern);
 + fprintf(stderr, \t-e '/%s/d' \\\n, pattern);
   }
   fprintf(stderr, \t%s  %s\n, name_in, name_out);
   }
 -- 
 1.7.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] How to setup $PATH of uClinux ?

2010-02-04 Thread David McCullough

Jivin wzc0066 lays it down ...
 Hello, 
 
 After enter uClinux shell, run export PATH=$PATH:/local/bin, it works.
 But if i put the command export PATH=$PATH:/local/bin into /etc/rc, it not 
 run at all.

That is because /etc/rc is a script that runs to completion,  init then
starts other applications from inittab.

 I just want to add /local/bin into $PATH when bootup, so how should i do ?

Check and see if the shell you are using will load an /etc/profile or a
~/.profile

If not then you may need to edit your init source and add the extra path
info to it.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.mcafee.com http://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] debug: add a gcc-2 compat tweak

2010-01-21 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 GCC-2.x has a bug with empty arg expansion in macros.

Applied with updated comment.

At first I wondered which uClinux stubs.h you were patching ;-)

Cheers,
Davidm

 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  stubs.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/stubs.h b/stubs.h
 index 7e5308d..615cab5 100644
 --- a/stubs.h
 +++ b/stubs.h
 @@ -41,7 +41,7 @@
  #define _debug(lvl, fmt, args...) \
   do { \
   if (lvl = DEBUG) { \
 - fprintf(stderr, %s:%i:  fmt, __func__, __LINE__, ## 
 args); \
 + fprintf(stderr, %s:%i:  fmt, __func__, __LINE__ , ## 
 args); \
   fflush(stderr); \
   } \
   } while (0)
 -- 
 1.6.6
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] NOMMU: use copy_*_user_page() in access_process_vm()

2009-11-24 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 The mmu code uses the copy_*_user_page() variants in access_process_vm()
 rather than copy_*_user() as the former includes an icache flush.  This is
 important when doing things like setting software breakpoints with gdb.
 So switch the nommu code over to do the same.
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Acked-by: David McCullough david_mccullo...@mcafee.com

Cheers,
Davidm

 ---
  mm/nommu.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/mm/nommu.c b/mm/nommu.c
 index 9876fa0..51ae9be 100644
 --- a/mm/nommu.c
 +++ b/mm/nommu.c
 @@ -1889,9 +1889,11 @@ int access_process_vm(struct task_struct *tsk, 
 unsigned long addr, void *buf, in
  
   /* only read or write mappings where it is permitted */
   if (write  vma-vm_flags  VM_MAYWRITE)
 - len -= copy_to_user((void *) addr, buf, len);
 + copy_to_user_page(vma, NULL, NULL,
 +   (void *) addr, buf, len);
   else if (!write  vma-vm_flags  VM_MAYREAD)
 - len -= copy_from_user(buf, (void *) addr, len);
 + copy_from_user_page(vma, NULL, NULL,
 + buf, (void *) addr, len);
   else
   len = 0;
   } else {
 -- 
 1.6.5.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt: fix option order when invoking children

2009-11-10 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Poor getopt() implementations as found in many BSD/Darwin systems will
 stop processing options after a non-option is encountered.  That means
 ld-elf2flt has to be careful to not stick options after non-options when
 executing sub children.  In a default setup, it will invoke `elf2flt` with
 the output followed by the -a option which subsequently fails:
 elf2flt: Can't open '-a': No such file or directory

Applied,  thanks,
Davidm


 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  ld-elf2flt.c |   13 ++---
  1 files changed, 10 insertions(+), 3 deletions(-)
 
 diff --git a/ld-elf2flt.c b/ld-elf2flt.c
 index f9b0f1a..227c90b 100644
 --- a/ld-elf2flt.c
 +++ b/ld-elf2flt.c
 @@ -76,7 +76,14 @@ static void append_sed(sed_commands_t *dst, const char 
 *pattern,
  
  /* Execute an external program COMMAND.  Write its stdout to OUTPUT,
 unless that is NULL.  Pass the trailing NULL terminated list of
 -   options, followed by all those in OPTIONS, if that is non-NULL.  */
 +   options, followed by all those in OPTIONS, if that is non-NULL.
 +   Order of options is important here as we may run on systems that
 +   do not allow options after non-options (i.e. many BSDs).  So the
 +   final command line will look like:
 +   command [options] [... va args ...]
 +   This is because [options] will (should?) never contain non-options,
 +   while non-options will always be passed via the [va args].
 + */
  static int
  execute(const char *command, const char *output, const options_t *options, 
 ...)
  {
 @@ -92,12 +99,12 @@ execute(const char *command, const char *output, const 
 options_t *options, ...)
  
   init_options(opts);
   append_option(opts, command);
 + if (options)
 + append_options(opts, options);
   va_start(args, options);
   while ((opt = va_arg(args, const char *)))
   append_option(opts, opt);
   va_end(args);
 - if (options)
 - append_options(opts, options);
   append_option(opts, NULL);
  
   fflush(stdout);
 -- 
 1.6.5.2
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] help-me about uclinux dist

2009-11-03 Thread David McCullough

Jivin thiago lays it down ...
 I'm beginner with embedded systems and uclinux dist, and I'm need add
 new vendor (amd geode) in uclinux source.

Have a look at the vendors/Soekris/net4801 target,  thats a geode board.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH v3] NOMMU: fix malloc performance by adding uninitialized flag

2009-10-13 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 The NOMMU code currently clears all anonymous mmapped memory.  While this
 is what we want in the default case, all memory allocation from userspace
 under NOMMU has to go through this interface, including malloc() which is
 allowed to return uninitialized memory.  This can easily be a significant
 performance penalty.  So for constrained embedded systems were security is
 irrelevant, allow people to avoid clearing memory unnecessarily.
 
 This also alters the ELF-FDPIC binfmt such that it obtains uninitialised
 memory for the brk and stack region.
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Robin Getz robin.g...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 Signed-off-by: David Howells dhowe...@redhat.com
 Acked-by: Paul Mundt let...@linux-sh.org

Acked-by: David McCullough dav...@snapgear.com

Cheers,
Davidm

 v3
   - tweak kconfig desc
 
  Documentation/nommu-mmap.txt  |   26 ++
  fs/binfmt_elf_fdpic.c |3 ++-
  include/asm-generic/mman-common.h |5 +
  init/Kconfig  |   22 ++
  mm/nommu.c|8 +---
  5 files changed, 60 insertions(+), 4 deletions(-)
 
 diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt
 index b565e82..8e1ddec 100644
 --- a/Documentation/nommu-mmap.txt
 +++ b/Documentation/nommu-mmap.txt
 @@ -119,6 +119,32 @@ FURTHER NOTES ON NO-MMU MMAP
   granule but will only discard the excess if appropriately configured as
   this has an effect on fragmentation.
  
 + (*) The memory allocated by a request for an anonymous mapping will normally
 + be cleared by the kernel before being returned in accordance with the
 + Linux man pages (ver 2.22 or later).
 +
 + In the MMU case this can be achieved with reasonable performance as
 + regions are backed by virtual pages, with the contents only being mapped
 + to cleared physical pages when a write happens on that specific page
 + (prior to which, the pages are effectively mapped to the global zero 
 page
 + from which reads can take place).  This spreads out the time it takes to
 + initialize the contents of a page - depending on the write-usage of the
 + mapping.
 +
 + In the no-MMU case, however, anonymous mappings are backed by physical
 + pages, and the entire map is cleared at allocation time.  This can cause
 + significant delays during a userspace malloc() as the C library does an
 + anonymous mapping and the kernel then does a memset for the entire map.
 +
 + However, for memory that isn't required to be precleared - such as that
 + returned by malloc() - mmap() can take a MAP_UNINITIALIZED flag to
 + indicate to the kernel that it shouldn't bother clearing the memory 
 before
 + returning it.  Note that CONFIG_MMAP_ALLOW_UNINITIALIZED must be enabled
 + to permit this, otherwise the flag will be ignored.
 +
 + uClibc uses this to speed up malloc(), and the ELF-FDPIC binfmt uses 
 this
 + to allocate the brk and stack region.
 +
   (*) A list of all the private copy and anonymous mappings on the system is
   visible through /proc/maps in no-MMU mode.
  
 diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
 index 38502c6..79d2b1a 100644
 --- a/fs/binfmt_elf_fdpic.c
 +++ b/fs/binfmt_elf_fdpic.c
 @@ -380,7 +380,8 @@ static int load_elf_fdpic_binary(struct linux_binprm 
 *bprm,
   down_write(current-mm-mmap_sem);
   current-mm-start_brk = do_mmap(NULL, 0, stack_size,
PROT_READ | PROT_WRITE | PROT_EXEC,
 -  MAP_PRIVATE | MAP_ANONYMOUS | 
 MAP_GROWSDOWN,
 +  MAP_PRIVATE | MAP_ANONYMOUS |
 +  MAP_UNINITIALIZED | MAP_GROWSDOWN,
0);
  
   if (IS_ERR_VALUE(current-mm-start_brk)) {
 diff --git a/include/asm-generic/mman-common.h 
 b/include/asm-generic/mman-common.h
 index 5ee13b2..2011126 100644
 --- a/include/asm-generic/mman-common.h
 +++ b/include/asm-generic/mman-common.h
 @@ -19,6 +19,11 @@
  #define MAP_TYPE 0x0f/* Mask for type of mapping */
  #define MAP_FIXED0x10/* Interpret addr exactly */
  #define MAP_ANONYMOUS0x20/* don't use a file */
 +#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
 +# define MAP_UNINITIALIZED 0x400 /* For anonymous mmap, memory could be 
 uninitialized */
 +#else
 +# define MAP_UNINITIALIZED 0x0   /* Don't support this flag */
 +#endif
  
  #define MS_ASYNC 1   /* sync memory asynchronously */
  #define MS_INVALIDATE2   /* invalidate the caches */
 diff --git a/init/Kconfig b/init/Kconfig
 index 09c5c64..309cd9a 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1069,6 +1069,28

Re: [uClinux-dev] multiple arch with MMU/noMMU

2009-09-04 Thread David McCullough

Jivin tom gogh lays it down ...
 Hello everyone,
  I am facing classic dilemma of which distribution to go for.
 I have powerpc with mmu, MIPS, may be in future some other processor like ARM 
 and I want to keep my code portable to multiple arch.
   Which means, if I use MMU/noMMU in both cases, I need to do less rework or 
 no rework and easy software maintanability.
   My favorite is uclinux  considering many ports and arch available on it and 
 good developer base. 
 
 Some options I was guessing by doing some little search on internet:
 
 1) penguinppc for powerpc but won't be useful for other arch.
 2) use kernel.org vanilla with uclinux but not sure if I can find web 
 resources/guide to do porting easily or any help in software maintainability.
 3) Add MMU support in uClinux
 
 What do you folks do in such case?
 
 It will be easier to decide if uClinux supports MMU.
 from link, 
 http://www.ucdot.org/article.pl?sid=03/03/24/2353251
 I think MMU is supported but I am still not sure.
 Can you pls confirm and if there is any web resources on it?

uClinux-dist supports anything (MMU and !MMU).

The kernel in the latest uClinux-dist's is as close to the kernel.org
releases as possible.

uClinux-dist even lets you add your own kernel easily.  For example,
take the penguinppc kernel, extract it to a directory at in the dists top
level dir called something like linux-2.6.ppc,  and do a make config, it
will let you chose the new kernel for building.

You will need to create a vendors/config/ppc directory, use the i386/arm
versions as a template,  probably just change the compiler names and you be
close.

You will need to check how well the uClibc version in the dist supports ppc
as well, and you can always bring in a new version of uClibc (much like the
kernel) if needed.

We run arm, mips, x86, SH4, m68knommu and more out of the tree on a regular
basis ;-)

There's not really any doc on all this,  but just ask here when you get
stuck and someone will help you out, perhaps then you can write some doc
for us ;-) ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] multiple arch with MMU/noMMU

2009-09-04 Thread David McCullough

Jivin Dave Rensberger lays it down ...
 uClinux-dist supports anything (MMU and !MMU).
 
 
 The kernel in the latest uClinux-dist's is as close to the kernel.org
 eleases as possible.
 
 uClinux-dist even lets you add your own kernel easily.  For example,
 take the penguinppc kernel, extract it to a directory at in the dists top
 level dir called something like linux-2.6.ppc,  and do a make config, it
 will let you chose the new kernel for building.
 
 
 So what is the purpose of the Snapgear project at this point?   I've always 
 thought of Snapgear as basically being uClinux extended to MMU-ful 
 processors, but if the regular uClinux distribution now supports that, what's 
 special about Snapgear?   
 
 I've never tried to use the raw uClinux-dist by itself, so please excuse me 
 if there's a fairly obvious answer to this question.  If I used uClinux-dist 
 by itself, would I be responsible for providing a toolchain and compatible 
 uClibc/glibc?   If this is the case, I can seen an advantage in Snapgear, 
 since it provides all of this.

Greg will probably give you the real bottom line,  but,  truth is,  there is
no difference.  The SnapGear distribution and the uClinux-dist are the same.
You can use the snapgear tools to build either eithout any problems :-)

The snapgear distro serves a few corporate objectives:

1) It's far more obvious that this is the source that we use in our products.

2) It gives us some branding :-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] fix elf2flt dep generation in out-of-tree builds

2009-08-30 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  Makefile.in |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
 index a36200a..861f62b 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -110,4 +110,4 @@ install:
  
  sinclude .deps
  .deps:
 - $(CC) -MM $(CPPFLAGS) *.c  .deps
 + $(CC) -MM $(CPPFLAGS) $(srcdir)/*.c  .deps
 -- 
 1.6.4
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] build problem with sshd in the 2.4 kernel

2009-08-11 Thread David McCullough

Jivin b2112 lays it down ...
 I'm using the uClinux 2.4 kernel with a Coldfire MC5275 and I'm trying to
 build in the sshd application and I'm getting a build failure.  I used make
 menuconfig and selected sshd under the networking applications option.
 
 In the build process I'm getting the following error;
 
 Has anyone been successful in getting sshd to build?  I'm wondering if I'm
 missing something or if there is a patch available.
 
 Any help is greatly appreciated.

You don't appear to have the openssl lib build enabled (or perhaps not
included depending on your version of the dist).

Which uClinux-dist version do you have ?

Check that CONFIG_LIB_LIBSSL is enabled in your config/.config

Check you have libssl or a smart makefile in lib/libssl 

You can get patches to add openssl back into an older dist from
http://ftp.snapgear.org/pub/patches/ , newer dists should have patches and
download scripts within the makefile to do it for you,

Cheers,
Davidm





 --
 
 make[2]: Entering directory `/home/uClinux-dist/user/sh'
 make[2]: Nothing to be done for `all'.
 make[2]: Leaving directory `/home/uClinux-dist/user/sh'
 make[2]: Entering directory `/home/uClinux-dist/user/ssh'
 (cd openbsd-compat  make)
 make[3]: Entering directory `/home/uClinux-dist/user/ssh/openbsd-compat'
 ucfront-gcc m68k-elf-gcc -m5200 -DCONFIG_COLDFIRE -Os -g
 -fomit-frame-pointer -fno-common -fno-builtin -Wall   -DEMBED -msep-data
 -Dlinux -D__linux__ -Dunix -D__uClinux__ -g -O2 -Wall
 -D_SSH_PROGRAM=\/bin/ssh\ -DSSH_ASKPASS_DEFAULT=\/bin/ssh-askpass\ -I.
 -DHAVE_CONFIG_H -I. -I..-c -o bsd-arc4random.o bsd-arc4random.c
 In file included from bsd-arc4random.c:25:
 ../includes.h:168: openssl/opensslv.h: No such file or directory
 bsd-arc4random.c:32: openssl/rand.h: No such file or directory
 bsd-arc4random.c:33: openssl/rc4.h: No such file or directory
 bsd-arc4random.c:34: openssl/err.h: No such file or directory
 make[3]: *** [bsd-arc4random.o] Error 1
 make[3]: Leaving directory `/home/uClinux-dist/user/ssh/openbsd-compat'
 make[2]: *** [subdirs] Error 2
 make[2]: Leaving directory `/home/uClinux-dist/user/ssh'
 make[1]: *** [all] Error 2
 make[1]: Leaving directory `/home/uClinux-dist/user'
 make: *** [subdirs] Error 1

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 6/7] ld-elf2flt: convert to C

2009-07-14 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Sun, Jul 12, 2009 at 20:01, David McCullough wrote:
  Jivin David McCullough lays it down ...
   at any rate, in the process of fixing my inverted logic, it looks like
   some were left behind.  you'll want to drop the AC_SUBST() right after
   the AC_ARG_ENABLE():
   +AC_SUBST(use_ld_elf2flt_script)
  
   and then at the end, you used the _script instead of the _binary:
   +if test $use_ld_elf2flt_script = yes ; then
   +AC_OUTPUT(ld-elf2flt)
   +fi
 
  Yep, thanks,  I didn't quite get back to figuring out why it only built
  ld-elf2flt (the script) at build time and not at configure time ;-)
 
  So I think what I have ready to commit is good to go.  Haven't seen any
  comments strongly against it,  so later today or tomorrow I'll check it in,
 
  All done,  checkout it out and see if I managed to break it ;-)
 
 the Makefile.in still refers to elf2flt.sh.in:
 ld-elf2flt.sh: $(srcdir)/ld-elf2flt.sh.in
 
 that should be:
 ld-elf2flt.sh: $(srcdir)/ld-elf2flt.in
 
 the shell script is generated without +x bits, but that is fixed
 during the install step ... so probably not a real big problem

Applied,

Thanks,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 6/7] ld-elf2flt: convert to C

2009-07-14 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Sun, Jul 12, 2009 at 20:01, David McCullough wrote:
  Jivin David McCullough lays it down ...
   at any rate, in the process of fixing my inverted logic, it looks like
   some were left behind.  you'll want to drop the AC_SUBST() right after
   the AC_ARG_ENABLE():
   +AC_SUBST(use_ld_elf2flt_script)
  
   and then at the end, you used the _script instead of the _binary:
   +if test $use_ld_elf2flt_script = yes ; then
   +AC_OUTPUT(ld-elf2flt)
   +fi
 
  Yep, thanks,  I didn't quite get back to figuring out why it only built
  ld-elf2flt (the script) at build time and not at configure time ;-)
 
  So I think what I have ready to commit is good to go.  Haven't seen any
  comments strongly against it,  so later today or tomorrow I'll check it in,
 
  All done,  checkout it out and see if I managed to break it ;-)
 
 one more ... the all target should not be depending on ld-elf2flt
 anymore as this is handled through the PROG vars.  it isnt a problem
 for Linux systems, but when EXEEXT is set, things go boom.

Done

Thanks,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH]: make output results of 'tcpblast' more correct

2009-07-14 Thread David McCullough

Jivin Ihar Hrachyshka lays it down ...
 This patch fixes inaccurate results generated by 'tcpblast' on uClinux
 because of integer (not float) arithmetics used. Please review it and
 apply if it's good.

Looks ok to me,  applied.  And yes, it took me forever and a bit to apply
it, sorry :-)

Thanks,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 6/7] ld-elf2flt: convert to C

2009-07-12 Thread David McCullough

Jivin David McCullough lays it down ...
...
  at any rate, in the process of fixing my inverted logic, it looks like
  some were left behind.  you'll want to drop the AC_SUBST() right after
  the AC_ARG_ENABLE():
  +AC_SUBST(use_ld_elf2flt_script)
  
  and then at the end, you used the _script instead of the _binary:
  +if test $use_ld_elf2flt_script = yes ; then
  +AC_OUTPUT(ld-elf2flt)
  +fi
 
 Yep, thanks,  I didn't quite get back to figuring out why it only built
 ld-elf2flt (the script) at build time and not at configure time ;-)
 
 So I think what I have ready to commit is good to go.  Haven't seen any
 comments strongly against it,  so later today or tomorrow I'll check it in,

All done,  checkout it out and see if I managed to break it ;-)

Thanks,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Stack size relation to memory use

2009-07-08 Thread David McCullough

Jivin Jan Ringoš lays it down ...
 Hi everyone,

 I was investigating why some of my processes use too much memory than  
 expected (just by looking at /proc/pid/status), and found interesting  
 relation to stack size (set with elf2flt). I prefer to use stack wherever 
 possible instead of dynamic allocations for speed and to decrease 
 potential for memory leaks, but the numbers below somewhat confused me.

On a !MMU system,  using the stack is not such a good idea IMO. 
The stack is fixed and must be allocated. Having a large stack just to cope
with a config file parse or some other temporary use is just wasteful
and forces you applications runtime memory usage to be higher than needed.

 If I leave the stack at 4 kB, the memory usage is 40 kB for this 
 particluar program.
 If I increase it to 32 kB, the memory usage jumps up to 250 kB or so.
 I also tried to use 128 kB high stack, then the memory use happened to be 
 over 500 kB.

 In /proc/pid/maps I see that the most of this memory is single large 
 mapped block.
 How can 28 kB of stack increase result in 200 kB of memory more being used?
 Or am I completely missing something else?

Sounds like you are using a power-of-2 allocator in your kernel.

Take all your sizes,  add them together then round up to the next power-of-2
to get the minimum size you will allocate.

Though that doesn't quite add up in this case though,  but it will get you a
lot closer.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 6/7] ld-elf2flt: convert to C

2009-07-08 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Tue, Jul 7, 2009 at 06:43, David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
  Due to shell portability issues (which is to say shell scripts are not
  portable -- think Windows), convert elf2flt to C code.
 
  I've updated this code base to the latest elf2flt tree and actually done
  some basic tests -- building the three Blackfin tuples (ELF, FLAT, FDPIC)
  and running programs on my Blackfin boards.  This process found errors in
  the original implementation as well as some of the cleanups I did.
 
  Signed-off-by: Nathan Sidwell nat...@codesourcery.com
  Signed-off-by: Mike Frysinger vap...@gentoo.org
 
  Rather than rename ld-elf2flt.in I merged dropped patch 4 and made some
  changes to patch 6 and fixed a logic error with the configure
  use_ld_elf2flt_script logic so that it is not inverted.
 
  Try this patch against current CVS and see if it's ok for you,
 
 the reason i liked renaming ld-elf2flt script to .sh is that you could
 run configure by default and end up with both the binary and the shell
 script.  if something was wonky, this lets you quickly test either one
 without having to re-run configure to switch modes.  i'm not terribly
 set on keeping this functionality, just pointing out that it was done
 this way on purpose.

And some of why I didn't rename it is just leaving the CVS history die with
the original file.  Of course the rename to ld-elf2flt.in probably ate that
already :-(

I just figured that this will be mostly temporary and that the script will
get dropped due to being defaulted to off and bit rotting and .

 at any rate, in the process of fixing my inverted logic, it looks like
 some were left behind.  you'll want to drop the AC_SUBST() right after
 the AC_ARG_ENABLE():
 +AC_SUBST(use_ld_elf2flt_script)
 
 and then at the end, you used the _script instead of the _binary:
 +if test $use_ld_elf2flt_script = yes ; then
 +AC_OUTPUT(ld-elf2flt)
 +fi

Yep, thanks,  I didn't quite get back to figuring out why it only built
ld-elf2flt (the script) at build time and not at configure time ;-)

So I think what I have ready to commit is good to go.  Haven't seen any
comments strongly against it,  so later today or tomorrow I'll check it in,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 6/7] ld-elf2flt: convert to C

2009-07-08 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Wednesday 08 July 2009 20:56:20 David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
 
   On Tue, Jul 7, 2009 at 06:43, David McCullough wrote:
Jivin Mike Frysinger lays it down ...
   
Due to shell portability issues (which is to say shell scripts are not
portable -- think Windows), convert elf2flt to C code.
   
I've updated this code base to the latest elf2flt tree and actually
done some basic tests -- building the three Blackfin tuples (ELF,
FLAT, FDPIC) and running programs on my Blackfin boards.  This process
found errors in the original implementation as well as some of the
cleanups I did.
   
Signed-off-by: Nathan Sidwell nat...@codesourcery.com
Signed-off-by: Mike Frysinger vap...@gentoo.org
   
Rather than rename ld-elf2flt.in I merged dropped patch 4 and made some
changes to patch 6 and fixed a logic error with the configure
use_ld_elf2flt_script logic so that it is not inverted.
   
Try this patch against current CVS and see if it's ok for you,
  
   the reason i liked renaming ld-elf2flt script to .sh is that you could
   run configure by default and end up with both the binary and the shell
   script.  if something was wonky, this lets you quickly test either one
   without having to re-run configure to switch modes.  i'm not terribly
   set on keeping this functionality, just pointing out that it was done
   this way on purpose.
 
  And some of why I didn't rename it is just leaving the CVS history die with
  the original file.  Of course the rename to ld-elf2flt.in probably ate that
  already :-(
 
 ah, that does suck.  time to move to git ! :)
 
  I just figured that this will be mostly temporary and that the script will
  get dropped due to being defaulted to off and bit rotting and .
 
 hmm, i'd forgotten about an oft unused config.status feature ... how about 
 adding a dedicated rule that looks like:
 ld-elf2flt.sh: $(srcdir)/ld-elf2flt.in
   ./config.status --file=$@:$
 
 this would allow people debugging things to manually run `make ld-elf2flt.sh` 
 and get the right thing

Even better :-)

AC_OUTPUT(ld-elf2flt.sh:ld-elf2flt.in Makefile elf2flt.ld)

lets us keep the old name and generate both all the time, with other fixups
of course.  We can work out what I have missed once it's committed ;-)

Cheers,
Davidm


-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [Fwd: convert ld-elf2flt to C program]

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Monday 06 July 2009 00:24:46 David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
   On Wednesday 20 February 2008 19:22:38 David McCullough wrote:
If someone wants to have a go at reducing the code size/complexity a
bit (or not) and make sure the patch is up to date and only used for
cygwin/windows builds, I will get it committed into the elf2flt repo on
uclinux.org, promise :-)
  
   is this still your opinion David ?  while i dont agree, if it's the only
   way to get merged, then i guess i'll have to do it.  rather than tying it
   to a target environment, i would make it a configure option.  something
   like: ./configure --enable-ld-elf2flt-binary
  
   the latest version is attached and has been tested with the different
   Blackfin tuples and Linux/mingw hosts.  fixed a few more bugs to get this
   far ;).
 
  I was sort of hoping to run the two (script and C in parrallel for a while)
  but I am not sure if that will really do more than cause bit-rot in the
  non-default option.
 
 i'll be switching the Blackfin toolchain to the binary one, so there would be 
 testing on both sides if you wanted to keep the uclinux.org side cautious for 
 a little while.  if no one complains, we flip the default configure option.  
 if still no one complains, we drop it.

Unless there is some strong support for dragging the process out, lets assume
for now the 'C' version is the default and the script is a config option until
we drop it down the track.

  Other thans Johns comments about 'C' not being ideal for scripting,  which
  I agree, I am mostly ok. The only thought I had when all the perl compiler
  stuff was getting thrown around was to re-write it in TCL (Yeah I know),
  but the tinytcl library could easily be used to produce a binary tool to
  run the script,  or, run it native of systems with tcl interpreters.
 
 tinytcl can produce native code from a tcl script ?  or you mean the tinytcl 
 executable itself is tiny ?

No,  but you can just encode the script into a small wrapper and invoke the
interpreter on it that way.  Pretty simple IIRC.

  So unless there are any more followups to this thread with better ideas
  or agreement/disagreement, I think it's time to merge it in.
  Give a day or so for and final feedback and I'll run with whatever is the
  latest patch
 
 i can split the patch up into smaller pieces if you like.  atm it adds helper 
 functions like fatal() to stubs.c and then converts elf2flt.c to use those 
 (i found this useful after elf2flt produced the error output cannot open 
 with no indication *which* program could not open).

Your call on splitting it,  might be better for others to follow.

Actually,  do that and I'll apply all those now,  then we can at least tag the
source prior to the C version coming in so if someone wants the old behaviour
it's easy enough to checkout to a tag.

 i'm pretty sure this is the latest patch (taken from blackfin.u.o git), but i 
 have to double check to make sure i dont have anything left on my laptop 
 which 
 i can do tomorrow.

No prob,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] parallel compiles

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Wednesday 06 February 2008, David McCullough wrote:
   is there a reason for forcing -j1 in sub-packages ?  we've dropped the
   -j1 in {lib,user}/Makefile for the DIRS target and generally had great
   success.  you can really feel the difference on an 8 or 16 proc system. 
   i also replaced the -j1 for the _only targets with -j$(HOST_NCPU).
 
  Interesting result,  do you have an measured build times with and
  without the change ?  It would be nice to know,  and if the gains
  justify the fixing of any potentially broken sub dirs :-)
 
 just doing a simple `time make AnalogDevices/BF537-STAMP_default` here ...
  - with NON_SMP_BUILD set: ~8min
  - without NON_SMP_BUILD set (and the -j1 pieces removed): ~1.5min
 pretty consistent here ... +/-10seconds
 
  If you have a patch,  send it in and I'll try it here and see how bad it
  is for our builds,  if it's relatively isolated I am happy to fix up
  some bits and include it,  anything that speeds builds is good,
 
 i'm pushing this for our next-next release (so current development tree).  
 only noticed net-tools failing so far (but i posted a patch for that)
 ---
 Do not force -j1 in subdirs and use -j$(HOST_NCPU) for _only targets.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied.  I needed to fix:

new-wave/user/samba/source/makefile (disable parallel builds)
new-wave/user/pciutils/Makefile (fixed deps)
new-wave/user/nessus/Makefile (fixed deps)

For completeness,  this reduces my complete build time for a large target
from 25.3 minutes to 21.4 minutes,  which was enough to put it in,

Thanks,
Davidm

 ---
 diff --git a/lib/Makefile b/lib/Makefile
 index 0de9193..e9e9372 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -136,16 +136,16 @@ all:
  # the actual dir target
  .PHONY: $(DIRS_y)
  $(DIRS_y):
 - [ ! -d $@ ] || ( touch $@/.sgbuilt_lib  $(MAKE) -j1 -C $@ ) || exit 
 $$?
 + [ ! -d $@ ] || ( touch $@/.sgbuilt_lib  $(MAKE) -C $@ ) || exit $$?
  
  %_only:
 - touch $(@:_only=)/.sgbuilt_lib  $(MAKE) -j1 -C $(@:_only=)
 + touch $(@:_only=)/.sgbuilt_lib  $(MAKE) -j$(HOST_NCPU) -C $(@:_only=)
  
  %_clean:
   $(MAKE) -j1 -C $(@:_clean=) clean; rm -f $(@:_clean=)/.sgbuilt_lib; true
  
  %_romfs:
 - $(MAKE) -j1 -C $(@:_romfs=) romfs
 + $(MAKE) -C $(@:_romfs=) romfs
  
  
 ##
  
 diff --git a/user/Makefile b/user/Makefile
 index d452260..18b8f00 100644
 --- a/user/Makefile
 +++ b/user/Makefile
 @@ -440,16 +440,16 @@ asterisk-addons: mysql asterisk
  miniupnpd : iptables
  
  $(sort $(dir_y) $(dir_p)):  config
 - [ ! -d $@ ] || ( touch $@/.sgbuilt_user  $(MAKE) -j1 -C $@ ) || 
 exit $$?
 + [ ! -d $@ ] || ( touch $@/.sgbuilt_user  $(MAKE) -C $@ ) || exit $$?
  
  %_only:
 - touch $(@:_only=)/.sgbuilt_user  $(MAKE) -j1 -C $(@:_only=)
 + touch $(@:_only=)/.sgbuilt_user  $(MAKE) -j$(HOST_NCPU) -C $(@:_only=)
  
  %_clean:
   $(MAKE) -j1 -C $(@:_clean=) clean; rm -f $(@:_clean=)/.sgbuilt_user; 
 true
  
  %_romfs:
 - $(MAKE) -j1 -C $(@:_romfs=) romfs
 + $(MAKE) -C $(@:_romfs=) romfs
  
  romfs:
   for i in $(sort $(dir_y)) $(dir_p) ; do \
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] mkconfig: allow people to control default vendor

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Rather than forcing SECURECOMPUTING as the default vendor, allow people to
 tweak this locally with a config/vendor-default file.  If said file does not
 exist, then we still get SECURECOMPUTING as the default.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied using the following patch, same net outcome :-)

Thanks,
Davidm

 ---
  config/mkconfig |8 +++-
  1 files changed, 7 insertions(+), 1 deletions(-)
 
 diff --git a/config/mkconfig b/config/mkconfig
 index e110aac..71bc31a 100755
 --- a/config/mkconfig
 +++ b/config/mkconfig
 @@ -30,6 +30,12 @@ echo  string
  echodefault 4.0
  echo
  
 +if [ -e config/vendor-default ] ; then
 + vendor=$(cat config/vendor-default)
 +else
 + vendor=SECURECOMPUTING
 +fi
 +
  #
  # Figure out the vendor/products dynamically, allows people to add there
  # own without messin with the config.in file
 @@ -40,7 +46,7 @@ echo comment \Select the Vendor you wish to target\
  echo
  echo choice
  echoprompt \Vendor\
 -echodefault DEFAULTS_SECURECOMPUTING
 +echodefault DEFAULTS_${vendor}
  echo
  
  pfile=/tmp/products.$$
 -- 
 1.6.0.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
Index: config/mkconfig
===
RCS file: /cvs/sw/new-wave/config/mkconfig,v
retrieving revision 1.34
diff -u -r1.34 mkconfig
--- config/mkconfig	5 Jul 2009 23:58:19 -	1.34
+++ config/mkconfig	6 Jul 2009 11:44:00 -
@@ -21,6 +21,15 @@
 	echo
 }
 
+default_vendor()
+{
+	if [ -f config/vendor-default ] ; then
+		fix_name `cat config/vendor-default`
+	else
+		fix_name McAfee
+	fi
+}
+
 #
 
 echo mainmenu \Embedded Linux Configuration\
@@ -40,7 +49,7 @@
 echo
 echo choice
 echo 	prompt \Vendor\
-echo 	default DEFAULTS_MCAFEE
+echo 	default DEFAULTS_`default_vendor`
 echo
 
 pfile=/tmp/products.$$
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Re: [uClinux-dev] [PATCH 1/7] add more common files to gitignore

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

applied,

Thanks,
Davidm


 ---
  .gitignore |6 ++
  1 files changed, 6 insertions(+), 0 deletions(-)
 
 diff --git a/.gitignore b/.gitignore
 index 12b560b..92ff5f6 100644
 --- a/.gitignore
 +++ b/.gitignore
 @@ -1,9 +1,15 @@
  # standard patterns
 +*.a
  *.o
  *~
  *.orig
  *.rej
  *.patch
 +.deps
 +
 +a.out
 +*.gdb
 +*.exe
  
  # autotool files
  autom4te.cache
 -- 
 1.6.3.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 2/7] cleanup build flag handling

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 This cleans up the Makefile handling of the different compiler flags such
 that it uses standard names across the board as well as unifies the link
 method.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  Makefile.in |   24 +---
  1 files changed, 13 insertions(+), 11 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
 index 1b192c4..148fd38 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -11,10 +11,10 @@ CC = @CC@
  CPU = @target_cpu@
  TARGET = @target_alias@
  CFLAGS = @CFLAGS@
 -INCLUDES = @bfd_include_dir@ @binutils_include_dir@ @zlib_include_dir@
 -CPPFLAGS = @CPPFLAGS@
 +INCLUDES = -I$(srcdir) @bfd_include_dir@ @binutils_include_dir@ 
 @zlib_include_dir@
 +CPPFLAGS = @CPPFLAGS@ $(DEFS) $(INCLUDES)
  LDFLAGS = @LDFLAGS@
 -LIBS = @LIBS@
 +LDLIBS = @LIBS@
  INSTALL = @INSTALL@
  DEFS = @DEFS@ -DTARGET_$(CPU)
  EXEEXT = @EXEEXT@
 @@ -23,16 +23,14 @@ OBJEXT = @OBJEXT@
  HOST = @host_alias@
  
  ifneq (,$(findstring mingw32,$(HOST)))
 -   LIBS :=  $(LIBS) -lws2_32
 +   LDLIBS += -lws2_32
  endif
  
  # force link order under cygwin to avoid getopts / libiberty clash
  ifneq ($(strip $(shell gcc -v 21 | grep cygwin)),)
 -   LIBS := -lcygwin $(LIBS)
 +   LDLIBS := -lcygwin $(LDLIBS)
  endif
  
 -CCFLAGS = $(CFLAGS) $(DEFS) $(INCLUDES)
 -
  LDFILE= elf2flt.ld
  ifeq ($(strip $(CPU)),e1)
  SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld
 @@ -50,11 +48,15 @@ PROGS = $(PROG_ELF2FLT) $(PROG_FLTHDR)
  
  all: $(PROGS) ld-elf2flt
  
 -$(PROG_ELF2FLT): $(srcdir)/elf2flt.c compress.o $(srcdir)/stubs.c
 - $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 +# We need to declare the link explicitly because make only provides
 +# implicit rules when EXEEXT is set to nothing
 +link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 +
 +$(PROG_ELF2FLT): elf2flt.o compress.o stubs.o
 + $(link)
  
 -$(PROG_FLTHDR): $(srcdir)/flthdr.c compress.o
 - $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 +$(PROG_FLTHDR): flthdr.o compress.o
 + $(link)
  
  ld-elf2flt: $(srcdir)/ld-elf2flt.in
   ./config.status $@
 -- 
 1.6.3.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 3/7] generate dependency info automatically

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  Makefile.in |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
 index 148fd38..8b82809 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -65,7 +65,7 @@ Makefile: $(srcdir)/Makefile.in
   ./config.status $@
  
  clean:
 - -rm -f $(PROGS) *.$(OBJEXT)
 + -rm -f $(PROGS) *.$(OBJEXT) .deps
  
  distclean: clean
   -rm -f Makefile config.log config.status config.cache ld-elf2flt
 @@ -86,4 +86,6 @@ install:
   $(INSTALL) -m 755 ld-elf2flt $(target_bindir)/ld
   $(INSTALL) -m 644 $(SRC_LDFILE) $(target_libdir)/$(LDFILE)
  
 -
 +sinclude .deps
 +.deps:
 + $(CC) -MM $(CPPFLAGS) *.c  .deps
 -- 
 1.6.3.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 5/7] unify portability handling and errors

2009-07-06 Thread David McCullough
, : %s\n, strerror(e));
 + va_end(args);
 + exit(1);
 +}
 diff --git a/stubs.h b/stubs.h
 new file mode 100644
 index 000..493ff73
 --- /dev/null
 +++ b/stubs.h
 @@ -0,0 +1,38 @@
 +/* macros for conversion between host and (internet) network byte order */
 +#ifndef WIN32
 +# include netinet/in.h /* Consts and structs defined by the internet 
 system */
 +# define BINARY_FILE_OPTS
 +#else
 +# include winsock2.h
 +# define BINARY_FILE_OPTS b
 +#endif
 +
 +#ifndef __WIN32
 +# include sys/wait.h
 +#endif
 +#ifndef WIFSIGNALED
 +# define WIFSIGNALED(S) (((S)  0xff) != 0  ((S)  0xff) != 0x7f)
 +#endif
 +#ifndef WTERMSIG
 +# define WTERMSIG(S) ((S)  0x7f)
 +#endif
 +#ifndef WIFEXITED
 +# define WIFEXITED(S) (((S)  0xff) == 0)
 +#endif
 +#ifndef WEXITSTATUS
 +# define WEXITSTATUS(S) (((S)  0xff00)  8)
 +#endif
 +#ifndef WCOREDUMP
 +# define WCOREDUMP(S) ((S)  WCOREFLG)
 +#endif
 +#ifndef WCOREFLG
 +# define WCOREFLG 0200
 +#endif
 +#ifndef HAVE_STRSIGNAL
 +# define strsignal(sig) SIG???
 +#endif
 +
 +extern const char *elf2flt_progname;
 +
 +void fatal(const char *, ...);
 +void fatal_perror(const char *, ...);
 -- 
 1.6.3.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 7/7] ld-elf2flt.sh: handle more strip/verbose options

2009-07-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  ld-elf2flt.sh.in |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/ld-elf2flt.sh.in b/ld-elf2flt.sh.in
 index fc5064c..8d12a45 100644
 --- a/ld-elf2flt.sh.in
 +++ b/ld-elf2flt.sh.in
 @@ -53,7 +53,8 @@ then
  
   -move-rodata)
 MOVDAT=y;; # Put rodata in ROM if 
 possible
 - -s)   ;;   # Ignore -s (strip)
 + -s|-S|--strip-all|--strip-debug)
 +   ;;   # Ignore strip flags
  
   -shared-lib-id)
 shift; SHARED_ID=$1;;  # Shared library ID
 @@ -81,7 +82,8 @@ then
 ARG1=$ARG1 $1
 ;;
  
 - -v)   ARG1=$ARG1 $1
 + -v|--verbose)
 +   ARG1=$ARG1 $1
 VERBOSE=y
 ;;
  
 -- 
 1.6.3.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [patch] all Kconfig files in vendors/ subdir

2009-07-05 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 this patch allows for per-arch/board/vendor Kconfig files (and thus
 options) by generating vendors/Kconfig based on `find` in the vendors
 dir.  this way we can keep Blackfin options (like file format and dynamic
 device nodes) in our own directories.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Fair idea,  only the patch provided added all vendors Kconfig's to the main
config.  I have respun this to only use the following Kconfig files:

vendors/VENDOR/Kconfig
vendors/VENDOR/PRODUCT/Kconfig

Which prevents cross vendor/platform pollution.  It should work out of the
box for you guys I would think. Patch as committed against our current
version attached.

Thanks,
Davidm

 ---
 Index: Makefile
 ===
 RCS file: /usr/local/src/uClinux/local-cvs/,v/Makefile,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 Makefile
 --- Makefile  11 Jun 2007 06:52:54 -  1.1.1.1
 +++ Makefile  13 Jun 2007 02:55:16 -
 @@ -102,8 +102,12 @@ tools/cksum: tools/sg-cksum/*.c
  # running the kernel and other config scripts
  #
  
 +.PHONY: vendors/Kconfig
 +vendors/Kconfig:
 + find vendors -mindepth 2 -name Kconfig | sed 's:^:source ../:'  
 vendors/Kconfig
 +
  .PHONY: Kconfig
 -Kconfig:
 +Kconfig: vendors/Kconfig
   @chmod u+x config/mkconfig
   config/mkconfig  Kconfig
  
 Index: config/Kconfig
 ===
 RCS file: /usr/local/src/uClinux/local-cvs/,v/config/Kconfig,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 Kconfig
 --- config/Kconfig11 Jun 2007 06:57:34 -  1.1.1.1
 +++ config/Kconfig13 Jun 2007 02:54:25 -
 @@ -12,4 +12,6 @@ source ../lib/Kconfig
  
  source ../user/Kconfig
  
 +source ../vendors/Kconfig
 +
  #
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
Index: Makefile
===
RCS file: /cvs/sw/new-wave/Makefile,v
retrieving revision 1.182
diff -u -r1.182 Makefile
--- Makefile	28 May 2009 00:23:49 -	1.182
+++ Makefile	6 Jul 2009 01:52:26 -
@@ -154,11 +154,12 @@
 .PHONY: oldconfig
 oldconfig: Kconfig conf
 	KCONFIG_NOTIMESTAMP=1 $(SCRIPTSDIR)/conf -o Kconfig
+	@chmod u+x config/setconfig
+	@config/setconfig defaults
 	@$(MAKE) oldconfig_linux
 	@$(MAKE) oldconfig_modules
 	@$(MAKE) oldconfig_config
 	@$(MAKE) oldconfig_uClibc
-	@chmod u+x config/setconfig
 	@config/setconfig final
 
 .PHONY: modules
Index: config/Kconfig
===
RCS file: /cvs/sw/new-wave/config/Kconfig,v
retrieving revision 1.4
diff -u -r1.4 Kconfig
--- config/Kconfig	27 May 2009 23:55:13 -	1.4
+++ config/Kconfig	6 Jul 2009 01:52:26 -
@@ -12,6 +12,8 @@
 	string
 	default 4.0
 
+source ../vendors/Kconfig
+
 source ../lib/Kconfig
 menu Automake Libraries
 source ../lib/Kconfig.auto
Index: config/Makefile
===
RCS file: /cvs/sw/new-wave/config/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- config/Makefile	6 Jul 2009 01:51:56 -	1.11
+++ config/Makefile	6 Jul 2009 01:52:26 -
@@ -21,14 +21,24 @@
 xconfig: gconfig autoconf
 
 .PHONY: automake force autoclean
-autoconf: autoclean ../lib/Kconfig.auto ../user/Kconfig.auto automake
+autoconf: ../vendors/Kconfig ../lib/Kconfig.auto ../user/Kconfig.auto automake
 automake: ../lib/Makefile.auto ../user/Makefile.auto
 force:
 
 #
 # build the auto config Kconfig.auto files and their Makefile.auto components
+# also include any vendor Kconfig files if they exist.
 #
-../lib/Kconfig.auto ../user/Kconfig.auto: force
+../vendors/Kconfig ../lib/Kconfig.auto ../user/Kconfig.auto: force
+
+../vendors/Kconfig: Makefile
+	@echo # autogenerated, do not EDIT  $@; \
+	. ../.config; \
+	for i in $$CONFIG_VENDOR/$$CONFIG_PRODUCT/. $$CONFIG_VENDOR/.; do \
+		[ -f ../vendors/$$i/Kconfig ] || continue; \
+		echo source ../vendors/$$i/Kconfig  $@; \
+		echo autoconf: vendors/$$i/Kconfig; \
+	done
 
 ../lib/Kconfig.auto ../user/Kconfig.auto ../lib/Makefile.auto ../user/Makefile.auto: Makefile
 	@cd `dirname $...@`; \
@@ -59,6 +69,7 @@
 autoclean:
 	rm -f ../lib/Kconfig.auto ../user/Kconfig.auto
 	rm -f ../lib/Makefile.auto ../user/Makefile.auto
+	rm -f ../vendors/Kconfig
 
 clean: confclean autoclean
 	rm -f autoconf.h auto.conf .config .config.old
Index: config/setconfig

Re: [uClinux-dev] [patch] detect ledman support in dhcpcd-new via kernel .config

2009-07-05 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 here's another stab at the problem.  this one should work ok for everyone
 concerned (i'm assuming of course as i have no way of actually testing
 ledman).
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 Index: user/dhcpcd-new/Makefile
 ===
 RCS file: /usr/local/src/uClinux/local-cvs/,v/user/dhcpcd-new/Makefile,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 Makefile
 --- user/dhcpcd-new/Makefile  11 Jun 2007 06:55:04 -  1.1.1.1
 +++ user/dhcpcd-new/Makefile  13 Jun 2007 00:40:14 -
 @@ -5,6 +5,9 @@ OBJS = arp.o buildmsg.o client.o dhcpcd.
  ifeq ($(findstring 2.0,$(LINUXDIR)),2.0)
  CFLAGS += -DOLD_LINUX_VERSION=1
  endif
 +ifneq ($(CONFIG_LEDMAN),)
 +CFLAGS += -DCONFIG_LEDMAN
 +endif
  
  CFLAGS += -D_BSD_SOURCE=1
  
 Index: user/dhcpcd-new/client.c
 ===
 RCS file: /usr/local/src/uClinux/local-cvs/,v/user/dhcpcd-new/client.c,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 client.c
 --- user/dhcpcd-new/client.c  11 Jun 2007 06:55:04 -  1.1.1.1
 +++ user/dhcpcd-new/client.c  13 Jun 2007 00:40:16 -
 @@ -48,7 +48,6 @@
  #include pathnames.h
  #include confdefs.h
  
 -#include linux/autoconf.h
  #ifdef CONFIG_LEDMAN
  #include linux/ledman.h
  #endif
 Index: user/dhcpcd-new/dhcpcd.c
 ===
 RCS file: /usr/local/src/uClinux/local-cvs/,v/user/dhcpcd-new/dhcpcd.c,v
 retrieving revision 1.1.1.1
 diff -u -p -r1.1.1.1 dhcpcd.c
 --- user/dhcpcd-new/dhcpcd.c  11 Jun 2007 06:55:04 -  1.1.1.1
 +++ user/dhcpcd-new/dhcpcd.c  13 Jun 2007 00:39:57 -
 @@ -33,7 +33,6 @@
  #include client.h
  #include signals.h
  
 -#include linux/autoconf.h
  #ifdef CONFIG_LEDMAN
  #include linux/ledman.h
  #endif
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] FLAT: use IS_ERR_VALUE() helper macro

2009-07-01 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 There is a common macro now for testing mixed pointer/errno values, so use
 that rather than handling the casts ourself.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Acked-by: David McCullough david_mccullo...@securecomputing.com

Cheers,
Davidm

 ---
  fs/binfmt_flat.c |   22 ++
  1 files changed, 10 insertions(+), 12 deletions(-)
 
 diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
 index 697f6b5..f22b312 100644
 --- a/fs/binfmt_flat.c
 +++ b/fs/binfmt_flat.c
 @@ -278,8 +278,6 @@ static int decompress_exec(
   ret = bprm-file-f_op-read(bprm-file, buf, LBUFSIZE, fpos);
   if (ret = 0)
   break;
 - if (ret = (unsigned long) -4096)
 - break;
   len -= ret;
  
   strm.next_in = buf;
 @@ -335,7 +333,7 @@ calc_reloc(unsigned long r, struct lib_info *p, int 
 curid, int internalp)
   (%d != %d), (unsigned) r, curid, id);
   goto failed;
   } else if ( ! p-lib_list[id].loaded 
 - load_flat_shared_library(id, p)  (unsigned 
 long) -4096) {
 + IS_ERR_VALUE(load_flat_shared_library(id, p))) {
   printk(BINFMT_FLAT: failed to load library %d, id);
   goto failed;
   }
 @@ -545,7 +543,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   textpos = do_mmap(bprm-file, 0, text_len, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_EXECUTABLE, 0);
   up_write(current-mm-mmap_sem);
 - if (!textpos  || textpos = (unsigned long) -4096) {
 + if (!textpos || IS_ERR_VALUE(textpos)) {
   if (!textpos)
   textpos = (unsigned long) -ENOMEM;
   printk(Unable to mmap process text, errno %d\n, 
 (int)-textpos);
 @@ -560,7 +558,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0);
   up_write(current-mm-mmap_sem);
  
 - if (realdatastart == 0 || realdatastart = (unsigned 
 long)-4096) {
 + if (realdatastart == 0 || IS_ERR_VALUE(realdatastart)) {
   if (!realdatastart)
   realdatastart = (unsigned long) -ENOMEM;
   printk(Unable to allocate RAM for process data, errno 
 %d\n,
 @@ -587,7 +585,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   result = bprm-file-f_op-read(bprm-file, (char *) 
 datapos,
   data_len + (relocs * sizeof(unsigned 
 long)), fpos);
   }
 - if (result = (unsigned long)-4096) {
 + if (IS_ERR_VALUE(result)) {
   printk(Unable to read data+bss, errno %d\n, 
 (int)-result);
   do_munmap(current-mm, textpos, text_len);
   do_munmap(current-mm, realdatastart, data_len + extra);
 @@ -607,7 +605,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0);
   up_write(current-mm-mmap_sem);
  
 - if (!textpos  || textpos = (unsigned long) -4096) {
 + if (!textpos || IS_ERR_VALUE(textpos)) {
   if (!textpos)
   textpos = (unsigned long) -ENOMEM;
   printk(Unable to allocate RAM for process text/data, 
 errno %d\n,
 @@ -641,7 +639,7 @@ static int load_flat_file(struct linux_binprm * bprm,
   fpos = 0;
   result = bprm-file-f_op-read(bprm-file,
   (char *) textpos, text_len, fpos);
 - if (result  (unsigned long) -4096)
 + if (!IS_ERR_VALUE(result))
   result = decompress_exec(bprm, text_len, (char 
 *) datapos,
data_len + (relocs * 
 sizeof(unsigned long)), 0);
   }
 @@ -651,13 +649,13 @@ static int load_flat_file(struct linux_binprm * bprm,
   fpos = 0;
   result = bprm-file-f_op-read(bprm-file,
   (char *) textpos, text_len, fpos);
 - if (result  (unsigned long) -4096) {
 + if (!IS_ERR_VALUE(result)) {
   fpos = ntohl(hdr-data_start);
   result = bprm-file-f_op-read(bprm-file, 
 (char *) datapos,
   data_len + (relocs * sizeof(unsigned 
 long)), fpos);
   }
   }
 - if (result = (unsigned long)-4096) {
 + if (IS_ERR_VALUE(result)) {
   printk(Unable

Re: [uClinux-dev] uClinux compilation probleam on ubuntu

2009-06-23 Thread David McCullough
 ]; then \
 
 inode=`ls -i $ROMFSDIR/bin/busybox | awk '{print $1}'`; \
 
 ls -iL $ROMFSDIR/bin | grep ^ *$inode | awk '{print $2}'
 | \
 
 sed s:^:$ROMFSDIR/bin/: | env -i /bin/xargs
 /bin/rm -f; \
 
 fi
 
 cp busybox /usr/local/src/uClinux-dist/romfs/bin/busybox
 
 cp: cannot stat `busybox': No such file or directory
 
 make[2]: *** [romfs] Error 1
 
 make[2]: Leaving directory `/usr/local/src/uClinux-dist/user/busybox'
 
 make[1]: *** [romfs] Error 2
 
 make[1]: Leaving directory `/usr/local/src/uClinux-dist/user'
 
 make: *** [romfs] Error 1
 
 r...@ubuntu:/usr/local/src/uClinux-dist#
 
  
 
 .
 
 Thanks and Regards
 
 Venkatesh Chindam
 
  
 

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: rename Blackfin relocs

2009-06-04 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 We renamed all the Blackfin relocs in the toolchain to match other ports
 (all caps and a R_BFIN_ prefix), so update elf2flt accordingly.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

  elf2flt.c |   22 +++---
  1 files changed, 11 insertions(+), 11 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index 8bcce1f..0ae3ad1 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -69,7 +69,7 @@
  /* Always include Blackfin-specific defines in addition to common ELF stuff
   * above as the common elf headers often do not have our relocs.
   */
 -#ifdef TARGET_bfin
 +#if defined(TARGET_bfin)  !defined(R_BFIN_RIMM16)
  #include elf/bfin.h
  #endif
  
 @@ -738,15 +738,15 @@ dump_symbols(symbols, number_of_symbols);
   default:
   goto bad_resolved_reloc;
  #elif defined TARGET_bfin
 - case R_rimm16:
 - case R_luimm16:
 - case R_huimm16:
 + case R_BFIN_RIMM16:
 + case R_BFIN_LUIMM16:
 + case R_BFIN_HUIMM16:
   sym_vma = bfd_section_vma(abs_bfd, 
 sym_section);
   sym_addr += sym_vma + q-addend;
  
   if (weak_und_symbol(sym_section-name, 
 (*(q-sym_ptr_ptr
   continue;
 - if (q-howto-type == R_rimm16  
 (0x  sym_addr)) {
 + if (q-howto-type == R_BFIN_RIMM16  
 (0x  sym_addr)) {
   fprintf (stderr, Relocation overflow 
 for rN = %s\n,sym_name);
   bad_relocs++;
   }
 @@ -765,7 +765,7 @@ dump_symbols(symbols, number_of_symbols);
   if (bfin_set_reloc (flat_relocs + 
 flat_reloc_count,
   sym_section-name, 
 sym_name,
   (*(q-sym_ptr_ptr)),
 - q-howto-type == 
 R_huimm16 ? 1 : 0,
 + q-howto-type == 
 R_BFIN_HUIMM16 ? 1 : 0,
   section_vma + 
 q-address))
   bad_relocs++;
   if (a-flags  SEC_CODE)
 @@ -773,7 +773,7 @@ dump_symbols(symbols, number_of_symbols);
   flat_reloc_count++;
   break;
  
 - case R_byte4_data:
 + case R_BFIN_BYTE4_DATA:
   sym_vma = bfd_section_vma(abs_bfd, 
 sym_section);
   sym_addr += sym_vma + q-addend;
  
 @@ -1507,13 +1507,13 @@ DIS29_RELOCATION:
   break;
   }
  #elif defined TARGET_bfin
 - if ((*p)-howto-type == R_rimm16
 - || (*p)-howto-type == R_huimm16
 - || (*p)-howto-type == R_luimm16)
 + if ((*p)-howto-type == R_BFIN_RIMM16
 + || (*p)-howto-type == R_BFIN_HUIMM16
 + || (*p)-howto-type == R_BFIN_LUIMM16)
   {
   /* for l and h we set the lower 16 bits 
 which is only when it will be used */
   bfd_putl16 (sym_addr, sectionp + 
 q-address);
 - } else if ((*p)-howto-type == R_byte4_data) {
 + } else if ((*p)-howto-type == 
 R_BFIN_BYTE4_DATA) {
   bfd_putl32 (sym_addr, sectionp + 
 q-address);
   }
  #else /* ! TARGET_arm  ! TARGET_e1  ! TARGET_bfin */
 -- 
 1.6.3.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt: make sure to cleanup tmp linker script

2009-06-01 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Rather than putting the `rm` at the end of the script before the normal
 exit point, create a trap to automatically delete the script when exiting.
 This way the linker script gets cleaned up whenever there is an error as
 well.  Otherwise every link invocation that ends in a failure could leave
 behind crap.  On my system, i found almost 2 million of these suckers in
 my /tmp dir.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm


 ---
  ld-elf2flt.in |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/ld-elf2flt.in b/ld-elf2flt.in
 index 32eb7e0..91e1ccb 100644
 --- a/ld-elf2flt.in
 +++ b/ld-elf2flt.in
 @@ -107,6 +107,7 @@ then
   [ $VERBOSE = y ]  set -x
   ARG1=$ARG1 $FINAL_ONLY
   NEWLDSCRIPT=`mktemp /tmp/flt-XX`
 + trap 'rm -f $NEWLDSCRIPT' EXIT
   SEDOP= -e s/^R_RODAT// -e /^W_RODAT/d
   OBJCOPYOP=
   if [ $MOVDAT ]
 @@ -225,7 +226,6 @@ then
fi
   fi
   [ $RFILE = $OFILE.gdb ] || rm -f $RFILE  # not needed for 
 any reason
 - rm -f $NEWLDSCRIPT
   exit 0
   fi
  
 -- 
 1.6.3.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Unable to compile uclinux-dist, arm-linux-gcc: Command not found

2009-05-28 Thread David McCullough

Jivin Peter Weichai lays it down ...
 Hi Guys,
 
 I managed to solve the previous problem, however i ended up with anther.
 
 cannot find entry symbol lf2flt; defaulting to 80b0

You toolchain doe snot support flat binaries,  and thus misinterprets
the -Wl,-elf2flt option to be -e lf2flt

Cheers,
Davidm

 --- On Thu, 5/28/09, Peter Weichai peterweic...@yahoo.com wrote:
 
 From: Peter Weichai peterweic...@yahoo.com
 Subject: Unable to compile uclinux-dist, arm-linux-gcc: Command not found
 To: uclinux-dev@uclinux.org
 Date: Thursday, May 28, 2009, 5:19 AM
 
 Hi Guys,
  
 I encounted very weird problem. I couldnt compile my uClinux-dist. From the 
 terminal screen message, its due to arm-linux-gcc, command not found. However 
 i already specified the arm-linux-gcc path. Below is what i got from
 echo $PATH
  
 /usr/local/arm/3.4.1/bin:/usr/local/arm/3.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 
 Any advice?
 Thanks
 
  
 --Screen Message of uclinux-dist 
 build
 make[1]: Nothing to be done for `all'.
 make[1]: Leaving directory `/home/peter/uclinux/uClinux-dist/tools/ucfront'
 ln -sf /home/peter/uclinux/uClinux-dist/tools/ucfront/ucfront 
 tools/ucfront-gcc
 ln -sf /home/peter/uclinux/uClinux-dist/tools/ucfront/ucfront 
 tools/ucfront-g++
 ln -sf /home/peter/uclinux/uClinux-dist/tools/ucfront/ucfront-ld 
 tools/ucfront-ld
 chmod +x tools/romfs-inst.sh tools/modules-alias.sh
 . linux-2.6.x/.config; if [ $CONFIG_INITRAMFS_SOURCE !=  ]; then \
   mkdir -p `dirname $CONFIG_INITRAMFS_SOURCE`; \
   touch $CONFIG_INITRAMFS_SOURCE || exit 1; \
  fi
 make ARCH=arm CROSS_COMPILE=arm-linux- -j1 -C linux-2.6.x  || exit 1
 make[1]: arm-linux-gcc: Command not found
 make[1]: Entering directory `/home/peter/uclinux/uClinux-dist/linux-2.6.x'
   CHK
  include/linux/version.h
 make[2]: `include/asm-arm/mach-types.h' is up to date.
   CHK include/linux/utsrelease.h
   CC  arch/arm/kernel/asm-offsets.s
 /bin/sh: arm-linux-gcc: not found
 make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 127
 make[1]: *** [prepare0] Error 2
 make[1]: Leaving directory `/home/peter/uclinux/uClinux-dist/linux-2.6.x'
 make: *** [linux] Error 1
 -
 
 
 
   
 
 
   
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] problem with netflash

2009-05-28 Thread David McCullough

Jivin b2112 lays it down ...
 I am using the 2.4 kernel with the Coldfire MCF5275 and I've found an
 issue using the netflash application with programming files above 4meg.  At
 4megs the following segfault error occurs.

I am guessing you have 128K sectors (* 32 = 4MB),  and you are overflowing
the bitmap (with is only 32 bits).

Try the attached patch (completely untested ;-)

Cheers,
Davidm


 ---
 Write of 58388 bytes at pos 4194304 (data at 0054)
 bad frame format: 
 PC: [040f5e00]
 SR: 2014  SP: 005a3f4c  a2: f30ba003
 d0: d1: 0061d2: 06ffd3: e703
 d4: 0004d5: a0: 00448010a1: 005a2000
 Process netflash (pid: 54, stackpage=005a3000)
 Frame format=5
 Stack from 005a3f80:
 005745e0 03f30ba0 0006 03e23dfc 005a3fc4 00047326 005745e0
 03f30ba0
 0006 03e23dfc 0036 00047128 0001 0040 03e20e14
 03e214f8
 03e23f14 03e23f14 00023af6 0004 0006 03e23dfc 0001
 
 0006 0004 0040 ffda 0036  4080
 003a0e94
 Call Trace:
 [00047326] [00047128] [00023af6]
 Code: bad frame format: 
 PC: [00022234]
 SR: 2714  SP: 005a3ec4  a2: 005a4000
 d0: d1: 0f58d2: d3: 003a0e94
 d4: 005a4000d5: a0: 040f5e00a1: 00109178
 Process netflash (pid: 54, stackpage=005a3000)
 Frame format=4 Stack from 005a3f00:
 0004 00028730 005a3f2c 0002260c 005a3f4c 000e7fd5 005a223c
 0036
 005a3000 f30ba003 e23dfc00 005a3f40 00021f42 000e7d1c 005a3f4c
 
 5a3f9000 00023a30 005a3f4c 0061 06ff e703 0004
 
 00448010 005a2000 f30ba003    54082014
 040f5e00
 005745e0 03f30ba0 0006 03e23dfc 005a3fc4 00047326 005745e0
 03f30ba0
 0006 03e23dfc 0036 00047128 0001 0040 03e20e14
 03e214f8
 Call Trace:
 [00028730] [0002260c] [000e7fd5] [00021f42]
 [000e7d1c] [00023a30] [00047326] [00047128]
 [00023af6]
 Code: 3030 2a00 2f00 4879 000e 7eb6 4eb9 0002 8730 508f
 SIGSEGV
 -
 
 
 I was able to narrow down the exact function causing the problem in
 /linux-2.4.x/drivers/block/blkmem.c  In general_program_func(), the function
 call to set_bit() is causing the segfault.
 
 When the function is commented out, the application works fine.  I'm still
 working on the work around for this problem, but if anyone is aware of a
 solution if you could let me know so I can update it.
 
 int general_program_func(struct inode * inode, struct file * file, struct
 arena_t * a, struct blkmem_program_t * prog)
 {
   unsigned long i,block;
   unsigned long erased = 0;
 
   /* Mandatory flush of all dirty buffers */
   fsync_dev(inode-i_rdev);
   invalidate_buffers(inode-i_rdev);
 
   for(i=0;iprog-blocks;i++) {
 int min= prog-block[i].pos / a-blksize;
 int max = (prog-block[i].pos + prog-block[i].length - 1) / a-blksize;
 for(block=min; block = max; block++) {
   if (!test_bit(block, erased)) {
 printk(Erase of sector at pos %lx of arena %d (address
 %p)\n, block * a-blksize, MINOR(inode-i_rdev),
 (void*)(a-address+block*a-blksize));
 
 /* Invoke erase function */
 a-erase_func(a, block * a-blksize);
 *//set_bit(block, erased);
 *  }
 }
 
 printk(Write of %lu bytes at pos %lu (data at %p)\n,
 prog-block[i].length, prog-block[i].pos, prog-block[i].data);
 
 a-write_func(a, prog-block[i].pos, prog-block[i].length,
 prog-block[i].data);
 
 schedule();
   }
 
 #ifdef CONFIG_UCLINUX
   if (prog-reset)
 HARD_RESET_NOW();
 #endif
   return 0;
 }
 
 Thanks
 Bruce

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
Index: linux-2.4.x/drivers/block/blkmem.c
===
RCS file: /cvs/sw/linux-2.4.x/drivers/block/blkmem.c,v
retrieving revision 1.61
diff -u -r1.61 blkmem.c
--- linux-2.4.x/drivers/block/blkmem.c	1 Oct 2008 13:16:33 -	1.61
+++ linux-2.4.x/drivers/block/blkmem.c	28 May 2009 22:51:18 -
@@ -2623,7 +2623,9 @@
 int general_program_func(struct inode * inode, struct file * file, struct arena_t * a, struct blkmem_program_t * prog)
 {
   int i,block;
-  unsigned int erased = 0;
+  unsigned int erased[8]; /* enough for 32MBs of flash */
+
+  memset(erased, 0, sizeof(erased));
 
   /* Mandatory flush

Re: [uClinux-dev] Re: [PATCH 2/2] mtd/maps: uclinux: support Blackfin systems

2009-05-26 Thread David McCullough

Jivin Paul Mundt lays it down ...
 On Tue, May 26, 2009 at 01:24:46PM -0400, Mike Frysinger wrote:
  On Tue, May 26, 2009 at 13:06, Paul Mundt wrote:
   Use the attached, and then just set uclinux_ram_map.phys = 
   your_address_here
   in your setup_arch(). Having weak symbols in drivers that are supposed to
   be overriden by the architecture code is just way too backwards for
   words. Globals suffice fine for this sort of thing, if you are not going
   to go to the effort to pass this information to the driver directly that
   is.
  
  i was thinking something else, but obviously this is nicer than what i
  was thinking
 
 Unfortunately there is the problem that the map driver itself is a
 tristate, so if this is built as a module, the symbol will not be
 available to you. On the other hand, if it doesn't need to ever really be
 a module, converting it to a bool ought to be workable. There are no
 in-tree users that enable this as a module anyways.

Based on how it relocates the rootfs,  I don't believe a module can ever
be work,  so a boolean would be a better choice IMO,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] allow the prop dir to not exist

2009-05-24 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 If the prop dir does not actually exist, then don't try to process it.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org


Applied,

Thanks,
Davidm

 ---
  lib/Makefile |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/Makefile b/lib/Makefile
 index 07655b5..1379432 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -91,8 +91,8 @@ dir_5_$(CONFIG_LIB_LIBOPENH323)  += libopenh323
  #
  -include Makefile.local
  
 -# And build libraries in the prop directory last
 -dir_9_y += $(ROOTDIR)/prop
 +# And build libraries in the prop directory last (if it exists)
 +dir_9_y += $(wildcard $(ROOTDIR)/prop)
  
  DIRS_NUM = 1 2 3 4 5 6 7 8 9
  DIRS_y   = $(foreach n,$(DIRS_NUM),$(sort $(dir_$(n)_y)))
 -- 
 1.6.1.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: fix Blackfin bug with H/L relocs

2009-05-24 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 When the relocs are larger than 16bits, incorrect values are written when
 the .H/.L loading are reversed.  Normally this wouldn't happen because the
 gcc compiler always outputs in the same order (first hi, then lo).
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm


 ---
  elf2flt.c |   27 ++-
  1 files changed, 6 insertions(+), 21 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index 49ceb30..8bcce1f 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -740,6 +740,7 @@ dump_symbols(symbols, number_of_symbols);
  #elif defined TARGET_bfin
   case R_rimm16:
   case R_luimm16:
 + case R_huimm16:
   sym_vma = bfd_section_vma(abs_bfd, 
 sym_section);
   sym_addr += sym_vma + q-addend;
  
 @@ -749,28 +750,9 @@ dump_symbols(symbols, number_of_symbols);
   fprintf (stderr, Relocation overflow 
 for rN = %s\n,sym_name);
   bad_relocs++;
   }
 + if ((0x  sym_addr) != 
 persistent_data) {
   flat_relocs = (uint32_t *)
   (realloc (flat_relocs, 
 (flat_reloc_count + 1) * sizeof (uint32_t)));
 - if (bfin_set_reloc (flat_relocs + 
 flat_reloc_count,
 - sym_section-name, 
 sym_name,
 - (*(q-sym_ptr_ptr)),
 - 0, section_vma + 
 q-address))
 - bad_relocs++;
 - if (a-flags  SEC_CODE)
 - text_has_relocs = 1;
 - flat_reloc_count++;
 - break;
 -
 - case R_huimm16:
 - sym_vma = bfd_section_vma(abs_bfd, 
 sym_section);
 - sym_addr += sym_vma + q-addend;
 -
 - if (weak_und_symbol (sym_section-name, 
 (*(q-sym_ptr_ptr
 - continue;
 -
 - flat_relocs = (uint32_t *)
 - (realloc (flat_relocs, 
 (flat_reloc_count + 2) * sizeof (uint32_t)));
 - if ((0x  sym_addr) != 
 persistent_data) {
   if (verbose)
   printf (New persistent 
 data for %08lx\n, sym_addr);
   persistent_data = 0x  
 sym_addr;
 @@ -778,10 +760,13 @@ dump_symbols(symbols, number_of_symbols);
   = (sym_addr  16) | (3  
 26);
   }
  
 + flat_relocs = (uint32_t *)
 + (realloc (flat_relocs, 
 (flat_reloc_count + 1) * sizeof (uint32_t)));
   if (bfin_set_reloc (flat_relocs + 
 flat_reloc_count,
   sym_section-name, 
 sym_name,
   (*(q-sym_ptr_ptr)),
 - 1, section_vma + 
 q-address))
 + q-howto-type == 
 R_huimm16 ? 1 : 0,
 + section_vma + 
 q-address))
   bad_relocs++;
   if (a-flags  SEC_CODE)
   text_has_relocs = 1;
 -- 
 1.6.3.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] flthdr: control the Blackfin L1 stack flag

2009-05-21 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Bernd Schmidt bernds_...@t-online.de
 
 Add -u/-U options to control the Blackfin L1 stack flag.
 
 Signed-off-by: Bernd Schmidt bernds_...@t-online.de
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
 Not sure if we want to take this patch as is or try and generalize it as
 a set arch bit ?  or wait until another arch actually utilizes the arch
 bit for their own purpose ?
 
  flthdr.c |   15 +--
  1 files changed, 13 insertions(+), 2 deletions(-)
 
 diff --git a/flthdr.c b/flthdr.c
 index cf6fe4d..90f9aa3 100644
 --- a/flthdr.c
 +++ b/flthdr.c
 @@ -51,7 +51,7 @@
  char *program_name;
  
  static int print = 0, print_relocs = 0, docompress = 0, ramload = 0,
 -   stacksize = 0, ktrace = 0;
 +   stacksize = 0, ktrace = 0, l1stack = 0;
  
  
 //
  
 @@ -106,6 +106,11 @@ process_file(char *ifile, char *ofile)
   else if (ktrace  0)
   new_flags = ~FLAT_FLAG_KTRACE;
   
 + if (l1stack  0)
 + new_flags |= FLAT_FLAG_L1STK;
 + else if (l1stack  0)
 + new_flags = ~FLAT_FLAG_L1STK;
 +
   if (stacksize)
   new_stack = stacksize;
  
 @@ -139,6 +144,8 @@ process_file(char *ifile, char *ofile)
   printf(Gzip-Data-Compressed );
   if (old_flags  FLAT_FLAG_KTRACE)
   printf(Kernel-Traced-Load );
 + if (old_flags  FLAT_FLAG_L1STK)
 + printf(L1-Scratch-Stack );
   printf()\n);
   }
  
 @@ -317,6 +324,8 @@ usage(char *s)
   fprintf(stderr,-R  : do not RAM load\n);
   fprintf(stderr,-k  : kernel traced load (for debug)\n);
   fprintf(stderr,-K  : normal non-kernel traced load\n);
 + fprintf(stderr,-u  : place stack in L1 scratchpad 
 memory\n);
 + fprintf(stderr,-U  : place stack in normal SDRAM 
 memory\n);
   fprintf(stderr,-s size : stack size\n);
   fprintf(stderr,-o file : output-file\n
(default is to modify input file)\n);
 @@ -333,7 +342,7 @@ main(int argc, char *argv[])
  
   program_name = argv[0];
  
 - while ((c = getopt(argc, argv, pPdzZrRkKs:o:)) != EOF) {
 + while ((c = getopt(argc, argv, pPdzZrRuUkKs:o:)) != EOF) {
   switch (c) {
   case 'p': print = 1;break;
   case 'P': print_relocs = 1; break;
 @@ -344,6 +353,8 @@ main(int argc, char *argv[])
   case 'R': ramload = -1; break;
   case 'k': ktrace = 1;   break;
   case 'K': ktrace = -1;  break;
 + case 'u': l1stack = 1;  break;
 + case 'U': l1stack = -1; break;
   case 'o': ofile = optarg;   break;
   case 's':
   if (sscanf(optarg, %i, stacksize) != 1)
 -- 
 1.6.3.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] add .gitignore

2009-05-21 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  .gitignore |   18 ++
  1 files changed, 18 insertions(+), 0 deletions(-)
  create mode 100644 .gitignore
 
 diff --git a/.gitignore b/.gitignore
 new file mode 100644
 index 000..12b560b
 --- /dev/null
 +++ b/.gitignore
 @@ -0,0 +1,18 @@
 +# standard patterns
 +*.o
 +*~
 +*.orig
 +*.rej
 +*.patch
 +
 +# autotool files
 +autom4te.cache
 +config.log
 +config.status
 +Makefile
 +
 +# our generated files
 +elf2flt
 +elf2flt.ld
 +flthdr
 +ld-elf2flt
 -- 
 1.6.3.1
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [patch ] elf2flt MicroBlaze update

2009-05-19 Thread David McCullough

Jivin John Williams lays it down ...
 On Tue, May 19, 2009 at 8:32 AM, David McCullough
 david_mccullo...@securecomputing.com wrote:
 
  Jivin John Williams lays it down ...
  Attached is a patch that updates elf2flt support for microblaze:
 
   * Handling for new reloc type R_MICROBLAZE_32_PCREL_LO (we can just 
  ignore it)
   * remove workarounds for old microblaze linker bugs, fixed in 2.16
   * Tweak configure{.in} to indicate that MicroBlaze needs the
  --disable-emit-relocs switch
 
  signed-off-by: John Williams john.willi...@petalogix.com
 
  Applied the elf2flt changes.
 
 Thanks
 
  Still awaiting a conclusion to the emit-relocs bits discussion :-)
 
  Seems like MB would be better served with a preset default like Mike
  suggested ?
 
 Yeah - I'm about to go away for a week so this change has slipped off
 my priority queue - will look at it when I get back!

Ok,  no problems,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [patch ] elf2flt MicroBlaze update

2009-05-18 Thread David McCullough
;
   relocation_needed = 1;
   break;
   }
   case R_MICROBLAZE_64_PCREL:
   sym_vma = 0;
 - //sym_addr = (*(q-sym_ptr_ptr))-value;
   sym_addr += sym_vma + q-addend;
   sym_addr -= (q-address + 4);
   sym_addr = htonl(sym_addr);
   /* insert 16 MSB */
 - * ((unsigned short *) (r_mem+2)) |= 
 (sym_addr)  0x;
 + * ((unsigned short *) (r_mem+2)) = 
 (sym_addr)  0x;
   /* then 16 LSB */
 - * ((unsigned short *) (r_mem+6)) |= 
 (sym_addr  16)  0x;
 + * ((unsigned short *) (r_mem+6)) = 
 (sym_addr  16)  0x;
   /* We've done all the work, so continue
  to next reloc instead of break */
   continue;

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: always include elf/bfin.h

2009-05-17 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The header logic for pulling in ELF defines mixes common ELF headers and
 target specific headers.  In the Blackfin case, we always want to pull in
 the bfin.h since most of the time, the common ELF headers do not have our
 relocation defines.  This fixes building for mingw targets.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  elf2flt.c |9 +++--
  1 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index 9b1ea37..a120cc9 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -62,12 +62,17 @@
  #include cygwin-elf.h  /* Cygwin uses a local copy */
  #elif defined(TARGET_microblaze)
  #include elf/microblaze.h  /* TARGET_* ELF support for the BFD library */
 -#elif defined(TARGET_bfin)
 -#include elf/bfin.h
  #else
  #include elf.h  /* TARGET_* ELF support for the BFD library
 */
  #endif
  
 +/* Always include Blackfin-specific defines in addition to common ELF stuff
 + * above as the common elf headers often do not have our relocs.
 + */
 +#ifdef TARGET_bfin
 +#include elf/bfin.h
 +#endif
 +
  #if defined(__MINGW32__)
  #include getopt.h
  #endif
 -- 
 1.6.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: make code 64-bit clean

2009-05-07 Thread David McCullough
-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: only print No relocations when in verbose mode

2009-05-07 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm


 ---
  elf2flt.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index 9ff0299..889ea98 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -2049,7 +2049,7 @@ int main(int argc, char *argv[])
  output_relocs(abs_bfd, symbol_table, number_of_symbols, reloc_len,
 text, text_len, text_vma, data, data_len, data_vma, rel_bfd);
  
 -  if (reloc == NULL)
 +  if (reloc == NULL  verbose)
  printf(No relocations in code!\n);
  
text_offs = real_address_bits(text_vma);
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: update Blackfin port

2009-05-07 Thread David McCullough
 relocation fail for reloc 
 type: 0x%x\n, (*p)-howto-type);
 - }
  #elif defined(TARGET_e1)
  #define OPCODE_SIZE 2   /* Add 2 bytes, counting the opcode size*/
   switch ((*p)-howto-type) {
 @@ -1604,7 +1530,17 @@ DIS29_RELOCATION:
   exit(0);
   break;
   }
 -#else /* ! TARGET_arm  ! TARGET_e1 */
 +#elif defined TARGET_bfin
 + if ((*p)-howto-type == R_rimm16
 + || (*p)-howto-type == R_huimm16
 + || (*p)-howto-type == R_luimm16)
 + {
 + /* for l and h we set the lower 16 bits 
 which is only when it will be used */
 + bfd_putl16 (sym_addr, sectionp + 
 q-address);
 + } else if ((*p)-howto-type == R_byte4_data) {
 + bfd_putl32 (sym_addr, sectionp + 
 q-address);
 + }
 +#else /* ! TARGET_arm  ! TARGET_e1  ! TARGET_bfin */
  
   switch (q-howto-type) {
  #ifdef TARGET_v850
 @@ -1657,19 +1593,6 @@ DIS29_RELOCATION:
  #endif /* !TARGET_arm */
   }
  
 -#ifdef TARGET_bfin
 - else {
 - if ((*p)-howto-type == R_rimm16
 - || (*p)-howto-type == R_huimm16
 - || (*p)-howto-type == R_luimm16)
 - {
 - /* for l and h we set the lower 16 bits which 
 is only when it will be used */
 - *((unsigned short *) (sectionp + q-address)) = 
 (unsigned short) sym_addr;
 - } else if ((*p)-howto-type == R_byte4_data) {
 - *((uint32_t *)(sectionp + q-address)) = 
 sym_addr;
 - }
 - }
 -#endif
   if (verbose)
   printf(  RELOC[%d]: offset=0x%x symbol=%s%s 
   section=%s size=%d 
 @@ -1718,7 +1641,7 @@ DIS29_RELOCATION:
   }
  #endif
   flat_reloc_count++;
 -#endif
 +#endif //TARGET_bfin
   relocation_needed = 0;
   pflags = 0;
   }
 @@ -2065,7 +1988,7 @@ int main(int argc, char *argv[])
hdr.reloc_start = htonl(sizeof(hdr) + text_offs + text_len +data_len);
hdr.reloc_count = htonl(reloc_len);
hdr.flags   = htonl(0
 -   | (load_to_ram ? FLAT_FLAG_RAM : 0)
 +   | (load_to_ram || text_has_relocs ? FLAT_FLAG_RAM : 0)
 | (ktrace ? FLAT_FLAG_KTRACE : 0)
 | (pic_with_got ? FLAT_FLAG_GOTPIC : 0)
 | (docompress ? (docompress == 2 ? FLAT_FLAG_GZDATA : FLAT_FLAG_GZIP) 
 : 0)
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: only define get_gp_value for nios2

2009-05-07 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 Since the nios2 port is the only one to use the get_gp_value() function,
 stick it behind a TARGET_nios2 ifdef.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm


 ---
  elf2flt.c |4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index a950ff7..9ff0299 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -281,6 +281,7 @@ get_symbol_offset(char *name, asection *sec, asymbol 
 **symbol_table, long number
  
  
  
 +#ifdef TARGET_nios2
  long
  get_gp_value(asymbol **symbol_table, long number_of_symbols)
  {
 @@ -291,7 +292,8 @@ get_gp_value(asymbol **symbol_table, long 
 number_of_symbols)
}
return -1;
  }
 - 
 +#endif
 +
  
  
  int32_t
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 1/4] elf2flt.ld: cleanup spurious whitespace

2009-05-06 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

thanks,
Davidm

 ---
  elf2flt.ld |   11 +--
  1 files changed, 5 insertions(+), 6 deletions(-)
 
 diff --git a/elf2flt.ld b/elf2flt.ld
 index c319e71..7f043ef 100644
 --- a/elf2flt.ld
 +++ b/elf2flt.ld
 @@ -48,9 +48,9 @@ W_RODAT *(.gnu.linkonce.r*)
   *(.got.plt)
   *(.got)
   FILL(0) ;
 - . = ALIGN(0x20) ; 
 + . = ALIGN(0x20) ;
   LONG(-1)
 - . = ALIGN(0x20) ; 
 + . = ALIGN(0x20) ;
  R_RODAT  *(.rodata)
  R_RODAT  *(.rodata1)
  R_RODAT  *(.rodata.*)
 @@ -62,8 +62,8 @@ R_RODAT *(.gnu.linkonce.r*)
  
   /* Microblaze has .sdata and .sbss (small bss).  They must
  be contiguous, so please don't move any of this. JW */
 - _ssrw = . ; 
 - *(.sdata) 
 + _ssrw = . ;
 + *(.sdata)
   *(.sdata.*)
   *(.sbss)/* Don't move this! */
   *(.gnu.linkonce.sb*)
 @@ -130,14 +130,13 @@ SINGLE_LINK:KEEP (*(SORT(.dtors.*)))
   KEEP (*(.fini_array))
   KEEP (*(SORT(.fini_array.*)))
   PROVIDE (__fini_array_end = .);
 -
   }  flatmem
  
   .eh_frame_hdr : { *(.eh_frame_hdr) }  flatmem
   .eh_frame : { KEEP(*(.eh_frame)) }  flatmem
   .gcc_except_table : { KEEP(*(.gcc_except_table)) } flatmem
  
 - . = ALIGN(0x10) ; 
 + . = ALIGN(0x10) ;
   _edata = . ;
  
   .bss : {
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 2/4] elf2flt.ld: discard .note.GNU-stack

2009-05-06 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 PT_GNU_STACK markings make no sense with FLAT binaries, so discard the
 related section when linking.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,  

thanks,
Davidm

 ---
  elf2flt.ld |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/elf2flt.ld b/elf2flt.ld
 index 7f043ef..947a072 100644
 --- a/elf2flt.ld
 +++ b/elf2flt.ld
 @@ -165,6 +165,7 @@ SINGLE_LINK:  KEEP (*(SORT(.dtors.*)))
   }
  
   .junk 0 : { *(.rel*) *(.rela*) }
 + /DISCARD/ : { *(.note.GNU-stack) }
   /* Stabs debugging sections.*/
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 3/4] elf2flt.ld: update debugging section names

2009-05-06 Thread David McCullough
Jivin Mike Frysinger lays it down ...
 General update for the different DWARF debugging styles gcc may output.
 This only adds possible debug sections, so it shouldn't cause any
 regressions.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,  

thanks,
Davidm

 ---
  elf2flt.ld |   26 ++
  1 files changed, 22 insertions(+), 4 deletions(-)
 
 diff --git a/elf2flt.ld b/elf2flt.ld
 index 947a072..9c01b31 100644
 --- a/elf2flt.ld
 +++ b/elf2flt.ld
 @@ -174,11 +174,29 @@ SINGLE_LINK:KEEP (*(SORT(.dtors.*)))
   .stab.index 0 : { *(.stab.index) }
   .stab.indexstr 0 : { *(.stab.indexstr) }
   .comment 0 : { *(.comment) }
 - .debug_abbrev 0 : { *(.debug_abbrev) }
 - .debug_info 0 : { *(.debug_info) }
 - .debug_line 0 : { *(.debug_line) }
 + /* DWARF debug sections.
 +Symbols in the DWARF debugging sections are relative to the beginning
 +of the section so we begin them at 0.  */
 + /* DWARF 1 */
 + .debug  0 : { *(.debug) }
 + .line   0 : { *(.line) }
 + /* GNU DWARF 1 extensions */
 + .debug_srcinfo  0 : { *(.debug_srcinfo) }
 + .debug_sfnames  0 : { *(.debug_sfnames) }
 + /* DWARF 1.1 and DWARF 2 */
 + .debug_aranges  0 : { *(.debug_aranges) }
   .debug_pubnames 0 : { *(.debug_pubnames) }
 - .debug_aranges 0 : { *(.debug_aranges) }
 + /* DWARF 2 */
 + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
 + .debug_abbrev   0 : { *(.debug_abbrev) }
 + .debug_line 0 : { *(.debug_line) }
   .debug_frame0 : { *(.debug_frame) }
   .debug_str  0 : { *(.debug_str) }
 + .debug_loc  0 : { *(.debug_loc) }
 + .debug_macinfo  0 : { *(.debug_macinfo) }
 + /* SGI/MIPS DWARF 2 extensions */
 + .debug_weaknames 0 : { *(.debug_weaknames) }
 + .debug_funcnames 0 : { *(.debug_funcnames) }
 + .debug_typenames 0 : { *(.debug_typenames) }
 + .debug_varnames  0 : { *(.debug_varnames) }
  }
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 4/4] elf2flt: allow arches to specify ABI symbol prefixes

2009-05-06 Thread David McCullough
 = . ;
 + @symbol_pre...@_ssro_size = @symbol_pre...@_essro - 
 @symbol_pre...@_ssro;
 + PROVIDE(@symbol_pre...@_sda2_base_ = @symbol_pre...@_ssro + 
 (@symbol_pre...@_ssro_size / 2));
  
   . = ALIGN(4) ;
 - __CTOR_LIST__ = .;
 - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
 + @symbol_pre...@__ctor_list__ = .;
 + LONG((@symbol_pre...@__ctor_end__ - 
 @symbol_pre...@__ctor_list__) / 4 - 2)
  SINGLE_LINK: /* gcc uses crtbegin.o to find the start of
  SINGLE_LINK:the constructors, so we make sure it is
  SINGLE_LINK:first.  Because this is a wildcard, it
 @@ -107,29 +107,29 @@ SINGLE_LINK:KEEP (*(EXCLUDE_FILE (*crtend*.o ) 
 .ctors))
  SINGLE_LINK: KEEP (*(SORT(.ctors.*)))
   KEEP (*(.ctors))
   LONG(0)
 - __CTOR_END__ = .;
 - __DTOR_LIST__ = .;
 - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
 + @symbol_pre...@__ctor_end__ = .;
 + @symbol_pre...@__dtor_list__ = .;
 + LONG((@symbol_pre...@__dtor_end__ - 
 @symbol_pre...@__dtor_list__) / 4 - 2)
  SINGLE_LINK: KEEP (*crtbegin*.o(.dtors))
  SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
  SINGLE_LINK: KEEP (*(SORT(.dtors.*)))
   KEEP (*(.dtors))
   LONG(0)
 - __DTOR_END__ = .;
 + @symbol_pre...@__dtor_end__ = .;
  
 - PROVIDE (__preinit_array_start = .);
 + PROVIDE (@symbol_pre...@__preinit_array_start = .);
   KEEP (*(.preinit_array))
 - PROVIDE (__preinit_array_end = .);
 + PROVIDE (@symbol_pre...@__preinit_array_end = .);
  
 - PROVIDE (__init_array_start = .);
 + PROVIDE (@symbol_pre...@__init_array_start = .);
   KEEP (*(SORT(.init_array.*)))
   KEEP (*(.init_array))
 - PROVIDE (__init_array_end = .);
 + PROVIDE (@symbol_pre...@__init_array_end = .);
  
 - PROVIDE (__fini_array_start = .);
 + PROVIDE (@symbol_pre...@__fini_array_start = .);
   KEEP (*(.fini_array))
   KEEP (*(SORT(.fini_array.*)))
 - PROVIDE (__fini_array_end = .);
 + PROVIDE (@symbol_pre...@__fini_array_end = .);
   }  flatmem
  
   .eh_frame_hdr : { *(.eh_frame_hdr) }  flatmem
 @@ -137,12 +137,12 @@ SINGLE_LINK:KEEP (*(SORT(.dtors.*)))
   .gcc_except_table : { KEEP(*(.gcc_except_table)) } flatmem
  
   . = ALIGN(0x10) ;
 - _edata = . ;
 + @symbol_pre...@_edata = . ;
  
   .bss : {
   . = ALIGN(0x4) ;
 - _sbss = ALIGN(0x4) ;
 - __bss_start = . ;
 + @symbol_pre...@_sbss = ALIGN(0x4) ;
 + @symbol_pre...@__bss_start = . ;
   *(.dynsbss)
   *(.sbss)
   *(.sbss.*)
 @@ -154,14 +154,14 @@ SINGLE_LINK:KEEP (*(SORT(.dtors.*)))
   *(.gnu.linkonce.b*)
   *(COMMON)
   . = ALIGN(0x10) ;
 - _ebss = . ;
 - _end = . ;
 - end = . ;
 + @symbol_pre...@_ebss = . ;
 + @symbol_pre...@_end = . ;
 + @symbol_pre...@end = . ;
   }  flatmem
  
   .stack : {
   . = ALIGN(0x4);
 - __stack_start = .;
 + @symbol_pre...@_stack_start = .;
   }
  
   .junk 0 : { *(.rel*) *(.rela*) }
 diff --git a/ld-elf2flt.in b/ld-elf2flt.in
 index 418c9ee..3ca0c7b 100644
 --- a/ld-elf2flt.in
 +++ b/ld-elf2flt.in
 @@ -122,7 +122,7 @@ then
   then
   # Non application modules enter via main not 
 _start
   #SEDOP=$SEDOP -e 's/ENTRY (_start)/ENTRY 
 (main)/'
 - SEDOP=$SEDOP -e 
 s/\\(ENTRY.\\)(_start)/\1(lib_main)/
 + SEDOP=$SEDOP -e 
 s/\\(ENTRY.\\)(@symbol_pre...@_start)/\1(lib_main)/
   OBJCOPYOP=--localize-hidden --weaken
   fi
  
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt.ld: need to keep .gcc_except_table.* too

2009-05-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 Newer versions of gcc (4.3+) may output additional exception tables
 sections, so we need to include those as well.
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  elf2flt.ld.in |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)
 
 diff --git a/elf2flt.ld.in b/elf2flt.ld.in
 index 4343108..f76eadf 100644
 --- a/elf2flt.ld.in
 +++ b/elf2flt.ld.in
 @@ -134,7 +134,10 @@ SINGLE_LINK: KEEP (*(SORT(.dtors.*)))
  
   .eh_frame_hdr : { *(.eh_frame_hdr) }  flatmem
   .eh_frame : { KEEP(*(.eh_frame)) }  flatmem
 - .gcc_except_table : { KEEP(*(.gcc_except_table)) } flatmem
 + .gcc_except_table : {
 + KEEP(*(.gcc_except_table))
 + KEEP(*(.gcc_except_table.*))
 + } flatmem
  
   . = ALIGN(0x10) ;
   @symbol_pre...@_edata = . ;
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] elf2flt: handle no bss better

2009-05-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Jie Zhang jie.zh...@analog.com
 
 If there is no bss section, set bss_vma to the end of data.
 
 Signed-off-by: Jie Zhang jie.zh...@analog.com
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  elf2flt.c |3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
 
 diff --git a/elf2flt.c b/elf2flt.c
 index 546305f..289d542 100644
 --- a/elf2flt.c
 +++ b/elf2flt.c
 @@ -2022,6 +2022,9 @@ int main(int argc, char *argv[])
   exit(2);
}
  
 +  if (bss_vma == ~0)
 +bss_vma = data_vma + data_len;
 +
/* Put common symbols in bss.  */
bss_len += add_com_to_bss(symbol_table, number_of_symbols, bss_len);
  
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] ld-elf2flt: allow -shared to be used

2009-05-06 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 From: Bernd Schmidt bernds_...@t-online.de
 
 Often build systems will use -shared when creating shared libraries, so
 don't barf on the flag when we see it.  This makes porting efforts easier.
 As a sanity check, make sure we see the -shared-lib-id flag when creating
 a shared library.
 
 Signed-off-by: Bernd Schmidt bernds_...@t-online.de
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  ld-elf2flt.in |   11 +++
  1 files changed, 11 insertions(+), 0 deletions(-)
 
 diff --git a/ld-elf2flt.in b/ld-elf2flt.in
 index 3ca0c7b..f3ad80b 100644
 --- a/ld-elf2flt.in
 +++ b/ld-elf2flt.in
 @@ -22,6 +22,7 @@ OBJDUMP=`expr $OBJCOPY : '\(.*\)objcopy'`objdump
  LDSCRIPTPATH=@binutils_ldscript_dir@   # and the scripts
  SHARED_ID=
  NEWLDSCRIPT=
 +WANT_SHARED=
  
  # check TOOLDIR from prefix/bin/ or prefix/target-alias/bin/
  [ -d ${LDSCRIPTPATH} ] || LDSCRIPTPATH=${TOOLDIR}/../lib
 @@ -56,6 +57,8 @@ then
  
   -shared-lib-id)
 shift; SHARED_ID=$1;;  # Shared library ID
 + -shared|-G)
 +   WANT_SHARED=y;;# Shared library
  
   -o)   shift; OFILE=$1;;  # the final outfile
   -o*)  OFILE=`expr \$1\ : '-o\(.*\)'`;;
 @@ -91,6 +94,14 @@ then
   shift
   done
  
 + if [ $WANT_SHARED = y ]
 + then
 + if [ -z $SHARED_ID ]
 + then
 + echo -shared used without passing a shared library ID
 + exit 1
 + fi
 + fi
   if [ $FINAL = yes ]
   then
   [ $VERBOSE = y ]  set -x
 -- 
 1.6.2.5
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] torrent client

2009-04-22 Thread David McCullough

Jivin Jamie Lokier lays it down ...
 Lennart Sorensen wrote:
  Bittornado is python.  Does python run on uclinux?
 
 I read enough of a rumour that Python doesn't run on MMU-less uClinux
 that I didn't bother to try.
 
 I guess it might work on MMU-less architectures with FDPIC-ELF,
 and of course uClinux tends to include MMUs now.

Actually,  it has little to do with the executable format and more to do
with the use of fork IMO.

The chance of a complex shell/scripting language using fork in an
incompatible to !MMU way is high in my view.  For example, bash, perl.

If the scripting supports backgrounded execution and/or process control
I figure it's even more likely to be broken for !MMU.

As usual, search the code for fork,  if it does much more than the
acceptable fork/exec,  expect to have fun making it work ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] torrent client

2009-04-22 Thread David McCullough

Jivin Jamie Lokier lays it down ...
 David McCullough wrote:
   I read enough of a rumour that Python doesn't run on MMU-less uClinux
   that I didn't bother to try.
   
   I guess it might work on MMU-less architectures with FDPIC-ELF,
   and of course uClinux tends to include MMUs now.
  
  Actually,  it has little to do with the executable format and more to do
  with the use of fork IMO.
 
 I was more thinking of all those loadable modules.  Without FDPIC-ELF
 there's no dlopen() and no (useful) shared libs.

Yeah, there is that issue ;-)

  The chance of a complex shell/scripting language using fork in an
  incompatible to !MMU way is high in my view.  For example, bash, perl.
 
  If the scripting supports backgrounded execution and/or process control
  I figure it's even more likely to be broken for !MMU.
  
  As usual, search the code for fork,  if it does much more than the
  acceptable fork/exec,  expect to have fun making it work ;-)
 
 Well, yes, but fork is typically invoked from a script interpreter if
 you actually call fork() or system() or `backquotes` from your script.
 You could just not do that.  I believe even Python has rudimentary
 thread support :-)

I meant in the python source.   Lots of the functionality that seems
harmless in the python scripts you write may actally do bad things within
the python source itself.

There's a good reason that only sash and the minix shell work on !MMU,
and the initially the minix shell needed a fair bit of work to make safe
on !MMU :-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Re: MMU trade-off

2009-03-30 Thread David McCullough

Jivin Thomas Häberle lays it down ...
 
 First of all: Thanks for the quick, frequent, interesting and informative 
 response!!
 
 The numbers mentioned by the developer were a gut feeling and rough 
 estimation, not derived by tests and measurements,
 but because I had neither I also had no basis to disagree.
 
 The CPUs in use are PowerPCs (MPC852  MPC8247) from the PowerQuicc II family 
 with 8MB to 32MB of RAM,
 thus AFAIK the cache design is descent and the cache has not to be flushed 
 completly on a context switch, right?
 
 I'll take your information into account, propose some tests and let you know 
 if we get proper results!

I think it might have been posted in one of the threads,  but just in
case it wasn't, here is a doc that gives numbers to MMU vs. no MMU.

http://opensrc.sec.samsung.com/document.html

Always good to have some real numbers ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] iptables: use _exit instead of exit if execv fails

2009-03-25 Thread David McCullough

Jivin Rainer Keller lays it down ...
 Hi All,
 
 We experienced mysterious memory corruptions in our router product
 configurations of uClinux. We tracked it down to iptables being the
 common element in those scenarios and were able to get a certain
 corruption to happen consistently at a fixed address (lucky) and were
 able to trap it with a register in our processor that traps on write to
 get a backtrace which pointed to this.
 
 When using iptables xtables_insmod is called to load the iptables module
 using /sbin/modprobe. Neither the module nor modprobe are currently
 installed on our configuration (iptables support is compiled into the
 kernel and we use plain insmod currently). So the execv fails:
 
 By using the real `exit' after the failed execv iptables modified memory
 (in fact unmapped all the heap) that was still shared between child and
 parent. When the child was done the parent continued and tried to free a
 pointer from its heap whose backing memory did not exist anymore. So it
 clobbered random memory and caused all kinds of havoc.

Applied :-)

Thanks,
Davidm


 diff --git a/iptables/xtables.c b/iptables/xtables.c
 index a309954..92314bc 100644
 --- a/iptables/xtables.c
 +++ b/iptables/xtables.c
 @@ -134,7 +134,11 @@ int xtables_insmod(const char *modname, const char
 *modprob
 case 0:
 execv(argv[0], argv);
 /* not usually reached */
 +#ifdef __uClinux__
 +   _exit(1);
 +#else
 exit(1);
 +#endif
 case -1:
 return -1;
 
 This is mine and Ubicom's first patch to uClinux. I hope you find it
 useful.
 
 Thank you for creating uClinux!
 Best Regards,
 - Rainer
 
 
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] uClinux with Cygwin

2009-03-19 Thread David McCullough

Jivin gowri sankar loganathan lays it down ...
   
 I trying to build uClinux for NEC V850
 
 On Thu, 19 Mar 2009 gowri sankar loganathan wrote :
 Hello uClinux developers,
 I am just starting with uClinux, is it possible to build the 
  uClinux with cygwin.
 
 It will be helpful if get the info how to build the uClinux in cygwin.


Search through the archives for cygwin:

http://marc.info/?l=uclinux-dev

to see what works and what doesn't,  find patches etc.

I think the general consensus is that it's a poor substitute for for
building on a linux system and that you may be better off to run a linux
dev system in a VM ;-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Re: building kernel error :

2009-03-17 Thread David McCullough

Jivin Ghanem Lafi lays it down ...
 Thanks all experts,
 The answers bombarded my  e-mail!

Could you share the answer with the rest of the list :-) :-)

Thanks,
Davidm

 2009/3/17 Ghanem Lafi lafi.gha...@gmail.com
 
  Hi all,
 
  when i do make i have this error :
 
  CC net/ipv4/xfrm4_mode_transport.
 
  o
  CC net/ipv4/xfrm4_mode_tunnel.o
  CC net/ipv4/inet_diag.o
  CC net/ipv4/tcp_diag.o
  CC net/ipv4/tcp_cubic.o
  CC net/ipv4/xfrm4_policy.o
  CC net/ipv4/xfrm4_state.o
  CC net/ipv4/xfrm4_input.o
  CC net/ipv4/xfrm4_output.o
  LD net/ipv4/built-in.o
  LD net/built-in.o
  GEN .version
  CHK include/linux/compile.h
  UPD include/linux/compile.h
  CC init/version.o
  LD init/built-in.o
  LD vmlinux
  arch/arm/mm/built-in.o:(__ksymtab+0x70): undefined reference to
  `cpu_arm7tdmi_set_pte_ext'
  make[1]: *** [vmlinux] Error 1
  make[1]: Leaving directory
  `/home/sst/Bureau/ghanem.lafi/WorkPath/uClinux2007-Linux2.6.21/uClinux-dist/linux-2.6.x'
  make: *** [linux] Error 1
 
  Does anybody know how to solve this problem ??
 
  Kind regards
  GhL
 

 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] mailing list archives

2009-03-16 Thread David McCullough

Jivin Andrei Martynov lays it down ...
 only archives for February and March are available at
 http://mailman.uclinux.org/pipermail/uclinux-dev/ , older archives are
 gone. Is it still possible to download them somewhere?

Michael let us know earlier in the week that the archives were lost and
it would take a while to get them back up.

There are some other sites on the net that archive the uClinux-dev list,
perhaps someone here could post a link ?

Thanks,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] fixup libxml2 stuff

2009-03-15 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 There is a typo in lib/Makefile for the new libxml2 option, and Kconfig
 incorrectly says libxml-2.0.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks
Davidm

 ---
  lib/Kconfig  |2 +-
  lib/Makefile |2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/Kconfig b/lib/Kconfig
 index 1207cef..412ea0a 100644
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
 @@ -379,7 +379,7 @@ config LIB_LIBFFI
 The Config will make sure this library is built if it is needed.
  
  config LIB_LIBXML2
 - bool 'Build libxml-2.0'
 + bool 'Build libxml2'
   default n
   help
 Library to access XML files.
 diff --git a/lib/Makefile b/lib/Makefile
 index 30f2b45..b955162 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -78,7 +78,7 @@ dir_3_$(CONFIG_LIB_BITVECTOR)+= bitvector
  # See Kconfig for the dependencies
  dir_4_$(CONFIG_LIB_LIBPNG)   += libpng
  dir_4_$(CONFIG_LIB_LIBCURL)  += libcurl
 -dir_4_$(CONFIG_LIB_LIXML) += libxml2
 +dir_4_$(CONFIG_LIB_LIBXML2)  += libxml2
  
  dir_3_$(CONFIG_LIB_NFNETLINK)+= libnfnetlink
  dir_4_$(CONFIG_LIB_NETFILTER_LOG)+= libnetfilter_log
 -- 
 1.6.2
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] split config steps into %_defconfig

2009-03-05 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 The _default target is pretty useful, but sometimes I want to start with
 the default config.  Splitting the default config steps out into a new
 _defconfig target allows for this code flow w/out breaking it manually
 with my own CTRL+C:
   $ make Some/Board_defconfig
   $ make config_menuconfig
   $ make

Applied,

Thanks,
Davidm

 ---
  Makefile |   10 ++
  1 files changed, 6 insertions(+), 4 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 9faa7b7..f331838 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -352,17 +352,19 @@ bugreport:
   *)   $(MAKEARCH) -C $(@:_romfs=) romfs;; \
   esac
  
 -%_default: conf
 - @if [ ! -f vendors/$(@:_default=)/config.device ]; then \
 - echo vendors/$(@:_default=)/config.device must exist first; \
 +%_defconfig: conf
 + @if [ ! -f vendors/$(@:_defconfig=)/config.device ]; then \
 + echo vendors/$(@:_defconfig=)/config.device must exist first; 
 \
   exit 1; \
fi
   -$(MAKE) clean  /dev/null 21
 - cp vendors/$(@:_default=)/config.device .config
 + cp vendors/$(@:_defconfig=)/config.device .config
   chmod u+x config/setconfig
   yes  | config/setconfig defaults
   config/setconfig final
   $(MAKE) dep
 +%_default: conf
 + $(MAKE) $(@:_default=_defconfig)
   $(MAKE)
  
  config_error:
 -- 
 1.6.1.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] fix bugreport target for LIBC=none

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 If the LIBC is set to none, then LIBCDIR expands to nothing and we get
 an error.  So tweak how we optionally install the libc config.
 
 Also drop a duplicate install of the kernel config.

Applied,

Thanks,
Davidm

 ---
  Makefile |8 +---
  1 files changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 2f7369f..71488d6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -318,11 +318,13 @@ bugreport:
   cp .config bugreport/
   mkdir bugreport/$(LINUXDIR)
   cp $(LINUXDIR)/.config bugreport/$(LINUXDIR)/
 - mkdir bugreport/$(LIBCDIR)
 - [ ! -f $(LIBCDIR)/.config ] || cp $(LIBCDIR)/.config 
 bugreport/$(LIBCDIR)/
 + if [ -f $(LIBCDIR)/.config ] ; then \
 + set -e ; \
 + mkdir bugreport/$(LIBCDIR) ; \
 + cp $(LIBCDIR)/.config bugreport/$(LIBCDIR)/ ; \
 + fi
   mkdir bugreport/config
   cp config/.config bugreport/config/
 - cp $(LINUXDIR)/.config bugreport/$(LINUXDIR)/
   tar czf bugreport.tar.gz bugreport
   rm -rf ./bugreport
  
 -- 
 1.6.1.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] clean links in tools/

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 In the Blackfin dist, we generate some temp symlinks in the tools/ subdir
 for utilities.  The uClinux-dist doesn't use any symlinks in this subdir,
 so it shouldn't affect anything there.

Ok,  I can't apply this one.  Lots of uClinux-dist users (in particular us :-)
build using sym-link trees,  this will trash the good symlinks as well
as the temp ones.

Perhaps you can beef the tools/... Makefiles to clean specifically the
symlinks they install ?

Cheers,
Davidm

 ---
  Makefile |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 0be4f16..2f7369f 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -289,6 +289,7 @@ clean: modules_clean
   rm -f $(LINUXDIR)/linux
   rm -f $(LINUXDIR)/include/asm
   rm -rf $(LINUXDIR)/net/ipsec/alg/libaes 
 $(LINUXDIR)/net/ipsec/alg/perlasm
 + find ./tools/ -maxdepth 1 -type l | xargs rm -f
  
  real_clean mrproper: clean
   [ -d $(LINUXDIR) ]  $(MAKEARCH_KERNEL) -C $(LINUXDIR) mrproper || :
 -- 
 1.6.1.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] clean links in tools/

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Tuesday 03 March 2009 18:36:59 David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
   In the Blackfin dist, we generate some temp symlinks in the tools/ subdir
   for utilities.  The uClinux-dist doesn't use any symlinks in this subdir,
   so it shouldn't affect anything there.
 
  Ok,  I can't apply this one.  Lots of uClinux-dist users (in particular us
  :-) build using sym-link trees,  this will trash the good symlinks as well
  as the temp ones.
 
 i thought i looked and there were no symlinks in tools/ ... what'd i miss ?

A link tree is an out of source tree build where everything except
directories is a symlink.

For example, to make one,  be sure to start with a pristine (never built
in tree) and then do:

mkdir build1
cd build1
lndir -silent /full/path/to/pristine
make config
make

It allows you to cleanly build multiple targets from a common source tree
at the same time.  Currently build1 cannot be a directory under
pristine.

It also means a real clean can become rm -rf build1 :-)

  Perhaps you can beef the tools/... Makefiles to clean specifically the
  symlinks they install ?
 
 the symlinks are arbitrarily generated

If there is some pattern to it at all you may be able to avoid existing
filenames.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] use full path for depmod

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Using a relative path to busybox's depmod script doesn't work if the kern
 dir is actually a symlink somewhere else.  Using a full path avoids that.

Applied,

Thanks,
Davidm

 ---
  Makefile |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 71488d6..9faa7b7 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -168,7 +168,7 @@ modules_install:
   . $(CONFIG_CONFIG); \
   if [ $$CONFIG_MODULES = y ]; then \
   [ -d $(ROMFSDIR)/lib/modules ] || mkdir -p 
 $(ROMFSDIR)/lib/modules; \
 - $(MAKEARCH_KERNEL) -C $(LINUXDIR) INSTALL_MOD_CMD=$(ROMFSINST) 
 -S -r \\ INSTALL_MOD_PATH=$(ROMFSDIR) 
 DEPMOD=../user/busybox/examples/depmod.pl modules_install; \
 + $(MAKEARCH_KERNEL) -C $(LINUXDIR) INSTALL_MOD_CMD=$(ROMFSINST) 
 -S -r \\ INSTALL_MOD_PATH=$(ROMFSDIR) 
 DEPMOD=$(ROOTDIR)/user/busybox/examples/depmod.pl modules_install; \
   rm -f $(ROMFSDIR)/lib/modules/*/build; \
   rm -f $(ROMFSDIR)/lib/modules/*/source; \
   find $(ROMFSDIR)/lib/modules -type f -name *o | xargs -r 
 $(STRIP) -R .comment -R .note -g --strip-unneeded; \
 -- 
 1.6.1.3
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] clean links in tools/

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Tuesday 03 March 2009 20:06:27 David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
   On Tuesday 03 March 2009 18:36:59 David McCullough wrote:
Jivin Mike Frysinger lays it down ...
   
 In the Blackfin dist, we generate some temp symlinks in the tools/
 subdir for utilities.  The uClinux-dist doesn't use any symlinks in
 this subdir, so it shouldn't affect anything there.
   
Ok,  I can't apply this one.  Lots of uClinux-dist users (in particular
us
   
:-) build using sym-link trees,  this will trash the good symlinks as
: well
   
as the temp ones.
  
   i thought i looked and there were no symlinks in tools/ ... what'd i miss
 
  A link tree is an out of source tree build where everything except
  directories is a symlink.
 
  For example, to make one,  be sure to start with a pristine (never built
  in tree) and then do:
 
  mkdir build1
  cd build1
  lndir -silent /full/path/to/pristine
  make config
  make
 
  It allows you to cleanly build multiple targets from a common source tree
  at the same time.  Currently build1 cannot be a directory under
  pristine.
 
  It also means a real clean can become rm -rf build1 :-)
 
 is there more info on this ?  we've had requests for out-of-tree builds before


Not really any more info than above.  I can write something up if you
like,  but it will be short :-)

I don't always use it,  but others use it religiously.  Here is an
example of how to use it safely (with a cvs repo):


TDIR=`pwd`
cvs co -d pristine uClinux-dist

mkdir target1
cd target1
lndir -silent $TDIR/pristine
make Vendor1/Target1_default
cd ..

mkdir target2
cd target2
lndir -silent $TDIR/pristine
make Vendor2/Target2_default
cd ..

The original pristine tree will remain largely untouched (there are a
few rogue packages that still mess with autogenerated files).  All the
binaries, images and config etc will be in the targetX dirs.

target1 and target2 can build/clean/operate completely independantly
(even being built at the same time is ok IIRC).

If you update your pristine dir,  you may need to rerun lndir to ensure
target1 and target2 pick up any new files that need to be linked.

lndir automatically leaves out the CVS/RCS/SCCS/SVN control directories
as well unless you ask it to keep them.

lndir is silent unless it sees something it can't fix,  like a link
already exists but doesn’t point to the correct file.

If it gets messy (lots of changes on a tree update), rm -rf targetX and
re-link/build.

I tend to use it whenever I have slow source repo access and lots of
targets to manage.

Is that enough to get you started ?

Perhaps you can beef the tools/... Makefiles to clean specifically the
symlinks they install ?
  
   the symlinks are arbitrarily generated
 
  If there is some pattern to it at all you may be able to avoid existing
  filenames.
 
 i can change things to use a dedicated dir and create more symlinks to 
 workaround it.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] clean links in tools/

2009-03-03 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 On Tuesday 03 March 2009 22:22:30 David McCullough wrote:
  Jivin Mike Frysinger lays it down ...
   On Tuesday 03 March 2009 20:06:27 David McCullough wrote:
A link tree is an out of source tree build where everything except
directories is a symlink.
   
For example, to make one,  be sure to start with a pristine (never
built in tree) and then do:
   
mkdir build1
cd build1
lndir -silent /full/path/to/pristine
make config
make
   
It allows you to cleanly build multiple targets from a common source
tree at the same time.  Currently build1 cannot be a directory under
pristine.
   
It also means a real clean can become rm -rf build1 :-)
  
   is there more info on this ?  we've had requests for out-of-tree builds
   before
 
  Not really any more info than above.  I can write something up if you
  like,  but it will be short :-)
 
  I don't always use it,  but others use it religiously.  Here is an
  example of how to use it safely (with a cvs repo):
 
 
  TDIR=`pwd`
  cvs co -d pristine uClinux-dist
 
  mkdir target1
  cd target1
  lndir -silent $TDIR/pristine
  make Vendor1/Target1_default
  cd ..
 
  mkdir target2
  cd target2
  lndir -silent $TDIR/pristine
  make Vendor2/Target2_default
  cd ..
 
  The original pristine tree will remain largely untouched (there are a
  few rogue packages that still mess with autogenerated files).  All the
  binaries, images and config etc will be in the targetX dirs.
 
  target1 and target2 can build/clean/operate completely independantly
  (even being built at the same time is ok IIRC).
 
  If you update your pristine dir,  you may need to rerun lndir to ensure
  target1 and target2 pick up any new files that need to be linked.
 
  lndir automatically leaves out the CVS/RCS/SCCS/SVN control directories
  as well unless you ask it to keep them.
 
  lndir is silent unless it sees something it can't fix,  like a link
  already exists but doesn’t point to the correct file.
 
  If it gets messy (lots of changes on a tree update), rm -rf targetX and
  re-link/build.
 
  I tend to use it whenever I have slow source repo access and lots of
  targets to manage.
 
  Is that enough to get you started ?
 
 ive never heard of lndir before, so i'll have to install that package on my 
 system ... but otherwise, it seems like it should be enough for me to play 
 with ...

Its comes from xutils-dev under ubuntu,

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] LPC 2294

2009-02-03 Thread David McCullough

Jivin vo sla lays it down ...
 Quick question: does uclinux have a port for LPC2294. I am asking
 because I did not see it mentioned here http://www.uclinux.org/ports/

There's something in there:


http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/uClinux-dist/vendors/Philips/LPC2294/

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,  Ph:+61 734352815
McAfee - SnapGear  http://www.snapgear.comhttp://www.uCdot.org
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] newest possible kernel version for trunk of uClinux-dist?

2009-01-22 Thread David McCullough

Jivin Michael Schnell lays it down ...
 
 No, not exactly either. Almost all of the current code in the kernel
 for non-mmu is conditional on CONFIG_MMU.
 With user space stuff I always found the EMDED define which often is 
 used to do a fork() vs. vfork() selection.
 
 (Which IMHO in many cases seems silly, as AFAIK, you can happily use 
 vfork() if there is
 an MMU, too, in nearly (?) all cases when you can _simply_ (without any 
 other code change) replace fork() with vfork() anyway. )

That is true,  but to be sure everything is happy, it's often better to
continue using fork on MMU systems,  especially if there is any question over 
the safe use of vfork.

 Moreover the name of the EMBED define seems quite outdated, as today, 
 many embedded devices do provide an MMU.

Hmm,  I thought that current SG/uClinux-dist mostly used EMBED for things that
reduce code size (and often functionality at the same time) and
__uClinux__ for true uClinux (ie !MMU) changes.

 I don't know if there is some change on that issue planned (e.g. using 
 CONFIG_MMU, in User Land as well).

In user space we use __uClinux__ for vfork/MMU differences.

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] libpthread

2009-01-20 Thread David McCullough

Jivin Michael Schnell lays it down ...
 libpthread seems not to be available in the distr any more. Is this a 
 glitch or am I missing something ?

It's part of uClibc,  providing you turn on the uClibc option for it
that is :-)

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] openssl with hw-crypt engine IXP425 or lesslcryptlib

2009-01-20 Thread David McCullough

Jivin Siegfried Müller lays it down ...
 David,
 
  Jivin Siegfried Müller lays it down ...
   Hi David,
   Jivin Siegfried Müller lays it down ...
Hi,
   
I currently using openswan with the OCF for the hw crypto engine
 on 
the ixp425. I want to use also openvpn. I compiled it with crypto
 
and openvpn grows to 1MB. (without crypto
~240KB)
Is there any possibility to use openssl also with OCF? How can i 
reduce the size of openvpn with crypto?
   
   Depending on how you added OCF to your uClinux-dist,  you should  
   already have openssl(libcrypto) being accelerated by OCF.
   
   I selected OCF, cryptodev and IXP4XX in the Kernel Module 
   Settings. Is there anything else to do in the openssl config?
  
  openssl needs to be patched and have ocf-linux enabled with the:
  
  --with-cryptodev
  
  options.  Run openssl and type:
  
  OpenSSL engine
  (cryptodev) BSD cryptodev engine
  (dynamic) Dynamic engine loading support
  OpenSSL
  
 
 I get:
 OpenSSL engine
 (dynamic) Dynamic engine loading support
 (cswift) CryptoSwift hardware engine support
 (chil) nCipher hardware engine support
 (atalla) Atalla hardware engine support
 (nuron) Nuron hardware engine support
 (ubsec) UBSEC hardware engine support
 (aep) Aep hardware engine support
 (sureware) SureWare hardware engine support
 (4758cca) IBM 4758 CCA hardware engine support
 
 Do you have any idea why there is no IXP4xx?

You do not need any of those ;-)

  If cryptodev does show then you do not have OCF acceleration in
 openssl. You need to get a patch from the OCF project for your
  openssl version.
 
 I doesn't show cryptodev so I must have OCF acceleration, do I?

No cryptodev means no OCF patch or OCF not enabled with the
--with-cryptodev option for openssl.

Get the openssl patch from the ocf-linux project,  checkout the
README.sglinux and see how you go,

Cheers,
Davidm


  Most of the SG dist will handle this if CONFIG_OCF_OCF is defined in
 eth modules build.  You most likely have this.
  
   There is an OpenSSL patch included with OCF specifically for that, 
   then
   you just need to create the /dev/crypto node:
   
   mknod /dev/crypto c 10 70
   
   Is that patch already included in snapgear3.4 (i use 0.9.7m
 OpenSSL)?
  
  The SG dist should also do that for you,  look in /dev/ on your target
 for /dev/crypto
  
   How can I reduce the size of the libcrypto?
  
  I wish I knew :-), it's big and interdependent.
  
  The lib/libssl makefile has a good go at getting rid of a much as
 possible.  Depending on your usage you may be able to disable some 
 more algs etc.
 
  Otherwise look at use dropbear?? perhaps ?  Would be more work to
 convert openvpn though,  someone may have already done it.
 
  Cheers,
  Davidm
 
 Cheers,
 Siegfried
 
 -- 
 David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61
 734352815
 Secure Computing - SnapGear  http://www.uCdot.org
 http://www.snapgear.com
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] openssl with hw-crypt engine IXP425 or less lcrypt lib

2009-01-15 Thread David McCullough

Jivin Siegfried Müller lays it down ...
 Hi,
 
 I currently using openswan with the OCF for the hw crypto engine on the
 ixp425. I want to use also openvpn.
 I compiled it with crypto and openvpn grows to 1MB. (without crypto
 ~240KB)
 Is there any possibility to use openssl also with OCF? How can i reduce
 the size of openvpn with crypto?

Depending on how you added OCF to your uClinux-dist,  you should already
have openssl(libcrypto) being accelerated by OCF.

There is an OpenSSL patch included with OCF specifically for that,
then you just need to create the /dev/crypto node:

mknod /dev/crypto c 10 70

Cheers,
Davidm

-- 
David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] user/Kconfig: fix typo in mkfs.jffs2 entry

2009-01-05 Thread David McCullough

Jivin Mike Frysinger lays it down ...
 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied,

Thanks,
Davidm

 ---
  user/Kconfig |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/user/Kconfig b/user/Kconfig
 index fc1135b..632ec1e 100644
 --- a/user/Kconfig
 +++ b/user/Kconfig
 @@ -478,7 +478,7 @@ config USER_MTDUTILS_MKFSJFFS
   depends on USER_MTDUTILS
  
  config USER_MTDUTILS_MKFSJFFS2
 - bool mkfs.jff2
 + bool mkfs.jffs2
   depends on USER_MTDUTILS
  
  config USER_MTDUTILS_NFTLDUMP
 -- 
 1.6.0.6
 
 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev
 

-- 
David McCullough,  david_mccullo...@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


  1   2   3   >