You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Refactor exported headers + add folder for tools. #1471
Is your feature request related to a problem? Please describe.
Our current headers folders structure seems to be bad in some scenarios, it recently showed up f.e. in these PRs: #1405 - we ended up with workaround, but not everything going to be that simple and we need some kind of place for logic shared between FW and user-space apps (but not by kernel). #1351 - there are definitions that are needed by FW and by tools but not by kernel, we can add everything to be in uapi, but this way we going to have a lot of definitions on kernel side that are not used by kernel at all, because they are just for tools that generate binary blobs.
Also should uapi folder be named like that? - In kernel it is for user-space. Here this name is misleading because it's for kernel/driver and what really end-up in user-space may be headers for tools - but still it's not the same, because they don't use it in the same way as user-space apps use kernel's uapi.
Describe the solution you'd like
I'd like to have more fine-grained headers classification with clear purpose.
@lgirdwood any objection to create a 3rd directory, we'd have
ipc
user (can be renamed as kernel if needed)
apps
Personally I'd make it saying more info about what's in it, instead of for whom it is, f.e.:
include
├── api (it's just api, we don't have "userspace" api)
│ ├── ipc (obvious, ipc with our FW)
│ └── meta (info about FW internals, manifest, modules, or some other name, depends what is there)
│ ├── kernel (or user/driver, indicating it's FW's metadata necessary for driver)
│ └── apps (or non-kernel/others/etc, data not needed by driver, used by tools/sdk)
└── sof (internal, project-wide headers, used across FW modules)
But I wrote most of my code as guy from userspace, so I may look at it from bad point.
Also I'm not sure how many of these things are really needed on driver side, so maybe it may be split differently, but you should get the idea.
include
│ ── ipc (obvious, ipc with our FW)
│ ── kernel (or user/driver, indicating it's FW's metadata necessary for driver )
│ ── user (or non-kernel/others/etc, data not needed by driver, used by tools/sdk)
└── sof (internal, project-wide headers, used across FW modules)
@jajanusz yes since you are restructuring. But the make install rule must prefix all these directories with "sof/" so that there is no collisions with other headers from other SW.
Activity
lgirdwood commentedon May 27, 2019
@jajanusz please describe what you propose.
jajanusz commentedon May 27, 2019
@plbossart already propsed something there: #1405 (comment) ->
Personally I'd make it saying more info about what's in it, instead of for whom it is, f.e.:
But I wrote most of my code as guy from userspace, so I may look at it from bad point.
Also I'm not sure how many of these things are really needed on driver side, so maybe it may be split differently, but you should get the idea.
lgirdwood commentedon May 28, 2019
@jajanusz Don't need the api/meta subdirs.
jajanusz commentedon May 28, 2019
@lgirdwood So you want to make it more flat ? (There is uapi folder missing)
keyonjie commentedon May 28, 2019
do we have any non-ipc interfaces needed for kernel? otherwise, only "ipc" and "meta" is good?
jajanusz commentedon May 28, 2019
I don't know if they are needed by kernel, but they are copied to kernel repo - f.e. manifest metadata, some tokens.
lgirdwood commentedon May 28, 2019
@jajanusz yes since you are restructuring. But the make install rule must prefix all these directories with "sof/" so that there is no collisions with other headers from other SW.
jajanusz commentedon Jun 4, 2019
done in #1504