[uClibc]Problem with vfork() followed by exec() on Coldfire MCF5272

David Neale dneale at bluesocket.com
Thu Sep 13 15:02:51 UTC 2001


Hi Erik,

Thanks for you reply to my SOS.

FYI:

1. I looked for vfork in the version of libc provided with the kernel 
distribution (I have been using the latest experimental release from 
http://www.uclinux.org/ports/coldfire/binary.html and downloaded it again the 
day before yesterday to make sure I was up to date.)   It is not in libc (nm 
libc | grep vfork returns nothing).   I haven't looked in more detail, but 
maybe it is implemented somewhere using a macro (guess it must be as sash 
works)?

2. I got my uClibc distro from the daily snapshot the day before yesterday 
and have always been using recent versions.   My test executables are very 
simple and are built using uClibc.

3. I am using the latest version of the kernel and my kernel and user 
configurations are pretty rudimentary, without any unnecessary frills.

4. My hardware is the M5272C3 development board.

5. I copy my executables into ..../romfs/bin/ and thus run them from the ROM 
filesystem.   I also tried copying them and running them from /var in case 
something weird was going on!

At present I think the most likely cause of the problem (assuming vfork/exec 
has been tested and works OK on the 5272 board!) is somewhere in my 
configuration - particularly my kernel setup, or perhaps the build flags for 
the kernel or the executables.  

If you have any ideas I would be very pleased to hear from you!

Regards,

Dave N.


On Wednesday 12 September 2001 17:10, you wrote:
> On Wed Sep 12, 2001 at 02:01:08PM +0000, David Neale wrote:
> > Help!
> >
> > I'm having problems getting a vfork() followed by an exec() working in
> >  uClinux on the Motorola Coldfire MCF5272, even with a trivial example
> >  program.
> >
> > At the point of the exec something nasty happens and I get output similar
> > to:
> >
> > bad frame format: 00000000
> > PC: [<000b3938>]
> > SR: 2000  SP: 002e1e68  a2: 00000034
>
> Your stack got hosed.
>
> > 7. I have tried 3 different libc libraries, which all give different
> >    results(!!)  The library with my uClinux distribution doesn't support
> >    vfork(), the one from m68k-elf tools falls over the moment I do an
> > exec, even without a vfork, so I am using a recent uClibc at present.
>
> If the library from you uClinux distribution doesn't support vfork() I
> would be _very_ _very_ surprised.  Previous versions of uClibc implement
> vfork() as a macro.  The current uClibc uses a function call, and it
> _should_ work.
>
> > I have rebuilt both uClibc and the kernel using latest snapshots
> > (yesterday), with no difference (I have been using pretty recent versions
> > all along).
> >
> > Looking at the file ..../uClibc/libc/sysdeps/linux/m68k/README.m68k, it
> > seems that vfork has yet to be fixed (fixing vfork is on a to-do list).  
> > Is the
>
> That todo list is out of date...
>
> > Are there any known kernel configurations (for example) that could cause
> > a problem with vfork/exec?   Or is there another version of libc out
> > there that will solve my problem?
>
> Lets start from the beginning.  Where did you obtain your uClinux
> distro from?  Toolchain?  I highly recommend that people starting
> work on Coldfire should start with
> 	http://www.uclinux.org/ports/coldfire/binary.html
>
>  -Erik
>
> --
> Erik B. Andersen   email:  andersee at debian.org, formerly of Lineo
> --This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list