mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] AT91bootstrap with ptxdist
@ 2016-08-22 14:41 Guillermo Rodriguez Garcia
  2016-08-25 10:54 ` Michael Olbrich
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-08-22 14:41 UTC (permalink / raw)
  To: ptxdist

Hello all,

I am trying to compile AT91bootstrap with ptxdist and I have found the
following minor issues:

1. Starting from end of 2014, at91bootstrap releases are no longer
published on ftp://www.at91.com/pub/.. The "official" source now seems
to be the at91bootstrap repo. The ftp site contains versions up to
3.7.1 (Nov 2014), while the github repo contains versions from 3.7
(Sep 2014) onwards.

I can just send a patch to update the URL but that would break if
someone wants to use an old at91bootstrap version. How should this be
handled?

2. Also, at91bootstrap.make assumes that the name of the generated
image is *boot-$(AT91BOOTSTRAP2_VERSION).bin, whereas this now seems
to be *boot-*-$(AT91BOOTSTRAP2_VERSION).bin.

Likewise I could send a patch for this but it will break for older
at91bootstrap versions. How should this be handled?

Other than this all works fine.

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] AT91bootstrap with ptxdist
  2016-08-22 14:41 [ptxdist] AT91bootstrap with ptxdist Guillermo Rodriguez Garcia
@ 2016-08-25 10:54 ` Michael Olbrich
  2016-08-25 11:15   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Olbrich @ 2016-08-25 10:54 UTC (permalink / raw)
  To: ptxdist

On Mon, Aug 22, 2016 at 04:41:52PM +0200, Guillermo Rodriguez Garcia wrote:
> Hello all,
> 
> I am trying to compile AT91bootstrap with ptxdist and I have found the
> following minor issues:
> 
> 1. Starting from end of 2014, at91bootstrap releases are no longer
> published on ftp://www.at91.com/pub/.. The "official" source now seems
> to be the at91bootstrap repo. The ftp site contains versions up to
> 3.7.1 (Nov 2014), while the github repo contains versions from 3.7
> (Sep 2014) onwards.
> 
> I can just send a patch to update the URL but that would break if
> someone wants to use an old at91bootstrap version. How should this be
> handled?

There can be multiple URLs. PTXdist will try one after the other until one
works. So just add another URL.

> 2. Also, at91bootstrap.make assumes that the name of the generated
> image is *boot-$(AT91BOOTSTRAP2_VERSION).bin, whereas this now seems
> to be *boot-*-$(AT91BOOTSTRAP2_VERSION).bin.
> 
> Likewise I could send a patch for this but it will break for older
> at91bootstrap versions. How should this be handled?

Take a look at what we do in barebox.make: Check which file exists and
copy that one.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] AT91bootstrap with ptxdist
  2016-08-25 10:54 ` Michael Olbrich
@ 2016-08-25 11:15   ` Guillermo Rodriguez Garcia
  2016-08-29  7:26     ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-08-25 11:15 UTC (permalink / raw)
  To: ptxdist

Hi Michael,

2016-08-25 12:54 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> On Mon, Aug 22, 2016 at 04:41:52PM +0200, Guillermo Rodriguez Garcia wrote:
>> Hello all,
>>
>> I am trying to compile AT91bootstrap with ptxdist and I have found the
>> following minor issues:
>>
>> 1. Starting from end of 2014, at91bootstrap releases are no longer
>> published on ftp://www.at91.com/pub/.. The "official" source now seems
>> to be the at91bootstrap repo. The ftp site contains versions up to
>> 3.7.1 (Nov 2014), while the github repo contains versions from 3.7
>> (Sep 2014) onwards.
>>
>> I can just send a patch to update the URL but that would break if
>> someone wants to use an old at91bootstrap version. How should this be
>> handled?
>
> There can be multiple URLs. PTXdist will try one after the other until one
> works. So just add another URL.

Didn't know that, thank you.

In this case however there's another complication which is the file suffix.
For the 'old' ftp url, tar.bz2 is used. For the new one (github) you
can get .zip or .tar.gz. This means it is not only the URL that
changes, but also the name of the downloaded file. How can this be
handled?

>
>> 2. Also, at91bootstrap.make assumes that the name of the generated
>> image is *boot-$(AT91BOOTSTRAP2_VERSION).bin, whereas this now seems
>> to be *boot-*-$(AT91BOOTSTRAP2_VERSION).bin.
>>
>> Likewise I could send a patch for this but it will break for older
>> at91bootstrap versions. How should this be handled?
>
> Take a look at what we do in barebox.make: Check which file exists and
> copy that one.

OK, that one is clear.

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] AT91bootstrap with ptxdist
  2016-08-25 11:15   ` Guillermo Rodriguez Garcia
@ 2016-08-29  7:26     ` Guillermo Rodriguez Garcia
  2016-08-30  7:19       ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-08-29  7:26 UTC (permalink / raw)
  To: ptxdist

Hello,

2016-08-25 13:15 GMT+02:00 Guillermo Rodriguez Garcia
<guille.rodriguez@gmail.com>:
> Hi Michael,
>
> 2016-08-25 12:54 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
>> On Mon, Aug 22, 2016 at 04:41:52PM +0200, Guillermo Rodriguez Garcia wrote:
>>> Hello all,
>>>
>>> I am trying to compile AT91bootstrap with ptxdist and I have found the
>>> following minor issues:
>>>
>>> 1. Starting from end of 2014, at91bootstrap releases are no longer
>>> published on ftp://www.at91.com/pub/.. The "official" source now seems
>>> to be the at91bootstrap repo. The ftp site contains versions up to
>>> 3.7.1 (Nov 2014), while the github repo contains versions from 3.7
>>> (Sep 2014) onwards.
>>>
>>> I can just send a patch to update the URL but that would break if
>>> someone wants to use an old at91bootstrap version. How should this be
>>> handled?
>>
>> There can be multiple URLs. PTXdist will try one after the other until one
>> works. So just add another URL.
>
> Didn't know that, thank you.
>
> In this case however there's another complication which is the file suffix.
> For the 'old' ftp url, tar.bz2 is used. For the new one (github) you
> can get .zip or .tar.gz. This means it is not only the URL that
> changes, but also the name of the downloaded file. How can this be
> handled?

Any thoughts on this? How can we handle the case where the suffix may
be different depending on the URL used?

If I understand correctly, @packagename@_SOURCE must be defined with
the current filename for the get and extract stages. But the actual
filename depends on which URL was used. Is there a way to define this
dynamically?

An alternative approach would be to add a new config option to
at91bootstrap2.in, e.g. AT91BOOTSTRAP2_LEGACY -- if set, use the old
ftp URL (which is not being updated anymore). If unset, use the new
github URL. Is this acceptable ?

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] AT91bootstrap with ptxdist
  2016-08-29  7:26     ` Guillermo Rodriguez Garcia
@ 2016-08-30  7:19       ` Guillermo Rodriguez Garcia
  2016-08-30  8:34         ` [ptxdist] [PATCH] Update at91bootstrap2 package for compatibility with 3.x series Guillermo Rodriguez
  2016-09-02 11:53         ` [ptxdist] AT91bootstrap with ptxdist Michael Olbrich
  0 siblings, 2 replies; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-08-30  7:19 UTC (permalink / raw)
  To: ptxdist, Michael Olbrich

Hello all,

2016-08-29 9:26 GMT+02:00 Guillermo Rodriguez Garcia
<guille.rodriguez@gmail.com>:
> Hello,
>
> 2016-08-25 13:15 GMT+02:00 Guillermo Rodriguez Garcia
> <guille.rodriguez@gmail.com>:
>> Hi Michael,
>>
>> 2016-08-25 12:54 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
>>> On Mon, Aug 22, 2016 at 04:41:52PM +0200, Guillermo Rodriguez Garcia wrote:
>>>> Hello all,
>>>>
>>>> I am trying to compile AT91bootstrap with ptxdist and I have found the
>>>> following minor issues:
>>>>
>>>> 1. Starting from end of 2014, at91bootstrap releases are no longer
>>>> published on ftp://www.at91.com/pub/.. The "official" source now seems
>>>> to be the at91bootstrap repo. The ftp site contains versions up to
>>>> 3.7.1 (Nov 2014), while the github repo contains versions from 3.7
>>>> (Sep 2014) onwards.
>>>>

I have had a closer look at this and found the following:

1. The original URL used in ptxdist's at91bootstrap2.make
(ftp://www.at91.com/pub/buildroot/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX))
does no longer work. The buildroot/ dir in the at91 ftp site does not
contain at91bootstrap sources anymore.

2. In the same ftp site there is a directory
ftp://www.at91.com/pub/at91bootstrap which contains:
- Some 1.x at91bootstrap releases (not relevant for
at91bootstrap_2_.make, which is supposed to deal with versions >= 2.x)
- No 2.x releases at all (neither source code nor binary)
- Some (but not all) 3.x releases between 3.1 and 3.7.1: Of these,
only 3.1 and 3.2 have some sort of source code, although judging from
the file names they does not seem to be the official releases (perhaps
a dev snapshot).

The above means that ptxdist's at91bootstrap2.make is currently more
or less broken already in its current state.

3. Atmel now officially points you to their github repo in order to
get the source code (see:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap#Get_AT91Boostrap_Source_Code)

4. In the github repo you can find full releases including source code
for all versions since 3.4 (I said 3.7 in my first mail but I was
wrong).

So if no one objects I will prepare and send a patch
at91bootstrap2.{in,make} to make it work with the current 3.x series.

Best regards,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH] Update at91bootstrap2 package for compatibility with 3.x series
  2016-08-30  7:19       ` Guillermo Rodriguez Garcia
@ 2016-08-30  8:34         ` Guillermo Rodriguez
  2016-09-02 11:53         ` [ptxdist] AT91bootstrap with ptxdist Michael Olbrich
  1 sibling, 0 replies; 7+ messages in thread
From: Guillermo Rodriguez @ 2016-08-30  8:34 UTC (permalink / raw)
  To: ptxdist; +Cc: grodriguez

From: grodriguez <guille.rodriguez@gmail.com>

The original 2.x series of at91bootstrap are not available anymore,
and the current rules don't work with the 3.x series. Update them
for at91bootstrap 3.4 and above.

Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
---
 platforms/at91bootstrap2.in |    8 ++++----
 rules/at91bootstrap2.make   |   13 +++++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/platforms/at91bootstrap2.in b/platforms/at91bootstrap2.in
index ebaf349..80f0542 100644
--- a/platforms/at91bootstrap2.in
+++ b/platforms/at91bootstrap2.in
@@ -2,9 +2,9 @@
 
 menuconfig AT91BOOTSTRAP2
 	tristate
-	prompt "AT91 bootstrap 2.x            "
+	prompt "AT91 bootstrap 3.x            "
 	help
-	  Note: this is for AT91 bootstrap version 2.x
+	  Note: this is for AT91 bootstrap version 3.4 or later.
 
 	  The AT91Bootstrap application is a first level bootloader
 	  for Atmel AT91SAM9 ARM Thumb-based microcontrollers.
@@ -35,10 +35,10 @@ if AT91BOOTSTRAP2
 
 config AT91BOOTSTRAP2_VERSION
 	string
-	default "2.13"
+	default "3.8.5"
 	prompt "AT91 Bootstrap version"
 	help
-	  Enter the AT91 Bootstrap version you want to build. Usally something like "1.11"
+	  Enter the AT91 Bootstrap version you want to build. Usally something like "3.8.5"
 
 config AT91BOOTSTRAP2_MD5
 	prompt "AT91 Bootstrap source md5sum"
diff --git a/rules/at91bootstrap2.make b/rules/at91bootstrap2.make
index 4f1aef3..33c7003 100644
--- a/rules/at91bootstrap2.make
+++ b/rules/at91bootstrap2.make
@@ -19,8 +19,8 @@ PACKAGES-$(PTXCONF_AT91BOOTSTRAP2) += at91bootstrap2
 AT91BOOTSTRAP2_VERSION	:= $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_VERSION))
 AT91BOOTSTRAP2_MD5	:= $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_MD5))
 AT91BOOTSTRAP2		:= at91bootstrap-$(AT91BOOTSTRAP2_VERSION)
-AT91BOOTSTRAP2_SUFFIX	:= tar.bz2
-AT91BOOTSTRAP2_URL	:= ftp://www.at91.com/pub/buildroot/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
+AT91BOOTSTRAP2_SUFFIX	:= tar.gz
+AT91BOOTSTRAP2_URL	:= https://github.com/linux4sam/at91bootstrap/archive/v$(AT91BOOTSTRAP2_VERSION).$(AT91BOOTSTRAP2_SUFFIX)
 AT91BOOTSTRAP2_SOURCE	:= $(SRCDIR)/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
 AT91BOOTSTRAP2_DIR	:= $(BUILDDIR)/$(AT91BOOTSTRAP2)
 AT91BOOTSTRAP2_CONFIG	:= $(call remove_quotes, $(PTXDIST_PLATFORMCONFIGDIR)/$(PTXCONF_AT91BOOTSTRAP2_CONFIG))
@@ -70,8 +70,13 @@ $(STATEDIR)/at91bootstrap2.install:
 
 $(STATEDIR)/at91bootstrap2.targetinstall:
 	@$(call targetinfo)
-	install -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \
-		$(IMAGEDIR)/at91bootstrap.bin
+	@if [ -e $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin ]; then \
+		install -m644 $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin \
+			$(IMAGEDIR)/at91bootstrap.bin; \
+	else \
+		install -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \
+			$(IMAGEDIR)/at91bootstrap.bin; \
+	fi
 	@$(call touch)
 
 # ----------------------------------------------------------------------------
-- 
1.7.9.5


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] AT91bootstrap with ptxdist
  2016-08-30  7:19       ` Guillermo Rodriguez Garcia
  2016-08-30  8:34         ` [ptxdist] [PATCH] Update at91bootstrap2 package for compatibility with 3.x series Guillermo Rodriguez
@ 2016-09-02 11:53         ` Michael Olbrich
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2016-09-02 11:53 UTC (permalink / raw)
  To: ptxdist

On Tue, Aug 30, 2016 at 09:19:39AM +0200, Guillermo Rodriguez Garcia wrote:
> 2016-08-29 9:26 GMT+02:00 Guillermo Rodriguez Garcia
> <guille.rodriguez@gmail.com>:
> > 2016-08-25 13:15 GMT+02:00 Guillermo Rodriguez Garcia
> > <guille.rodriguez@gmail.com>:
> >> 2016-08-25 12:54 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> >>> On Mon, Aug 22, 2016 at 04:41:52PM +0200, Guillermo Rodriguez Garcia wrote:
> >>>> I am trying to compile AT91bootstrap with ptxdist and I have found the
> >>>> following minor issues:
> >>>>
> >>>> 1. Starting from end of 2014, at91bootstrap releases are no longer
> >>>> published on ftp://www.at91.com/pub/.. The "official" source now seems
> >>>> to be the at91bootstrap repo. The ftp site contains versions up to
> >>>> 3.7.1 (Nov 2014), while the github repo contains versions from 3.7
> >>>> (Sep 2014) onwards.
> >>>>
> 
> I have had a closer look at this and found the following:
> 
> 1. The original URL used in ptxdist's at91bootstrap2.make
> (ftp://www.at91.com/pub/buildroot/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX))
> does no longer work. The buildroot/ dir in the at91 ftp site does not
> contain at91bootstrap sources anymore.
> 
> 2. In the same ftp site there is a directory
> ftp://www.at91.com/pub/at91bootstrap which contains:
> - Some 1.x at91bootstrap releases (not relevant for
> at91bootstrap_2_.make, which is supposed to deal with versions >= 2.x)
> - No 2.x releases at all (neither source code nor binary)
> - Some (but not all) 3.x releases between 3.1 and 3.7.1: Of these,
> only 3.1 and 3.2 have some sort of source code, although judging from
> the file names they does not seem to be the official releases (perhaps
> a dev snapshot).
> 
> The above means that ptxdist's at91bootstrap2.make is currently more
> or less broken already in its current state.
> 
> 3. Atmel now officially points you to their github repo in order to
> get the source code (see:
> http://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap#Get_AT91Boostrap_Source_Code)
> 
> 4. In the github repo you can find full releases including source code
> for all versions since 3.4 (I said 3.7 in my first mail but I was
> wrong).
> 
> So if no one objects I will prepare and send a patch
> at91bootstrap2.{in,make} to make it work with the current 3.x series.

Sounds good. I've applied the patch. Thanks.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-09-02 11:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 14:41 [ptxdist] AT91bootstrap with ptxdist Guillermo Rodriguez Garcia
2016-08-25 10:54 ` Michael Olbrich
2016-08-25 11:15   ` Guillermo Rodriguez Garcia
2016-08-29  7:26     ` Guillermo Rodriguez Garcia
2016-08-30  7:19       ` Guillermo Rodriguez Garcia
2016-08-30  8:34         ` [ptxdist] [PATCH] Update at91bootstrap2 package for compatibility with 3.x series Guillermo Rodriguez
2016-09-02 11:53         ` [ptxdist] AT91bootstrap with ptxdist Michael Olbrich

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