Home Forum Developers General discussions [590]

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


Chewi
useravatar
User Info

Re: [590]

glibc isn't written with MMU-less systems in mind but uClinux isn't inherently tied to uClibc either. The kernel isn't actually built against any libc at all. For user space, you could potentially use Newlib or dietlibc instead, though I wouldn't bother trying it.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [590]

Thanks for the tip. I'd be curious to have a developer explain the work involved in porting applications to no-MMU CPUs with examples.

Besides the fork/vfork, there's also the issue of dynamic memory allocations, where an application that makes too many calls to malloc/free can end up fragmenting RAM so bad that the only solution is to kill/restart the app or even reboot the appliance.

Does someone know of an application that would watch memory on the Atcom, and if it detects too much fragmentation, send an e-mail, and reboot the device?


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [590]

Does it mean that the kernel doesn't use the C library at all (ie. implements its own routines), or does it compile it statically so that it's self-containted and not dependent on a shared C library?

Am I correct in saying that uClinux = modified Linux kernel? Are those changes uploaded to the main tree on www.kernel.org?


Administrator has disabled public posting
Chewi
useravatar
User Info

Re: [590]

It doesn't use a C library at all. Some features were moved out of the kernel and into user space to lessen the need for such routines and this resulted in the creation of klibc, which can be used to build the programs you will find on a typical initramfs.

uClinux used to be a fork but has long since been merged into mainline. Now it basically means Linux built for an MMU-less system.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [590]

Thanks Chewi for the education.


Administrator has disabled public posting
Henning
useravatar
User Info

Re: [590]

admin wrote:


I've checked in the code and it seems only app_dahdiras.so is problematic.
Does your Asterisk fail with app_dahdibarge.so and app_dahdiscan.so?
Your are right, my Asterisk fails as soon as I'm loading app_dahdrias.so. The other two modules can be loaded without a problem.

admin wrote:


Anyone willing to test patched app_dahdiras.so?
Willing? Yeah, why not. But I never did something like that before. I even don't know how to test patches.
I'm using a bf527-EZKIT-V2. Is it possible to test the patch with that kind of hardware reasonable? Because as far as I know dahdi is connected to hardware interface cards, isn't it?


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [590]

admin wrote:

I've checked in the code and it seems only app_dahdiras.so is problematic.
Out of curiosity, what do you do exactly when you try to port a Linux x86 app to the uClinux Blackfin platform: I assume you don't only grep for fork() but also check all the calls to malloc() to make sure it doesn't make too many calls? Is this correct? Do you also look at other algos that are known to be problematic?

Or do you just run the app with some kind of monitor, see if the app loads, and wait for any issue (memory leak, crashes, etc.)?


Administrator has disabled public posting
admin
useravatar
User Info

Re: [590]

Hi Gilles,

Well Asterisk now a days is getting pretty complex.
It is not always trivial to me to study the algorithms behind.
So in most of the cases I am indeed consider only forks.
And the most of time is actually spent in make files.

In some more rare cases like Asterisk DSP, Spandsp , Attrafax, LEC etc
I/we have put some time on speed optimizations as the DSP code is usually where the CPU is spending the most.

I believe that there are lot of room for memory adjustments in Asterisk. As you know uClinux memory management is susceptible to memory fragmentation. In addition we don't have that much memory here as it is available on the PC.

However right now I can not afford spending very much time on this.
It's not that I don't want to smile

Best Regards
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [590]

Thanks for the feedback.


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 142
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked