Skip to content

Commit 5a19c7e

Browse files
andreas-schwabpalmer-dabbelt
authored andcommitted
riscv: fix building external modules
When building external modules, vdso_prepare should not be run. If the kernel sources are read-only, it will fail. Fixes: fde9c59 ("riscv: explicitly use symbol offsets for VDSO") Signed-off-by: Andreas Schwab <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 12c484c commit 5a19c7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ PHONY += vdso_install
107107
vdso_install:
108108
$(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
109109

110+
ifeq ($(KBUILD_EXTMOD),)
110111
ifeq ($(CONFIG_MMU),y)
111112
prepare: vdso_prepare
112113
vdso_prepare: prepare0
113114
$(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h
114115
endif
116+
endif
115117

116118
ifneq ($(CONFIG_XIP_KERNEL),y)
117119
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)

0 commit comments

Comments
 (0)