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

FS#503 - Build fails with CONFIG_KERNEL_GIT_CLONE_URI beig set #5523

Open
openwrt-bot opened this issue Feb 12, 2017 · 1 comment
Open

FS#503 - Build fails with CONFIG_KERNEL_GIT_CLONE_URI beig set #5523

openwrt-bot opened this issue Feb 12, 2017 · 1 comment
Labels
flyspray kernel

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Feb 12, 2017

mirko:

When specifying CONFIG_KERNEL_GIT_CLONE_URI a clean build fails, as the system assumes a already downloaded/cloned/packed linux-source is present in dl/ which on a freshly checked out openwrt/lede source isn't the case yet, when toolchain/kernel-headers is about to be built.

The build error looks like:

make[3]: Entering directory `/build/lede.git/toolchain/kernel-headers' zcat /build/lede.git/dl/linux-4.4.42.tar.gz | tar -C /build/lede.git/build_dir/toolchain-arm_cortex-a9+neon_gcc-6.3.0_glibc-2.24_eabi -xf - gzip: /build/lede.git/dl/linux-4.4.42.tar.gz: No such file or directory tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors

The issue apparently is located in include/kernel-defaults.mk, line 53ff::

ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") define Kernel/Prepare/Default zcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) $(Kernel/Patch) $(if $(QUILT),touch $(LINUX_DIR)/.quilt_used) endef else define Kernel/Prepare/Default zcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) endef endif

For the package kernel-headers it just tries to access the not-yet downloaded/cloned/packed linux kernel source archive.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Feb 12, 2017

mirko:

include/kernel-defaults.mk

doesn't seem the right place to dig, as either way - independendat of CONFIG_KERNEL_GIT_CLONE_URI being set or not, the tarball is assumed already being there.

My next candidate is the following line in toolchain/kernel-headers/Makefile:

PKG_SOURCE_URL:=$(LINUX_SITE)

LINUX_SITE gets set in include/kernel-defaults.mk and only if CONFIG_KERNEL_GIT_CLONE_URI is unset.

The regular kernel build takes this into account, while the kernel-headers-Makefile apparently doesn't.

In include/kernel-build.mk it states:

define BuildKernel
$(if $(QUILT),$(Build/Quilt))
$(if $(LINUX_SITE),$(call Download,kernel))
$(if $(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),$(call Download,git-kernel))

while the kernel-headers-Makefile only relies on LINUX_SITE being set.

@aparcar aparcar added the kernel label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray kernel
Projects
None yet
Development

No branches or pull requests

2 participants