On Wed, Feb 26, 2020 at 12:57 PM Takashi Yamamoto <yamam...@midokura.com.invalid> wrote: > > hi, > > On Wed, Feb 26, 2020 at 1:36 PM Xiang Xiao <xiaoxiang781...@gmail.com> wrote: > > > > For kernel build, all symbols need be resolved: > > 1.We need add libapps.a into LDLIBS to resolve nsh_*, which remove > > accidentally in commit 4ee39e208048f075860 > > it removed only "ifneq ($(CONFIG_BUILD_KERNEL),y)" block. > it should not affect KERNEL build, should it? >
After review the related Makefile again, I think we need remove "ifneq ($(CONFIG_BUILD_KERNEL),y)", LDLIBS should contain libapps.a for both mode. > > 2.LDLIBS should contain libproxy.a to resolve sched_*, and libc.a for > > fprintf, but these library should in LDLIBS automatically. > > > > Thanks > > Xiang > > > > On Wed, Feb 26, 2020 at 11:23 AM Takashi Yamamoto > > <yamam...@midokura.com.invalid> wrote: > > > > > > hi, > > > > > > how can i build userspace for CONFIG_BUILD_KERNEL? > > > > > > using sama5d4-ek:knsh config, > > > i tried "make TOPDIR=$(pwd) APPDIR=$(pwd)/../apps -C ../apps install". > > > it generated some binaries like the following. > > > but i don't see how it will get nsh_consolemain etc. > > > > > > spacetanuki% nm ../apps/bin/init > > > 000000c0 B _ebss > > > 000000c0 D _edata > > > 000000c0 N _edtors > > > 000000c0 N _enoinit > > > 000000bf R _erodata > > > 00000098 T _etext > > > 000000c0 B _sbss > > > 000000c0 N _sctors > > > 000000bf D _sdata > > > 000000c0 N _sdtors > > > 000000c0 N _snoinit > > > 00000098 R _srodata > > > 00000000 T _stext > > > U fprintf > > > 00000000 T main > > > U nsh_consolemain > > > U nsh_initialize > > > U sched_getparam > > > U sched_getstreams > > > U sched_setparam > > > spacetanuki%