Quantcast

[PATCH v2] linux custom tarball: automatically detect a change in tarball configuration

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v2] linux custom tarball: automatically detect a change in tarball configuration

Thomas De Schampheleire-3
When you specify a LINUX_TARBALL, the variable LINUX_VERSION will be set to
the fixed "custom". As a result, LINUX_DIR remains the same even though you
modified the .config file to specify a different tarball.  When re-running
make, buildroot does not see the change because the stamp files still look
up-to-date, and you'll have to force building the new kernel in some way.

This patch overwrites LINUX_VERSION to include the LINUX_TARBALL string, If a
new custom tarball is configured, LINUX_DIR will be different, the old stamp
files will not matter, and buildroot will correctly start the build process for
the new kernel.

Although the resulting linux directory name in output/build will look strange, I
think that developers using the 'custom tarball' option will not mind given the
benefits of it.

Signed-off-by: Thomas De Schampheleire <[hidden email]>
---

v2: take into account that LINUX_TARBALL may be an URL (thanks to Daniel Nyström
for the URL transformation suggestion).

 linux/linux.mk |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -10,6 +10,10 @@
 LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
 LINUX_SITE = $(dir $(LINUX_TARBALL))
 LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
+# Overwrite LINUX_VERSION so that LINUX_DIR becomes unique, in which case a
+# change in the LINUX_TARBALL configuration automatically gets picked up.
+LINUX_VERSION = custom-$(subst /,_,$(lastword $(subst ://, ,$(LINUX_TARBALL))))
+
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
 LINUX_SITE_METHOD = git
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v2] linux custom tarball: automatically detect a change in tarball configuration

Thomas De Schampheleire-3
Hi,

On Fri, Oct 7, 2011 at 5:30 PM, Thomas De Schampheleire
<[hidden email]> wrote:

> When you specify a LINUX_TARBALL, the variable LINUX_VERSION will be set to
> the fixed "custom". As a result, LINUX_DIR remains the same even though you
> modified the .config file to specify a different tarball.  When re-running
> make, buildroot does not see the change because the stamp files still look
> up-to-date, and you'll have to force building the new kernel in some way.
>
> This patch overwrites LINUX_VERSION to include the LINUX_TARBALL string, If a
> new custom tarball is configured, LINUX_DIR will be different, the old stamp
> files will not matter, and buildroot will correctly start the build process for
> the new kernel.
>
> Although the resulting linux directory name in output/build will look strange, I
> think that developers using the 'custom tarball' option will not mind given the
> benefits of it.
>
> Signed-off-by: Thomas De Schampheleire <[hidden email]>
> ---
>
> v2: take into account that LINUX_TARBALL may be an URL (thanks to Daniel Nyström
> for the URL transformation suggestion).
>
>  linux/linux.mk |  4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -10,6 +10,10 @@
>  LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
>  LINUX_SITE = $(dir $(LINUX_TARBALL))
>  LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
> +# Overwrite LINUX_VERSION so that LINUX_DIR becomes unique, in which case a
> +# change in the LINUX_TARBALL configuration automatically gets picked up.
> +LINUX_VERSION = custom-$(subst /,_,$(lastword $(subst ://, ,$(LINUX_TARBALL))))
> +
>  else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
>  LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
>  LINUX_SITE_METHOD = git
>

What about this updated patch?

Thanks,
Thomas
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v2] linux custom tarball: automatically detect a change in tarball configuration

Thomas De Schampheleire-3
On Sun, Oct 16, 2011 at 12:31 PM, Thomas De Schampheleire
<[hidden email]> wrote:

> Hi,
>
> On Fri, Oct 7, 2011 at 5:30 PM, Thomas De Schampheleire
> <[hidden email]> wrote:
>> When you specify a LINUX_TARBALL, the variable LINUX_VERSION will be set to
>> the fixed "custom". As a result, LINUX_DIR remains the same even though you
>> modified the .config file to specify a different tarball.  When re-running
>> make, buildroot does not see the change because the stamp files still look
>> up-to-date, and you'll have to force building the new kernel in some way.
>>
>> This patch overwrites LINUX_VERSION to include the LINUX_TARBALL string, If a
>> new custom tarball is configured, LINUX_DIR will be different, the old stamp
>> files will not matter, and buildroot will correctly start the build process for
>> the new kernel.
>>
>> Although the resulting linux directory name in output/build will look strange, I
>> think that developers using the 'custom tarball' option will not mind given the
>> benefits of it.
>>
>> Signed-off-by: Thomas De Schampheleire <[hidden email]>
>> ---
>>
>> v2: take into account that LINUX_TARBALL may be an URL (thanks to Daniel Nyström
>> for the URL transformation suggestion).
>>
>>  linux/linux.mk |  4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/linux/linux.mk b/linux/linux.mk
>> --- a/linux/linux.mk
>> +++ b/linux/linux.mk
>> @@ -10,6 +10,10 @@
>>  LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
>>  LINUX_SITE = $(dir $(LINUX_TARBALL))
>>  LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
>> +# Overwrite LINUX_VERSION so that LINUX_DIR becomes unique, in which case a
>> +# change in the LINUX_TARBALL configuration automatically gets picked up.
>> +LINUX_VERSION = custom-$(subst /,_,$(lastword $(subst ://, ,$(LINUX_TARBALL))))
>> +
>>  else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
>>  LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
>>  LINUX_SITE_METHOD = git
>>
>
> What about this updated patch?
>
> Thanks,
> Thomas
>

bump
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Loading...