nasa / PSP

The Core Flight System (cFS) Platform Support Package (PSP)
Apache License 2.0
67 stars 57 forks source link

Update "beaglebone-linux" PSP #30

Closed skliper closed 5 years ago

skliper commented 5 years ago

LaRC is contributing a Beagle Bone Linux PSP, which is based on the CFS 6.4.1 version of the PC-Linux PSP. It is now present in the cfs_psp project tree under the "ic-LaRC-beaglebone-linux" branch on Babelfish, based at the 6.4.1 release.

This PSP does not yet have the following updates to bring it up to match the development versions of the other PSPs:

4 enhanced build script

5 - change uint32 to cpuaddr

6 - dependency management

19 compatibility with CFE "const" API

21 - clean up build macros

skliper commented 5 years ago

Imported from trac issue 26. Created by glimes on 2015-07-13T16:04:00, last modified: 2019-04-25T15:16:31

skliper commented 5 years ago

Trac comment by glimes on 2015-07-13 16:07:57:

I have attached a patch file, constructed by extracting the updates that have been applied to the PC-Linux PSP as a "diff" listing, then editing it so that "patch" would in theory apply it to the beaglebone-linux PSP.

Grabbing the current PC-Linux PSP and applying the few adjustments necessary to make it back into the BeagleBone PSP might be faster and have the same result, but we do want to look at the changes involved and assure that Beagle Bone does not need to diverge from PC-Linux on any of them.

skliper commented 5 years ago

Trac comment by glimes on 2015-07-13 16:09:47:

Sent this to review state until I've talked it over with Susie, Joe, LaRC and the CCB. I anticipate that this will move pretty quickly once folks peek at it.

skliper commented 5 years ago

Trac comment by jphickey on 2015-07-13 16:52:09:

It looks like the source code is identical between {{{beaglebone-linux}}} and {{{pc-linux}}} subdirectories - is that true? The only differences I see are some compiler options which are moot when using the CMake build.

I have personally tested CFE numerous times using the beaglebone black board and I simply use then unmodified {{{pc-linux}}} PSP to do it -- so far I have not seen a compelling need to fork this.

skliper commented 5 years ago

Trac comment by glimes on 2015-07-13 19:12:40:

Actually, yes, they are identical. If you write even semi-portable source, Linux on a Beagle Bone is just like Linux on a laptop or on a desktop.

My initial take on porting this stuff to a Beagle Bone was to rename the "pc-linux" BSP and PSP stuff to be just "linux" and strip out all of the compile options that were (unnecessarily) insisting that we were compiling for x86.

In my initial efforts, I didn't even bother ripping out the options that lied to the code about the ISA, and it still worked Just Fine.

Maybe we just need to widen our definition of "pc" to include Beagle Bones? ;)

skliper commented 5 years ago

Trac comment by jphickey on 2015-07-14 09:08:46:

Yes, my take here is that the "pc-linux" BSP is really a generic linux PSP and should be usable on any Linux platform, "PC" or not.

I don't know that it is really necessary to rename the "pc-" part -- I think just documenting that it works on lots of various platforms (including a PC) would be good enough. Many times a simple rename has lots of side effects, breaking strange things that you didn't even realize were dependent on the existing name.

The only time I think it is possibly necessary to fork the BSP would be if you wanted to use hardware timers or some other hardware features available on a particular board. But even that, if resources are accessed via a kernel module / device driver architecture, it is still probably not necessary to really fork the BSP.

I really hope to avoid the practice of copying 98% of some code just to accommodate the 2% that needs to change for a specific application.

skliper commented 5 years ago

Trac comment by jhageman on 2019-03-06 11:29:39:

CCB - review to communicate PSP support, recommend mark wontfix since generic pc-linux PSP works for beaglebone.

skliper commented 5 years ago

Trac comment by jhageman on 2019-04-25 15:16:31:

Closing as invalid since it applies to a custom PSP, feel free to reopen if this work is still relevant to community development.