diff mbox series

[v3] build: create $(PKG_SYMVERS_DIR) if non-existent

Message ID 20201118212808.GA12761@darth.lan
State Superseded
Headers show
Series [v3] build: create $(PKG_SYMVERS_DIR) if non-existent | expand

Commit Message

Sebastian Kemper Nov. 18, 2020, 9:28 p.m. UTC
Commit 5d76065 moved the creation of the symvers directory to
include/kernel-build.mk. This is fine when building from scratch. But
when unpacking an SDK the directory doesn't exist and because the kernel
won't be built (again) this directory will not be created by the build
system, causing build failure if make tries to copy files into it.

This moves the creation of the symvers directory back into
include/kernel.mk so that the directory is created in any case.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
---
 include/kernel-build.mk | 1 -
 include/kernel.mk       | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

--
2.26.2

Comments

Sebastian Kemper Nov. 18, 2020, 9:52 p.m. UTC | #1
On Wed, Nov 18, 2020 at 10:28:12PM +0100, Sebastian Kemper wrote:
> diff --git a/include/kernel.mk b/include/kernel.mk
> index 1ae9c6be29..d48b68f515 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -149,6 +149,7 @@ define collect_module_symvers
>  			grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
>  	done; \
>  	sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
> +	mkdir -p $(PKG_SYMVERS_DIR)
>  	mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers
>  endef

Whoopsie, I just realized that this is all sort of linked together with
backslashes. I don't think this is needed except for the for loop. But
I'll send a v5 that keeps this fashion as is.
diff mbox series

Patch

diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index a698deec3c..22f7c4c7c7 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -136,7 +136,6 @@  define BuildKernel
   $(LINUX_DIR)/.modules: export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig
   $(LINUX_DIR)/.modules: $(STAMP_CONFIGURED) $(LINUX_DIR)/.config FORCE
 	$(Kernel/CompileModules)
-	mkdir -p $(PKG_SYMVERS_DIR)
 	touch $$@

   $(LINUX_DIR)/.image: export STAGING_PREFIX=$$(STAGING_DIR_HOST)
diff --git a/include/kernel.mk b/include/kernel.mk
index 1ae9c6be29..d48b68f515 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -149,6 +149,7 @@  define collect_module_symvers
 			grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
 	done; \
 	sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
+	mkdir -p $(PKG_SYMVERS_DIR)
 	mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers
 endef