* [Buildroot] Using a bootlin toolchain with buildroot @ 2018-04-06 14:44 Patrick Doyle 2018-04-06 14:53 ` Jan Kundrát 2018-04-06 19:02 ` Thomas Petazzoni 0 siblings, 2 replies; 14+ messages in thread From: Patrick Doyle @ 2018-04-06 14:44 UTC (permalink / raw) To: buildroot Are there any tips or tricks to using a bootlin toolchain with buildroot(.2018.02)? I have downloaded armv7-eabihf--musl--stable-2018.02-2.tar.bz2 unpacket it into /opt. I have selected BR2_TOOLCHAIN_EXTERNAL I have selected BR2_TOOLCHAIN_EXTERNAL_CUSTOM I have selected BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED I have specified /opt/armv7-eabihf--musl--stable-2018.02-2/bin for BR2_TOOLCHAIN_EXTERNAL_PATH I could keep listing all of these settings, but I'm not sure how useful that would be. Basically, I'm asking: If I want to use a bootline toolchain, do I just go through and choose the options that best seem to match the toolchain options, or is there more documentation about doing this someplace? I don't know that I have run into any problems choosing the options myself, but it would be nice not to have to reinvent any wheels. (Oh yeah, something just failed in my build... but I'll dig into that myself before I waste your time asking about it.) --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-06 14:44 [Buildroot] Using a bootlin toolchain with buildroot Patrick Doyle @ 2018-04-06 14:53 ` Jan Kundrát 2018-04-06 19:02 ` Thomas Petazzoni 2018-04-06 19:02 ` Thomas Petazzoni 1 sibling, 1 reply; 14+ messages in thread From: Jan Kundrát @ 2018-04-06 14:53 UTC (permalink / raw) To: buildroot Here's what works well for us: BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2018.02-1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="i686-buildroot-linux-gnu" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y BR2_TOOLCHAIN_EXTERNAL_CXX=y Cheers, Jan ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-06 14:53 ` Jan Kundrát @ 2018-04-06 19:02 ` Thomas Petazzoni 0 siblings, 0 replies; 14+ messages in thread From: Thomas Petazzoni @ 2018-04-06 19:02 UTC (permalink / raw) To: buildroot Hello, On Fri, 06 Apr 2018 16:53:13 +0200, Jan Kundr?t wrote: > BR2_TOOLCHAIN_EXTERNAL=y > BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y > BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2018.02-1.tar.bz2" > BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="i686-buildroot-linux-gnu" > BR2_TOOLCHAIN_EXTERNAL_GCC_7=y > BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y > BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y > BR2_TOOLCHAIN_EXTERNAL_CXX=y Or also: https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/fragments/x86-i686--glibc--bleeding-edge-2018.02-1.frag :-) Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-06 14:44 [Buildroot] Using a bootlin toolchain with buildroot Patrick Doyle 2018-04-06 14:53 ` Jan Kundrát @ 2018-04-06 19:02 ` Thomas Petazzoni 2018-04-07 0:50 ` Patrick Doyle 1 sibling, 1 reply; 14+ messages in thread From: Thomas Petazzoni @ 2018-04-06 19:02 UTC (permalink / raw) To: buildroot Hello Patrick, On Fri, 6 Apr 2018 10:44:24 -0400, Patrick Doyle wrote: > Are there any tips or tricks to using a bootlin toolchain with > buildroot(.2018.02)? > > I have downloaded armv7-eabihf--musl--stable-2018.02-2.tar.bz2 > unpacket it into /opt. > I have selected BR2_TOOLCHAIN_EXTERNAL > I have selected BR2_TOOLCHAIN_EXTERNAL_CUSTOM > I have selected BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED > I have specified /opt/armv7-eabihf--musl--stable-2018.02-2/bin for > BR2_TOOLCHAIN_EXTERNAL_PATH > > I could keep listing all of these settings, but I'm not sure how > useful that would be. > > Basically, I'm asking: If I want to use a bootline toolchain, do I > just go through and choose the options that best seem to match the > toolchain options, or is there more documentation about doing this > someplace? There are two things that will help you :) First thing, that is currently hidden is that the toolchains.bootlin.com website has a defconfig fragment for each toolchain, that is ready to use with Buildroot. For example, for the toolchain you tried to use, you can simply use the defconfig at https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/fragments/armv7-eabihf--musl--stable-2018.02-2.frag. In general, for any toolchain, you can go to: https://toolchains.bootlin.com/downloads/releases/toolchains/<ARCH-TUPLE>/fragments/ and find defconfig files for Buildroot. The second thing that should help is that I'm working on adding the Bootlin toolchains as "pre-defined" external toolchains in Buildroot, very much like the Linaro/Sourcery toolchains we already have. I've started a patch doing that, but it needs more work, especially because we have so many Bootlin toolchains for various architectures/C libraries. Hope this helps, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-06 19:02 ` Thomas Petazzoni @ 2018-04-07 0:50 ` Patrick Doyle 2018-04-07 6:43 ` Thomas Petazzoni 0 siblings, 1 reply; 14+ messages in thread From: Patrick Doyle @ 2018-04-07 0:50 UTC (permalink / raw) To: buildroot Hi Thomas On Fri, Apr 6, 2018 at 3:02 PM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > In general, for any toolchain, you can go to: > > https://toolchains.bootlin.com/downloads/releases/toolchains/<ARCH-TUPLE>/fragments/ > > and find defconfig files for Buildroot. I didn't know it was possible to use defconfig fragments with buildroot. Cool. I'll go to go figure out how to use those. > The second thing that should help is that I'm working on adding the > Bootlin toolchains as "pre-defined" external toolchains in Buildroot, > very much like the Linaro/Sourcery toolchains we already have. I've > started a patch doing that, but it needs more work, especially because > we have so many Bootlin toolchains for various architectures/C > libraries. Can I do anything to help with that? It would be most useful to me (and my team) if it were possible to use an external pre-defined toolchain pre-installed in the file system. That way I could tell them "go download this toolchain from bootlin to build applications you want on this board". (Or, possibly, I could maintain a .deb file of that same toolchain for them.) > > Hope this helps, It does. Thank you very much. --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-07 0:50 ` Patrick Doyle @ 2018-04-07 6:43 ` Thomas Petazzoni 2018-04-08 22:34 ` Patrick Doyle 0 siblings, 1 reply; 14+ messages in thread From: Thomas Petazzoni @ 2018-04-07 6:43 UTC (permalink / raw) To: buildroot Hello, On Fri, 6 Apr 2018 20:50:30 -0400, Patrick Doyle wrote: > > https://toolchains.bootlin.com/downloads/releases/toolchains/<ARCH-TUPLE>/fragments/ > > > > and find defconfig files for Buildroot. > I didn't know it was possible to use defconfig fragments with > buildroot. Cool. I'll go to go figure out how to use those. Of course you can. See slides 43 and following of https://bootlin.com/doc/training/buildroot/buildroot-slides.pdf for a few details about this. > Can I do anything to help with that? It would be most useful to me > (and my team) if it were possible to use an external pre-defined > toolchain pre-installed in the file system. That way I could tell > them "go download this toolchain from bootlin to build applications > you want on this board". (Or, possibly, I could maintain a .deb file > of that same toolchain for them.) The toolchains provided on toolchains.bootlin.com are "pure" toolchains, i.e the only library they provide in their sysroot is the C library. Most likely, your board will have a root filesystem with many more libraries, and you want the toolchain you provide to your application developers to contain all the headers/libraries matching the ones available on the target. toolchains.bootlin.com is not going to provide these ready to use for you, because there is an infinite number of library combinations. What you need to do is to provide a SDK to your application developers, and Buildroot can produce one for you. Just do your normal Buildroot build, run "make sdk", and create a tarball out of the contents of output/host. This tarball is your SDK, that you can give to your application developers. They just have to extract it, and run the relocate-sdk.sh script. Of course, to build this Buildroot configuration, nothing prevents you from using a Bootlin toolchain. The overall process would be: 1. Create a Buildroot configuration, which uses a Bootlin toolchain as an external toolchain, plus everything you need for your root filesystem (libraries, applications, etc.) 2. Run the Buildroot build 3. Run "make sdk" 4. Tarball output/host And that's it. The resulting SDK in output/host is the combination of the Bootlin toolchain and the libraries defined in your Buildroot configuration. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-07 6:43 ` Thomas Petazzoni @ 2018-04-08 22:34 ` Patrick Doyle 2018-06-11 19:12 ` Patrick Doyle 0 siblings, 1 reply; 14+ messages in thread From: Patrick Doyle @ 2018-04-08 22:34 UTC (permalink / raw) To: buildroot On Sat, Apr 7, 2018 at 2:43 AM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > And that's it. The resulting SDK in output/host is the combination of > the Bootlin toolchain and the libraries defined in your Buildroot > configuration. > Thank you Thomas. That sounds great. --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-04-08 22:34 ` Patrick Doyle @ 2018-06-11 19:12 ` Patrick Doyle 2018-06-15 17:05 ` Patrick Doyle 2018-06-15 19:13 ` Thomas Petazzoni 0 siblings, 2 replies; 14+ messages in thread From: Patrick Doyle @ 2018-06-11 19:12 UTC (permalink / raw) To: buildroot Hi All, Remember this thread from last April? Suppose I wanted to generate and host my own prebuilt toolchain. Suppose I really liked the existing armv7-eabihf--musl--stable-2018.02-2 toolchain, but I really wanted to use 4.9 kernel headers instead of 4.1. How would I generate and archive the toolchain for my own use? And, as long as I have your attention, what is the difference between the 2018.02-1 and 2018.02-2 toolchains anyway? They seem to have the same set of GCC, GDB, Linux headers, library, and binutils versions. --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-11 19:12 ` Patrick Doyle @ 2018-06-15 17:05 ` Patrick Doyle 2018-06-15 19:13 ` Thomas Petazzoni 1 sibling, 0 replies; 14+ messages in thread From: Patrick Doyle @ 2018-06-15 17:05 UTC (permalink / raw) To: buildroot Now that the furor has died down for the moment from Yann's proposal to generate the SDK tarball automatically, can I respectfully submit a bump request? bump :-) --wpd On Mon, Jun 11, 2018 at 3:12 PM Patrick Doyle <wpdster@gmail.com> wrote: > > Hi All, > Remember this thread from last April? > > Suppose I wanted to generate and host my own prebuilt toolchain. > Suppose I really liked the existing > armv7-eabihf--musl--stable-2018.02-2 toolchain, but I really wanted to > use 4.9 kernel headers instead of 4.1. How would I generate and > archive the toolchain for my own use? > > And, as long as I have your attention, what is the difference between > the 2018.02-1 and 2018.02-2 toolchains anyway? They seem to have the > same set of GCC, GDB, Linux headers, library, and binutils versions. > > --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-11 19:12 ` Patrick Doyle 2018-06-15 17:05 ` Patrick Doyle @ 2018-06-15 19:13 ` Thomas Petazzoni 2018-06-17 2:28 ` Patrick Doyle 1 sibling, 1 reply; 14+ messages in thread From: Thomas Petazzoni @ 2018-06-15 19:13 UTC (permalink / raw) To: buildroot Hello Patrick, On Mon, 11 Jun 2018 15:12:16 -0400, Patrick Doyle wrote: > Remember this thread from last April? > > Suppose I wanted to generate and host my own prebuilt toolchain. > Suppose I really liked the existing > armv7-eabihf--musl--stable-2018.02-2 toolchain, but I really wanted to > use 4.9 kernel headers instead of 4.1. How would I generate and > archive the toolchain for my own use? Here is the summary: 1/ Generate a Buildroot configuration that just defines the architecture, architecture variant and toolchain options. Also use the following for this configuration to disable any user-space package: BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set # BR2_TARGET_ROOTFS_TAR is not set I also typically pass something like BR2_HOST_DIR=/opt/armv7-eabihf--musl--stable-2018.02-2 in the configuration. 2/ Do the Buildroot build as usual 3/ Run "make sdk" 4/ Create a tarball of /opt/armv7-eabihf--musl--stable-2018.02-2 and you're done :-) > And, as long as I have your attention, what is the difference between > the 2018.02-1 and 2018.02-2 toolchains anyway? They seem to have the > same set of GCC, GDB, Linux headers, library, and binutils versions. The minor versions are typically just updates to the toolchain build process or additional patches on the gcc/binutils/gdb versions. I should have a better tracking of what I change between versions, but that's not something I'm doing yet :-/ Hope this helps! Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-15 19:13 ` Thomas Petazzoni @ 2018-06-17 2:28 ` Patrick Doyle 2018-06-17 11:47 ` Thomas Petazzoni 0 siblings, 1 reply; 14+ messages in thread From: Patrick Doyle @ 2018-06-17 2:28 UTC (permalink / raw) To: buildroot Hi Thomas, On Fri, Jun 15, 2018 at 3:13 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > Here is the summary: > > 1/ Generate a Buildroot configuration that just defines the > architecture, architecture variant and toolchain options. > > Also use the following for this configuration to disable any > user-space package: > > BR2_INIT_NONE=y > BR2_SYSTEM_BIN_SH_NONE=y > # BR2_PACKAGE_BUSYBOX is not set > # BR2_TARGET_ROOTFS_TAR is not set > > I also typically pass something like > BR2_HOST_DIR=/opt/armv7-eabihf--musl--stable-2018.02-2 in the > configuration. > > 2/ Do the Buildroot build as usual > > 3/ Run "make sdk" > > 4/ Create a tarball of /opt/armv7-eabihf--musl--stable-2018.02-2 and > you're done :-) So, once I do that, I can pull that tarball into my build as if it were a bootliin tarball? And buildroot is smart enough to run the relocate-sdk.sh script contained therein? I wonder if anybody else noticed that I now seem to be writing my questions as statements? Thanks Thomas. --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-17 2:28 ` Patrick Doyle @ 2018-06-17 11:47 ` Thomas Petazzoni 2018-06-17 19:03 ` Patrick Doyle 0 siblings, 1 reply; 14+ messages in thread From: Thomas Petazzoni @ 2018-06-17 11:47 UTC (permalink / raw) To: buildroot Hello Patrick, On Sat, 16 Jun 2018 22:28:08 -0400, Patrick Doyle wrote: > > 4/ Create a tarball of /opt/armv7-eabihf--musl--stable-2018.02-2 and > > you're done :-) > So, once I do that, I can pull that tarball into my build as if it > were a bootliin tarball? Yes. > And buildroot is smart enough to run the relocate-sdk.sh script > contained therein? No, Buildroot is not smart enough to do this, but it's not a problem. The relocate-sdk.sh is necessary to fixup path in .la files, -config scripts and stuff like that, which you don't have in a SDK that is just a pure toolchain. The only thing that really matters is to have relative RPATH, and that's already done as part of the "make sdk" target. Hence, "make sdk" + tarballing output/host already makes a toolchain that is relocatable, and usable as-is as an external toolchain for another Buildroot build. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-17 11:47 ` Thomas Petazzoni @ 2018-06-17 19:03 ` Patrick Doyle 2018-06-18 13:22 ` nimaim 0 siblings, 1 reply; 14+ messages in thread From: Patrick Doyle @ 2018-06-17 19:03 UTC (permalink / raw) To: buildroot Thank you Thomas. --wpd ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] Using a bootlin toolchain with buildroot 2018-06-17 19:03 ` Patrick Doyle @ 2018-06-18 13:22 ` nimaim 0 siblings, 0 replies; 14+ messages in thread From: nimaim @ 2018-06-18 13:22 UTC (permalink / raw) To: buildroot Patrick Doyle wrote > Thank you Thomas. > > --wpd > > Thanks for starting this discussion guys ... I thought I was the only one > who used one of the bootlin toolchains since it is not really documented > anywhere :) I have a similar need: to use one of the stable toolchains w/ > a newer GCC + libs. Looks like the aforementioned "make sdk" will do just > that. > _______________________________________________ > buildroot mailing list > buildroot@ > http://lists.busybox.net/mailman/listinfo/buildroot -- Sent from: http://buildroot-busybox.2317881.n4.nabble.com/ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-06-18 13:22 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-04-06 14:44 [Buildroot] Using a bootlin toolchain with buildroot Patrick Doyle 2018-04-06 14:53 ` Jan Kundrát 2018-04-06 19:02 ` Thomas Petazzoni 2018-04-06 19:02 ` Thomas Petazzoni 2018-04-07 0:50 ` Patrick Doyle 2018-04-07 6:43 ` Thomas Petazzoni 2018-04-08 22:34 ` Patrick Doyle 2018-06-11 19:12 ` Patrick Doyle 2018-06-15 17:05 ` Patrick Doyle 2018-06-15 19:13 ` Thomas Petazzoni 2018-06-17 2:28 ` Patrick Doyle 2018-06-17 11:47 ` Thomas Petazzoni 2018-06-17 19:03 ` Patrick Doyle 2018-06-18 13:22 ` nimaim
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox