Removing module

Joel Sherrill joel.sherrill at oarcorp.com
Fri Dec 5 17:02:41 UTC 2014



On December 5, 2014 10:40:26 AM CST, Gedare Bloom <gedare at rtems.org> wrote:
>Reine,
>
>What version of RTEMS are you targeting?
>
>I suppose you could use sparc-rtems-objdump with -d flag and inspect
>the output to see where calls are made to the partition functions.

Since the tool doesn't have a version number, it is either Gaisler tools or 4.6.

Anyway hacking the build system to remove code is an utter and complete waste of time on any recent RTEMS version. Beyond what happens at configure time, most of the things being hacked out are dropped out at link time based on application configuration settings via confdefs.h. 

If the version is not old enough to have the per function and data section patches, then back porting that to 4.10 for local use will drop the size.

The end result of this type of hacking is an unmaintainable divergent version. In the worst case, you break things by not understanding the ramifications. Since you didn't know enough about RTEMS configuration to know that the file system can be left out by specifying one application time configure parameter, I suspect this is what will happen.

Sorry to be harsh but in 25 years of RTEMS, I have seen this multiple times. All end up in dead ends and/or introduction of hard bugs in YOUR version that are not in the main line source.

If you have identified something that is reasonably not required in a minimum real system, you are better served by working with the community and support providers to find a standard way to make that feature optional.

--joel

>-Gedare
>
>On Fri, Dec 5, 2014 at 9:24 AM, Reine <rg at irfu.se> wrote:
>> Hello
>>
>> Thank you.
>>
>> What we are trying to do is minimize RTEMS because we have to qualify
>it for
>> space use and if it is less code it will be much easier.
>>
>> I've removed everything easy..
>>
>>  --disable-networking
>>  --disable-cxx
>>  --disable-itron
>>  --disable-tests
>>  --disable-docs
>>  --disable-posix
>>  --disable-drvmgr
>>
>> We have also removed the filesystem and the consoles.
>>
>> Now I started to look at managers, what you say about unused code is
>removed
>> seem to be
>> true..but not entirely .. (or it is used)
>>
>> For instance we do not need the region manager or the partition
>manager but
>> still there are symbols in the application code for the latter:
>>
>> sparc-rtems-readelf -a RPWI_FSW1 | grep region
>>    247: 00000000     0 FILE    LOCAL  DEFAULT  ABS region.c
>>    295: 00000000     0 FILE    LOCAL  DEFAULT  ABS regiondata.c
>>
>> juice at ubuntu:~/software/flight_software_dev$ sparc-rtems-readelf -a
>> RPWI_FSW1 | grep partition
>>    378: 4000f7e0   252 FUNC    GLOBAL DEFAULT    1
>rtems_partition_get_buffe
>>    948: 4000f0e0   284 FUNC    GLOBAL DEFAULT    1
>rtems_partition_return_bu
>>
>>
>> So it seems the region manager is not there but there are things for
>the
>> partition manager in there.
>>
>> Does that mean RTEMS use the partition manager internally ?
>>
>>
>> I guess what I need is ideas to trim RTEMS down...
>>
>>
>> Reine
>>
>>
>>
>>
>>
>> On 04/12/14 17:11, Gedare Bloom wrote:
>>>
>>> Reine,
>>>
>>> I found your message on the build ml that is better sent to the
>users
>>> mailing list, so I transcribed it here.
>>>
>>> With the master branch of RTEMS I don't believe setting MANAGERS
>makes
>>> a difference. Unused code is no longer linked into the application
>>> executable. What version of RTEMS are you using?
>>>
>>> If you look in the testsuites/ directory you can find many examples,
>>> and searching for "MANAGERS" in the Makefiles can show you how to
>use
>>> the option in the older RTEMS releases.
>>>
>>> -Gedare
>>>
>>> On Thu, Dec 4, 2014 at 11:09 AM, Gedare Bloom <gedare at gwu.edu>
>wrote:
>>>>
>>>> Hello
>>>>
>>>> It says in the RTEMS documentation that some managers are optional.
>>>>
>>>> I tried to remove the region manager from the kernel by modifying
>the
>>>> file make/leaf.cfg see excerpt of top of file below:
>>>>
>>>> # make/leaf.cfg
>>>> #
>>>> #   Make(1) configuration file include'd by all leaf-node Makefiles
>>>> #
>>>>
>>>> #
>>>> # list of all known managers
>>>> # This list is used, along with $(MANAGERS) (set by app makefile)
>>>> #   to build the list of *not wanted* drivers.
>>>> #
>>>> # ref: target compiler config file for usage
>>>> #
>>>>
>>>> #MANAGER_LIST=barrier dpmem event io msg mp part
>>>> #MANAGER_LIST+=region sem signal timer rtmon ext
>>>>
>>>> MANAGER_LIST=barrier dpmem event io msg mp part
>>>> MANAGER_LIST+=sem signal timer rtmon ext
>>>>
>>>>
>>>> Then I compiled as usual including a bootstrap.
>>>>
>>>> However it did not seem to change anything?
>>>>
>>>> (The region symbols are still in the librtemscpu.a library)
>>>>
>>>>
>>>> What am I doing wrong ? should is set MANAGERS somewhere ?
>>>>
>>>> Best regards
>>>>
>>>> Reine Gill
>>
>>
>_______________________________________________
>users mailing list
>users at rtems.org
>http://lists.rtems.org/mailman/listinfo/users

--joel



More information about the users mailing list