linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH atusb/fw 1/2] atusb: fw: Update toolchain instructions
@ 2022-09-05 20:43 Miquel Raynal
  2022-09-05 20:43 ` [PATCH atusb/fw 2/2] atusb: fw: Provide TRAC status Miquel Raynal
  2022-09-05 23:33 ` [PATCH atusb/fw 1/2] atusb: fw: Update toolchain instructions Alexander Aring
  0 siblings, 2 replies; 7+ messages in thread
From: Miquel Raynal @ 2022-09-05 20:43 UTC (permalink / raw)
  To: werner
  Cc: Stefan Schmidt, Alexander Aring, Thomas Petazzoni, linux-wpan,
	Miquel Raynal

Those instructions do not work anymore for several reaons:
- Two out of the three files to download return a 404 error:
      * The binutils version does not exist, it was 2.21.1 or 2.21.1a
        instead of just 2.21.
      * The avr-libc is no longer hosted on the pointed website, I've
        found an alternate.
- The binutils version mentioned is not able to compile the firmware on
  a recent distribution, the Internet advised to update its version and
  it worked.
- Most of these compilations will throw warnings if you use a recent
  gcc. Sometimes -Werror is set and it fails the build. To avoid that,
  just use --disable-werror in the ./configure options.
- I had issues building the gcc doc but those issues are trivial to
  fix inline.

Update the instructions for building the toolchain and while at it,
start the file by mentioning that this is maybe not useful anymore, and
provide the packets to install.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 atusb/fw/README | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/atusb/fw/README b/atusb/fw/README
index 99ceb22..44f65f5 100644
--- a/atusb/fw/README
+++ b/atusb/fw/README
@@ -1,4 +1,6 @@
-Requires a very recent toolchain, because ATmega32U2 is relatively new.
+- Toolchain:
+
+  apt install avr-gcc libc-avr
 
 - Building:
 
@@ -64,12 +66,13 @@ apt-get install libmpfr-dev libmpc-dev
 
 # binutils
 
-wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
-tar xfj binutils-2.21.tar.bz2 
-cd binutils-2.21
-./configure --target=avr --disable-nls
+wget https://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.bz2
+tar xfj binutils-2.27.tar.bz2
+cd binutils-2.27
+./configure --target=avr --disable-nls --disable-werror
 make
 make install
+ln -s /usr/local/bin/avr-as /usr/bin/avr-as
 
 # gcc
 
@@ -85,9 +88,8 @@ cd obj-avr
 make
 make install
 
-wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.7.1.tar.bz2
-tar xfj avr-libc-1.7.1.tar.bz2 
-cd avr-libc-1.7.1
+wget https://android.googlesource.com/toolchain/avr-libc/+archive/master/avr-libc-1.7.1.tar.gz
+tar xf avr-libc-1.7.1.tar.gz
 ./bootstrap	# the automake at the end takes a while
 ./configure --build=`./config.guess` --host=avr
 make
-- 
2.34.1


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

end of thread, other threads:[~2022-09-06  8:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 20:43 [PATCH atusb/fw 1/2] atusb: fw: Update toolchain instructions Miquel Raynal
2022-09-05 20:43 ` [PATCH atusb/fw 2/2] atusb: fw: Provide TRAC status Miquel Raynal
2022-09-06  0:16   ` Alexander Aring
2022-09-06  0:19     ` Alexander Aring
2022-09-06  8:08       ` Miquel Raynal
2022-09-05 23:33 ` [PATCH atusb/fw 1/2] atusb: fw: Update toolchain instructions Alexander Aring
2022-09-06  7:56   ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).