mirror of
https://github.com/fbelavenuto/arpl.git
synced 2025-12-24 23:12:05 +08:00
Compare commits
25 Commits
v0.2-alpha
...
v0.2-alpha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7c7fd816 | ||
|
|
84c405cdf7 | ||
|
|
9560f40603 | ||
|
|
8718027acb | ||
|
|
7f464a94e1 | ||
|
|
6df00babb3 | ||
|
|
a21392c97e | ||
|
|
d1070d37c3 | ||
|
|
db464ec087 | ||
|
|
3512ca422a | ||
|
|
df1905b17d | ||
|
|
14e8ac2a5c | ||
|
|
2225b6afd7 | ||
|
|
fd6c9db110 | ||
|
|
466722e7ad | ||
|
|
dfec0accde | ||
|
|
1185a9144d | ||
|
|
4abaef8885 | ||
|
|
a990957148 | ||
|
|
c79acb8a8b | ||
|
|
47b49ac259 | ||
|
|
6fac568cfc | ||
|
|
97ed86cf20 | ||
|
|
f560f402b2 | ||
|
|
d0b839af26 |
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@@ -3,13 +3,12 @@ name: Build image
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
|
||||
# Push and PR
|
||||
# Push
|
||||
push:
|
||||
# pull_request:
|
||||
|
||||
# When a release is published
|
||||
# release:
|
||||
# types: [published]
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
2
TODO
2
TODO
@@ -1,5 +1,7 @@
|
||||
A fazer
|
||||
- Descobrir como é o serial do DS2422+
|
||||
- Mudar addons para colocar pacote completo na partição 3 e detectar dinâmicamente durante o boot do júnior
|
||||
- Estudar acrescentar modo simples e avançado do menu
|
||||
|
||||
Concluidos:
|
||||
- Generalizar código dos addons
|
||||
|
||||
@@ -11,7 +11,12 @@ RUN for V in ${PLATFORMS}; do \
|
||||
mkdir "/opt/${PLATFORM}" && \
|
||||
tar -xaf "/cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" -C "/opt/${PLATFORM}" --strip-components=10 \
|
||||
"usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-7.0/build" && \
|
||||
echo -e "${PLATFORM}\t${KVER}" >> /opt/platforms; \
|
||||
echo -e "${PLATFORM}\t${KVER}" >> /opt/platforms && \
|
||||
if [ ! -d "/opt/linux-${KVER}" ]; then \
|
||||
mkdir "/opt/linux-${KVER}" && \
|
||||
echo "Extracting linux-${KVER}.tar.xz" && \
|
||||
tar -xaf "/cache/linux-${KVER}.tar.xz" -C "/opt/linux-${KVER}" --strip-components=1; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
@@ -22,7 +27,8 @@ ENV SHELL=/bin/bash \
|
||||
|
||||
RUN apt update --yes && \
|
||||
apt install --yes --no-install-recommends --no-install-suggests \
|
||||
build-essential nano make && \
|
||||
nano curl bc kmod \
|
||||
build-essential make ncurses-dev libssl-dev autogen automake pkg-config libtool xsltproc gperf && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ done <../PLATFORMS
|
||||
mkdir -p cache
|
||||
TOOLKIT_VER="7.0"
|
||||
for PLATFORM in ${!PLATFORMS[@]}; do
|
||||
KVER="${PLATFORMS[${PLATFORM}]}"
|
||||
echo -n "Checking cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz... "
|
||||
if [ ! -f "cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" ]; then
|
||||
URL="https://global.download.synology.com/download/ToolChain/toolkit/${TOOLKIT_VER}/${PLATFORM}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
|
||||
@@ -28,6 +29,14 @@ for PLATFORM in ${!PLATFORMS[@]}; do
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
echo -n "Checking cache/linux-${KVER}.tar.xz... "
|
||||
if [ ! -f "cache/linux-${KVER}.tar.xz" ]; then
|
||||
URL="https://cdn.kernel.org/pub/linux/kernel/v${KVER:0:1}.x/linux-${KVER}.tar.xz"
|
||||
echo "Downloading ${URL}"
|
||||
curl -L "${URL}" -o "cache/linux-${KVER}.tar.xz"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
done
|
||||
|
||||
# Generate Dockerfile
|
||||
|
||||
@@ -19,13 +19,13 @@ dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=250 conv=sync 2>/dev/null
|
||||
# Copy grub stage1 to image
|
||||
dd if="${BOARD_PATH}/grub.bin" of="${IMAGE_FILE}" conv=notrunc,sync 2>/dev/null
|
||||
# Create partitions on image
|
||||
echo -e "n\np\n\n\n+100M\nt\n\n0b\nn\np\n\n\n+100M\nn\np\n\n\n\nw" | fdisk "${IMAGE_FILE}" >/dev/null
|
||||
echo -e "n\np\n\n\n+100M\na\nt\n\n0b\nn\np\n\n\n+100M\nn\np\n\n\n\nw" | fdisk "${IMAGE_FILE}" >/dev/null
|
||||
|
||||
# Force umount, ignore errors
|
||||
sudo umount "${BINARIES_DIR}/p1" 2>/dev/null || true
|
||||
sudo umount "${BINARIES_DIR}/p3" 2>/dev/null || true
|
||||
# Force unsetup of loop device
|
||||
sudSetupo losetup -d "/dev/loop8" 2>/dev/null || true
|
||||
sudo losetup -d "/dev/loop8" 2>/dev/null || true
|
||||
# Setup the loop8 loop device
|
||||
sudo losetup -P "/dev/loop8" "${IMAGE_FILE}"
|
||||
# Format partitions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
ARPL_VERSION="0.2-alpha1"
|
||||
ARPL_VERSION="0.2-alpha5"
|
||||
|
||||
# Define paths
|
||||
TMP_PATH="/tmp"
|
||||
|
||||
@@ -243,7 +243,6 @@ function addonMenu() {
|
||||
d "Delete addon(s)" \
|
||||
s "Show user addons" \
|
||||
m "Show all available addons" \
|
||||
o "Download an addon" \
|
||||
e "Exit" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
@@ -317,32 +316,6 @@ function addonMenu() {
|
||||
dialog --backtitle "`backtitle`" --title "Available addons" \
|
||||
--colors --msgbox "${MSG}" 0 0
|
||||
;;
|
||||
o)
|
||||
TEXT="please enter the complete URL to download.\n"
|
||||
TEXT+="\Zb(Official addons location: https://github.com/fbelavenuto/arpl-addons/releases)\Zn\n"
|
||||
TEXT+="Ex: https://github.com/fbelavenuto/arpl-addons/releases/download/v0.2/9p.addon"
|
||||
dialog --backtitle "`backtitle`" --aspect 18 --colors --inputbox "${TEXT}" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
URL="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${URL}" ] && continue
|
||||
clear
|
||||
echo "Downloading ${URL}"
|
||||
curl --insecure -L "${URL}" -o "${TMP_PATH}/addon.tgz" --progress-bar
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Error downloading" --aspect 18 \
|
||||
--msgbox "Check internet or cache disk space" 0 0
|
||||
return 1
|
||||
fi
|
||||
ADDON="`untarAddon "${TMP_PATH}/addon.tgz"`"
|
||||
if [ -n "${ADDON}" ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Success" --aspect 18 \
|
||||
--msgbox "Addon '${ADDON}' added to loader" 0 0
|
||||
else
|
||||
dialog --backtitle "`backtitle`" --title "Invalid addon" --aspect 18 \
|
||||
--msgbox "File format not recognized!" 0 0
|
||||
fi
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
@@ -350,8 +323,6 @@ function addonMenu() {
|
||||
|
||||
###############################################################################
|
||||
function cmdlineMenu() {
|
||||
# Read device-tree flag
|
||||
DT="`readModelKey "${MODEL}" "dt"`"
|
||||
unset CMDLINE
|
||||
declare -A CMDLINE
|
||||
while IFS="=" read KEY VALUE; do
|
||||
@@ -359,11 +330,9 @@ function cmdlineMenu() {
|
||||
done < <(readConfigMap "cmdline" "${USER_CONFIG_FILE}")
|
||||
echo "a \"Add/edit an cmdline item\"" > "${TMP_PATH}/menu"
|
||||
echo "d \"Delete cmdline item(s)\"" >> "${TMP_PATH}/menu"
|
||||
if [ "${DT}" != "true" ]; then
|
||||
echo "u \"Show SATA(s) # ports and drives\"" >> "${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "s \"Show user cmdline\"" >> "${TMP_PATH}/menu"
|
||||
echo "m \"Show model/build cmdline\"" >> "${TMP_PATH}/menu"
|
||||
echo "u \"Show SATA(s) # ports and drives\"" >> "${TMP_PATH}/menu"
|
||||
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
|
||||
# Loop menu
|
||||
while true; do
|
||||
@@ -406,6 +375,22 @@ function cmdlineMenu() {
|
||||
deleteConfigKey "cmdline.${I}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
;;
|
||||
s)
|
||||
ITEMS=""
|
||||
for KEY in ${!CMDLINE[@]}; do
|
||||
ITEMS+="${KEY}: ${CMDLINE[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m)
|
||||
ITEMS=""
|
||||
while IFS="=" read KEY VALUE; do
|
||||
ITEMS+="${KEY}: ${VALUE}\n"
|
||||
done < <(readModelMap "${MODEL}" "builds.${BUILD}.cmdline")
|
||||
dialog --backtitle "`backtitle`" --title "Model/build cmdline" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
u) TEXT=""
|
||||
NUMPORTS=0
|
||||
for PCI in `lspci -d ::106 | awk '{print$1}'`; do
|
||||
@@ -434,22 +419,6 @@ function cmdlineMenu() {
|
||||
dialog --backtitle "`backtitle`" --colors --aspect 18 \
|
||||
--msgbox "${TEXT}" 0 0
|
||||
;;
|
||||
s)
|
||||
ITEMS=""
|
||||
for KEY in ${!CMDLINE[@]}; do
|
||||
ITEMS+="${KEY}: ${CMDLINE[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m)
|
||||
ITEMS=""
|
||||
while IFS="=" read KEY VALUE; do
|
||||
ITEMS+="${KEY}: ${VALUE}\n"
|
||||
done < <(readModelMap "${MODEL}" "builds.${BUILD}.cmdline")
|
||||
dialog --backtitle "`backtitle`" --title "Model/build cmdline" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
echo "Insert basic USB modules..."
|
||||
SYNOLoadModules $USB_MODULES
|
||||
+SYNOLoadModules "usb-storage"
|
||||
+/addons/addons.sh early
|
||||
+/addons/addons.sh early; /addons/addons.sh patches
|
||||
|
||||
# insert Etron USB3.0 drivers
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@ cp "${PATCH_PATH}/iosched-trampoline.sh" "${RAMDISK_PATH}/usr/sbin/modprobe"
|
||||
# Addons
|
||||
# Check if model needs Device-tree dynamic patch
|
||||
DT="`readModelKey "${MODEL}" "dt"`"
|
||||
# Add system addon "qjs-dtb" or "maxdisks"
|
||||
[ "${DT}" = "true" ] && ADDONS['qjs-dtb']="" || ADDONS['maxdisks']=""
|
||||
# Add system addon "dtbpatch" or "maxdisks"
|
||||
[ "${DT}" = "true" ] && ADDONS['dtbpatch']="" || ADDONS['maxdisks']=""
|
||||
ADDONS['misc']="" # Add system addon "misc"
|
||||
ADDONS['acpid']="" # Add system addon "acpid"
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/apollolake-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/apollolake-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/broadwell-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/broadwell-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/broadwellnk-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/broadwellnk-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/bromolow-3.10.108.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/bromolow-3.10.108.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/denverton-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/denverton-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/alx/geminilake-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/geminilake-4.4.180.tgz
Normal file
Binary file not shown.
25
files/board/arpl/p3/addons/alx/manifest.yml
Normal file
25
files/board/arpl/p3/addons/alx/manifest.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
version: 1
|
||||
name: alx
|
||||
description: "Driver for Qualcomm Atheros AR816x/AR817x ethernet adapters"
|
||||
available-for:
|
||||
bromolow-3.10.108:
|
||||
install-script: &script "install.sh"
|
||||
modules: true
|
||||
apollolake-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
broadwell-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
broadwellnk-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
denverton-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
geminilake-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
v1000-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
BIN
files/board/arpl/p3/addons/alx/v1000-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/alx/v1000-4.4.180.tgz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
files/board/arpl/p3/addons/dtbpatch/all.tgz
Normal file
BIN
files/board/arpl/p3/addons/dtbpatch/all.tgz
Normal file
Binary file not shown.
8
files/board/arpl/p3/addons/dtbpatch/manifest.yml
Normal file
8
files/board/arpl/p3/addons/dtbpatch/manifest.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
version: 1
|
||||
name: dtbpatch
|
||||
system: true
|
||||
description: "Patch model.dtb"
|
||||
compile-script: compile.sh
|
||||
all:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
files/board/arpl/p3/addons/eudev/all.tgz
Normal file
BIN
files/board/arpl/p3/addons/eudev/all.tgz
Normal file
Binary file not shown.
16
files/board/arpl/p3/addons/eudev/manifest.yml
Normal file
16
files/board/arpl/p3/addons/eudev/manifest.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: 1
|
||||
name: eudev
|
||||
system: true
|
||||
description: "eudev project + kmod modified"
|
||||
compile-script: compile.sh
|
||||
all:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
available-for:
|
||||
bromolow-3.10.108:
|
||||
apollolake-4.4.180:
|
||||
broadwell-4.4.180:
|
||||
broadwellnk-4.4.180:
|
||||
denverton-4.4.180:
|
||||
geminilake-4.4.180:
|
||||
v1000-4.4.180:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user