@@ -1,18 +1,5 @@ | |||||
#!/bin/bash -e | #!/bin/bash -e | ||||
install -m 755 patch/ninja.patch "${ROOTFS_DIR}/etc/" | |||||
on_chroot << EOF | on_chroot << EOF | ||||
cd "/tmp" | |||||
if [ ! -d "ninja" ]; then | |||||
git clone https://github.com/ninja-build/ninja.git | |||||
cd ninja | |||||
patch -u CMakeLists.txt -i /etc/ninja.patch | |||||
mkdir -p build | |||||
cd build | |||||
cmake -DCMAKE_BUILD_TYPE=Release .. | |||||
make -j$(nproc) install | |||||
ldconfig | |||||
fi | |||||
pip3 install cmake ninja | |||||
EOF | EOF |
@@ -0,0 +1,8 @@ | |||||
#!/bin/bash -e | |||||
install -m 755 patch/export.txt "${ROOTFS_DIR}/etc/" | |||||
on_chroot << EOF | |||||
cat /etc/export.txt >> /home/${FIRST_USER_NAME}/.bashrc | |||||
source /home/${FIRST_USER_NAME}/.bashrc | |||||
EOF |
@@ -0,0 +1,4 @@ | |||||
## PiSDR Variables | |||||
export PYTHONPATH="/usr/local/lib/python3/dist-packages:$PYTHONPATH" | |||||
export PATH="$HOME/.local/bin:$PATH" |
@@ -1,6 +0,0 @@ | |||||
@@ -1,4 +1,4 @@ | |||||
-cmake_minimum_required(VERSION 3.15) | |||||
+cmake_minimum_required(VERSION 3.13) | |||||
project(ninja) | |||||
# --- optional link-time optimization |
@@ -15,7 +15,7 @@ cd build | |||||
cmake -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ | cmake -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ | ||||
-DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ | -DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ | ||||
-DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15" \ | -DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15" \ | ||||
-GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../ | |||||
-GNinja -DCMAKE_BUILD_TYPE=Release ../ | |||||
ninja install | ninja install | ||||
cp /usr/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/ | cp /usr/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/ | ||||
udevadm control --reload-rules | udevadm control --reload-rules | ||||
@@ -13,7 +13,7 @@ git checkout maint-3.8 | |||||
git submodule update --init --recursive | git submodule update --init --recursive | ||||
mkdir -p build | mkdir -p build | ||||
cd build | cd build | ||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. | |||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. | |||||
ninja install | ninja install | ||||
ldconfig | ldconfig | ||||
EOF | EOF |