[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Shared vs Static libraries?
Hi,
I was using a very cut-down list of applications. Which is why I was
surprised by they 8MB image.bin!
Well the problem has disappeared now that I am using your toolchain. I
was using the EDK 6.3 toolchain previously, as I thought your toolchain
was just a copy of this. I hope the EDK supplied tools will be able to
support uClinux directly soon.
The compile went ahead pretty smoothly - just a few points to note
(learned the hard way!)
- When you have no ethernet adapter defined in auto-config.in you still
have to disable it in the kernel options. (guess it is obvious to
everyone else by now..but took me a while to figure out why adapter.c
was complaining about certain defines not existing!)
- The vendors/Xilinx/uclinux-auto/ directory seems to have "hotsts" in
the wrong location ., it should be in ./etc/. make failed until I copied
the file into etc.
- user/shutils make fails, as it compiles dirname before some other
files in this directory, and it just happens that mb-ld wrapper uses
dirname internally - of course the system picks up the dirname in the
current directory (built for microblaze) before the pc linux version,
and of course cannot execute it. Changing the order of the files to be
built in the makefile so dirname is last allows make to work. (that or
change the path to not have . first!)
image.bin is now 1.3 megs - quite a nice tidy size i think! (can't try
it out as yet - I'm waiting on a parallel IV cable - but I have
bitstream and image waiting here to be downloaded! if I have any luck
I'll let you know!)
Thanks for all the help!
Cheers
John
John Williams wrote:
> Hi John,
>
> John McGrath wrote:
>
>> I just sucessfully compiled the kernel / image for the current
>> uClinux distribution. I wanted to have a pertty minimal setup, but
>> after compilation I discovered the image.bin was 8.8 Mb!! I looked
>> and saw the kernel was about 1.2Mb, while the user applications took
>> up the rest. On looking in the romfs/bin directory I saw all the
>> executable files there were about 200-500K! for example cat was 159K
>> while the cat on my linux machine is 19K !! so clearly there is
>> something going wrong.
>
>
> A few comments here. You will see that many of the utilities in the
> romfs/bin directory are exactly the same size - these are links to the
> busybox executable, which is intended to combat exactly the issue you
> are raising. In the actual romgfs image, there is (or should be) only
> a single instance of busybox, with a bunch of links to it to
> represents that various applets that it implements.
>
> That said, if your final image.bin file is over 8mb in size, you must
> have a pretty serious collection of applications installed, or else
> some large data in the home/httpd directory or something. This
> shouldn't happen in a "minimal setup" - my typical baseline build is
> normally around 2-2.5MB kernel included. It seems likely that you've
> enabled something that yuo've forgotten, or there's something else
> going on.
>
> Feel free to post the full directory listing of the romfs/bin
> directory on your host, it might tell us something.
>
>> My guess it is is statically linking the programs. I did not do
>> anything (to my knowledfge) to turn this on - but I assume it would
>> not be the default, as space is a premium! Anyone got any ideas on
>> what this could be?
>
>
> Yep - it's all statically linked. Dynamic linking is possible on
> uClinux, but needs some software hackery and also support from the
> compiler for position independent code (I think). As far as I know,
> m68k-nommu is the only arch to support dynamic libraries on uClinux.
>
> Regards,
> John
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>
>
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/