Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] u-boot: begin custom patch dir with a capital
@ 2012-02-09 14:51 yegorslists at googlemail.com
  2012-02-09 14:51 ` [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support yegorslists at googlemail.com
  0 siblings, 1 reply; 4+ messages in thread
From: yegorslists at googlemail.com @ 2012-02-09 14:51 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 boot/uboot/Config.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index c8db9fb..b10d380 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -55,7 +55,7 @@ config BR2_TARGET_UBOOT_VERSION
 	default $BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION if BR2_TARGET_UBOOT_CUSTOM_GIT
 
 config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
-	string "custom patch dir"
+	string "Custom patch dir"
 	help
 	  If your board requires custom patches, add the path to the
 	  directory containing the patches here. The patches must be
-- 
1.7.5.4

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

* [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support
  2012-02-09 14:51 [Buildroot] [PATCH 1/2] u-boot: begin custom patch dir with a capital yegorslists at googlemail.com
@ 2012-02-09 14:51 ` yegorslists at googlemail.com
  2012-02-11 14:55   ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: yegorslists at googlemail.com @ 2012-02-09 14:51 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 boot/xloader/Config.in  |   45 +++++++++++++++++++++++++++++++++++++++++++++
 boot/xloader/xloader.mk |   22 ++++++++++++++++++++--
 2 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/boot/xloader/Config.in b/boot/xloader/Config.in
index c411be4..4a510c9 100644
--- a/boot/xloader/Config.in
+++ b/boot/xloader/Config.in
@@ -12,4 +12,49 @@ config BR2_TARGET_XLOADER_BOARDNAME
 	  One of x-loader supported boards to be built.
 	  This will be suffixed with _config to meet x-loader
 	  standard naming.
+
+choice
+	prompt "X-loader Version"
+	default BR2_TARGET_XLOADER_CUSTOM_GIT
+	help
+	  Select the specific X-loader version you want to use
+
+config BR2_TARGET_XLOADER_CUSTOM_TARBALL
+	bool "Custom tarball"
+
+config BR2_TARGET_XLOADER_CUSTOM_GIT
+	bool "Custom Git repository"
+
+endchoice
+
+if BR2_TARGET_XLOADER_CUSTOM_GIT
+
+config BR2_TARGET_XLOADER_CUSTOM_GIT_REPO_URL
+	string "URL of custom Git repository"
+
+config BR2_TARGET_XLOADER_CUSTOM_GIT_VERSION
+	string "Custom Git version"
+
+endif
+
+if BR2_TARGET_XLOADER_CUSTOM_TARBALL
+
+config BR2_TARGET_XLOADER_CUSTOM_TARBALL_LOCATION
+	string "URL of custom X-loader tarball"
+
+endif
+
+config BR2_TARGET_XLOADER_VERSION
+	string
+	default "custom"	if BR2_TARGET_XLOADER_CUSTOM_TARBALL
+	default $BR2_TARGET_XLOADER_CUSTOM_GIT_VERSION if BR2_TARGET_XLOADER_CUSTOM_GIT
+
+config BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR
+	string "Custom patch dir"
+	help
+	  If your board requires custom patches, add the path to the
+	  directory containing the patches here. The patches must be
+	  named xloader-<version>-<something>.patch.
+
+	  Most users may leave this empty
 endif
diff --git a/boot/xloader/xloader.mk b/boot/xloader/xloader.mk
index e8dd380..6ba2920 100644
--- a/boot/xloader/xloader.mk
+++ b/boot/xloader/xloader.mk
@@ -3,10 +3,28 @@
 # x-loader
 #
 #############################################################
-XLOADER_VERSION    = 6f3a26101303051e0f91b6213735b68ce804e94e
-XLOADER_SITE       = git://gitorious.org/x-loader/x-loader.git
+XLOADER_VERSION    = $(call qstrip,$(BR2_TARGET_XLOADER_VERSION))
 XLOADER_BOARD_NAME = $(call qstrip,$(BR2_TARGET_XLOADER_BOARDNAME))
 
+ifeq ($(XLOADER_VERSION),custom)
+# Handle custom X-loader tarballs as specified by the configuration
+XLOADER_TARBALL = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_TARBALL_LOCATION))
+XLOADER_SITE    = $(dir $(XLOADER_TARBALL))
+XLOADER_SOURCE  = $(notdir $(XLOADER_TARBALL))
+else
+XLOADER_SITE        = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_GIT_REPO_URL))
+XLOADER_SITE_METHOD = git
+endif
+
+ifneq ($(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR)),)
+define XLOADER_APPLY_CUSTOM_PATCHES
+	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR) \
+		xloader-$(XLOADER_VERSION)-\*.patch
+endef
+
+XLOADER_POST_PATCH_HOOKS += XLOADER_APPLY_CUSTOM_PATCHES
+endif
+
 XLOADER_INSTALL_IMAGES = YES
 
 define XLOADER_BUILD_CMDS
-- 
1.7.5.4

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

* [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support
  2012-02-09 14:51 ` [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support yegorslists at googlemail.com
@ 2012-02-11 14:55   ` Arnout Vandecappelle
  2012-02-13  8:13     ` Yegor Yefremov
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-02-11 14:55 UTC (permalink / raw)
  To: buildroot

On Thursday 09 February 2012 15:51:48 yegorslists at googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>

 First some general remarks:

- Make sure that existing (def)configs keep working as expected.  So
setting BR2_TARGET_XLOADER and BR2_TARGET_XLOADER_BOARDNAME should be
enough to get a working xloader.

- Are there actual public xloader tarballs that you would use?  If the
purpose is to avoid git clones from gitorious, it's better to use the 
PRIMARY_SITE feature.  If the purpose is to use a locally modified
version, it's better to use the _OVERRIDE_SRCDIR feature.  And if the
purpose is to avoid requiring git access, it's better to change the
XLOADER_SITE to http://gitorious.org/x-loader/x-loader/archive-tarball
and XLOADER_SOURCE to v1.5.1 (this is a version bump as well, obviously).


> +choice
> +	prompt "X-loader Version"
> +	default BR2_TARGET_XLOADER_CUSTOM_GIT
> +	help
> +	  Select the specific X-loader version you want to use
> +
> +config BR2_TARGET_XLOADER_CUSTOM_TARBALL
> +	bool "Custom tarball"
> +
> +config BR2_TARGET_XLOADER_CUSTOM_GIT
> +	bool "Custom Git repository"

 Since you have to choose one of the two, it's strange to call them
"custom".  Also, git comes before tarball in the alphabet.

 Perhaps the best option is to add 'v1.5.1' as one of the options,
that also solves my issue with existing defconfigs no longer working.

[snip]
> +config BR2_TARGET_XLOADER_VERSION
> +	string
> +	default "custom"	if BR2_TARGET_XLOADER_CUSTOM_TARBALL
> +	default $BR2_TARGET_XLOADER_CUSTOM_GIT_VERSION if BR2_TARGET_XLOADER_CUSTOM_GIT

 I didn't know that it worked with the $.  Is there a difference between
with and without?  If not, Peter, do we have a preference?

> +
> +config BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR
> +	string "Custom patch dir"
> +	help
> +	  If your board requires custom patches, add the path to the
> +	  directory containing the patches here. The patches must be
> +	  named xloader-<version>-<something>.patch.

 Leave the version out of the name.  Especially if <version> is a git
sha, this becomes annoyingly long.

 At the developer day, we decided that internal patches normally have no
version number, and that if one is required (because multiple versions of
the package exist), each version will have a separate directory.  For 
external patches, the same pattern should be allowed.

 The linux patches require linux-*.patch, u-boot currently requires the
version number to be there (but that will change I guess).


> +ifeq ($(XLOADER_VERSION),custom)
 A git branch may be called 'custom', so this is no reliable way to detect
git vs. tarball.  But you can simply put
ifeq ($(BR2_TARGET_XLOADER_CUSTOM_TARBALL),y)

> +# Handle custom X-loader tarballs as specified by the configuration
 This remark is redundant.

> +XLOADER_TARBALL = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_TARBALL_LOCATION))
> +XLOADER_SITE    = $(dir $(XLOADER_TARBALL))
> +XLOADER_SOURCE  = $(notdir $(XLOADER_TARBALL))
> +else
> +XLOADER_SITE        = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_GIT_REPO_URL))
> +XLOADER_SITE_METHOD = git
> +endif
> +
> +ifneq ($(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR)),)
> +define XLOADER_APPLY_CUSTOM_PATCHES
> +	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR) \
> +		xloader-$(XLOADER_VERSION)-\*.patch
> +endef
> +
> +XLOADER_POST_PATCH_HOOKS += XLOADER_APPLY_CUSTOM_PATCHES
> +endif
> +
>  XLOADER_INSTALL_IMAGES = YES
>  
>  define XLOADER_BUILD_CMDS


 Regards,
 Arnout

-- 
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

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

* [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support
  2012-02-11 14:55   ` Arnout Vandecappelle
@ 2012-02-13  8:13     ` Yegor Yefremov
  0 siblings, 0 replies; 4+ messages in thread
From: Yegor Yefremov @ 2012-02-13  8:13 UTC (permalink / raw)
  To: buildroot

Am 11.02.2012 15:55, schrieb Arnout Vandecappelle:
> On Thursday 09 February 2012 15:51:48 yegorslists at googlemail.com wrote:
>> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
>  First some general remarks:
> 
> - Make sure that existing (def)configs keep working as expected.  So
> setting BR2_TARGET_XLOADER and BR2_TARGET_XLOADER_BOARDNAME should be
> enough to get a working xloader.
> 
> - Are there actual public xloader tarballs that you would use?  If the
> purpose is to avoid git clones from gitorious, it's better to use the 
> PRIMARY_SITE feature.  If the purpose is to use a locally modified
> version, it's better to use the _OVERRIDE_SRCDIR feature.  And if the
> purpose is to avoid requiring git access, it's better to change the
> XLOADER_SITE to http://gitorious.org/x-loader/x-loader/archive-tarball
> and XLOADER_SOURCE to v1.5.1 (this is a version bump as well, obviously).

I think we don't really need support for tarballs. I've just taken the u-boot approach.
 
>> +choice
>> +	prompt "X-loader Version"
>> +	default BR2_TARGET_XLOADER_CUSTOM_GIT
>> +	help
>> +	  Select the specific X-loader version you want to use
>> +
>> +config BR2_TARGET_XLOADER_CUSTOM_TARBALL
>> +	bool "Custom tarball"
>> +
>> +config BR2_TARGET_XLOADER_CUSTOM_GIT
>> +	bool "Custom Git repository"
> 
>  Since you have to choose one of the two, it's strange to call them
> "custom".  Also, git comes before tarball in the alphabet.

ACK
 
>  Perhaps the best option is to add 'v1.5.1' as one of the options,
> that also solves my issue with existing defconfigs no longer working.

ACK
 
> [snip]
>> +config BR2_TARGET_XLOADER_VERSION
>> +	string
>> +	default "custom"	if BR2_TARGET_XLOADER_CUSTOM_TARBALL
>> +	default $BR2_TARGET_XLOADER_CUSTOM_GIT_VERSION if BR2_TARGET_XLOADER_CUSTOM_GIT
> 
>  I didn't know that it worked with the $.  Is there a difference between
> with and without?  If not, Peter, do we have a preference?
> 
>> +
>> +config BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR
>> +	string "Custom patch dir"
>> +	help
>> +	  If your board requires custom patches, add the path to the
>> +	  directory containing the patches here. The patches must be
>> +	  named xloader-<version>-<something>.patch.
> 
>  Leave the version out of the name.  Especially if <version> is a git
> sha, this becomes annoyingly long.

Oh yes, it is annoying.
 
>  At the developer day, we decided that internal patches normally have no
> version number, and that if one is required (because multiple versions of
> the package exist), each version will have a separate directory.  For 
> external patches, the same pattern should be allowed.

I support this decision.

>  The linux patches require linux-*.patch, u-boot currently requires the
> version number to be there (but that will change I guess).
> 
> 
>> +ifeq ($(XLOADER_VERSION),custom)
>  A git branch may be called 'custom', so this is no reliable way to detect
> git vs. tarball.  But you can simply put
> ifeq ($(BR2_TARGET_XLOADER_CUSTOM_TARBALL),y)
> 
>> +# Handle custom X-loader tarballs as specified by the configuration
>  This remark is redundant.

ACK

>> +XLOADER_TARBALL = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_TARBALL_LOCATION))
>> +XLOADER_SITE    = $(dir $(XLOADER_TARBALL))
>> +XLOADER_SOURCE  = $(notdir $(XLOADER_TARBALL))
>> +else
>> +XLOADER_SITE        = $(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_GIT_REPO_URL))
>> +XLOADER_SITE_METHOD = git
>> +endif
>> +
>> +ifneq ($(call qstrip,$(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR)),)
>> +define XLOADER_APPLY_CUSTOM_PATCHES
>> +	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR) \
>> +		xloader-$(XLOADER_VERSION)-\*.patch
>> +endef
>> +
>> +XLOADER_POST_PATCH_HOOKS += XLOADER_APPLY_CUSTOM_PATCHES
>> +endif
>> +
>>  XLOADER_INSTALL_IMAGES = YES
>>  
>>  define XLOADER_BUILD_CMDS

I'm using am3517 based board and it's x-loader is still in arago repo. That's why I wanted to introduce alternative x-loader repo. But after getting feedback from Arago, I would postpone reworking this patch and trying to get x-loader upstream. With arago repo I still have a problem, that signPG is missing. Had made a patch to solve this, but getting am3517 upstream were the best solution.

Yegor

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

end of thread, other threads:[~2012-02-13  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 14:51 [Buildroot] [PATCH 1/2] u-boot: begin custom patch dir with a capital yegorslists at googlemail.com
2012-02-09 14:51 ` [Buildroot] [PATCH 2/2] x-loader: add custom git and tarball support yegorslists at googlemail.com
2012-02-11 14:55   ` Arnout Vandecappelle
2012-02-13  8:13     ` Yegor Yefremov

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