Cross-Compile fixes after test on Ubuntu 19.10

This commit is contained in:
LordGrey 2019-06-10 19:08:30 +02:00
parent 2832b70bb7
commit a7f6292d53
3 changed files with 8 additions and 13 deletions

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/bash
#Updated: 5 Mai 2019, by Lordgrey #Use a clean Raspbian Stretch Lite and Ubunut 18/19 and run this script
#Just use a clean Raspbian Stretch Lite and Ubunut 18/19 and run this script
############## ##############
#ON TARGET #ON TARGET
#-------------- #--------------
sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev aptitude show qt5-default rsync #sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev aptitude show qt5-default rsync
############# #############
#ON HOST #ON HOST
#--------- #---------
sudo apt-get update sudo apt-get update
@ -40,9 +38,10 @@ mkdir -p "$RASCROSS_DIR/firmware"
git clone --depth 1 https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware" git clone --depth 1 https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR/opt" ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR/opt"
mkdir -p "$TOOLCHAIN_DIR"
cd $TOOLCHAIN_DIR cd $TOOLCHAIN_DIR
wget -c hhttps://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz --no-check-certificate wget -c https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz --no-check-certificate
tar -xvzf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz tar -xvf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz
##### End of RPi specific ###### ##### End of RPi specific ######
@ -52,10 +51,9 @@ mkdir -p "$QT5_DIR"
cd "$QT5_DIR" cd "$QT5_DIR"
wget -c http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-5.7.1.run wget -c http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-5.7.1.run
chmod +x "$QT5_DIR/*.run" chmod +x $QT5_DIR/*.run
qt-opensource-linux-x64-5.7.1.run
#Display absolute installation directory #Display absolute installation directory to be used in Qt5 installer
echo $HOME/crosscompile/Qt5 echo $HOME/crosscompile/Qt5
./qt-opensource-linux-x64-5.7.1.run ./qt-opensource-linux-x64-5.7.1.run

View File

@ -28,9 +28,6 @@ make_release()
CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake" CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake"
CMAKE_FLATC_FLAG="-DIMPORT_FLATC=../build-x86x64/flatc_export.cmake" CMAKE_FLATC_FLAG="-DIMPORT_FLATC=../build-x86x64/flatc_export.cmake"
export CFLAGS=-m32
export CXXFLAGS=-m32
make_release x86x64 x86 make_release x86x64 x86
#make_release x32 x86 -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-x32.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG} #make_release x32 x86 -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-x32.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG} make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}

View File

@ -7,7 +7,7 @@ SET(PIROOT ${DEVROOT}/rootfs)
SET(PITOOLCHAIN ${DEVROOT}/tools) SET(PITOOLCHAIN ${DEVROOT}/tools)
SET(TOOLROOT ${PITOOLCHAIN}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf ) SET(TOOLROOT ${PITOOLCHAIN}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf )
SET(QT_BIN_PATH ${CROSSROOT}/Qt5/Qt5.7.1/5.7/gcc_64/bin) SET(QT_BIN_PATH ${CROSSROOT}/Qt5/5.7/gcc_64/bin)
# specify the cross compiler # specify the cross compiler
SET(CMAKE_C_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-gcc) SET(CMAKE_C_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-gcc)