How can I create a modern cross-compilation tool for raspberries Pi 1?

At least Debian does not provide a usable cross-development toolchain for Raspberry Pi 1. The Linar Turtle is too outdated at the time of writing for the Qt5 developer branch. There is a crosstools-ng project that makes it easy to create custom toolchains for all kinds of systems. It supports the fairly modern GCC 4.9.1. The configuration is a small trial version and an error, but the main problem is that the tool chain does not find all the included files or libraries. How to configure crosstools-ng so that it can be used to compile Qt5 for raspberry Pi 1?

The following how Raspberry Pi with Raspian should be ready to use this toolchain can be found here: How to prepare a raspberry Pi with Raspbian so that I can cross-compile Qt5 programs from a Linux host?

+3
source share
1 answer

First, I start with the problem of detecting include / library, as this is slightly different from the usual installation / use of crosstools-ng.

, crosstools-ng gcc- : arm-vendor-linux-gnueabihf. . , Raspian libs :/lib/arm-linux-gnueabihf. , pkg-config . crosstools-ng , , . crosstool-ng, , . , GCC. - crosstools-ng.

, Raspberry Pi/Raspian gcc 4.9.1 crosstools-ng:

git clone git://crosstool-ng.org/crosstool-ng

-, :

diff --git a/scripts/config.guess b/scripts/config.guess
index dbfb978..9a35943 100755
--- a/scripts/config.guess
+++ b/scripts/config.guess
@@ -176,7 +176,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH} ;;
        esac
        # The Operating System including object format, if it has switched
        # to ELF recently, or will in the future.
diff --git a/scripts/config.sub b/scripts/config.sub
index 6d2e94c..f92db2b 100755
--- a/scripts/config.sub
+++ b/scripts/config.sub
@@ -317,7 +317,7 @@ case $basic_machine in
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
-               basic_machine=$basic_machine-unknown
+               basic_machine=$basic_machine
                ;;
        c54x)
                basic_machine=tic54x-unknown

- configure/make/make. - crosstools-ng . ct-ng menuconfig.

, , : http://pastebin.com/MhQKnhpN

. ct-ng build . {HOME}/x-tools3, . , "-" " ". .

/ , Qt5 Pi.

+3

Source: https://habr.com/ru/post/1609140/


All Articles