first commit

This commit is contained in:
Fabio Belavenuto
2022-07-01 13:57:55 -03:00
commit a08662802d
1085 changed files with 341425 additions and 0 deletions

28
compile-lkm.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -e
TMP_PATH="/tmp"
DEST_PATH="files/board/arpl/p3/lkms"
###############################################################################
function trap_cancel() {
echo "Press Control+C once more terminate the process (or wait 2s for it to restart)"
sleep 2 || exit 1
}
trap trap_cancel SIGINT SIGTERM
###############################################################################
function die() {
echo -e "\033[1;31m$@\033[0m"
exit 1
}
# Main
while read PLATFORM KVER; do
# Compile using docker
docker run --rm -t --user `id -u` -v "${TMP_PATH}":/output \
-v "${PWD}/redpill-lkm":/input syno-compiler compile-lkm ${PLATFORM}
mv "${TMP_PATH}/redpill-dev.ko" "${DEST_PATH}/rp-${PLATFORM}-${KVER}-dev.ko"
mv "${TMP_PATH}/redpill-prod.ko" "${DEST_PATH}/rp-${PLATFORM}-${KVER}-prod.ko"
done < PLATFORMS