Starting beta6 - fixing eudev and docker imgs

This commit is contained in:
Fabio Belavenuto 2022-11-30 13:39:07 -03:00
parent 3aeb27fe5b
commit 3118c5537e
17 changed files with 8 additions and 35 deletions

View File

@ -1 +1 @@
1.0-beta5 1.0-beta6

View File

@ -3,7 +3,7 @@ ARG PLATFORMS="@@@PLATFORMS@@@"
ARG TOOLKIT_VER="@@@TOOLKIT_VER@@@" ARG TOOLKIT_VER="@@@TOOLKIT_VER@@@"
# Copy downloaded toolkits # Copy downloaded toolkits
ADD cache/$TOOLKIT_VER /cache ADD cache /cache
# Extract toolkits # Extract toolkits
RUN for V in ${PLATFORMS}; do \ RUN for V in ${PLATFORMS}; do \
echo "${V}" | while IFS=':' read PLATFORM KVER; do \ echo "${V}" | while IFS=':' read PLATFORM KVER; do \

View File

@ -23,6 +23,7 @@ function prepare() {
URLS["geminilake"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28GeminiLake%29/geminilake-${GCCLIB_VER}_x86_64-GPL.txz" URLS["geminilake"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28GeminiLake%29/geminilake-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["v1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28V1000%29/v1000-${GCCLIB_VER}_x86_64-GPL.txz" URLS["v1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28V1000%29/v1000-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["r1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/AMD%20x86%20Linux%204.4.180%20%28r1000%29/r1000-${GCCLIB_VER}_x86_64-GPL.txz" URLS["r1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/AMD%20x86%20Linux%204.4.180%20%28r1000%29/r1000-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["epyc7002"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/AMD%20x86%20Linux%20Linux%205.10.55%20%28epyc7002%29/epyc7002-${GCCLIB_VER}_x86_64-GPL.txz"
# Read platforms/kerver version # Read platforms/kerver version
echo "Reading platforms" echo "Reading platforms"

View File

@ -9,15 +9,16 @@ function export-vars() {
echo "Use: export-vars <platform>" echo "Use: export-vars <platform>"
exit 1 exit 1
fi fi
export PLATFORM="${1}"
export KSRC="/opt/${1}/build" export KSRC="/opt/${1}/build"
export CROSS_COMPILE="/opt/${1}/bin/x86_64-pc-linux-gnu-" export CROSS_COMPILE="/opt/${1}/bin/x86_64-pc-linux-gnu-"
export CFLAGS="-I/opt/${1}/include" export CFLAGS="-I/opt/${1}/include"
export LDFLAGS="-I/opt/${1}/lib" export LDFLAGS="-I/opt/${1}/lib"
export LD_LIBRARY_PATH="/opt/${1}/lib" export LD_LIBRARY_PATH="/opt/${1}/lib"
export ARCH=x86_64 export ARCH=x86_64
export PATH="/opt/${1}/bin:${PATH}"
export CC="x86_64-pc-linux-gnu-gcc" export CC="x86_64-pc-linux-gnu-gcc"
export LD="x86_64-pc-linux-gnu-ld" export LD="x86_64-pc-linux-gnu-ld"
export PATH="/opt/${1}/bin:${PATH}"
} }
############################################################################### ###############################################################################

2
docker/syno-toolkit/rootfs/etc/profile.d/login.sh Normal file → Executable file
View File

@ -1,3 +1,4 @@
export PATH="/usr/local/x86_64-pc-linux-gnu/bin:${PATH}"
[[ "$-" != *i* ]] && return [[ "$-" != *i* ]] && return
export LS_OPTIONS='--color=auto' export LS_OPTIONS='--color=auto'
export SHELL='linux' export SHELL='linux'
@ -7,4 +8,3 @@ alias ll='ls -l'
alias l='ls -l -a' alias l='ls -l -a'
alias h='history 25' alias h='history 25'
alias j='jobs -l' alias j='jobs -l'
export PATH="/opt/${PLATFORM}/bin:${PATH}"

View File

@ -29,30 +29,6 @@ function compile-lkm {
chown 1000.1000 /output/redpill-prod.ko chown 1000.1000 /output/redpill-prod.ko
} }
###############################################################################
# function compile-drivers {
# while read platform kver; do
# SRC_PATH="/opt/${platform}"
# echo "Compiling for ${platform}-${kver}"
# cd /opt/linux-${kver}/drivers
# while read dir; do
# if [ -f "${dir}/Makefile" ]; then
# echo "Driver `basename ${dir}`"
# grep "CONFIG_.*/.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=n/g' > /tmp/env
# grep "CONFIG_.*\.o.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=m/g' >> /tmp/env
# make -C "${SRC_PATH}" M=$(readlink -f "${dir}") clean
# cat /tmp/env | xargs -d '\n' make -C "${SRC_PATH}" M=$(readlink -f "${dir}") modules $@
# fi
# done < <(find -type d)
# DST_PATH="/output/compiled-mods/${platform}-${kver}"
# mkdir -p "${DST_PATH}"
# while read f; do
# strip -g "${f}"
# mv "${f}" "${DST_PATH}"
# done < <(find -name \*.ko)
# done </opt/platforms
# }
############################################################################### ###############################################################################
############################################################################### ###############################################################################
@ -61,13 +37,9 @@ if [ $# -lt 1 ]; then
echo "Commands: shell | compile-module | compile-lkm" echo "Commands: shell | compile-module | compile-lkm"
exit 1 exit 1
fi fi
export PATH="/usr/local/x86_64-pc-linux-gnu/bin:${PATH}"
export KSRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build" export KSRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build"
export LINUX_SRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build" export LINUX_SRC="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}/build"
export CROSS_COMPILE="/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-" export CROSS_COMPILE="/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-"
#export CFLAGS="-I/opt/${1}/include"
#export LDFLAGS="-I/opt/${1}/lib"
#export LD_LIBRARY_PATH="/opt/${1}/lib"
export ARCH=x86_64 export ARCH=x86_64
export CC="x86_64-pc-linux-gnu-gcc" export CC="x86_64-pc-linux-gnu-gcc"
export LD="x86_64-pc-linux-gnu-ld" export LD="x86_64-pc-linux-gnu-ld"
@ -76,6 +48,5 @@ case $1 in
shell) shift && bash -l $@ ;; shell) shift && bash -l $@ ;;
compile-module) compile-module ;; compile-module) compile-module ;;
compile-lkm) compile-lkm ;; compile-lkm) compile-lkm ;;
# compile-drivers) compile-drivers ;;
*) echo "Command not recognized: $1" ;; *) echo "Command not recognized: $1" ;;
esac esac

View File

@ -15,7 +15,7 @@ BOARD_PATH="${CONFIG_DIR}/board/arpl"
echo "Creating image file" echo "Creating image file"
# Create image zeroed # Create image zeroed
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=500 conv=sync 2>/dev/null dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=1024 conv=sync 2>/dev/null
# Copy grub stage1 to image # Copy grub stage1 to image
dd if="${BOARD_PATH}/grub.bin" of="${IMAGE_FILE}" conv=notrunc,sync 2>/dev/null dd if="${BOARD_PATH}/grub.bin" of="${IMAGE_FILE}" conv=notrunc,sync 2>/dev/null
# Create partitions on image # Create partitions on image

View File

@ -1,5 +1,5 @@
ARPL_VERSION="1.0-beta5" ARPL_VERSION="1.0-beta6"
# Define paths # Define paths
TMP_PATH="/tmp" TMP_PATH="/tmp"