Skip to content

os: Add userspace Makefile#7156

Merged
sunghan-chang merged 1 commit intoSamsung:masterfrom
seokhun-eom24:260213-userspace-makefile
Apr 7, 2026
Merged

os: Add userspace Makefile#7156
sunghan-chang merged 1 commit intoSamsung:masterfrom
seokhun-eom24:260213-userspace-makefile

Conversation

@seokhun-eom24
Copy link
Copy Markdown
Contributor

@seokhun-eom24 seokhun-eom24 commented Feb 13, 2026

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

Copy link
Copy Markdown
Member

@pcs1265 pcs1265 left a comment

Choose a reason for hiding this comment

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

LGTM

@sunghan-chang
Copy link
Copy Markdown
Contributor

@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.

@seokhun-eom24 seokhun-eom24 force-pushed the 260213-userspace-makefile branch from 59c0f69 to 0e07d65 Compare March 5, 2026 02:25
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>
@seokhun-eom24 seokhun-eom24 force-pushed the 260213-userspace-makefile branch from 0e07d65 to 39304c2 Compare April 6, 2026 10:12
@seokhun-eom24
Copy link
Copy Markdown
Contributor Author

@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.

I have updated the Makefile so that it takes responsibility for both build and clean.

Copy link
Copy Markdown
Contributor

@sunghan-chang sunghan-chang left a comment

Choose a reason for hiding this comment

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

@amandeep-samsung Could you review this?

Copy link
Copy Markdown
Contributor

@amandeep-samsung amandeep-samsung left a comment

Choose a reason for hiding this comment

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

The changes are good (better code build manage for userspace/) and we will change mkldscript.py code changes patch accordingly.

@sunghan-chang sunghan-chang merged commit 6db3a15 into Samsung:master Apr 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants