correction : use same kernel in buildroot and in crosstool-ng
PATCH 1/1 correction : use same kernel in buildroot and in crosstool-ng
--- Makefile | 4 +- ...-ng-001-makefile-buildroot-kernel-version.patch | 41 ++++++++++++++++++++ ...ol-ng-002-config-buildroot-kernel-version.patch | 24 +++++++++++ package/crosstool-ng/crosstool-ng.mk | 6 ++- toolchain/toolchain-crosstool-ng/Config.in | 6 +++ toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 5 ++ 6 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patch create mode 100644 package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patch
Makefile +3 -1
@@ -301,6 +301,8 @@ all: world # We also need the various per-package makefiles, which also add # each selected package to TARGETS if that package was selected # in the .config file. +include linux/linux.mk + ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) include toolchain/toolchain-buildroot.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
@@ -313,7 +315,7 @@ include package/*/*.mk include boot/common.mk include target/Makefile.in -include linux/linux.mk + TARGETS+=target-finalize
package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patch new file +41 -0
41 lines not on this page · raw message
package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patch new file +24 -0
@@ -0,0 +1,24 @@ +--- crosstool-ng-1.12.1/config/kernel/linux.in 2011-09-21 11:00:49.759188996 +0200 ++++ host-crosstool-ng-1.12.1/config/kernel/linux.in 2011-09-21 11:02:45.390254678 +0200 +@@ -144,16 +144,18 @@ + + config KERNEL_LINUX_CUSTOM + bool +- prompt "custom tarball" ++ prompt "custom tarball or directory" + help +- Use a local tarball of a complete kernel source tree. ++ Use a local tarball of a complete kernel source tree or ++ a local kernel tree (not pre-installed) + + config KERNEL_LINUX_CUSTOM_TARBALL + string + prompt "Path to custom tarball" + depends on KERNEL_LINUX_CUSTOM + help +- Enter here the path to the tarball of your full kernel tree. ++ Enter here the path to the tarball of your full kernel tree or ++ the path or the local kernel tree + + endchoice +
package/crosstool-ng/crosstool-ng.mk +5 -1
@@ -4,6 +4,10 @@ CROSSTOOL_NG_SITE = http://crosstool-ng.org/download/crosstool-ng/ CROSSTOOL_NG_INSTALL_STAGING = NO CROSSTOOL_NG_INSTALL_TARGET = NO CROSSTOOL_NG_MAKE = $(MAKE1) -HOST_CROSSTOOL_NG_DEPENDENCIES = host-gawk host-automake $(if $(BR2_CCACHE),host-ccache) +HOST_CROSSTOOL_NG_DEPENDENCIES = host-gawk host-automake $(if $(BR2_CCACHE),host-ccache) + +ifeq ($(BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL), y) +HOST_CROSSTOOL_NG_DEPENDENCIES += linux-configure +endif $(eval $(call AUTOTARGETS,package,crosstool-ng,host))
toolchain/toolchain-crosstool-ng/Config.in +6 -0
@@ -46,6 +46,12 @@ config BR2_TOOLCHAIN_CTNG_CONFIG If unsure, keep the default value. +config BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL + bool "Buildroot kernel version" + depends on BR2_LINUX_KERNEL + help + Use buildroot kernel version in crosstool-Ng + if BR2_TOOLCHAIN_CTNG_uClibc comment "Toolchain Options"
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +5 -0
@@ -218,6 +218,11 @@ else CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:; endif +ifeq ($(BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL),y) +CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_KERNEL_LINUX_CUSTOM) is not set:\1=y:; +CTNG_FIX_DOT_CONFIG_SED += s:^(CT_KERNEL_LINUX_CUSTOM_TARBALL)=.*:\1="$(LINUX_DIR)":; +endif + # Shoe-horn CPU variant now ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_ARCH)=.*:\1=$(BR2_GCC_TARGET_ARCH):;
Signature · 1 line
1.7.0.4
PATCH 1/1 correction : use same kernel in buildroot and in crosstool-ng
I'm working on a new patch to add this modifications in the last version of crosstool-ng.
I don't modified CT_KERNEL_LINUX_CUSTOM_TARBALL to avoid add new parameter in crosstool-ng (1.12.1) config file.
Sincerely
2011/9/22 sinseman44 <[email protected]>
Quoted 194 lines
--- Makefile | 4 +- ...-ng-001-makefile-buildroot-kernel-version.patch | 41 ++++++++++++++++++++ ...ol-ng-002-config-buildroot-kernel-version.patch | 24 +++++++++++ package/crosstool-ng/crosstool-ng.mk | 6 ++- toolchain/toolchain-crosstool-ng/Config.in | 6 +++ toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 5 ++ 6 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patch create mode 100644
package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patchMakefile +3
-1@@ -301,6 +301,8 @@ all: world # We also need the various per-package makefiles, which also add # each selected package to TARGETS if that package was selected # in the .config file. +include linux/linux.mk + ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) include toolchain/toolchain-buildroot.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)@@ -313,7 +315,7 @@ include package/*/*.mk include boot/common.mk include target/Makefile.in -include linux/linux.mk + TARGETS+=target-finalizediff --git
a/package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patchb/package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patchnew file mode 100644
index 0000000..2a2c8ac
---/dev/null
+++b/package/crosstool-ng/crosstool-ng-001-makefile-buildroot-kernel-version.patchMakefile +1
-0@@ -0,0 +1,41 @@ +--- crosstool-ng-1.12.1/scripts/build/kernel/linux.sh 2011-09-2110:50:31.403186872 +0200
++++host-crosstool-ng-1.12.1/scripts/build/kernel/linux.sh2011-09-21
10:50:56.932014313 +0200
+@@ -61,21 +61,24 @@Makefile +4
-0+ return 0 + fi + +- CT_TestAndAbort "Custom kernel tree partially extracted.Remove before resuming" -f "${CT_SRC_DIR}/.linux-custom.extracting"
+-CT_DoExecLogDEBUG touch
"${CT_SRC_DIR}/.linux-custom.extracting"+- CT_DoExecLog DEBUG mkdir "${CT_SRC_DIR}/linux-custom" +- +- case "${CT_KERNEL_LINUX_CUSTOM_TARBALL}" in +- *.tar.bz2) tar_opt=-j;; +- *.tar.gz|*.tgz) tar_opt=-z;; +- *.tar) ;; +- *) CT_Abort "Don't know how to handle '${CT_KERNEL_LINUX_CUSTOM_TARBALL}': unknown extension";; +- esac +- CT_DoLog EXTRA "Extracting custom linux kernel" +- CT_DoExecLog ALL tar x -C "${CT_SRC_DIR}/linux-custom" \ +- --strip-components 1 -v ${tar_opt} \ +- -f "${CT_KERNEL_LINUX_CUSTOM_TARBALL}" ++ CT_TestAndAbort "Custom kernel tree partiallyextracted. Remove before resuming" -f
"${CT_SRC_DIR}/.linux-custom.extracting"
++CT_DoExecLogDEBUG touch
"${CT_SRC_DIR}/.linux-custom.extracting"
+
++ if [ ! -d "${CT_KERNEL_LINUX_CUSTOM_TARBALL}" ];
then
++CT_DoExecLogDEBUG mkdir
"${CT_SRC_DIR}/linux-custom"
++ case "${CT_KERNEL_LINUX_CUSTOM_TARBALL}" in++ *.tar.bz2) tar_opt=-j;; ++ *.tar.gz|*.tgz) tar_opt=-z;; ++ *.tar) ;; ++ *) CT_Abort "Don'tknow how to handle '${CT_KERNEL_LINUX_CUSTOM_TARBALL}': unknown extension";;
++ esac
++CT_DoLogEXTRA "Extracting custom linux
kernel"
++CT_DoExecLogALL tar x -C
"${CT_SRC_DIR}/linux-custom" \
++
--strip-components 1 -v ${tar_opt} \
++ -f
"${CT_KERNEL_LINUX_CUSTOM_TARBALL}"
++ else
++CT_DoExecLogALL ln -s
"${CT_KERNEL_LINUX_CUSTOM_TARBALL}" "${CT_SRC_DIR}/linux-custom"
++ fi
+CT_DoExecLogALL mv -v
"${CT_SRC_DIR}/.linux-custom.extracting" "${CT_SRC_DIR}/.linux-custom.extracted"Makefile +2
-0+ else + CT_Extract "linux-${CT_KERNEL_VERSION}"diff --git
a/package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patchb/package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patchnew file mode 100644
index 0000000..0d98ced
---/dev/null
+++b/package/crosstool-ng/crosstool-ng-002-config-buildroot-kernel-version.patchMakefile +1
-0@@ -0,0 +1,24 @@ +--- crosstool-ng-1.12.1/config/kernel/linux.in 2011-09-2111:00:49.759188996 +0200
++++ host-crosstool-ng-1.12.1/config/kernel/linux.in 2011-09-21
11:02:45.390254678 +0200
+@@ -144,16 +144,18 @@Makefile +21
-0+ + config KERNEL_LINUX_CUSTOM + bool +- prompt "custom tarball" ++ prompt "custom tarball or directory" + help +- Use a local tarball of a complete kernel source tree. ++ Use a local tarball of a complete kernel source tree or ++ a local kernel tree (not pre-installed) + + config KERNEL_LINUX_CUSTOM_TARBALL + string + prompt "Path to custom tarball" + depends on KERNEL_LINUX_CUSTOM + help +- Enter here the path to the tarball of your full kernel tree. ++ Enter here the path to the tarball of your full kernel tree or ++ the path or the local kernel tree + + endchoice +package/crosstool-ng/ renamed from package/crosstool-ng/crosstool-ng.mk +0
-0crosstool-ng.mk
index 076be28..848ead7 100644package/crosstool-ng/crosstool-ng.mk +0
-0@@ -4,6 +4,10 @@ CROSSTOOL_NG_SITE =http://crosstool-ng.org/download/crosstool-ng/
CROSSTOOL_NG_INSTALL_STAGING = NO CROSSTOOL_NG_INSTALL_TARGET = NO CROSSTOOL_NG_MAKE = $(MAKE1)-HOST_CROSSTOOL_NG_DEPENDENCIES = host-gawk host-automake $(if $(BR2_CCACHE),host-ccache) +HOST_CROSSTOOL_NG_DEPENDENCIES = host-gawk host-automake $(if $(BR2_CCACHE),host-ccache)
package/crosstool-ng/crosstool-ng.mk +4
-0+ +ifeq ($(BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL), y) +HOST_CROSSTOOL_NG_DEPENDENCIES += linux-configure +endif $(eval $(call AUTOTARGETS,package,crosstool-ng,host))toolchain/toolchain-crosstool-ng/Config.in +6
-0@@ -46,6 +46,12 @@ config BR2_TOOLCHAIN_CTNG_CONFIG If unsure, keep the default value. +config BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL + bool "Buildroot kernel version" + depends on BR2_LINUX_KERNEL + help + Use buildroot kernel version in crosstool-Ng + if BR2_TOOLCHAIN_CTNG_uClibc comment "Toolchain Options"(quoted diff) +0
-0crosstool-ng.mk
index 3a205dd..f71c2ae 100644toolchain/toolchain-crosstool-ng/crosstool-ng.mk +5
-0@@ -218,6 +218,11 @@ else CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:; endif +ifeq ($(BR2_TOOLCHAIN_CTNG_BUILDROOT_KERNEL),y) +CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_KERNEL_LINUX_CUSTOM) is not set:\1=y:; +CTNG_FIX_DOT_CONFIG_SED += s:^(CT_KERNEL_LINUX_CUSTOM_TARBALL)=.*:\1="$(LINUX_DIR)":; +endif + # Shoe-horn CPU variant now
Quoted 7 lines
ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
CTNG_FIX_DOT_CONFIG_SED+=
s:^(CT_ARCH_ARCH)=.*:\1=$(BR2_GCC_TARGET_ARCH):;
--
1.7.0.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110922/6f1c1131/attachment-0001.html>