On Wed, Oct 24, 2018 at 11:29:00PM +0200, Helmut Grohne wrote: > On Fri, Aug 03, 2018 at 04:46:16AM +0100, Jonathan McDowell wrote: > > I've been looking at generating binutils + gcc packages based on the > > binutils-source + gcc-7-source packages for the xtensa-lx106 target > > (ESP8266). I have something that seems to be working, and I'm > > considering uploading them, but I don't think it's possible to build a > > single toolchain that will target the ESP8266, ESP32 + ath9k Xtensa > > variants. The xtensa-lx106 binary packages are turning out at about 20M > > between them; is there enough use that it would be worth having all 3 > > options present in Debian? > > Let me argue that yes, that would be a good idea. > > We have esptool in the archive. The esptool comes with a flasher_stub > (https://sources.debian.org/src/esptool/2.5.0+dfsg-1/flasher_stub/). > Presently it cannot be built, because the toolchain would be required > for doing so. It needs the xtensa-lx106-elf and xtensa-esp32-elf > toolchains.
Yeah, I've ended up having to use the non-packaged esptool on occasion because the flasher stub makes things easier. > The open-ath9k-htc-firmware package presently builds an xtensa toolchain > from gcc-7 sources during build > https://sources.debian.org/src/open-ath9k-htc-firmware/1.4.0-97-g75b3e59+dfsg-1/debian/cross-toolchain.mk/ > using --target xtensa-elf. Having separate binary packages could > simplify the packaging of open-ath9k-htc-firmware. > > Maybe the ath9k toolchain is less relevant as most users will be using > open-ath9k-htc-firmware or firmware-atheros. Those that need can quite > easily produce the toolchain from the open-ath9k-htc-firmware source > package. But given the rising popcon of esptool (~200 now), toolchains > for ESP8266 and ESP32 seem sensible to me. To answer the question you asked on IRC (you left before I could answer); I'm using the ESP8266 toolchain built from the pkg-electronics git repo myself, with the esp-open-sdk and no problems. However I got the ESP32 toolchain built and had problems getting it integrated with the esp-idf SDK; various issues with not finding the system includes. I'm sure it's a matter of fighting with the build system a bit more, but I'm just getting started with the ESP32 so haven't investigated further. > Note that any practical use will also need esp-idf. In particular, the > flasher_stub from esptool needs esp-idf. Do you have any plans for > packaging esp-idf? The ESP8266 is of much greater interest to me. I'm a bit torn about packaging the SDKs up, because they seem to be moving targets and aren't as relevant from the Debian side of things. So I have no immediate plans to do so, though I had some conversations with Keith Packard about at least getting newlib/nano support for the ESP chips into Debian. > Also moving to gcc-8-source seems in order. I've had this on my todo for a while, just not got round to it yet. J. -- I may be cool Beavis, but I can't change the future.