* [Buildroot] [PATCH] strip path when untaring kernel for headers
@ 2010-12-05 21:30 Paulius Zaleckas
2010-12-13 16:19 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Paulius Zaleckas @ 2010-12-05 21:30 UTC (permalink / raw)
To: buildroot
This is needed when custom/snapshot kernel headers are selected.
Buildroot expects to find dl/linux-2.6.tar.bz2 and also expects
it to extract to output/toolchain/linux-2.6, but if you tar
custom kernel sources directory can be anything, etc. linux-git.
In that case buildroot would extract it to output/toolchain/linux-git.
So fix this behaviour, by using tar strip-directory/component.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---
.../kernel-headers/kernel-headers-new.makefile | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/toolchain/kernel-headers/kernel-headers-new.makefile b/toolchain/kernel-headers/kernel-headers-new.makefile
index 2237a0a..5682869 100644
--- a/toolchain/kernel-headers/kernel-headers-new.makefile
+++ b/toolchain/kernel-headers/kernel-headers-new.makefile
@@ -28,8 +28,9 @@ LINUX_HEADERS_DEPENDS:=
$(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
@echo "*** Using kernel-headers generated from kernel source"
rm -rf $(LINUX_HEADERS_DIR)
- [ -d $(TOOLCHAIN_DIR) ] || $(INSTALL) -d $(TOOLCHAIN_DIR)
- $(LINUX_HEADERS_CAT) $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
+ $(INSTALL) -d $(@D)
+ $(LINUX_HEADERS_CAT) $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | \
+ tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
touch $@
$(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked $(LINUX_HEADERS_DEPENDS)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] strip path when untaring kernel for headers
2010-12-05 21:30 [Buildroot] [PATCH] strip path when untaring kernel for headers Paulius Zaleckas
@ 2010-12-13 16:19 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2010-12-13 16:19 UTC (permalink / raw)
To: buildroot
>>>>> "Paulius" == Paulius Zaleckas <paulius.zaleckas@gmail.com> writes:
Paulius> This is needed when custom/snapshot kernel headers are selected.
Paulius> Buildroot expects to find dl/linux-2.6.tar.bz2 and also expects
Paulius> it to extract to output/toolchain/linux-2.6, but if you tar
Paulius> custom kernel sources directory can be anything, etc. linux-git.
Paulius> In that case buildroot would extract it to output/toolchain/linux-git.
Paulius> So fix this behaviour, by using tar strip-directory/component.
Paulius> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-13 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 21:30 [Buildroot] [PATCH] strip path when untaring kernel for headers Paulius Zaleckas
2010-12-13 16:19 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox