mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
Native build
Changes to allow the Raspberry Pi to natively build the userland. Assumes that any armv6l (as returned by the arch(1) command) is a Raspberry Pi and changes the compile accordingly. Fix for issues #2 and #79
This commit is contained in:
committed by
popcornmix
parent
b58a0498f1
commit
775cf0bb88
28
buildme
28
buildme
@@ -1,12 +1,26 @@
|
||||
#/bin/sh
|
||||
mkdir -p build/arm-linux/release/
|
||||
pushd build/arm-linux/release/
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
make -j 6
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
sudo make install DESTDIR=$1
|
||||
if [ "armv6l" = `arch` ]; then
|
||||
# Native compile on the Raspberry Pi
|
||||
mkdir -p build/raspberry/release
|
||||
pushd build/raspberry/release
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
make
|
||||
if [ "$1" != "" ]; then
|
||||
sudo make install DESTDIR=$1
|
||||
else
|
||||
sudo make install
|
||||
fi
|
||||
else
|
||||
# Cross compile on a more capable machine
|
||||
mkdir -p build/arm-linux/release/
|
||||
pushd build/arm-linux/release/
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
make -j 6
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
sudo make install DESTDIR=$1
|
||||
fi
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user