Hi, I am using the linaro tolchain to create a root-filesystem for an embedded Linux system. I would like to copy the essential include files and libraries(libc) from the toolchain to the rootFS of the embedded system.
Is there any explanation of the folder structure of the toolchain so I know which folder to copy? How do I know which files to copy and where those files are located in the toolchain?
Thanks, Robert
On Tue, Apr 21, 2015 at 12:52 PM, Robert Schwarz rschwarz.arrow@gmail.com wrote:
Hi, I am using the linaro tolchain to create a root-filesystem for an embedded Linux system. I would like to copy the essential include files and libraries(libc) from the toolchain to the rootFS of the embedded system.
Is there any explanation of the folder structure of the toolchain so I know which folder to copy? How do I know which files to copy and where those files are located in the toolchain?
That would depend on which toolchain version you are using. We used to use crosstools-ng to build them. Now we use abe to build them. The structure of the releases is a bit different as a result.
Looking at the 2014.09 release, it appears that the runtime file has the gcc shared libraries you need, and in the linux file, aarch64-linux-gnu/libc has the target glibc tree. You need the shared libraries, but not necessarily the header files and static libraries from the glibc tree. These two places are both structured as the linux target filesystem, so you can just copy them in as is. If you just want to run code this should be enough. If you want to be able to compile on the embedded target, then you would need a lot more. I'm assuming aarch64 here. It works roughly the same for arm.
If you are trying to do something serious, then you are probably better off using a proper root filesystem rather than trying to cobble one together from bits and pieces. Our toolchain releases are just toolchain releases as far as I understand it. There are various tools you can use to build your own root file system. Or you can use an existing distro release to get a root filesystem.
Jim
On 04/21/2015 03:10 PM, Jim Wilson wrote:
On Tue, Apr 21, 2015 at 12:52 PM, Robert Schwarz rschwarz.arrow@gmail.com wrote:
Hi, I am using the linaro tolchain to create a root-filesystem for an embedded Linux system. I would like to copy the essential include files and libraries(libc) from the toolchain to the rootFS of the embedded system.
Is there any explanation of the folder structure of the toolchain so I know which folder to copy? How do I know which files to copy and where those files are located in the toolchain?
That would depend on which toolchain version you are using. We used to use crosstools-ng to build them. Now we use abe to build them. The structure of the releases is a bit different as a result.
We don't ship a rootfs, just a sysroot. You need something like 'buildroot' to build a rootfs, the headers and libraries from the sysroot are only part of it. These are contained in two places. One is the sysroot tarball that should be in the same directory as the toolchain. The exact same sysroot is also in the toolchain tarball under ${host}/libc.
Crosstool-ng never built our sysroots, they were produced by a script that cobbled one together from an old Ubuntu Precise installation. Now we do build the sysroot that we ship.
- rob -
linaro-toolchain@lists.linaro.org