os: Add userspace Makefile#7156
Conversation
|
@seokhun-eom24 This makefile is newly added. Then, who does build the userspace file? Separating build (target ALL) and clean looks wrong. Who builds should clean it. I don't mean you should add the clean target at existed makefile. You can split them into the new file. But both should be in the same file. |
59c0f69 to
0e07d65
Compare
Add a new userspace Makefile to build userspace object file and clean it. For app binary we need up_userspace.o, and for common binary we need up_userspace_common.o. So split build targets into app_obj and common_obj to support each binary. When we build loadable apps, userspace.o is built but not cleaned. This can make linking error between other boards. This patch fix this issue by adding userspace Makefile. [Linking Error] ``` make[1]: Leaving directory '/root/tizenrt/os/binfmt' make[1]: Entering directory '/root/tizenrt/loadable_apps' make[2]: Entering directory '/root/tizenrt/loadable_apps/loadable_sample/wifiapp' CC: wifiapp.c arm-none-eabi-ld: error: /root/tizenrt/os/../build/output/bin/app1.relelf uses VFP register arguments, /root/tizenrt/os/userspace/up_userspace.o does not arm-none-eabi-ld: error: /root/tizenrt/os/userspace/up_userspace.o: conflicting CPU architectures 14/17 arm-none-eabi-ld: failed to merge target specific data of file /root/tizenrt/os/userspace/up_userspace.o /root/tizenrt/os/../loadable_apps/loadable.mk:66: recipe for target 'undefsym' failed make[2]: Leaving directory '/root/tizenrt/loadable_apps/loadable_sample/wifiapp' make[2]: *** [undefsym] Error 1 Makefile:71: recipe for target 'loadable_sample/wifiapp_undefsym' failed make[1]: Leaving directory '/root/tizenrt/loadable_apps' make[1]: *** [loadable_sample/wifiapp_undefsym] Error 2 make: *** [pass1] Error 2 Makefile.unix:458: recipe for target 'pass1' failed ``` Signed-off-by: seokhun-eom <seokhun.eom@samsung.com>
0e07d65 to
39304c2
Compare
I have updated the Makefile so that it takes responsibility for both build and clean. |
sunghan-chang
left a comment
There was a problem hiding this comment.
@amandeep-samsung Could you review this?
amandeep-samsung
left a comment
There was a problem hiding this comment.
The changes are good (better code build manage for userspace/) and we will change mkldscript.py code changes patch accordingly.
Add a new userspace Makefile to build userspace object file and clean it.
For app binary we need up_userspace.o, and for common binary we need up_userspace_common.o.
So split build targets into app_obj and common_obj to support each binary.
When we build loadable apps, userspace.o is built but not cleaned. This can make linking error between other boards.
This patch fix this issue by adding userspace Makefile.
[Linking Error]