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

build error with kernel mode #12050

Closed
gneworld opened this issue Apr 4, 2024 · 5 comments
Closed

build error with kernel mode #12050

gneworld opened this issue Apr 4, 2024 · 5 comments

Comments

@gneworld
Copy link

gneworld commented Apr 4, 2024

Have a build error after enabling CONFIG_BUILD_KERNEL and CONFIG_ARCH_VMA_MAPPING in sabre-6quad:knsh, as shown below

nuttx$ make -j12
Create version.h
LN: platform/board to /home/official/apps/platform/dummy
Register: hello
Register: init
Register: sh
Register: getprime

CC: clock/clock_settime.c In file included from /home/official/nuttx/include/nuttx/addrenv.h:39,
from addrenv/addrenv.c:30:
/home/official/nuttx/include/arch/arch.h:141:18: error: 'ARCH_SHM_MAXPAGES' undeclared here (not in a function)
141 | uintptr_t *shm[ARCH_SHM_NSECTS];
^~~~~~~~~~~~~~~
Makefile:61: recipe for target 'addrenv.o' failed
make[1]: *** [addrenv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /home/official/nuttx/include/nuttx/arch.h:82,
from clock/clock_initialize.c:37

This issue can be fixed by moving the related code in arch.h into addrenv.h, however, is there a better solution for this issue? thanks much

@acassis
Copy link
Contributor

acassis commented Apr 4, 2024

@gneworld please confirm you CONFIG_ARCH_VMA_MAPPING defined in your .config

@gneworld
Copy link
Author

gneworld commented Apr 4, 2024

@gneworld please confirm you CONFIG_ARCH_VMA_MAPPING defined in your .config

@acassis
Yes, I have confirmed that CONFIG_ARCH_VMA_MAPPING has already been defined in the .config.
image

@acassis
Copy link
Contributor

acassis commented Apr 4, 2024

@masayuki2009 since you work a lot with sabre-6quad board, could you please take a look?

@gneworld gneworld closed this as completed Apr 7, 2024
@gneworld
Copy link
Author

gneworld commented Apr 7, 2024

just change ARCH_PG2SECT(ARCH_SHM_MAXPAGES)
to ARCH_PG2SECT((CONFIG_ARCH_SHM_NPAGES * CONFIG_ARCH_SHM_MAXREGIONS))
could fix this issue

@acassis
Copy link
Contributor

acassis commented Apr 7, 2024

@gneworld should it be modified into mainline?

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

No branches or pull requests

2 participants