buildroot:linux: Rename blackfin kernel Image file from vmImage back to uImage.
PATCH 1/5 buildroot:linux: Rename blackfin kernel Image file from vmImage back to uImage.
From: Sonic Zhang <[email protected]>
Consist with other architectures.
--- linux/linux.mk | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
linux/linux.mk +0 -5
@@ -69,12 +69,7 @@ ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y) LINUX_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)) else ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y) -ifeq ($(KERNEL_ARCH),blackfin) -# a uImage, but with a different file name -LINUX_IMAGE_NAME=vmImage -else LINUX_IMAGE_NAME=uImage -endif else ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y) LINUX_IMAGE_NAME=uImage else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y)
Signature · 1 line
1.7.0.4
PATCH 2/5 linux: support unpacked kernel source tree
From: Sonic Zhang <[email protected]>
Point the kernel build system to the unpacked source tree. Allow the building folder differ from the source folder.
LINUX_DIR still refers to the building folder, while LINUX_SOURCE_DIR refers to the customer specified source folder.
--- linux/Config.in | 11 ++++++++++- linux/linux-ext-ocf-linux.mk | 4 ++-- linux/linux-ext-rtai.mk | 6 +++--- linux/linux-ext-xenomai.mk | 2 +- linux/linux.mk | 42 ++++++++++++++++++++++++++---------------- package/pkg-generic.mk | 11 +++++++++++ 6 files changed, 53 insertions(+), 23 deletions(-)
linux/Config.in +10 -1
@@ -53,6 +53,11 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT This option allows Buildroot to get the Linux kernel source code from a Git repository. +config BR2_LINUX_KERNEL_CUSTOM_TREE + bool "Custom unpacked tree" + help + This option allows use of an already unpacked linux tree. + endchoice config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
@@ -75,12 +80,16 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION Git revision to use in the format used by git rev-parse, E.G. a sha id, a tag, branch, .. +config BR2_LINUX_KERNEL_CUSTOM_PATH + string "PATH of custom kernel tree" + depends on BR2_LINUX_KERNEL_CUSTOM_TREE + config BR2_LINUX_KERNEL_VERSION string default "3.4.7" if BR2_LINUX_KERNEL_3_4 default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION - default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL + default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL || BR2_LINUX_KERNEL_CUSTOM_TREE default $BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION if BR2_LINUX_KERNEL_CUSTOM_GIT #
linux/linux-ext-ocf-linux.mk +2 -2
@@ -13,9 +13,9 @@ LINUX_DEPENDENCIES += ocf-linux # It works for older kernel versions. # Run tested from 2.6.38+ and build tested from 2.6.35+ define OCF_LINUX_PREPARE_KERNEL - support/scripts/apply-patches.sh $(LINUX_DIR) \ + support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) \ $(OCF_LINUX_DIR)/patches/ linux-3.2.1-ocf.patch ; \ - cp -rf $(OCF_LINUX_DIR)/ocf $(LINUX_DIR)/crypto/ocf ; + cp -rf $(OCF_LINUX_DIR)/ocf $(LINUX_SOURCE_DIR)/crypto/ocf ; endef LINUX_PRE_PATCH_HOOKS += OCF_LINUX_PREPARE_KERNEL
linux/linux-ext-rtai.mk +3 -3
@@ -23,9 +23,9 @@ endif # Prepare kernel patch ifeq ($(RTAI_PATCH),) define RTAI_PREPARE_KERNEL - kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \ + kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_SOURCE_DIR) --no-print-directory -s kernelversion` ; \ if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \ - support/scripts/apply-patches.sh $(LINUX_DIR) \ + support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) \ $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \ hal-linux-$${kver}-*patch ; \ else \
@@ -36,7 +36,7 @@ endef else define RTAI_PREPARE_KERNEL support/scripts/apply-patches.sh \ - $(LINUX_DIR) \ + $(LINUX_SOURCE_DIR) \ $(dir $(RTAI_PATCH)) \ $(notdir $(RTAI_PATCH)) endef
linux/linux-ext-xenomai.mk +1 -1
@@ -19,7 +19,7 @@ endif # Prepare kernel patch define XENOMAI_PREPARE_KERNEL $(XENOMAI_DIR)/scripts/prepare-kernel.sh \ - --linux=$(LINUX_DIR) \ + --linux=$(LINUX_SOURCE_DIR) \ --arch=$(KERNEL_ARCH) \ $(XENOMAI_ADEOS_OPT) \ --verbose
linux/linux.mk +26 -16
119 lines not on this page · raw message
package/pkg-generic.mk +11 -0
@@ -77,6 +77,7 @@ endif $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") + $(Q)mkdir -p $(@D) $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) $(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH)) $(Q)( \
@@ -296,8 +297,18 @@ $(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured $(2)_TARGET_RSYNC = $$($(2)_DIR)/.stamp_rsynced $(2)_TARGET_RSYNC_SOURCE = $$($(2)_DIR)/.stamp_rsync_sourced $(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched +ifeq ($(2), LINUX) +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TREE),y) +$(2)_TARGET_EXTRACT = +$(2)_TARGET_SOURCE = +else $(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted $(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded +endif +else +$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted +$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded +endif $(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned
Signature · 1 line
1.7.0.4
PATCH 2/5 linux: support unpacked kernel source tree
Hello,
Le Tue, 7 Aug 2012 17:09:34 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 9 lines
From: Sonic Zhang <[email protected]>
Point the kernel build system to the unpacked source tree. Allow the building folder differ from the source folder.
LINUX_DIRstill refers to the building folder, whileLINUX_SOURCE_DIRrefers to the customer specified source folder.Signed-off-by Sonic Zhang <[email protected]>
I know Mike implemented this a while ago, but we don't want this in Buildroot. The reason is that we don't want a per-package specific mechanism to handle such a thing, but rather something at the package infrastructure level.
At the moment, what we have to offer is the local.mk mechanism: you can create a local.mk in which you write:
LINUX_OVERRIDE_SRCDIR = /path/to/linux/sources
and then Buildroot will use the sources of Linux from this directory instead of doing the normal download/extract/patch strategy.
This mechanism is implemented at the package infrastructure level, and therefore works for all packages, not only Linux.
We're definitely open to improving things at the package infrastructure level, but we clearly don't want to add package-specific mechanisms such as the one being proposed here.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/5 linux: support unpacked kernel source tree
Quoted 15 lines · Thomas Petazzoni
Hello,
Le Tue, 7 Aug 2012 17:09:34 +0800,
Sonic Zhang <[email protected]> a ?crit :Quoted 9 lines
From: Sonic Zhang <[email protected]>
Point the kernel build system to the unpacked source tree. Allow the building folder differ from the source folder.
LINUX_DIRstill refers to the building folder, whileLINUX_SOURCE_DIRrefers to the customer specified source folder.Signed-off-by Sonic Zhang <[email protected]>
Quoted 8 lines
I know Mike implemented this a while ago, but we don't want this in Buildroot. The reason is that we don't want a per-package specific mechanism to handle such a thing, but rather something at the package infrastructure level.
At the moment, what we have to offer is the local.mk mechanism: you can create a local.mk in which you write:
Should I put this local.mk into buildroot/linux/ ?
Quoted 5 lines
LINUX_OVERRIDE_SRCDIR= /path/to/linux/sourcesand then Buildroot will use the sources of Linux from this directory instead of doing the normal download/extract/patch strategy.
The kernel configuration options in linux/Config.in don't allow me to choose a local source. What should I do after seting local.mk up?
Thanks
Sonic
PATCH 2/5 linux: support unpacked kernel source tree
Hello,
Le Mon, 13 Aug 2012 18:12:07 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 4 lines
Quoted 2 lines
At the moment, what we have to offer is the local.mk mechanism: you can create a local.mk in which you write:
Should I put this local.mk into buildroot/linux/ ?
By default, Buildroot reads local.mk from the top source directory, but this is configurable through the BR2_PACKAGE_OVERRIDE_FILE configuration option.
Quoted 7 lines
Quoted 4 lines
LINUX_OVERRIDE_SRCDIR= /path/to/linux/sourcesand then Buildroot will use the sources of Linux from this directory instead of doing the normal download/extract/patch strategy.
The kernel configuration options in linux/Config.in don't allow me to choose a local source. What should I do after seting local.mk up?
Nothing, it will be picked automatically, because linux/ is handled by the common package infrastructure, which takes care of the <foo>_OVERRIDE_SRCDIR option you can set in local.mk.
I admit this isn't completely nice to use, but this is so far the best solution we have found to implement this at the package infrastructure level. If you have better suggestions, we are definitely open to changing/improving this mechanism.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/5 linux: support unpacked kernel source tree
Hi Thomas,
Quoted 22 lines · Thomas Petazzoni
Hello,
Le Mon, 13 Aug 2012 18:12:07 +0800,
Sonic Zhang <[email protected]> a ?crit :Quoted 4 lines
Quoted 2 lines
At the moment, what we have to offer is the local.mk mechanism: you can create a local.mk in which you write:
Should I put this local.mk into buildroot/linux/ ?
By default, Buildroot reads local.mk from the top source directory, but this is configurable through the
BR2_PACKAGE_OVERRIDE_FILEconfiguration option.Quoted 7 lines
Quoted 4 lines
LINUX_OVERRIDE_SRCDIR= /path/to/linux/sourcesand then Buildroot will use the sources of Linux from this directory instead of doing the normal download/extract/patch strategy.
The kernel configuration options in linux/Config.in don't allow me to choose a local source. What should I do after seting local.mk up?
Quoted 9 lines
Nothing, it will be picked automatically, because linux/ is handled by the common package infrastructure, which takes care of the <foo>_OVERRIDE_SRCDIR option you can set in local.mk.
I admit this isn't completely nice to use, but this is so far the best solution we have found to implement this at the package infrastructure level. If you have better suggestions, we are definitely open to changing/improving this mechanism.
Current _OVERRIDE_SRCDIR method in local.mk doesn't help the requirement to build developer's local SCM tree by buildroot without copying the entire source code. This method asks for a complete copy and rebuilding each time the developer changes anything in his local SCM. It is inefficient and painful to develop large software packages such as Linux kernel in this way.
To addresses this requirement, the generic package has to define its source override path and forward the path flags to make command explicitly. It is better to define _OVERRIDE_SRCDIR macro in the generic package's makefile other than the local.mk.
I will revise my patch into common package infrastructure part and Linux specific part for your comments.
Other generic packages can do similar change to support override source without copying.
Regards,
Sonic Zhang
PATCH 3/5 buildroot: patch kernel by kernel version
In reply to Sonic ZhangFrom: Bob Liu <[email protected]>
support patch kernel by kernel version.
--- linux/linux.mk | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
linux/linux.mk +3 -1
@@ -64,6 +64,8 @@ endif # going to be installed in the target filesystem. LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_SOURCE_DIR) --no-print-directory -s kernelrelease) +KERNELVERSION=$(shell cat $(LINUX_SOURCE_DIR)/Makefile | awk 'BEGIN { FS = " *= *" } NF != 2 { next } $$1 == "VERSION" { maj = $$2} $$1 == "PATCHLEVEL" { mid = $$2 } $$1 == "SUBLEVEL" { mic = $$2 } END {print maj "." mid "." mic}') + ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y) KERNEL_DTS_NAME = $(BR2_LINUX_KERNEL_INTREE_DTS_NAME) else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)
@@ -149,7 +151,7 @@ define LINUX_APPLY_PATCHES if echo $$p | grep -q -E "^ftp://|^http://" ; then \ support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ - support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-\*.patch ; \ + support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-$(KERNELVERSION)-\*.patch ; \ else \ support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) `dirname $$p` `basename $$p` ; \ fi \
Signature · 1 line
1.7.0.4
PATCH 3/5 buildroot: patch kernel by kernel version
Le Tue, 7 Aug 2012 17:09:35 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 1 line
+KERNELVERSION=$(shell cat $(LINUX_SOURCE_DIR)/Makefile | awk 'BEGIN { FS = " *= *" } NF != 2 { next } $$1 == "VERSION" { maj = $$2} $$1 == "PATCHLEVEL" { mid = $$2 } $$1 == "SUBLEVEL" { mic = $$2 } END {print maj "." mid "." mic}')
This sounds horribly fragile.
linux/linux.mk define LINUX_APPLY_PATCHES · line 154
Quoted 9 lines
ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y)
KERNEL_DTS_NAME= $(BR2_LINUX_KERNEL_INTREE_DTS_NAME) else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)linux/linux.mk +1
-1@@ -149,7 +151,7 @@ define LINUX_APPLY_PATCHES if echo $$p | grep -q -E "^ftp://|^http://" ; then \ support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ - support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-\*.patch ; \ + support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-$(KERNELVERSION)-\*.patch ; \
Generally, we want to move away from patches having a version number in their name. For the packages for which multiple versions are supported, the patches should be organized in subdirectories named after the version. So instead of this patch, just organize your kernel patches in directories named linux-patches-3.2/, linux-patches-3.4/, etc.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/5 buildroot: patch kernel by kernel version
Quoted 7 lines · Thomas Petazzoni
Le Tue, 7 Aug 2012 17:09:35 +0800,
Sonic Zhang <[email protected]> a ?crit :Quoted 1 line
+KERNELVERSION=$(shell cat $(LINUX_SOURCE_DIR)/Makefile | awk 'BEGIN { FS = " *= *" } NF != 2 { next } $$1 == "VERSION" { maj = $$2} $$1 == "PATCHLEVEL" { mid = $$2 } $$1 == "SUBLEVEL" { mic = $$2 } END {print maj "." mid "." mic}')
This sounds horribly fragile.
Quoted 16 lines
linux/linux.mk define LINUX_APPLY_PATCHES · line 154
Quoted 9 lines
ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y)
KERNEL_DTS_NAME= $(BR2_LINUX_KERNEL_INTREE_DTS_NAME) else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)linux/linux.mk +1
-1@@ -149,7 +151,7 @@ define LINUX_APPLY_PATCHES if echo $$p | grep -q -E "^ftp://|^http://" ; then \ support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ - support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-\*.patch ; \ + support/scripts/apply-patches.sh $(LINUX_SOURCE_DIR) $$p linux-$(KERNELVERSION)-\*.patch ; \Generally, we want to move away from patches having a version number in their name. For the packages for which multiple versions are supported, the patches should be organized in subdirectories named after the version. So instead of this patch, just organize your kernel patches in directories named linux-patches-3.2/, linux-patches-3.4/, etc.
This fine.
Sonic
PATCH 4/5 Linux: Unpatch customer kernel source tree before make clean.
In reply to Sonic ZhangFrom: Sonic Zhang <[email protected]>
Unpatch only patches which match current kernel version.
--- Makefile | 2 +- linux/linux.mk | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -663,7 +663,7 @@ ifeq ($(NEED_WRAPPER),y) $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O) endif -clean: +clean: linux-unpatch rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ $(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(BASE_DIR)/staging \ $(LEGAL_INFO_DIR)
linux/linux.mk +13 -0
@@ -309,6 +309,19 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI # after it generated the initramfs list of files. linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt +LINUX_PATCH_LIST=$(wildcard $(LINUX_PATCHES)/linux-$(KERNELVERSION)-*.patch) +linux-unpatch: +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TREE),y) +ifneq ($(wildcard $(BUILD_DIR)/linux-$(LINUX_VERSION)/.stamp_patched),) + @echo "unpatch linux kernel...." + for p in $(LINUX_PATCH_LIST) ; do \ + patch -RE -p1 -d $(LINUX_SOURCE_DIR) < $$p; \ + done +else + @echo "linux kernel didn't patched, skip unpatch...." +endif +endif + # Checks to give errors that the user can understand ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
Signature · 1 line
1.7.0.4
PATCH 4/5 Linux: Unpatch customer kernel source tree before make clean.
Le Tue, 7 Aug 2012 17:09:36 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 5 lines
From: Sonic Zhang <[email protected]>
Unpatch only patches which match current kernel version.
Signed-off-by Sonic Zhang <[email protected]>
What is the use case for this?
Again, you're implementing something completely specific for the linux package while the logic itself has nothing specific to the Linux kernel. So if we ever want something like this, we want to implement it at the package infrastructure level, and clearly not in some random specific package.
I'm sorry to reject some of your patches this way, but as Buildroot developers, we have to maintain a good coherency and consistency in the implementation of the package recipes and the package infrastructure. And this consistency means that we don't want to implement specific things in packages that should in fact be implemented at the package infrastructure level.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 4/5 Linux: Unpatch customer kernel source tree before make clean.
Quoted 9 lines · Thomas Petazzoni
Le Tue, 7 Aug 2012 17:09:36 +0800,
Sonic Zhang <[email protected]> a ?crit :Quoted 5 lines
From: Sonic Zhang <[email protected]>
Unpatch only patches which match current kernel version.
Signed-off-by Sonic Zhang <[email protected]>
Quoted 8 lines
What is the use case for this?
Again, you're implementing something completely specific for the linux package while the logic itself has nothing specific to the Linux kernel. So if we ever want something like this, we want to implement it at the package infrastructure level, and clearly not in some random specific package.
I will try to turn these unpatch script into a make clean hook for packages with override source.
Regards,
Sonic
PATCH 5/5 buildroot: initramfs: Generate vmImage without builtin initramfs rootfs.
In reply to Sonic ZhangFrom: Sonic Zhang <[email protected]>
This is for developer's convenience when debugging via initramfs uImage.
--- linux/linux.mk | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
linux/linux.mk +9 -0
@@ -223,6 +223,11 @@ endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. define LINUX_BUILD_CMDS + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + # Remove the any previously generated initramfs if do recompilation. + $(RM) -f $(BINARIES_DIR)/rootfs.initramfs + $(RM) -f $(@D)/usr/initramfs_data.cpio* + touch $(BINARIES_DIR)/rootfs.initramfs) $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), cp $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) $(KERNEL_ARCH_PATH)/boot/dts/) $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_SOURCE_DIR) $(LINUX_IMAGE_TARGET)
@@ -231,6 +236,8 @@ define LINUX_BUILD_CMDS fi $(LINUX_BUILD_DTB) $(LINUX_APPEND_DTB) + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(LINUX_IMAGE_PATH) $(KERNEL_ARCH_PATH)/boot/vmImage) endef
@@ -251,6 +258,8 @@ endef define LINUX_INSTALL_IMAGES_CMDS cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(KERNEL_ARCH_PATH)/boot/vmImage $(BINARIES_DIR)) endef define LINUX_INSTALL_TARGET_CMDS
Signature · 1 line
1.7.0.4
PATCH 5/5 buildroot: initramfs: Generate vmImage without builtin initramfs rootfs.
Le Tue, 7 Aug 2012 17:09:37 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 5 lines
From: Sonic Zhang <[email protected]>
This is for developer's convenience when debugging via initramfs uImage.
Signed-off-by Sonic Zhang <[email protected]>
What is the problem being solved here? Could you expand a bit on the "why" this is needed? When you make changes to the root filesystem and do "make", the initramfs is regenerated, and the kernel image is regenerated as well with the current Buildroot, so I'm not sure what this patch is solving.
linux/linux.mk define LINUX_BUILD_CMDS · line 240
Quoted 2 lines
linux/linux.mk +2
-0+ $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(LINUX_IMAGE_PATH) $(KERNEL_ARCH_PATH)/boot/vmImage)
I'm confused. What is this vmImage thing that you are copying back into the kernel tree here...
linux/linux.mk endef · line 262
Quoted 4 lines
define
LINUX_INSTALL_IMAGES_CMDSlinux/linux.mk +2
-0cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(KERNEL_ARCH_PATH)/boot/vmImage $(BINARIES_DIR))
and installing to output/images here?
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 5/5 buildroot: initramfs: Generate vmImage without builtin initramfs rootfs.
Quoted 7 lines · Thomas Petazzoni
Le Tue, 7 Aug 2012 17:09:37 +0800,
Sonic Zhang <[email protected]> a ?crit :Quoted 4 lines
From: Sonic Zhang <[email protected]>
This is for developer's convenience when debugging via initramfs uImage.
Quoted 7 lines
Quoted 1 line
Signed-off-by Sonic Zhang <[email protected]>What is the problem being solved here? Could you expand a bit on the "why" this is needed? When you make changes to the root filesystem and do "make", the initramfs is regenerated, and the kernel image is regenerated as well with the current Buildroot, so I'm not sure what this patch is solving.
The uImage generated for initramfs can't be used directly to boot kernel with a rootfs on the other device by setting boot parameters "root=/dev/mtdblock0" in uboot. Some test cases need to boot from the other device without rebuilding the uImage for initramfs.
This patch generates a pure kernel image (vmImage) for developers convenience in addition to the uImage which has initramfs linked in.
Regards,
Sonic
Quoted 22 lines
linux/linux.mk define LINUX_BUILD_CMDS · line 240
Quoted 3 lines
linux/linux.mk +2
-0+ $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(LINUX_IMAGE_PATH) $(KERNEL_ARCH_PATH)/boot/vmImage)I'm confused. What is this vmImage thing that you are copying back into the kernel tree here...
linux/linux.mk endef · line 262
Quoted 4 lines
define
LINUX_INSTALL_IMAGES_CMDScp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)linux/linux.mk +2
-0+ $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + cp $(KERNEL_ARCH_PATH)/boot/vmImage $(BINARIES_DIR))and installing to output/images here?
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
PATCH 5/5 buildroot: initramfs: Generate vmImage without builtin initramfs rootfs.
Quoted 2 lines · Sonic Zhang
This patch generates a pure kernel image (vmImage) for developers convenience in addition to the uImage which has initramfs linked in.
This sentence makes a much clearer commit message :-)
Also, I would call this image $(LINUX_IMAGE_NAME)-noinitramfs rather than
vmImage.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/5 buildroot:linux: Rename blackfin kernel Image file from vmImage back to uImage.
In reply to Sonic ZhangLe Tue, 7 Aug 2012 17:09:33 +0800,
Sonic Zhang <[email protected]> a ?crit :
Quoted 5 lines
From: Sonic Zhang <[email protected]>
Consist with other architectures.
Signed-off-by Sonic Zhang <[email protected]>
Thanks, pushed to master. I have considered this as a bug fix, so I could commit this to master.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com