Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: build as static library #37512

Merged
merged 34 commits into from
Aug 17, 2021

Conversation

dcpleung
Copy link
Member

@dcpleung dcpleung commented Aug 6, 2021

Most of the driver types are using zephyr_library() and zephyr_library_sources*() already. This converts the remaining ones so driver builds are aligned. This avoids private include directories being spilled outside the driver build.

Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <[email protected]>
Some display drivers may actually be initialized after LittlevGL
as those drivers and LittlevGL's lvgl_init() all have SYS_INIT()
at APPLICATION and init priority the same as application init
priority. Depending on how the final binary is linked, these
drivers may initialize after lvgl_init() resulting in it not
able to find a display driver. This changes the value of
CONFIG_DISPLAY_INIT_PRIORITY so that the display drivers that
make use of this kconfig are initialized a bit earlier to
ensure that they are actually initialized before lvgl_init().

Signed-off-by: Daniel Leung <[email protected]>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Also sort the entries alphabetically.

Signed-off-by: Daniel Leung <[email protected]>
@dcpleung dcpleung force-pushed the drivers_use_zephyr_library branch from 841660f to 2d4cefb Compare August 16, 2021 07:28
@@ -237,6 +237,6 @@ static int arm64_smp_init(const struct device *dev)

return 0;
}
SYS_INIT(arm64_smp_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
SYS_INIT(arm64_smp_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks

Copy link
Member

@alexanderwachter alexanderwachter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for CAN

@cfriedt cfriedt merged commit eb0060c into zephyrproject-rtos:main Aug 17, 2021
@dcpleung dcpleung deleted the drivers_use_zephyr_library branch August 17, 2021 17:22
tejlmand added a commit to tejlmand/zephyr that referenced this pull request Sep 14, 2021
With the driver library cleanup in zephyrproject-rtos#37512 all drivers are now placed in
dedicated zephyr libraries and not directly in libzephyr.a.

This commit follows up on this by placing all pinmux.c files in a
dedicated pinmux zephyr library.

Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand added a commit to tejlmand/zephyr that referenced this pull request Sep 14, 2021
With the driver library cleanup in zephyrproject-rtos#37512 all drivers are now placed in
dedicated zephyr libraries and not directly in libzephyr.a.

This commit follows up on this by placing all pinmux.c files in a
dedicated pinmux zephyr library.

Signed-off-by: Torsten Rasmussen <[email protected]>
tejlmand added a commit to tejlmand/zephyr that referenced this pull request Sep 16, 2021
With the driver library cleanup in zephyrproject-rtos#37512 all drivers are now placed in
dedicated zephyr libraries and not directly in libzephyr.a.

This commit follows up on this by placing all pinmux.c files in a
dedicated pinmux zephyr library.

Signed-off-by: Torsten Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants