On Sat, 8 Aug 2015 12:10:59 +0200 nice sw123 <nicesw123@gmail.com> wrote: > Hello! > > 'got a BBB (Beaglbone Black) here; and want to do some crosscompiling. What software is it currently running? "using desktop packages" is misleading - what I think you mean is using existing Debian mirrors. If it's any version of Debian or a Debian based distribution, then the software will be the armhf architecture. There is no armhf distribution, armhf specifies the architecture and you need to be clear here. The architecture is the same even if you change distribution. Architectures arrive in distributions like Debian as "ports" and starting a port involves preparing the first packages of that architecture using cross compilers. Many devices share an architecture which (generally) means that as long as the devices have a suitable kernel, they could all use the same binaries in the root filesystem. Distributions, like Debian, are provided as binary files for particular architectures - the distribution itself encompasses all architectures and each distribution gets to choose which architectures are of suitable quality and support to be part of a release. The armhf architecture has been part of Debian for some time without issues. > Because I hate wasting time watching compilers, I'm very happy to see > that Debian Testing (Stretch) has cross-compilers packages > available. ! > > https://packages.debian.org/stretch/gcc-5-arm-linux-gnueabihf arm-linux-gnueabihf === armhf There are no differences. > But what are the implications? None, really - as far as what to install. There are plenty of issues based on how you get your code to use the cross-compiler and different toolchains have different requirements for how you tell your build system to use the cross-compiler. > ### Question 1a) > Does a packaged cross-compiler > https://packages.debian.org/stretch/gcc-5-arm-linux-gnueabihf > generate code that works seamlessly together with the Debian armhf > Distro http://ftp.debian.org/debian/dists/testing/main/binary-armhf/ > ??? Get the terminology right first or everything becomes confusing: binary-armhf relates to the architecture. Debian is the distribution. Testing is the suite. The cross-compiler installed from a particular suite produces binaries which work seamlessly with natively built binaries for the same architecture. Those binaries may need to be recompiled to run the code on different suites. > Or are there incompatibility issues regarding ABI, libc, kernel, ... > and other stuff? The cross-compiler has dependencies on libc and kernel headers which mean that the packaged compiler installs alongside the required versions. There is a transition ongoing at the moment to gcc5 but unless you are cross-compiling code written in C++ (and using some of the more "advanced" aspects of C++), this shouldn't have any issues. > ### Question 1b) > Which cross-compiler do I need to use, to work with the Debian armhf > Distro ? Any other dependencies (libc, ...)? The armhf cross compiler for the distribution and suite you are using. The dependencies are handled by the packaging. > ### Question 1c) > How can I use the Debian armhf Distro on an embedded board such as BBB > (Beaglebone Black)? > Is there a howto somewhere? Depends what it is currently running, you may well already be using armhf. > ### Question 2 > What's the state of Debian cross-compilers and the Debian armhf > Distro? Cross-compilers are new to Debian (which is why different instructions are required for Jessie, the packages could not be made available in time for the Jessie cut off date) and are well supported and work well. The Debian armhf *architecture* is thriving, very well supported and very diverse. > Because as far as I can see Derek Molloy (**) is recommending > using using package crossbuild-essential-armhf under Jessie, > but for that you need a special repo: > deb http://emdebian.org/tools/debian jessie main > (**) > http://exploringbeaglebone.com/chapter7/#CC_Cross-compilation_on_the_BeagleBone_Platform > > But as of July 2014, updates to the Emdebian distributions ceased. Cross-compilers are not a distribution. The Emdebian Grip distribution ceased in July 2014, Emdebian still provides cross-compilers at the location specified for exactly that repo. That repo is required for Jessie but not for testing or unstable where the cross-compiler packages are available directly from Debian. > ### Question 3 > Could you recommend a manner of using some cross-tool-chain and > distro? Is Debian cross-compiler and armhf Distro usable? Yes, the armhf cross compiler in Debian is usable and armhf is probably what you've already got. Depending on which suite you are using (jessie, stretch or sid) you do have different instructions for installation but you can also migrate from jessie to stretch and on to sid if you like. That's all standard Debian mechanics. > Or is it > work-in-progress All free software is a work in progress. > In case Debian things are still in a state of flux, can you recommend > some alternative for the time being? > (Linaro's cross-toolchain?? But will they work with armhf Distro?) Linaro's cross-toolchain is the same compiler built to create a cross-compiler producing the same output with different patches. Unless you are directly involved in the more low level stuff that Linaro engineers tend to be doing, there is no particular reason to use the Linaro cross-toolchain as compared to the cross-compiler already available in Debian. -- Neil Williams ============= http://www.linux.codehelp.co.uk/
Attachment:
pgph6FpvQp_cY.pgp
Description: OpenPGP digital signature