@@ -9,7 +9,7 if [ "$ENABLE_VIDEOCORE" = true ] ; then | |||
|
9 | 9 | # Copy existing videocore sources into chroot directory |
|
10 | 10 | if [ -n "$VIDEOCORESRC_DIR" ] && [ -d "$VIDEOCORESRC_DIR" ] ; then |
|
11 | 11 | # Copy local U-Boot sources |
|
12 | cp -r "${VIDEOCORESRC_DIR}" "${R}/tmp" | |
|
12 | cp -r "${VIDEOCORESRC_DIR}" "${R}/tmp/userland" | |
|
13 | 13 | else |
|
14 | 14 | # Create temporary directory for U-Boot sources |
|
15 | 15 | temp_dir=$(as_nobody mktemp -d) |
@@ -27,7 +27,25 if [ "$ENABLE_VIDEOCORE" = true ] ; then | |||
|
27 | 27 | rm -fr "${temp_dir}" |
|
28 | 28 | fi |
|
29 | 29 | |
|
30 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DARM64=ON -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_ASM_COMPILER=aarch64-linux-gnu-gcc -DVIDEOCORE_BUILD_DIR="${R}"/opt/vc | |
|
30 | # Create build dir | |
|
31 | mkdir "${R}"/tmp/userland/build | |
|
32 | # push us to build directory | |
|
33 | pushd "${R}"/tmp/userland/build | |
|
34 | ||
|
35 | if [ "$RELEASE_ARCH" = "arm64" ] ; then | |
|
36 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DARM64=ON -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_ASM_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE" -DCMAKE_ASM_FLAGS="${CMAKE_ASM_FLAGS} -c" -DVIDEOCORE_BUILD_DIR="${R}" "${R}/tmp/userland" | |
|
37 | fi | |
|
38 | ||
|
39 | if [ "$RELEASE_ARCH" = "armel" ] ; then | |
|
40 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ -DCMAKE_ASM_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE" -DCMAKE_ASM_FLAGS="${CMAKE_ASM_FLAGS} -c" -DCMAKE_SYSTEM_PROCESSOR="arm" -DVIDEOCORE_BUILD_DIR="${R}" "${R}/tmp/userland" | |
|
41 | fi | |
|
42 | ||
|
43 | if [ "$RELEASE_ARCH" = "armhf" ] ; then | |
|
44 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DCMAKE_TOOLCHAIN_FILE="${R}"/tmp/userland/makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DVIDEOCORE_BUILD_DIR="${R}" "${R}/tmp/userland" | |
|
45 | fi | |
|
46 | ||
|
47 | #build userland | |
|
31 | 48 | make -j "$(nproc)" |
|
32 | chroot_exec PATH="${PATH}":/opt/vc/bin | |
|
49 | #pop us out of build dir | |
|
50 | popd | |
|
33 | 51 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant