first commit

This commit is contained in:
sanya
2025-09-01 14:20:39 +00:00
committed by ExternPointer
commit 490fc11f6a
4328 changed files with 1796224 additions and 0 deletions

38
toolchain/copy_sysroot.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
#apt install clang llvm libasound2-dev libssl-dev
#apt-get install usb-modeswitch usb-modeswitch-data
#apt-get install modemmanager
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang 100
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++ 100
#alsamixer -> F4, turn on mic1 with space
read -p "Input ip: " NANOPI_IP
read -sp "Input ssh password: " SSH_PASSWORD
echo
DEST_DIR="./sysroot"
copy_files() {
sshpass -p "$SSH_PASSWORD" rsync -avLW --no-p --no-o --no-g --delete root@$NANOPI_IP:$1 $2
}
if ! command -v sshpass &> /dev/null; then
echo "sshpass not found"
exit 1
fi
mkdir -p $DEST_DIR/usr
echo "Copying..."
copy_files "/lib" "$DEST_DIR/"
copy_files "/usr/lib" "$DEST_DIR/usr/"
copy_files "/usr/include" "$DEST_DIR/usr/"
#ln -sf $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlicommon.so.1.0.9 $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlicommon.so
#ln -sf $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlidec.so.1.0.9 $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlidec.so
#ln -sf $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlienc.so.1.0.9 $DEST_DIR/usr/lib/arm-linux-gnueabihf/libbrotlienc.so
echo "Success"