Skip to content

os: Add userspace Makefile#7156

Open
seokhun-eom24 wants to merge 1 commit intoSamsung:masterfrom
seokhun-eom24:260213-userspace-makefile
Open

os: Add userspace Makefile#7156
seokhun-eom24 wants to merge 1 commit intoSamsung:masterfrom
seokhun-eom24:260213-userspace-makefile

Conversation

@seokhun-eom24
Copy link
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
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
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.

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 59c0f69 to 0e07d65 Compare March 5, 2026 02:25
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.

3 participants