- Status Assigned
- Percent Complete
- Task Type Build Failure
- Category Kernel
-
Assigned To
Florian Fainelli - Operating System All
- Severity Medium
- Priority Very Low
- Reported Version All
- Due in Version Undecided
-
Due Date
Undecided
- Private
FS#503 - Build fails with CONFIG_KERNEL_GIT_CLONE_URI beig set
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.
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`:
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:
while the kernel-headers-Makefile only relies on LINUX_SITE being set.