Bash Script to find discrepancies in BSP file organization

Gedare Bloom gedare at rtems.org
Wed Sep 4 16:11:06 UTC 2013


Compare what you have found with the documentation:
http://rtems.org/onlinedocs/doc-current/share/rtems/html/bsp_howto/Target-Dependent-Files-Board-Support-Package-Structure.html#Target-Dependent-Files-Board-Support-Package-Structure
Note discrepancies, and whether the documentation should be modified.
If so propose the modifications.

Try your script out and report what results you get with it. Try to
summarize the results in some useful way rather than present us with
the raw output of the script. Try to classify the "problems" the
script finds as being either serious flaws (like not including any
bspgetworkarea) or missing option features (like rtc). I don't have
guidance off hand for what the differences would be...

Another issue that came up recently is interface violations. BSP code
should not be accessing RTEMS "internal" functions, which are
functions that start with an underscore, for example
_CPU_cache_flush_1_data_line(), _CPU_ISR_install_raw_handler(),
_ISR_Disable(), etc. Identify such possible violations.

-Gedare

On Wed, Sep 4, 2013 at 10:30 AM, Vipul Nayyar <nayyar_vipul at yahoo.com> wrote:
>
> Hello,
>
> Eagerly waiting for your comments, suggestions. Anything ? :-)
>
> Regards
> Vipul Nayyar
>
>
> ________________________________
> From: Vipul Nayyar <nayyar_vipul at yahoo.com>
> To: Gedare Bloom <gedare at rtems.org>
> Cc: "rtems-devel at rtems.org" <rtems-devel at rtems.org>
> Sent: Saturday, 31 August 2013 11:31 PM
>
> Subject: Re: Bash Script to find discrepancies in BSP file organization
>
> Hello Gedare,
>
> Modified the script to look for bsp specific files in the case of tm27.h,
> coverhd.h & bsppredriverhook.c. Currently the script looks for both the
> shared arch & local files in the case of bspstart.c, bspclean.c,
> bspgetworkarea.c.
>
> As you suggested, I'd really like to enhance the script to look for
> specified files under the BSP in all its subdirectories and report that
> information in case the file is not found where it is expected. But as you
> see, checking for a unified pattern across BSPs requires that the rules can
> only be laid down for those components that are used in every BSP. I'm not
> sure what these common components are apart from startup files. Maybe clock
> & console files. Need guidance on that.
>
> One method might be that we compile a list all types of support components
> that a BSP can offer (like network, console, wifi) & standardize the list of
> file names that must be created in that specific folder in a BSP. Then the
> BSP developer defines these macros in bsp.h or in some other file specifying
> which kind of standard component has he/she incorporated in his BSP(For
> example defining BSP_FEATURE_IRQ_EXTENSION macro for generic interrupt
> support ). Based on these defined macros, I can grep with my script & check
> whether the unified rules are followed or not.
>
> Will need guidance in compiling that list. What do you suggest ?
>
> Regards
> Vipul Nayyar
>
>
> ________________________________
> From: Gedare Bloom <gedare at rtems.org>
> To: Vipul Nayyar <nayyar_vipul at yahoo.com>
> Cc: Joel Sherrill <joel.sherrill at oarcorp.com>; Cynthia Rempel
> <cynt6007 at vandals.uidaho.edu>; "rtems-devel at rtems.org"
> <rtems-devel at rtems.org>
> Sent: Saturday, 31 August 2013 8:46 PM
> Subject: Re: Bash Script to find discrepancies in BSP file organization
>
> On Sat, Aug 31, 2013 at 11:11 AM, Gedare Bloom <gedare at rtems.org> wrote:
>> Also, tm27.h can be (usually is) overwritten by the BSP and located in
>> ./include/tm27.h.
>>
> The same goes for coverhd.h
>
>> On Sat, Aug 31, 2013 at 11:08 AM, Gedare Bloom <gedare at rtems.org> wrote:
>>> Vipul, would it make sense to also look for the specified files under
>>> the BSP in all its subdirectories and report that information in case
>>> the file is not found where it is expected?
>>>
>>> double check all of the BSP hook files. I noticed bsppredriverhook.c
>>> has the wrong location for ../shared/startup/bsppredriverhook.c (it
>>> omits "startup")
> The same goes for bspstart.c, bspclean.c, bspgetworkarea.c, and
> probably bsppost.c but I don't think any BSPs in the tree override
> bsppost.
>
>>>
>>> -Gedare
>>>
>>> On Fri, Aug 30, 2013 at 6:49 PM, Vipul Nayyar <nayyar_vipul at yahoo.com>
>>> wrote:
>>>> Hello DrJoel,
>>>>
>>>> Haven't heard from you for a long time. I hope you're well. I also
>>>> sincerely
>>>> hope that you're following the discussion about the project. I've
>>>> attached a
>>>> bash script, somewhat similar to what we both wrote during the start.
>>>> Please
>>>> have a look & verify whether it's output is upto your satisfaction. It
>>>> checks more rules for a BSP that I observed & wrote by looking at
>>>> lpc24xx.
>>>>
>>>> Just drop the script in libbsp, or some where down in an architecture or
>>>> a
>>>> bsp folder. Or else you can give it the path of a bsp from the terminal.
>>>> I've tested it & I think it's giving the required results.
>>>>
>>>> Please observe it & I'm all ears for any improvements that you suggest.
>>>> Hoping to hear from you soon.
>>>>
>>>> Regards
>>>> Vipul Nayyar
>>>>
>
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>
>



More information about the devel mailing list