[uClinux-dev] (stupid) question concerning uClinux environment

Greg Ungerer gerg at snapgear.com
Wed Nov 21 00:14:44 EST 2007


Hi Wolfgang,

Wolfgang Wegner wrote:
> after compiling busysbox from uClinux-dist-20071107, I tried running
> it in my previous uClinux environment/kernel - but with no success.

Did you just take the busybox binary itself - not the complete
generated user space/root filesystem?


> The kernel can not execute the executable:
> Freeing unused kernel memory: 400k freed (0x4019b000 - 0x401fe000)
> Unable to mmap process text, errno 12
> Failed to execute /init
> Unable to mmap process text, errno 12
> Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
> 
> I want to have the process running from an embedded initrd, without a
> flash filesystem, to have only one initial block of data (kernel +
> initrd) and be independent of the presence of a flash filesystem.
> 
> My "old" executable looks like this:
> colinux:test# file test
> test: BFLT executable - version 4 ram
> 
> Busybox looks like this:
> colinux:/projects/new2/uClinux-dist-20071107# file user/busybox/busybox
> user/busybox/busybox: BFLT executable - version 4 gotpic

Please run the flthdr tool on them both for more detail:

     m68k-elf-ftlhdr busybox


> It looks to me as if "gotpic" means XIP, is this correct?

It measn the code within was compile position-indepedant using
a global-offset-table. Which means it could be run XIP.


  And if so, why
> is this not executable from an initrd?

Did you actually have it as "/init"?
The error message seems to imply that it is looking for
it as "/init".

Try turning on the kernel trace load switch in the bflt header.
Do this to the binary:

     m68k-elf-flt -k busybox

See if that gives any extra trace output.

Regards
Greg




> The processor used is MCF5373L,
> with the old kernel having some fixes and additions (interrupt setup,
> console port), which is why I first wanted to try running the new
> application with the old kernel before taking the effort of porting all
> this to the newer kernel.
> 
> My main problem is I simply want to get a running system - the old
> environment has some severe stability problems (looks like memory
> corruption), and I thought when using the most current tools and uClinux
> environment available I should at least get a stable kernel (which I
> suspect to be a source of the problems with the old environment).
> Busybox as an executable was just an example (because having a busybox
> would be quite handy there, too), the same applies to all executables
> generated.
> 
> Any hints how I can get started correctly are greatly appreciated.
> 
> Thank you,
> Wolfgang
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com


More information about the uClinux-dev mailing list