Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs
@ 2015-04-17 20:26 Frank Hunleth
  2015-04-17 20:26 ` [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Frank Hunleth
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Frank Hunleth @ 2015-04-17 20:26 UTC (permalink / raw)
  To: buildroot

The existing u-boot patch option only allowed directories to be
specified. As suggested by Arnout Vandecappelle, hooking into the
generic patch framework enables files and URLs to be specified. The
downside is that patch directories need to be converted to lists of
files to use this approach.

This change is useful for Intel Edison support, so that Intel's u-boot
patch can be downloaded rather than stored in the Buildroot source tree.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 boot/uboot/Config.in | 8 ++++++++
 boot/uboot/uboot.mk  | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 3f39ee8..32fcb21 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -79,6 +79,14 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
 
 	  Most users may leave this empty
 
+config BR2_TARGET_UBOOT_PATCHES
+	string "custom patches"
+	help
+	  If your board requires custom patches, add a list of patches
+	  here.
+
+	  Most users may leave this empty
+
 choice
 	prompt "U-Boot binary format"
 	default BR2_TARGET_UBOOT_FORMAT_BIN
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 6b152ca..e9f90a2 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -101,6 +101,8 @@ endef
 UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
 endif
 
+UBOOT_PATCH += $(call qstrip,$(BR2_TARGET_UBOOT_PATCHES))
+
 define UBOOT_CONFIGURE_CMDS
 	$(TARGET_CONFIGURE_OPTS) 	\
 		$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS)		\
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
  2015-04-17 20:26 [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Frank Hunleth
@ 2015-04-17 20:26 ` Frank Hunleth
  2015-04-18 13:54   ` Thomas Petazzoni
  2015-04-17 20:26 ` [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR Frank Hunleth
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Frank Hunleth @ 2015-04-17 20:26 UTC (permalink / raw)
  To: buildroot

Users should use BR2_TARGET_UBOOT_PATCHES instead.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 boot/uboot/Config.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 32fcb21..6d42d49 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -71,6 +71,7 @@ config BR2_TARGET_UBOOT_VERSION
 		if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG
 
 config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
+	depends on BR2_DEPRECATED_SINCE_2015_05
 	string "custom patch dir"
 	help
 	  If your board requires custom patches, add the path to the
@@ -79,6 +80,8 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
 
 	  Most users may leave this empty
 
+	  NOTE: Use BR2_TARGET_UBOOT_PATCHES instead.
+
 config BR2_TARGET_UBOOT_PATCHES
 	string "custom patches"
 	help
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR
  2015-04-17 20:26 [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Frank Hunleth
  2015-04-17 20:26 ` [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Frank Hunleth
@ 2015-04-17 20:26 ` Frank Hunleth
  2015-04-18 13:55   ` Thomas Petazzoni
  2015-04-18  0:40 ` [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Vivien Didelot
  2015-04-18 13:53 ` Thomas Petazzoni
  3 siblings, 1 reply; 9+ messages in thread
From: Frank Hunleth @ 2015-04-17 20:26 UTC (permalink / raw)
  To: buildroot

Use BR2_TARGET_UBOOT_PATCHES now that BR2_TARGET_UBOOT_PATCH_DIR is
deprecated.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 configs/altera_sockit_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/altera_sockit_defconfig b/configs/altera_sockit_defconfig
index d27b96b..f9249ca 100644
--- a/configs/altera_sockit_defconfig
+++ b/configs/altera_sockit_defconfig
@@ -31,7 +31,7 @@ BR2_TARGET_UBOOT_BOARDNAME="socfpga_cyclone5"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
 BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.rocketboards.org/u-boot-socfpga.git"
 BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_acds13.0sp1"
-BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/altera/sockit"
+BR2_TARGET_UBOOT_CUSTOM_PATCHES="board/altera/sockit/uboot-sockit-preloader-sample-design.patch"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs
  2015-04-17 20:26 [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Frank Hunleth
  2015-04-17 20:26 ` [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Frank Hunleth
  2015-04-17 20:26 ` [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR Frank Hunleth
@ 2015-04-18  0:40 ` Vivien Didelot
  2015-04-18 13:53 ` Thomas Petazzoni
  3 siblings, 0 replies; 9+ messages in thread
From: Vivien Didelot @ 2015-04-18  0:40 UTC (permalink / raw)
  To: buildroot

Hi all,

Sorry for showing up a bit late on this thread.

> +config BR2_TARGET_UBOOT_PATCHES
> +	string "custom patches"
[...]
> +UBOOT_PATCH += $(call qstrip,$(BR2_TARGET_UBOOT_PATCHES))
> +
>  define UBOOT_CONFIGURE_CMDS

While we are adding new U-Boot related symbols, I think it would be nice
to respect the project naming convention, which is described in the
"Names and Spelling" section [1] of the project README file.

So, I'd suggest these symbols to be named BR2_TARGET_U_BOOT_PATCHES and
U_BOOT_PATCH in respect to the official project name.

[1] http://git.denx.de/?p=u-boot.git;a=blob;f=README;h=9b748ccc34120b3c10dd8c33d84269bff6853b1b;hb=HEAD#l93

Best Regards,
-v

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs
  2015-04-17 20:26 [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Frank Hunleth
                   ` (2 preceding siblings ...)
  2015-04-18  0:40 ` [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Vivien Didelot
@ 2015-04-18 13:53 ` Thomas Petazzoni
  3 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2015-04-18 13:53 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Fri, 17 Apr 2015 16:26:13 -0400, Frank Hunleth wrote:
> The existing u-boot patch option only allowed directories to be
> specified. As suggested by Arnout Vandecappelle, hooking into the
> generic patch framework enables files and URLs to be specified. The
> downside is that patch directories need to be converted to lists of
> files to use this approach.
> 
> This change is useful for Intel Edison support, so that Intel's u-boot
> patch can be downloaded rather than stored in the Buildroot source tree.
> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
> ---
>  boot/uboot/Config.in | 8 ++++++++
>  boot/uboot/uboot.mk  | 2 ++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 3f39ee8..32fcb21 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -79,6 +79,14 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
>  
>  	  Most users may leave this empty
>  
> +config BR2_TARGET_UBOOT_PATCHES
> +	string "custom patches"
> +	help
> +	  If your board requires custom patches, add a list of patches
> +	  here.
> +
> +	  Most users may leave this empty

What about doing like for the Linux kernel: a single option to list
patches, which can be local patches, local directories, or remote
patches to be downloaded?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
  2015-04-17 20:26 ` [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Frank Hunleth
@ 2015-04-18 13:54   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2015-04-18 13:54 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Fri, 17 Apr 2015 16:26:14 -0400, Frank Hunleth wrote:
> Users should use BR2_TARGET_UBOOT_PATCHES instead.
> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>

Except that your implementation of BR2_TARGET_UBOOT_PATCHES does not
allow the same thing as BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR.
BR2_TARGET_UBOOT_PATCHES, as per your current implementation, can only
be used for remote patches: they will be downloaded from the given URL
if a full URL is given, or from $(UBOOT_SITE) if just a file name is
given.

See how things are done in linux/linux.mk for an example that allows
both remote and local patches. Though I'm not necessarily too happy to
see the linux/linux.mk being duplicated...

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR
  2015-04-17 20:26 ` [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR Frank Hunleth
@ 2015-04-18 13:55   ` Thomas Petazzoni
  2015-04-18 14:28     ` Frank Hunleth
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2015-04-18 13:55 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Fri, 17 Apr 2015 16:26:15 -0400, Frank Hunleth wrote:
> Use BR2_TARGET_UBOOT_PATCHES now that BR2_TARGET_UBOOT_PATCH_DIR is
> deprecated.
> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
> ---
>  configs/altera_sockit_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/altera_sockit_defconfig b/configs/altera_sockit_defconfig
> index d27b96b..f9249ca 100644
> --- a/configs/altera_sockit_defconfig
> +++ b/configs/altera_sockit_defconfig
> @@ -31,7 +31,7 @@ BR2_TARGET_UBOOT_BOARDNAME="socfpga_cyclone5"
>  BR2_TARGET_UBOOT_CUSTOM_GIT=y
>  BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.rocketboards.org/u-boot-socfpga.git"
>  BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_acds13.0sp1"
> -BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/altera/sockit"
> +BR2_TARGET_UBOOT_CUSTOM_PATCHES="board/altera/sockit/uboot-sockit-preloader-sample-design.patch"

Did you actually tested this? It will end up with:

UBOOT_PATCH = board/altera/sockit/uboot-sockit-preloader-sample-design.patch

which means that the package infra will try to download:

   ftp://ftp.denx.de/pub/u-boot/board/altera/sockit/uboot-sockit-preloader-sample-design.patch

No?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR
  2015-04-18 13:55   ` Thomas Petazzoni
@ 2015-04-18 14:28     ` Frank Hunleth
  2015-04-18 15:48       ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Hunleth @ 2015-04-18 14:28 UTC (permalink / raw)
  To: buildroot

On Sat, Apr 18, 2015 at 9:55 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Frank Hunleth,
>
> On Fri, 17 Apr 2015 16:26:15 -0400, Frank Hunleth wrote:
>> Use BR2_TARGET_UBOOT_PATCHES now that BR2_TARGET_UBOOT_PATCH_DIR is
>> deprecated.
>>
>> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
>> ---
>>  configs/altera_sockit_defconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configs/altera_sockit_defconfig b/configs/altera_sockit_defconfig
>> index d27b96b..f9249ca 100644
>> --- a/configs/altera_sockit_defconfig
>> +++ b/configs/altera_sockit_defconfig
>> @@ -31,7 +31,7 @@ BR2_TARGET_UBOOT_BOARDNAME="socfpga_cyclone5"
>>  BR2_TARGET_UBOOT_CUSTOM_GIT=y
>>  BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.rocketboards.org/u-boot-socfpga.git"
>>  BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_acds13.0sp1"
>> -BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/altera/sockit"
>> +BR2_TARGET_UBOOT_CUSTOM_PATCHES="board/altera/sockit/uboot-sockit-preloader-sample-design.patch"
>
> Did you actually tested this? It will end up with:
>
> UBOOT_PATCH = board/altera/sockit/uboot-sockit-preloader-sample-design.patch
>
> which means that the package infra will try to download:
>
>    ftp://ftp.denx.de/pub/u-boot/board/altera/sockit/uboot-sockit-preloader-sample-design.patch
>
> No?

Dohh! In my rush to leave yesterday, I had convinced myself that it
would work without testing. You're totally right, though. I'll fix
depending on how the first patch in the series works out.

Thanks,
Frank

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR
  2015-04-18 14:28     ` Frank Hunleth
@ 2015-04-18 15:48       ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2015-04-18 15:48 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Sat, 18 Apr 2015 10:28:31 -0400, Frank Hunleth wrote:

> Dohh! In my rush to leave yesterday, I had convinced myself that it
> would work without testing. You're totally right, though. I'll fix
> depending on how the first patch in the series works out.

Well, I didn't test myself, so maybe I'm wrong. Make sure to verify
what I said by testing for real.

Regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-18 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 20:26 [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Frank Hunleth
2015-04-17 20:26 ` [Buildroot] [PATCH 2/3] uboot: deprecate BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Frank Hunleth
2015-04-18 13:54   ` Thomas Petazzoni
2015-04-17 20:26 ` [Buildroot] [PATCH 3/3] altera: update use of BR2_TARGET_UBOOT_PATCH_DIR Frank Hunleth
2015-04-18 13:55   ` Thomas Petazzoni
2015-04-18 14:28     ` Frank Hunleth
2015-04-18 15:48       ` Thomas Petazzoni
2015-04-18  0:40 ` [Buildroot] [PATCH 1/3] uboot: add support for patch files and URLs Vivien Didelot
2015-04-18 13:53 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox