Bash Script to find discrepancies in BSP file organization
Vipul Nayyar
nayyar_vipul at yahoo.com
Sat Aug 31 18:01:49 UTC 2013
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
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130901/be896ba1/attachment-0001.html>
More information about the devel
mailing list