mirror of
https://github.com/fbelavenuto/arpl.git
synced 2025-12-24 14:52:05 +08:00
Compare commits
93 Commits
v0.1-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 | ||
|
|
a8fef13c64 | ||
|
|
4a85944651 | ||
|
|
1458074276 | ||
|
|
fd1f06a7f3 | ||
|
|
2e4d14c25d | ||
|
|
43338b435a | ||
|
|
6ea54af667 | ||
|
|
012b2d72ec | ||
|
|
3dc56d40fe | ||
|
|
58fbdd7b7b | ||
|
|
e6f5a9d415 | ||
|
|
cf1ac2a026 | ||
|
|
02ab29ace7 | ||
|
|
d48e9f9fb6 | ||
|
|
958369c5cc | ||
|
|
863d949ae2 | ||
|
|
b9c84664cd | ||
|
|
d0ead7d18a | ||
|
|
825f31287a | ||
|
|
73902b0609 | ||
|
|
c83e28613f | ||
|
|
378b10b7e3 | ||
|
|
66d8abb2f9 | ||
|
|
5fdf9afd22 | ||
|
|
51b4d1666e | ||
|
|
5cc2f0bad3 | ||
|
|
20e6a1b030 | ||
|
|
193a888417 | ||
|
|
d9bae9bff3 | ||
|
|
4816e2b9d6 | ||
|
|
8be21e154f | ||
|
|
da0723baae | ||
|
|
60ebe853a1 | ||
|
|
17b7e9c3d3 | ||
|
|
0fdd36fb66 | ||
|
|
9b623817d5 | ||
|
|
285ef9beb8 | ||
|
|
fa46a643a3 | ||
|
|
b76c39402e | ||
|
|
1adea60697 | ||
|
|
95957b3c0a | ||
|
|
f234821abc | ||
|
|
8405ebb43f | ||
|
|
5382bde2c1 | ||
|
|
67eb896d9e | ||
|
|
58bb997b34 | ||
|
|
3f47e24fef | ||
|
|
970ccbee46 | ||
|
|
d7b13c9bf7 | ||
|
|
7d7c83ccc7 | ||
|
|
00f5b13249 | ||
|
|
14d568e47c | ||
|
|
5cd5a84602 | ||
|
|
bbc33b9991 | ||
|
|
99c2b26d8d | ||
|
|
cabe06ec67 | ||
|
|
27e0da70d2 | ||
|
|
02b03e5c30 | ||
|
|
be0a7ea2a6 | ||
|
|
995b93cf30 | ||
|
|
fb596f44bb | ||
|
|
7f3bf6c6b0 | ||
|
|
faed1e838e | ||
|
|
425c043e83 | ||
|
|
f028e5d8fe | ||
|
|
4032413b6f | ||
|
|
89b76b94f1 | ||
|
|
5314c0694a |
126
.github/workflows/main.yml
vendored
Normal file
126
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
name: Build image
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
|
||||
# Push
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Check cache
|
||||
- name: Cache buildroot
|
||||
id: cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .buildroot
|
||||
key: ${{ runner.os }}-${{ hashFiles('files/configs/arpl_defconfig') }}
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libelf-dev qemu-utils
|
||||
|
||||
# Prepare buildroot for first make (for cache)
|
||||
- name: Prepare buildroot
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone --single-branch -b 2022.02 https://github.com/buildroot/buildroot.git .buildroot
|
||||
# Copy files
|
||||
echo "Copying files"
|
||||
cp -Ru files/* .buildroot
|
||||
cd .buildroot
|
||||
echo "Generating default config"
|
||||
make arpl_defconfig
|
||||
echo "First make"
|
||||
make BR2_EXTERNAL=../external
|
||||
|
||||
# Build incremental from cache
|
||||
- name: Build image
|
||||
id: build
|
||||
run: |
|
||||
VERSION=`<VERSION`
|
||||
echo "::set-output name=VERSION::${VERSION}"
|
||||
# Remove old files
|
||||
rm -rf .buildroot/output/target/opt/arpl
|
||||
rm -rf .buildroot/board/arpl/overlayfs
|
||||
rm -rf .buildroot/board/arpl/p1
|
||||
rm -rf .buildroot/board/arpl/p3
|
||||
# Get latest LKMs
|
||||
echo "Getting latest LKMs"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/redpill-lkm/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
curl -L "https://github.com/fbelavenuto/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o /tmp/rp-lkms.zip
|
||||
rm -rf files/board/arpl/p3/lkms/*
|
||||
unzip /tmp/rp-lkms.zip -d files/board/arpl/p3/lkms
|
||||
# Get latest addons and install its
|
||||
echo "Getting latest Addons"
|
||||
TAG=`curl -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
curl -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip
|
||||
mkdir -p /tmp/addons
|
||||
unzip /tmp/addons.zip -d /tmp/addons
|
||||
DEST_PATH="files/board/arpl/p3/addons"
|
||||
echo "Installing addons to ${DEST_PATH}"
|
||||
for PKG in `ls /tmp/addons/*.addon`; do
|
||||
ADDON=`basename ${PKG} | sed 's|.addon||'`
|
||||
mkdir -p "${DEST_PATH}/${ADDON}"
|
||||
echo "Extracting ${PKG} to ${DEST_PATH}/${ADDON}"
|
||||
tar xaf "${PKG}" -C "${DEST_PATH}/${ADDON}"
|
||||
done
|
||||
# Copy files
|
||||
echo "Copying files"
|
||||
sed 's/^ARPL_VERSION=.*/ARPL_VERSION="'${VERSION}'"/' -i files/board/arpl/overlayfs/opt/arpl/include/consts.sh
|
||||
cp -Ru files/* .buildroot/
|
||||
cd .buildroot
|
||||
echo "Generating default config"
|
||||
make arpl_defconfig
|
||||
echo "Version: ${VERSION}"
|
||||
echo "Building..."
|
||||
make BR2_EXTERNAL=../external
|
||||
cd -
|
||||
qemu-img convert -O vmdk arpl.img arpl.vmdk
|
||||
|
||||
# Zip image
|
||||
- name: Pack
|
||||
shell: bash
|
||||
run: |
|
||||
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.img.zip" arpl.img
|
||||
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip" arpl.vmdk
|
||||
|
||||
# Upload artifact
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Images
|
||||
path: |
|
||||
arpl.img
|
||||
arpl.vmdk
|
||||
retention-days: 1
|
||||
|
||||
# Publish a release if is a tag
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
arpl-${{ steps.build.outputs.VERSION }}.img.zip
|
||||
arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip
|
||||
.buildroot/output/images/bzImage
|
||||
.buildroot/output/images/rootfs.cpio.xz
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,8 +1,10 @@
|
||||
!.gitkeep
|
||||
.vscode
|
||||
arpl.img*
|
||||
arpl.img
|
||||
arpl.vmdk
|
||||
*.zip
|
||||
/buildroot-2022.02.2
|
||||
.buildroot
|
||||
test.sh
|
||||
docker/Dockerfile
|
||||
docker/cache
|
||||
*.bak
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "redpill-lkm"]
|
||||
path = redpill-lkm
|
||||
url = git@github.com:fbelavenuto/redpill-lkm.git
|
||||
url = https://github.com/fbelavenuto/redpill-lkm
|
||||
[submodule "addons"]
|
||||
path = addons
|
||||
url = git@github.com:fbelavenuto/arpl-addons.git
|
||||
url = https://github.com/fbelavenuto/arpl-addons
|
||||
|
||||
@@ -5,4 +5,3 @@ broadwellnk 4.4.180
|
||||
denverton 4.4.180
|
||||
geminilake 4.4.180
|
||||
v1000 4.4.180
|
||||
purley 4.4.180
|
||||
|
||||
@@ -6,15 +6,15 @@ It is still in alpha stage, with little documentation, but it is functional. I'm
|
||||
|
||||
I tried to make the system as user-friendly as possible, to make life easier. The loader automatically detects which device is being used, SATADom or USB, detecting its VID and PID correctly. redpill-lkm has been edited to allow booting the kernel without setting the variables related to network interfaces so the loader (and user) doesn't have to worry about that. The Jun's code that makes the zImage and Ramdisk patch is embedded, if there is a change in "zImage" or "rd.gz" by some update, the loader re-applies the patches. Builds 42218 and 42661 up to update5 are working. Automatic updates should still be disabled as we are not sure if this technique will work forever.
|
||||
|
||||
To use this project, download the latest image available and burn it to a USB stick or SATA disk-on-module. Set the PC to boot from the burned media and follow the informations on the screen. When booting, the user can call the "menu.sh" command from the computer itself, access via SSH or use the virtual terminal (ttyd) by typing the address provided on the screen (http://<ip>:7681). The loader will automatically increase the size of the last partition and use this space as cache if it is larger than 2GiB.
|
||||
To use this project, download the latest image available and burn it to a USB stick or SATA disk-on-module. Set the PC to boot from the burned media and follow the informations on the screen. When booting, the user can call the "menu.sh" command from the computer itself, access via SSH or use the virtual terminal (ttyd) by typing the address provided on the screen (http://(ip):7681). The loader will automatically increase the size of the last partition and use this space as cache if it is larger than 2GiB.
|
||||
|
||||
The menu system is dynamic and I hope it is intuitive enough that the user can use it without any problems. Its allows you to choose a model, the existing buildnumber for the chosen model, randomly type or create a serial number, add/remove addons with a hardware detection option, add/remove/view "cmdline" and "synoinfo" entries, choose the LKM version, create the loader, boot, manually edit the configuration file, choose a keymap and exit.
|
||||
The menu system is dynamic and I hope it is intuitive enough that the user can use it without any problems. Its allows you to choose a model, the existing buildnumber for the chosen model, randomly type or create a serial number, add/remove addons with a hardware detection option, add/remove/view "cmdline" and "synoinfo" entries, choose the LKM version, create the loader, boot, manually edit the configuration file, choose a keymap, update and exit.
|
||||
|
||||
Addons and "synoinfo" entries require re-creating the loader, "cmdline" entries do not. You can view the "cmdline" and "synoinfo" entries defined for the chosen model, with user-defined entries having higher priority.
|
||||
|
||||
There is no need to configure the VID/PID (if using a USB stick) or define the MAC Addresses of the network interfaces. If the user wants to modify the MAC Address of any interface, he must manually add "cmdline" entries in the corresponding menu (set "netif_num" according to "mac1..4" entries).
|
||||
|
||||
If a model is chosen that uses the Device-tree system to define the HDs, there is no need to configure anything. In the case of models that do not use device-tree, the configurations must be done manually and for this there is an option in the "Cmdline" menu to display the SATA controllers, DUMMY ports and ports in use, to assist in the creation of the "SataPortMap", "DiskIdxMap" and "sata_remap". There is also an option to change the maximum amount of HDs supported by the model, adjusting "maxdisks" and "internalportcfg" automatically.
|
||||
If a model is chosen that uses the Device-tree system to define the HDs, there is no need to configure anything. In the case of models that do not use device-tree, the configurations must be done manually and for this there is an option in the "Cmdline" menu to display the SATA controllers, DUMMY ports and ports in use, to assist in the creation of the "SataPortMap", "DiskIdxMap" and "sata_remap".
|
||||
|
||||
Another important point is that the loader detects whether or not the CPU has the FMA3 instruction and does not display the models that require it. So if the DS918+ and DVA3221 models are not displayed it is because of the CPU's lack of support for FMA instructions.
|
||||
|
||||
@@ -25,3 +25,4 @@ Addons can be downloaded and added to the loader.
|
||||
All code was based on the work of TTG, pocopico, jumkey and others involved in continuing TTG's original redpill-load project.
|
||||
|
||||
More information will be added in the future.
|
||||
|
||||
|
||||
9
TODO
9
TODO
@@ -1,5 +1,7 @@
|
||||
A fazer
|
||||
- Implementar update do bzimage e ramdisk online
|
||||
- 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
|
||||
@@ -18,6 +20,9 @@ Concluidos:
|
||||
- Usando TTYD para acesso via web
|
||||
- Verificar se fica legal colocar na config dos modelos os addons obrigatórios como o qjs-dtb *** Usado outra maneira ***
|
||||
- Implementar escolha de maxdisks
|
||||
|
||||
- Limpar addons quando usuário muda de modelo
|
||||
- Arrumar detecção de discos/maxdisks. 918 tem só 4 discos e dá problema com proxmox
|
||||
- Melhorar opções de HD, talvez criar um menu a parte
|
||||
- Implementar update do bzimage e ramdisk online
|
||||
|
||||
https://kb.synology.com/en-me/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/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
|
||||
@@ -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/*
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ function trap_cancel() {
|
||||
}
|
||||
trap trap_cancel SIGINT SIGTERM
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
# Read platforms/kerver version
|
||||
echo "Reading platforms"
|
||||
declare -A PLATFORMS
|
||||
@@ -15,8 +17,10 @@ while read PLATFORM KVER; do
|
||||
done <../PLATFORMS
|
||||
|
||||
# Download toolkits
|
||||
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"
|
||||
@@ -25,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
|
||||
@@ -39,5 +51,5 @@ sed -i "s|@@@TOOLKIT_VER@@@|${TOOLKIT_VER}|g" Dockerfile
|
||||
|
||||
# Build
|
||||
echo "Building... Drink a coffee and wait!"
|
||||
docker image rm syno-compiler >/dev/null 2>&1
|
||||
docker buildx build . --load --tag syno-compiler
|
||||
docker image rm fbelavenuto/syno-compiler >/dev/null 2>&1
|
||||
docker buildx build . --load --tag fbelavenuto/syno-compiler
|
||||
|
||||
@@ -19,7 +19,7 @@ function compile-module {
|
||||
fi
|
||||
echo "Compiling module for ${PLATFORM}-${KVER}..."
|
||||
cp -R /input /tmp
|
||||
make -C "/opt/${PLATFORM}" M="/tmp/input" modules
|
||||
make -C "/opt/${PLATFORM}" M="/tmp/input" PLATFORM=${PLATFORM^^} modules
|
||||
while read F; do
|
||||
strip -g "${F}"
|
||||
echo "Copying `basename ${F}`"
|
||||
|
||||
2
external/Config.in
vendored
Normal file
2
external/Config.in
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
source "$BR2_EXTERNAL_ARPL_PATH/r8125/Config.in"
|
||||
source "$BR2_EXTERNAL_ARPL_PATH/r8168/Config.in"
|
||||
2
external/external.desc
vendored
Normal file
2
external/external.desc
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
name: ARPL
|
||||
desc: ARPL external packages
|
||||
1
external/external.mk
vendored
Normal file
1
external/external.mk
vendored
Normal file
@@ -0,0 +1 @@
|
||||
include $(sort $(wildcard $(BR2_EXTERNAL_ARPL_PATH)/*/*.mk))
|
||||
10
external/r8125/Config.in
vendored
Normal file
10
external/r8125/Config.in
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_R8125
|
||||
bool "r8125"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
A standalone driver for the RTL8125 Ethernet adapter.
|
||||
|
||||
https://github.com/fbelavenuto/r8125
|
||||
|
||||
comment "r8125 needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
2
external/r8125/r8125.hash
vendored
Normal file
2
external/r8125/r8125.hash
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 fe2420e69ae653e989e8ae754d4e3b5740d62b6e19911d88553106aaeaac97b4 r8125-99cd3bc868e4ba82a473d8efaedad04fedb0c0f7.tar.gz
|
||||
13
external/r8125/r8125.mk
vendored
Normal file
13
external/r8125/r8125.mk
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
################################################################################
|
||||
#
|
||||
# r8125
|
||||
#
|
||||
################################################################################
|
||||
|
||||
R8125_VERSION = 99cd3bc868e4ba82a473d8efaedad04fedb0c0f7
|
||||
R8125_SITE = $(call github,fbelavenuto,r8125,$(R8125_VERSION))
|
||||
R8125_LICENSE = GPL-2.0
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
||||
|
||||
10
external/r8168/Config.in
vendored
Normal file
10
external/r8168/Config.in
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_R8168
|
||||
bool "r8168"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
A standalone driver for the RTL8168 Ethernet adapter.
|
||||
|
||||
https://github.com/fbelavenuto/r8168
|
||||
|
||||
comment "r8168 needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
2
external/r8168/r8168.hash
vendored
Normal file
2
external/r8168/r8168.hash
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 36c4ba7779259c0eee8d496ba600e5935dc8ce7b978e1dc023e1ee7de713d97e r8168-52c98bd764e6dd22ff17876afa655e9e11237cc9.tar.gz
|
||||
12
external/r8168/r8168.mk
vendored
Normal file
12
external/r8168/r8168.mk
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
#
|
||||
# r8168
|
||||
#
|
||||
################################################################################
|
||||
|
||||
R8168_VERSION = 52c98bd764e6dd22ff17876afa655e9e11237cc9
|
||||
R8168_SITE = $(call github,fbelavenuto,r8168,$(R8168_VERSION))
|
||||
R8168_LICENSE = GPL-2.0
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
||||
@@ -161,6 +161,7 @@ CONFIG_NETDEVICES=y
|
||||
CONFIG_NETCONSOLE=y
|
||||
CONFIG_VIRTIO_NET=m
|
||||
CONFIG_ET131X=m
|
||||
CONFIG_SLICOSS=m
|
||||
CONFIG_ACENIC=m
|
||||
CONFIG_AMD_XGBE=m
|
||||
CONFIG_ATL1=m
|
||||
@@ -170,11 +171,16 @@ CONFIG_ALX=m
|
||||
CONFIG_CNIC=m
|
||||
CONFIG_TIGON3=y
|
||||
CONFIG_BNX2X=m
|
||||
CONFIG_BNA=m
|
||||
CONFIG_CHELSIO_T1=m
|
||||
CONFIG_CHELSIO_T1_1G=y
|
||||
CONFIG_CHELSIO_T3=m
|
||||
CONFIG_CHELSIO_T4=m
|
||||
CONFIG_CHELSIO_T4VF=m
|
||||
CONFIG_NET_TULIP=y
|
||||
CONFIG_DL2K=m
|
||||
CONFIG_BE2NET=m
|
||||
CONFIG_HINIC=m
|
||||
CONFIG_E100=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000E=y
|
||||
@@ -183,6 +189,12 @@ CONFIG_IGBVF=m
|
||||
CONFIG_IXGB=m
|
||||
CONFIG_IXGBE=m
|
||||
CONFIG_IXGBEVF=m
|
||||
CONFIG_I40E=m
|
||||
CONFIG_ICE=m
|
||||
CONFIG_FM10K=m
|
||||
CONFIG_IGC=m
|
||||
CONFIG_JME=m
|
||||
CONFIG_MVMDIO=m
|
||||
CONFIG_SKGE=m
|
||||
CONFIG_SKY2=y
|
||||
CONFIG_MLX4_EN=m
|
||||
@@ -193,13 +205,23 @@ CONFIG_FORCEDETH=m
|
||||
CONFIG_QLCNIC=m
|
||||
CONFIG_NETXEN_NIC=m
|
||||
CONFIG_QED=m
|
||||
CONFIG_BNA=m
|
||||
CONFIG_QCOM_EMAC=m
|
||||
CONFIG_R8169=m
|
||||
CONFIG_SXGBE_ETH=m
|
||||
CONFIG_SFC=m
|
||||
# CONFIG_SFC_MCDI_MON is not set
|
||||
# CONFIG_SFC_MCDI_LOGGING is not set
|
||||
CONFIG_SFC_FALCON=m
|
||||
CONFIG_SIS190=m
|
||||
CONFIG_STMMAC_ETH=m
|
||||
CONFIG_SUNGEM=m
|
||||
CONFIG_CASSINI=m
|
||||
CONFIG_NIU=m
|
||||
CONFIG_DWC_XLGMAC=m
|
||||
CONFIG_TEHUTI=m
|
||||
CONFIG_VIA_VELOCITY=m
|
||||
CONFIG_XILINX_AXI_EMAC=m
|
||||
CONFIG_XILINX_LL_TEMAC=m
|
||||
CONFIG_REALTEK_PHY=y
|
||||
# CONFIG_USB_NET_DRIVERS is not set
|
||||
# CONFIG_WLAN is not set
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,7 +30,7 @@ null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
||||
|
||||
# Login in terminals
|
||||
::respawn:/sbin/agetty -a root --noclear tty1
|
||||
ttyS0::askfirst:/sbin/agetty -a root ttyS0 115200 vt100
|
||||
ttyS0::askfirst:/sbin/agetty -a root ttyS0 115200 linux
|
||||
::respawn:/usr/bin/ttyd login -f root
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
|
||||
@@ -74,11 +74,16 @@ EFI_BUG="`readModelKey "${MODEL}" "builds.${BUILD}.efi-bug"`"
|
||||
|
||||
LOADER_DISK="`blkid | grep 'LABEL="ARPL3"' | cut -d3 -f1`"
|
||||
BUS=`udevadm info --query property --name ${LOADER_DISK} | grep ID_BUS | cut -d= -f2`
|
||||
if [ "${BUS}" = "ata" ]; then
|
||||
SIZE=$((`df -BM | awk '/\/mnt\/p3/{print$2}' | tr 'M' ' '`+300))
|
||||
# Read SATADoM type
|
||||
DOM="`readModelKey "${MODEL}" "dom"`"
|
||||
fi
|
||||
|
||||
# Prepare command line
|
||||
CMDLINE_LINE=""
|
||||
[ ${EFI} -eq 1 ] && CMDLINE_LINE+="withefi "
|
||||
[ "${BUS}" = "ata" ] && CMDLINE_LINE+="synoboot_satadom=1 "
|
||||
[ "${BUS}" = "ata" ] && CMDLINE_LINE+="synoboot_satadom=${DOM} dom_szmax=${SIZE} "
|
||||
CMDLINE_LINE+="console=ttyS0,115200n8 earlyprintk log_buf_len=32M earlycon=uart8250,io,0x3f8,115200n8 elevator=elevator root=/dev/md0 loglevel=15"
|
||||
for KEY in ${!CMDLINE[@]}; do
|
||||
VALUE="${CMDLINE[${KEY}]}"
|
||||
@@ -92,6 +97,23 @@ CMDLINE_LINE=`echo ${CMDLINE_LINE} | sed 's/>/\\\\>/g'`
|
||||
echo -e "Model: \033[1;36m${MODEL}\033[0m"
|
||||
echo -e "Build: \033[1;36m${BUILD}\033[0m"
|
||||
echo -e "Cmdline:\n\033[1;36m${CMDLINE_LINE}\033[0m"
|
||||
|
||||
# Wait for an IP
|
||||
COUNT=0
|
||||
echo -n "IP: "
|
||||
while true; do
|
||||
IP=`ip route get 1.1.1.1 2>/dev/null | awk '{print$7}'`
|
||||
if [ -n "${IP}" ]; then
|
||||
echo -e "\033[1;32m${IP}\033[0m"
|
||||
break
|
||||
elif [ ${COUNT} -eq 8 ]; then
|
||||
echo -e "\033[1;31mERROR\033[0m"
|
||||
break
|
||||
fi
|
||||
COUNT=$((${COUNT}+1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo -e "\033[1;37mLoading DSM kernel...\033[0m"
|
||||
|
||||
# Executes DSM kernel via KEXEC
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
ARPL_VERSION="0.1-alpha"
|
||||
ARPL_VERSION="0.2-alpha5"
|
||||
|
||||
# Define paths
|
||||
TMP_PATH="/tmp"
|
||||
|
||||
@@ -75,9 +75,10 @@ writeConfigKey "pid" ${PID} "${USER_CONFIG_FILE}"
|
||||
|
||||
# Shows title
|
||||
clear
|
||||
TITLE="Welcome to Automated Redpill Loader ${ARPL_VERSION}"
|
||||
TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}"
|
||||
printf "\033[1;44m%*s\n" $COLUMNS ""
|
||||
printf "\033[1;32m%*s%*s \033[0m\n" $(((${#TITLE}+$COLUMNS)/2)) "${TITLE}" $(((${#TITLE}+$COLUMNS)/2-${#TITLE})) ""
|
||||
printf "\033[1;44m%*s\033[A\n" $COLUMNS ""
|
||||
printf "\033[1;32m%*s\033[0m\n" $(((${#TITLE}+$COLUMNS)/2)) "${TITLE}"
|
||||
printf "\033[1;44m%*s\033[0m\n" $COLUMNS ""
|
||||
|
||||
# Inform user
|
||||
|
||||
@@ -103,6 +103,8 @@ function modelMenu() {
|
||||
rm -f "${MOD_ZIMAGE_FILE}"
|
||||
rm -f "${MOD_RDGZ_FILE}"
|
||||
DIRTY=1
|
||||
# Remove addons
|
||||
writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -162,6 +164,344 @@ function serialMenu() {
|
||||
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Detect hardware
|
||||
function detectHw() {
|
||||
PLATFORM="`readModelKey "${MODEL}" "platform"`"
|
||||
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
|
||||
# Get modules not needed
|
||||
unset NOTNEEDED
|
||||
declare -A NOTNEEDED
|
||||
while read M; do
|
||||
NOTNEEDED[${M}]="1"
|
||||
done < <(readModelArray "${MODEL}" "builds.${BUILD}.modules-notneeded")
|
||||
unset DEVC DEVN
|
||||
declare -A DEVC
|
||||
declare -A DEVN
|
||||
while read L; do
|
||||
F=` sed -E 's/^([0-9a-z]{2}:[0-9a-z]{2}.[0-9a-z]{1})[^\[]*\[([0-9a-z]{4})\]: (.*)/\1|\2|\3/' <<<"${L}"`
|
||||
PCI="`cut -d'|' -f1 <<<"${F}"`"
|
||||
CLASS="`cut -d'|' -f2 <<<"${F}"`"
|
||||
NAME="`cut -d'|' -f3 <<<"${F}"`"
|
||||
MODULE="`lspci -ks "${PCI}" | awk '/Kernel driver in use/{print$5}'`"
|
||||
[ -z "${MODULE}" ] && continue
|
||||
# If is a virtio module, change id
|
||||
if grep -q "virtio" <<<"$MODULE"; then
|
||||
MODULE="virtio"
|
||||
fi
|
||||
CLASS=${CLASSES[${CLASS}]} # Get class name of module
|
||||
[ -z "${CLASS}" ] && continue # If no class, skip
|
||||
arrayExistItem "${MODULE}" "${!ADDONS[@]}" && continue # Check if module already added
|
||||
[ -n "${NOTNEEDED[${MODULE}]}" ] && continue # Check if module is not necessary
|
||||
# Add module to list
|
||||
DEVC[${MODULE}]="${CLASS}"
|
||||
DEVN[${MODULE}]="${NAME}"
|
||||
done < <(lspci -nn)
|
||||
if [ ${#DEVC[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --aspect 18 \
|
||||
--msgbox "No device detected or already added!" 0 0
|
||||
return
|
||||
fi
|
||||
for MODULE in ${!DEVC[@]}; do
|
||||
CLASS="${DEVC[${MODULE}]}"
|
||||
NAME="${DEVN[${MODULE}]}"
|
||||
TEXT="Found a ${NAME}\nClass ${CLASS}\nModule ${MODULE}\nAccept?"
|
||||
checkAddonExist "${MODULE}" "${PLATFORM}" "${KVER}" || TEXT+="\n\n\Z1PS: Addon for this module not found\Zn"
|
||||
dialog --backtitle "`backtitle`" --title "Found Hardware" \
|
||||
--colors --yesno "${TEXT}" 12 70
|
||||
[ $? -ne 0 ] && continue
|
||||
dialog --backtitle "`backtitle`" --title "params" \
|
||||
--inputbox "Type a opcional params to module" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<${TMP_PATH}/resp`"
|
||||
ADDONS["${MODULE}"]="${VALUE}"
|
||||
writeConfigKey "addons.${MODULE}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Manage addons/drivers
|
||||
function addonMenu() {
|
||||
# Read 'platform' and kernel version to check if addon exists
|
||||
PLATFORM="`readModelKey "${MODEL}" "platform"`"
|
||||
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
|
||||
# Read addons from user config
|
||||
unset ADDONS
|
||||
declare -A ADDONS
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && ADDONS["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
||||
NEXT="h"
|
||||
# Loop menu
|
||||
while true; do
|
||||
dialog --backtitle "`backtitle`" --default-item ${NEXT} \
|
||||
--menu "Choose a option" 0 0 0 \
|
||||
h "Detect hardware" \
|
||||
a "Add an addon" \
|
||||
d "Delete addon(s)" \
|
||||
s "Show user addons" \
|
||||
m "Show all available addons" \
|
||||
e "Exit" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
h)
|
||||
detectHw
|
||||
NEXT='e'
|
||||
;;
|
||||
a) NEXT='a'
|
||||
rm "${TMP_PATH}/menu"
|
||||
while read ADDON DESC; do
|
||||
arrayExistItem "${ADDON}" "${!ADDONS[@]}" && continue # Check if addon has already been added
|
||||
echo "${ADDON} \"${DESC}\"" >> "${TMP_PATH}/menu"
|
||||
done < <(availableAddons "${PLATFORM}" "${KVER}")
|
||||
if [ ! -f "${TMP_PATH}/menu" ] ; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No available addons to add" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --menu "Select an addon" 0 0 0 \
|
||||
--file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDON="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${ADDON}" ] && continue
|
||||
dialog --backtitle "`backtitle`" --title "params" \
|
||||
--inputbox "Type a opcional params to addon" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDONS[${ADDON}]="`<"${TMP_PATH}/resp"`"
|
||||
writeConfigKey "addons.${ADDON}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
;;
|
||||
d) NEXT='d'
|
||||
if [ ${#ADDONS[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user addons to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!ADDONS[@]}"; do
|
||||
ITEMS+="${I} ${I} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --no-tags \
|
||||
--checklist "Select addon to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDON="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${ADDON}" ] && continue
|
||||
for I in ${ADDON}; do
|
||||
unset ADDONS[${I}]
|
||||
deleteConfigKey "addons.${I}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
DIRTY=1
|
||||
;;
|
||||
s) NEXT='s'
|
||||
ITEMS=""
|
||||
for KEY in ${!ADDONS[@]}; do
|
||||
ITEMS+="${KEY}: ${ADDONS[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User addons" \
|
||||
--msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m) NEXT='m'
|
||||
MSG=""
|
||||
while read MODULE DESC; do
|
||||
if arrayExistItem "${MODULE}" "${!ADDONS[@]}"; then
|
||||
MSG+="\Z4${MODULE}\Zn"
|
||||
else
|
||||
MSG+="${MODULE}"
|
||||
fi
|
||||
MSG+=": \Z5${DESC}\Zn\n"
|
||||
done < <(availableAddons "${PLATFORM}" "${KVER}")
|
||||
dialog --backtitle "`backtitle`" --title "Available addons" \
|
||||
--colors --msgbox "${MSG}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function cmdlineMenu() {
|
||||
unset CMDLINE
|
||||
declare -A CMDLINE
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && CMDLINE["${KEY}"]="${VALUE}"
|
||||
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"
|
||||
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
|
||||
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
|
||||
--file "${TMP_PATH}/menu" 2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
a)
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--inputbox "Type a name of cmdline" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
NAME="`sed 's/://g' <"${TMP_PATH}/resp"`"
|
||||
[ -z "${NAME}" ] && continue
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--inputbox "Type a value of '${NAME}' cmdline" 0 0 "${CMDLINE[${NAME}]}" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<"${TMP_PATH}/resp"`"
|
||||
CMDLINE[${NAME}]="${VALUE}"
|
||||
writeConfigKey "cmdline.${NAME}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
;;
|
||||
d)
|
||||
if [ ${#CMDLINE[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user cmdline to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!CMDLINE[@]}"; do
|
||||
ITEMS+="${I} ${CMDLINE[${I}]} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" \
|
||||
--checklist "Select cmdline to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
RESP=`<"${TMP_PATH}/resp"`
|
||||
[ -z "${RESP}" ] && continue
|
||||
for I in ${RESP}; do
|
||||
unset CMDLINE[${I}]
|
||||
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
|
||||
NAME=`lspci -s "${PCI}" | sed "s/\ .*://"`
|
||||
TEXT+="\Zb${NAME}\Zn\nPorts: "
|
||||
unset HOSTPORTS
|
||||
declare -A HOSTPORTS
|
||||
while read LINE; do
|
||||
ATAPORT="`echo ${LINE} | grep -o 'ata[0-9]*'`"
|
||||
PORT=`echo ${ATAPORT} | sed 's/ata//'`
|
||||
HOSTPORTS[${PORT}]=`echo ${LINE} | grep -o 'host[0-9]*$'`
|
||||
done < <(ls -l /sys/class/scsi_host | fgrep "${PCI}")
|
||||
while read PORT; do
|
||||
ls -l /sys/block | fgrep -q "${PCI}/ata${PORT}" && ATTACH=1 || ATTACH=0
|
||||
PCMD=`cat /sys/class/scsi_host/${HOSTPORTS[${PORT}]}/ahci_port_cmd`
|
||||
[ "${PCMD}" = "0" ] && DUMMY=1 || DUMMY=0
|
||||
[ ${ATTACH} -eq 1 ] && TEXT+="\Z2\Zb"
|
||||
[ ${DUMMY} -eq 1 ] && TEXT+="\Z1"
|
||||
TEXT+="${PORT}\Zn "
|
||||
NUMPORTS=$((${NUMPORTS}+1))
|
||||
done < <(echo ${!HOSTPORTS[@]} | tr ' ' '\n' | sort -n)
|
||||
TEXT+="\n"
|
||||
done
|
||||
TEXT+="\nTotal of ports: ${NUMPORTS}\n"
|
||||
TEXT+="\nPorts with color \Z1red\Zn as DUMMY, color \Z2\Zbgreen\Zn has drive connected."
|
||||
dialog --backtitle "`backtitle`" --colors --aspect 18 \
|
||||
--msgbox "${TEXT}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function synoinfoMenu() {
|
||||
# Read synoinfo from user config
|
||||
unset SYNOINFO
|
||||
declare -A SYNOINFO
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && SYNOINFO["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "synoinfo" "${USER_CONFIG_FILE}")
|
||||
|
||||
echo "a \"Add/edit an synoinfo item\"" > "${TMP_PATH}/menu"
|
||||
echo "d \"Delete synoinfo item(s)\"" >> "${TMP_PATH}/menu"
|
||||
echo "s \"Show user synoinfo\"" >> "${TMP_PATH}/menu"
|
||||
echo "m \"Show model/build synoinfo\"" >> "${TMP_PATH}/menu"
|
||||
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
|
||||
|
||||
# menu loop
|
||||
while true; do
|
||||
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
|
||||
--file "${TMP_PATH}/menu" 2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
a)
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--inputbox "Type a name of synoinfo variable" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
NAME="`sed 's/://g' <"${TMP_PATH}/resp"`"
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--inputbox "Type a value of '${NAME}' variable" 0 0 "${SYNOINFO[${NAME}]}" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<"${TMP_PATH}/resp"`"
|
||||
SYNOINFO[${NAME}]="${VALUE}"
|
||||
writeConfigKey "synoinfo.${NAME}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
;;
|
||||
d)
|
||||
if [ ${#SYNOINFO[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user synoinfo to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!SYNOINFO[@]}"; do
|
||||
ITEMS+="${I} ${SYNOINFO[${I}]} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" \
|
||||
--checklist "Select synoinfo to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
RESP=`<"${TMP_PATH}/resp"`
|
||||
[ -z "${RESP}" ] && continue
|
||||
for I in ${RESP}; do
|
||||
unset SYNOINFO[${I}]
|
||||
deleteConfigKey "synoinfo.${I}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
DIRTY=1
|
||||
;;
|
||||
s)
|
||||
ITEMS=""
|
||||
for KEY in ${!SYNOINFO[@]}; do
|
||||
ITEMS+="${KEY}: ${SYNOINFO[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m)
|
||||
ITEMS=""
|
||||
while IFS="=" read KEY VALUE; do
|
||||
ITEMS+="${KEY}: ${VALUE}\n"
|
||||
done < <(readModelMap "${MODEL}" "builds.${BUILD}.synoinfo")
|
||||
dialog --backtitle "`backtitle`" --title "Model/build synoinfo" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Where the magic happens :D
|
||||
function make() {
|
||||
@@ -330,7 +670,7 @@ function make() {
|
||||
--msgbox "zImage not patched:\n`<"${LOG_FILE}"`" 0 0
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
/opt/arpl/ramdisk-patch.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Error" --aspect 18 \
|
||||
@@ -347,391 +687,6 @@ function make() {
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Detect hardware
|
||||
function detectHw() {
|
||||
PLATFORM="`readModelKey "${MODEL}" "platform"`"
|
||||
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
|
||||
# Get modules not needed
|
||||
unset NOTNEEDED
|
||||
declare -A NOTNEEDED
|
||||
while read M; do
|
||||
NOTNEEDED[${M}]="1"
|
||||
done < <(readModelArray "${MODEL}" "builds.${BUILD}.modules-notneeded")
|
||||
unset DEVC DEVN
|
||||
declare -A DEVC
|
||||
declare -A DEVN
|
||||
while read L; do
|
||||
F=` sed -E 's/^([0-9a-z]{2}:[0-9a-z]{2}.[0-9a-z]{1})[^\[]*\[([0-9a-z]{4})\]: (.*)/\1|\2|\3/' <<<"${L}"`
|
||||
PCI="`cut -d'|' -f1 <<<"${F}"`"
|
||||
CLASS="`cut -d'|' -f2 <<<"${F}"`"
|
||||
NAME="`cut -d'|' -f3 <<<"${F}"`"
|
||||
MODULE="`lspci -ks "${PCI}" | awk '/Kernel driver in use/{print$5}'`"
|
||||
[ -z "${MODULE}" ] && continue
|
||||
# If is a virtio module, change id
|
||||
if grep -q "virtio" <<<"$MODULE"; then
|
||||
MODULE="virtio"
|
||||
fi
|
||||
CLASS=${CLASSES[${CLASS}]} # Get class name of module
|
||||
[ -z "${CLASS}" ] && continue # If no class, skip
|
||||
arrayExistItem "${MODULE}" "${!ADDONS[@]}" && continue # Check if module already added
|
||||
[ -n "${NOTNEEDED[${MODULE}]}" ] && continue # Check if module is not necessary
|
||||
# Add module to list
|
||||
DEVC[${MODULE}]="${CLASS}"
|
||||
DEVN[${MODULE}]="${NAME}"
|
||||
done < <(lspci -nn)
|
||||
if [ ${#DEVC[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --aspect 18 \
|
||||
--msgbox "No device detected or already added!" 0 0
|
||||
return
|
||||
fi
|
||||
for MODULE in ${!DEVC[@]}; do
|
||||
CLASS="${DEVC[${MODULE}]}"
|
||||
NAME="${DEVN[${MODULE}]}"
|
||||
TEXT="Found a ${NAME}\nClass ${CLASS}\nModule ${MODULE}\nAccept?"
|
||||
checkAddonExist "${MODULE}" "${PLATFORM}" "${KVER}" || TEXT+="\n\n\Z1PS: Addon for this module not found\Zn"
|
||||
dialog --backtitle "`backtitle`" --title "Found Hardware" \
|
||||
--colors --yesno "${TEXT}" 12 70
|
||||
[ $? -ne 0 ] && continue
|
||||
dialog --backtitle "`backtitle`" --title "params" \
|
||||
--inputbox "Type a opcional params to module" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<${TMP_PATH}/resp`"
|
||||
ADDONS["${MODULE}"]="${VALUE}"
|
||||
writeConfigKey "addons.${MODULE}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Manage addons/drivers
|
||||
function addonMenu() {
|
||||
# Read 'platform' and kernel version to check if addon exists
|
||||
PLATFORM="`readModelKey "${MODEL}" "platform"`"
|
||||
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
|
||||
# Read addons from user config
|
||||
unset ADDONS
|
||||
declare -A ADDONS
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && ADDONS["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
||||
NEXT="h"
|
||||
# Loop menu
|
||||
while true; do
|
||||
dialog --backtitle "`backtitle`" --default-item ${NEXT} \
|
||||
--menu "Choose a option" 0 0 0 \
|
||||
h "Detect hardware" \
|
||||
a "Add an addon" \
|
||||
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
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
h)
|
||||
detectHw
|
||||
NEXT='e'
|
||||
;;
|
||||
a) NEXT='a'
|
||||
rm "${TMP_PATH}/menu"
|
||||
while read ADDON DESC; do
|
||||
arrayExistItem "${ADDON}" "${!ADDONS[@]}" && continue # Check if addon has already been added
|
||||
echo "${ADDON} \"${DESC}\"" >> "${TMP_PATH}/menu"
|
||||
done < <(availableAddons "${PLATFORM}" "${KVER}")
|
||||
if [ ! -f "${TMP_PATH}/menu" ] ; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No available addons to add" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --menu "Select an addon" 0 0 0 \
|
||||
--file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDON="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${ADDON}" ] && continue
|
||||
dialog --backtitle "`backtitle`" --title "params" \
|
||||
--inputbox "Type a opcional params to addon" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDONS[${ADDON}]="`<"${TMP_PATH}/resp"`"
|
||||
writeConfigKey "addons.${ADDON}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
;;
|
||||
d) NEXT='d'
|
||||
if [ ${#ADDONS[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user addons to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!ADDONS[@]}"; do
|
||||
ITEMS+="${I} ${I} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --no-tags \
|
||||
--checklist "Select addon to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
ADDON="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${ADDON}" ] && continue
|
||||
for I in ${ADDON}; do
|
||||
unset ADDONS[${I}]
|
||||
deleteConfigKey "addons.${I}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
DIRTY=1
|
||||
;;
|
||||
s) NEXT='s'
|
||||
ITEMS=""
|
||||
for KEY in ${!ADDONS[@]}; do
|
||||
ITEMS+="${KEY}: ${ADDONS[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User addons" \
|
||||
--msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m) NEXT='m'
|
||||
MSG=""
|
||||
while read MODULE DESC; do
|
||||
if arrayExistItem "${MODULE}" "${!ADDONS[@]}"; then
|
||||
MSG+="\Z4${MODULE}\Zn"
|
||||
else
|
||||
MSG+="${MODULE}"
|
||||
fi
|
||||
MSG+=": \Z5${DESC}\Zn\n"
|
||||
done < <(availableAddons "${PLATFORM}" "${KVER}")
|
||||
dialog --backtitle "`backtitle`" --title "Available addons" \
|
||||
--colors --msgbox "${MSG}" 0 0
|
||||
;;
|
||||
o) dialog --backtitle "`backtitle`" \
|
||||
--inputbox "please enter the URL to download" 0 0 \
|
||||
"https://raw.githubusercontent.com/fbelavenuto/arpl-addons/main/" \
|
||||
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
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function cmdlineMenu() {
|
||||
# Read from user config
|
||||
DT="`readModelKey "${MODEL}" "dt"`"
|
||||
unset CMDLINE
|
||||
declare -A CMDLINE
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && CMDLINE["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "cmdline" "${USER_CONFIG_FILE}")
|
||||
# Loop menu
|
||||
while true; do
|
||||
|
||||
echo "a \"Add/edit an cmdline item\"" > "${TMP_PATH}/menu"
|
||||
echo "d \"Delete cmdline item(s)\"" >> "${TMP_PATH}/menu"
|
||||
echo "s \"Show user cmdline\"" >> "${TMP_PATH}/menu"
|
||||
echo "m \"Show model/build cmdline\"" >> "${TMP_PATH}/menu"
|
||||
if [ "${DT}" != "true" ]; then
|
||||
echo "h \"Change maxdisks\"" >> "${TMP_PATH}/menu"
|
||||
echo "u \"Show SATA(s) # ports and drives\"" >> "${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
|
||||
|
||||
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
|
||||
--file "${TMP_PATH}/menu" 2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
a)
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--inputbox "Type a name of cmdline" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
NAME="`sed 's/://g' <"${TMP_PATH}/resp"`"
|
||||
[ -z "${NAME}" ] continue
|
||||
dialog --backtitle "`backtitle`" --title "User cmdline" \
|
||||
--inputbox "Type a value of '${NAME}' cmdline" 0 0 "${CMDLINE[${NAME}]}" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<"${TMP_PATH}/resp"`"
|
||||
CMDLINE[${NAME}]="${VALUE}"
|
||||
writeConfigKey "cmdline.${NAME}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
;;
|
||||
d)
|
||||
if [ ${#CMDLINE[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user cmdline to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!CMDLINE[@]}"; do
|
||||
ITEMS+="${I} ${CMDLINE[${I}]} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" \
|
||||
--checklist "Select cmdline to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
RESP=`<"${TMP_PATH}/resp"`
|
||||
[ -z "${RESP}" ] && continue
|
||||
for I in ${RESP}; do
|
||||
unset CMDLINE[${I}]
|
||||
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
|
||||
;;
|
||||
h) MODEL_DISKS="`readModelKey "${MODEL}" "disks"`"
|
||||
dialog --backtitle "`backtitle`" --title "Change max of disks" \
|
||||
--inputbox "${MODEL} disks: ${MODEL_DISKS}\nType the desired number of disks (1-26)" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<"${TMP_PATH}/resp"`"
|
||||
[ -z "${VALUE}" ] && continue
|
||||
if [ ${VALUE} -ge 1 -a ${VALUE} -le 26 ]; then
|
||||
CMDLINE['maxdisks']="${VALUE}"
|
||||
writeConfigKey "cmdline.maxdisks" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
INTPORTCFG=""
|
||||
for I in `seq 1 ${VALUE}`; do INTPORTCFG+="1"; done
|
||||
INTPORTCFG=`printf "%x" "$((2#${INTPORTCFG}))"`
|
||||
CMDLINE['internalportcfg']="${INTPORTCFG}"
|
||||
writeConfigKey "cmdline.internalportcfg" "${INTPORTCFG}" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
dialog --backtitle "`backtitle`" --msgbox "Invalid number" 0 0
|
||||
fi
|
||||
;;
|
||||
u) TEXT=""
|
||||
for PCI in `lspci -d ::106 | awk '{print$1}'`; do
|
||||
NAME=`lspci -s "${PCI}" | sed "s/\ .*://"`
|
||||
TEXT+="\Zb${NAME}\Zn\nPorts: "
|
||||
unset HOSTPORTS
|
||||
declare -A HOSTPORTS
|
||||
while read LINE; do
|
||||
ATAPORT="`echo ${LINE} | grep -o 'ata[0-9]*'`"
|
||||
PORT=`echo ${ATAPORT} | sed 's/ata//'`
|
||||
HOSTPORTS[${PORT}]=`echo ${LINE} | grep -o 'host[0-9]*$'`
|
||||
done < <(ls -l /sys/class/scsi_host | fgrep "${PCI}")
|
||||
while read PORT; do
|
||||
ls -l /sys/block | fgrep -q "${PCI}/ata${PORT}" && ATTACH=1 || ATTACH=0
|
||||
[ `cat /sys/class/scsi_host/${HOSTPORTS[${PORT}]}/ahci_port_cmd` -eq 0 ] && DUMMY=1 || DUMMY=0
|
||||
[ ${ATTACH} -eq 1 ] && TEXT+="\Z2\Zb"
|
||||
[ ${DUMMY} -eq 1 ] && TEXT+="\Z1"
|
||||
TEXT+="${PORT}\Zn "
|
||||
done < <(echo ${!HOSTPORTS[@]} | tr ' ' '\n' | sort -n)
|
||||
TEXT+="\n"
|
||||
done
|
||||
TEXT+="\nPorts with color \Z1red\Zn as DUMMY, color \Z2\Zbgreen\Zn has drive connected\n"
|
||||
TEXT+="Use this information to assist in creating SataPortMap, DiskIdxMap and sata_remap"
|
||||
dialog --backtitle "`backtitle`" --colors --aspect 18 \
|
||||
--msgbox "${TEXT}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function synoinfoMenu() {
|
||||
# Read synoinfo from user config
|
||||
unset SYNOINFO
|
||||
declare -A SYNOINFO
|
||||
while IFS="=" read KEY VALUE; do
|
||||
[ -n "${KEY}" ] && SYNOINFO["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "synoinfo" "${USER_CONFIG_FILE}")
|
||||
# menu loop
|
||||
while true; do
|
||||
dialog --backtitle "`backtitle`" \
|
||||
--menu "Choose a option" 0 0 0 \
|
||||
a "Add/edit an synoinfo item" \
|
||||
d "Delete synoinfo item(s)" \
|
||||
s "Show user synoinfo" \
|
||||
m "Show model/build synoinfo" \
|
||||
e "Exit" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
a)
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--inputbox "Type a name of synoinfo variable" 0 0 \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
NAME="`sed 's/://g' <"${TMP_PATH}/resp"`"
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--inputbox "Type a value of '${NAME}' variable" 0 0 "${SYNOINFO[${NAME}]}" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && continue
|
||||
VALUE="`<"${TMP_PATH}/resp"`"
|
||||
SYNOINFO[${NAME}]="${VALUE}"
|
||||
writeConfigKey "synoinfo.${NAME}" "${VALUE}" "${USER_CONFIG_FILE}"
|
||||
DIRTY=1
|
||||
;;
|
||||
d)
|
||||
if [ ${#SYNOINFO[@]} -eq 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --msgbox "No user synoinfo to remove" 0 0
|
||||
continue
|
||||
fi
|
||||
ITEMS=""
|
||||
for I in "${!SYNOINFO[@]}"; do
|
||||
ITEMS+="${I} ${SYNOINFO[${I}]} off "
|
||||
done
|
||||
dialog --backtitle "`backtitle`" \
|
||||
--checklist "Select synoinfo to remove" 0 0 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && continue
|
||||
RESP=`<"${TMP_PATH}/resp"`
|
||||
[ -z "${RESP}" ] && continue
|
||||
for I in ${RESP}; do
|
||||
unset SYNOINFO[${I}]
|
||||
deleteConfigKey "synoinfo.${I}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
DIRTY=1
|
||||
;;
|
||||
s)
|
||||
ITEMS=""
|
||||
for KEY in ${!SYNOINFO[@]}; do
|
||||
ITEMS+="${KEY}: ${SYNOINFO[$KEY]}\n"
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "User synoinfo" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
m)
|
||||
ITEMS=""
|
||||
while IFS="=" read KEY VALUE; do
|
||||
ITEMS+="${KEY}: ${VALUE}\n"
|
||||
done < <(readModelMap "${MODEL}" "builds.${BUILD}.synoinfo")
|
||||
dialog --backtitle "`backtitle`" --title "Model/build synoinfo" \
|
||||
--aspect 18 --msgbox "${ITEMS}" 0 0
|
||||
;;
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Calls boot.sh to boot into DSM kernel/ramdisk
|
||||
function boot() {
|
||||
@@ -787,6 +742,122 @@ function keymapMenu() {
|
||||
zcat /usr/share/keymaps/i386/qwerty/${KEYMAP}.map.gz | loadkeys
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
function updateMenu() {
|
||||
while true; do
|
||||
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
|
||||
a "Update arpl" \
|
||||
d "Update addons" \
|
||||
l "Update LKMs" \
|
||||
e "Exit" \
|
||||
2>${TMP_PATH}/resp
|
||||
[ $? -ne 0 ] && return
|
||||
case "`<${TMP_PATH}/resp`" in
|
||||
a)
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--infobox "Checking last version" 0 0
|
||||
ACTUALVERSION="v${ARPL_VERSION}"
|
||||
TAG="`curl --insecure -s https://api.github.com/repos/fbelavenuto/arpl/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`"
|
||||
if [ $? -ne 0 -o -z "${TAG}" ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--msgbox "Error checking new version" 0 0
|
||||
continue
|
||||
fi
|
||||
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--yesno "No new version. Actual version is ${ACTUALVERSION}\nForce update?" 0 0
|
||||
[ $? -ne 0 ] && continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--infobox "Downloading last version ${TAG}" 0 0
|
||||
curl --insecure -s -L "https://github.com/fbelavenuto/arpl/releases/download/${TAG}/bzImage" -o /tmp/bzImage
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--msgbox "Error downloading bzImage" 0 0
|
||||
continue
|
||||
fi
|
||||
curl --insecure -s -L "https://github.com/fbelavenuto/arpl/releases/download/${TAG}/rootfs.cpio.xz" -o /tmp/rootfs.cpio.xz
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--msgbox "Error downloading rootfs.cpio.xz" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--infobox "Installing new files" 0 0
|
||||
mv /tmp/bzImage /mnt/p1/bzImage-arpl
|
||||
mv /tmp/rootfs.cpio.xz /mnt/p1/initrd-arpl
|
||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||
--yesno "Arpl updated with success to ${TAG}!\nReboot?" 0 0
|
||||
[ $? -ne 0 ] && continue
|
||||
reboot
|
||||
exit
|
||||
;;
|
||||
|
||||
d)
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--infobox "Checking last version" 0 0
|
||||
TAG=`curl --insecure -s https://api.github.com/repos/fbelavenuto/arpl-addons/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
if [ $? -ne 0 -o -z "${TAG}" ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--msgbox "Error checking new version" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--infobox "Downloading last version" 0 0
|
||||
curl --insecure -s -L "https://github.com/fbelavenuto/arpl-addons/releases/download/${TAG}/addons.zip" -o /tmp/addons.zip
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--msgbox "Error downloading new version" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--infobox "Extracting last version" 0 0
|
||||
rm -rf /tmp/addons
|
||||
mkdir -p /tmp/addons
|
||||
unzip /tmp/addons.zip -d /tmp/addons >/dev/null 2>&1
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--infobox "Installing new addons" 0 0
|
||||
DEST_PATH="/mnt/p3/addons"
|
||||
for PKG in `ls /tmp/addons/*.addon`; do
|
||||
ADDON=`basename ${PKG} | sed 's|.addon||'`
|
||||
rm -rf "${DEST_PATH}/${ADDON}"
|
||||
mkdir -p "${DEST_PATH}/${ADDON}"
|
||||
tar xaf "${PKG}" -C "${DEST_PATH}/${ADDON}" >/dev/null 2>&1
|
||||
done
|
||||
dialog --backtitle "`backtitle`" --title "Update addons" --aspect 18 \
|
||||
--msgbox "Addons updated with success!" 0 0
|
||||
;;
|
||||
|
||||
l)
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--infobox "Checking last version" 0 0
|
||||
TAG=`curl --insecure -s https://api.github.com/repos/fbelavenuto/redpill-lkm/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
|
||||
if [ $? -ne 0 -o -z "${TAG}" ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--msgbox "Error checking new version" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--infobox "Downloading last version" 0 0
|
||||
curl --insecure -s -L "https://github.com/fbelavenuto/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o /tmp/rp-lkms.zip
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--msgbox "Error downloading new version" 0 0
|
||||
continue
|
||||
fi
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--infobox "Extracting last version" 0 0
|
||||
rm -rf /mnt/p3/lkms/*
|
||||
unzip /tmp/rp-lkms.zip -d /mnt/p3/lkms >/dev/null 2>&1
|
||||
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
|
||||
--msgbox "LKMs updated with success!" 0 0
|
||||
;;
|
||||
|
||||
e) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
@@ -809,6 +880,7 @@ while true; do
|
||||
echo "u \"Edit user config file manually\"" >> "${TMP_PATH}/menu"
|
||||
echo "k \"Choose a keymap\" " >> "${TMP_PATH}/menu"
|
||||
[ ${RAMCACHE} -eq 0 -a -d "${CACHE_PATH}/dl" ] && echo "c \"Clean disk cache\"" >> "${TMP_PATH}/menu"
|
||||
echo "p \"Update menu\"" >> "${TMP_PATH}/menu"
|
||||
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
|
||||
dialog --clear --default-item ${NEXT} --backtitle "`backtitle`" --colors \
|
||||
--menu "Choose the option" 0 0 0 --file "${TMP_PATH}/menu" \
|
||||
@@ -831,8 +903,10 @@ while true; do
|
||||
k) keymapMenu ;;
|
||||
c) dialog --backtitle "`backtitle`" --title "Cleaning" --aspect 18 \
|
||||
--prgbox "rm -rfv \"${CACHE_PATH}/dl\"" 0 0 ;;
|
||||
p) updateMenu ;;
|
||||
e) break ;;
|
||||
esac
|
||||
done
|
||||
clear
|
||||
echo -e "Call \033[1;32mmenu.sh\033[0m to return to menu"
|
||||
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
id: "DS1621+"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- amd_xgbe
|
||||
- marvell10g
|
||||
- i40e
|
||||
- r8168
|
||||
- r8169
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
- mv14xx
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
@@ -33,6 +36,7 @@ cmdline: &cmdline
|
||||
syno_ttyS0: "serial,0x3f8"
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
platform: "v1000"
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "2080"
|
||||
@@ -59,6 +63,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
|
||||
@@ -80,5 +85,6 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
id: "DS2422+"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- amd_xgbe
|
||||
- marvell10g
|
||||
- i40e
|
||||
- r8168
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
- mv14xx
|
||||
synoinfo: &synoinfo
|
||||
support_disk_compatibility: "no"
|
||||
support_memory_compatibility: "no"
|
||||
rss_server: "http://example.com/null.xml"
|
||||
rss_server_ssl: "https://example.com/null.xml"
|
||||
rss_server_v2: "https://example.com/autoupdate/v2/getList"
|
||||
@@ -29,6 +33,7 @@ cmdline: &cmdline
|
||||
syno_ttyS0: "serial,0x3f8"
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
platform: "v1000"
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "0000"
|
||||
@@ -55,6 +60,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
id: "DS3615xs"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
@@ -24,7 +25,6 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "bromolow"
|
||||
serial:
|
||||
prefix:
|
||||
@@ -35,6 +35,7 @@ serial:
|
||||
middle: "LWN"
|
||||
suffix: "numeric"
|
||||
disks: 12
|
||||
dom: 1
|
||||
builds:
|
||||
42218:
|
||||
ver: "7.0.1"
|
||||
@@ -54,6 +55,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -76,6 +78,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
id: "DS3617xs"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
@@ -9,6 +10,7 @@ modules-notneeded: &modules-notneeded
|
||||
- xhci_pci
|
||||
- xhci_hcd
|
||||
- uhci_hcd
|
||||
- mv14xx
|
||||
synoinfo: &synoinfo
|
||||
esataportcfg: "0x00"
|
||||
usbportcfg: "0x8700"
|
||||
@@ -27,8 +29,8 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "broadwell"
|
||||
dom: 1
|
||||
serial:
|
||||
prefix:
|
||||
- "1130"
|
||||
@@ -57,6 +59,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -79,6 +82,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
id: "DS3622xs+"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- i40e
|
||||
- r8168
|
||||
- r8169
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- r8168
|
||||
- r8169
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
- mv14xx
|
||||
synoinfo: &synoinfo
|
||||
esataportcfg: "0x00"
|
||||
support_bde_internal_10g: "no"
|
||||
@@ -34,8 +36,8 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "broadwellnk"
|
||||
dom: 1
|
||||
serial:
|
||||
prefix:
|
||||
- "2030"
|
||||
@@ -64,6 +66,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -86,6 +89,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
id: "DS918+"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- i40e
|
||||
- ixgbe
|
||||
- ata_piix
|
||||
- r8168
|
||||
- r8169
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
synoinfo: &synoinfo
|
||||
esataportcfg: "0x00"
|
||||
@@ -30,8 +29,8 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "apollolake"
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "1780"
|
||||
@@ -62,6 +61,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -84,6 +84,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
id: "DS920+"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- ata_piix
|
||||
- r8168
|
||||
- r8169
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
synoinfo: &synoinfo
|
||||
rss_server: "http://example.com/null.xml"
|
||||
@@ -28,6 +25,8 @@ cmdline: &cmdline
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
vender_format_version: 2
|
||||
platform: "geminilake"
|
||||
dom: 2
|
||||
dt: true
|
||||
serial:
|
||||
prefix:
|
||||
- "2030"
|
||||
@@ -50,12 +49,13 @@ builds:
|
||||
<<: *synoinfo
|
||||
pat:
|
||||
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS920%2B_42218.pat"
|
||||
hash: "73053911bd118b432d5a2036dc62d518eed83b78b32c1eb23696d59725a14892"
|
||||
ramdisk-hash: "e39890f4bef2e5e4eea956996b0dd92d081c6d9e7c393331131e65bbad1a17a9"
|
||||
zimage-hash: "74d513aaa3e30d8aa4f80e202d94a68a552e9c0472f8470e133ad29080556f55"
|
||||
hash: "fe2a4648f76adeb65c3230632503ea36bbac64ee88b459eb9bfb5f3b8c8cebb3"
|
||||
ramdisk-hash: "f7dd1317f24ec6b9bac839e37f66b59030218c7f97c06f73f1f54ed0f892c4aa"
|
||||
zimage-hash: "346b68f662b50f47d3ee6c2bc9de6302e4b60436142c24ee88b620c7afd1ba06"
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
|
||||
@@ -77,5 +77,6 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
id: "DVA1622"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- ata_piix
|
||||
- r8168
|
||||
- r8169
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
|
||||
- i915
|
||||
- drm
|
||||
- fb
|
||||
- fbdev
|
||||
- video
|
||||
- backlight
|
||||
- button
|
||||
synoinfo: &synoinfo
|
||||
buzzeroffen: "0xffff"
|
||||
rss_server: "http://example.com/null.xml"
|
||||
@@ -31,6 +34,7 @@ cmdline: &cmdline
|
||||
syno_ttyS0: "serial,0x3f8"
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
platform: "geminilake"
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "2030"
|
||||
@@ -60,5 +64,6 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
id: "DVA3221"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- ata_piix
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
@@ -29,8 +29,8 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "denverton"
|
||||
dom: 2
|
||||
serial:
|
||||
prefix:
|
||||
- "2030"
|
||||
@@ -61,6 +61,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -83,6 +84,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
id: "FS6400"
|
||||
modules-notneeded: &modules-notneeded
|
||||
- ahci
|
||||
- i40e
|
||||
- ixgbe
|
||||
- igb
|
||||
- e1000e
|
||||
- dca
|
||||
- etxhci_hcd
|
||||
- xhci_hcd
|
||||
- ehci-pci
|
||||
- uhci_hcd
|
||||
- r8168
|
||||
- mpt3sas
|
||||
synoinfo: &synoinfo
|
||||
# support_bde_internal_10g: "no"
|
||||
# support_disk_compatibility: "no"
|
||||
# esataportcfg: "0x00"
|
||||
# usbportcfg: "0x10000"
|
||||
rss_server: "http://example.com/null.xml"
|
||||
rss_server_ssl: "https://example.com/null.xml"
|
||||
rss_server_v2: "https://example.com/autoupdate/v2/getList"
|
||||
update_server: "http://example.com/"
|
||||
update_server_ssl: "https://example.com/"
|
||||
small_info_path: "https://example.com/null"
|
||||
updateurl: "http://example.com/"
|
||||
myds_region_api_base_url: "https://example.com"
|
||||
security_version_server: "https://example.com/smallupdate"
|
||||
cmdline: &cmdline
|
||||
# SMBusHddDynamicPower: 1
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
synoboot2:
|
||||
syno_ttyS0: "serial,0x3f8"
|
||||
syno_ttyS1: "serial,0x2f8"
|
||||
platform: "purley"
|
||||
serial:
|
||||
prefix:
|
||||
- "1960"
|
||||
middle: "PSN"
|
||||
suffix: "numeric"
|
||||
disks: 24
|
||||
dt: true
|
||||
builds:
|
||||
42218:
|
||||
ver: "7.0.1"
|
||||
kver: "4.4.180"
|
||||
rd-compressed: false
|
||||
efi-bug: no
|
||||
modules-notneeded: *modules-notneeded
|
||||
cmdline:
|
||||
<<: *cmdline
|
||||
synoinfo:
|
||||
<<: *synoinfo
|
||||
pat:
|
||||
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_FS6400_42218.pat"
|
||||
hash: "0e5e15398fb50d21ac52e0fbae199d5bacebc52f04933be5825c710f9de874ea"
|
||||
ramdisk-hash: "eebaf0236230956fc1a9d8ca8c8f86143da959b631cad9c311152a4e644d17a0"
|
||||
zimage-hash: "cbed16da4970c41e9b9c6797c57c70b12f55ab497756cb050247d1c155c8a8f6"
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
|
||||
42661:
|
||||
ver: "7.1.0"
|
||||
kver: "4.4.180"
|
||||
rd-compressed: false
|
||||
efi-bug: no
|
||||
modules-notneeded: *modules-notneeded
|
||||
cmdline:
|
||||
<<: *cmdline
|
||||
synoinfo:
|
||||
<<: *synoinfo
|
||||
pat:
|
||||
url: "https://global.download.synology.com/download/DSM/release/7.1/42661-1/DSM_FS6400_42661.pat"
|
||||
hash: "94a84725e8b24dfb448429068c046e05084ead3a210f8710979e0992904673e7"
|
||||
ramdisk-hash: "6ceff751e7132dd8cc80ff64ee23b7e3b3986d85d7d9132b4cb4b0d50f223b1f"
|
||||
zimage-hash: "2326a556eec4c48b9887bad7eecab268e43dc0e036bed8ddf6fbba466d713cde"
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
@@ -30,8 +30,8 @@ cmdline: &cmdline
|
||||
vender_format_version: 2
|
||||
syno_port_thaw: 1
|
||||
syno_hdd_detect: 0
|
||||
|
||||
platform: "broadwellnk"
|
||||
dom: 1
|
||||
serial:
|
||||
prefix:
|
||||
- "0000"
|
||||
@@ -57,6 +57,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-common-rc.patch"
|
||||
- "ramdisk-common-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-common-disable-disabled-ports.patch"
|
||||
@@ -79,6 +80,7 @@ builds:
|
||||
patch:
|
||||
- "ramdisk-common-disable-root-pwd.patch"
|
||||
- "ramdisk-common-init-script.patch"
|
||||
- "ramdisk-42661-rc.patch"
|
||||
- "ramdisk-42661-post-init-script.patch"
|
||||
- "ramdisk-common-network-hosts.patch"
|
||||
- "ramdisk-42661-disable-disabled-ports.patch"
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
+ _replace_in_file '^#start on' 'start on' $UPSTART/tty.conf
|
||||
+fi
|
||||
+
|
||||
+/addons/addons.sh sys
|
||||
+/addons/addons.sh late
|
||||
+############################################################################################
|
||||
Mkdir -p /tmpRoot/initrd
|
||||
|
||||
Umount /proc >/dev/null 2>&1
|
||||
Umount /proc >/dev/null 2>&1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/etc/rc
|
||||
+++ b/etc/rc
|
||||
@@ -247,7 +247,7 @@
|
||||
/etc.defaults/AHAtasks load_network_modules_junior
|
||||
fi
|
||||
SYNOLoadModules ${NET_MODULES}
|
||||
-
|
||||
+/addons/addons.sh modules
|
||||
|
||||
if [ "no" != "$RUN_SYNOBIOS" ]; then
|
||||
SYNOLoadModules "synobios"
|
||||
@@ -5,7 +5,7 @@
|
||||
echo "Insert basic USB modules..."
|
||||
SYNOLoadModules $USB_MODULES
|
||||
+SYNOLoadModules "usb-storage"
|
||||
+/addons/addons.sh rd
|
||||
+/addons/addons.sh early; /addons/addons.sh patches
|
||||
|
||||
# insert Etron USB3.0 drivers
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
+ _replace_in_file '^#start on' 'start on' $UPSTART/tty.conf
|
||||
+fi
|
||||
+
|
||||
+/addons/addons.sh sys
|
||||
+/addons/addons.sh late
|
||||
+############################################################################################
|
||||
+
|
||||
Mkdir -p /tmpRoot/initrd
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/etc/rc
|
||||
+++ b/etc/rc
|
||||
@@ -230,7 +230,7 @@
|
||||
/etc.defaults/AHAtasks load_network_modules_junior
|
||||
fi
|
||||
SYNOLoadModules ${NET_MODULES}
|
||||
-
|
||||
+/addons/addons.sh modules
|
||||
|
||||
if [ "no" != "$RUN_SYNOBIOS" ]; then
|
||||
SYNOLoadModules "synobios"
|
||||
@@ -92,13 +92,17 @@ cp "${PATCH_PATH}/iosched-trampoline.sh" "${RAMDISK_PATH}/usr/sbin/modprobe"
|
||||
# Addons
|
||||
# Check if model needs Device-tree dynamic patch
|
||||
DT="`readModelKey "${MODEL}" "dt"`"
|
||||
[ "${DT}" = "true" ] && ADDONS['qjs-dtb']="" # Add system addon "qjs-dtb"
|
||||
# Add system addon "dtbpatch" or "maxdisks"
|
||||
[ "${DT}" = "true" ] && ADDONS['dtbpatch']="" || ADDONS['maxdisks']=""
|
||||
ADDONS['misc']="" # Add system addon "misc"
|
||||
ADDONS['acpid']="" # Add system addon "acpid"
|
||||
|
||||
mkdir -p "${RAMDISK_PATH}/addons"
|
||||
echo -n "."
|
||||
#/proc/sys/kernel/syno_install_flag
|
||||
echo "#!/bin/sh" > "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo 'export INSMOD="/sbin/insmod"' >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo 'echo "addons.sh called with params ${@}"' >> "${RAMDISK_PATH}/addons/addons.sh"
|
||||
for ADDON in ${!ADDONS[@]}; do
|
||||
PARAMS=${ADDONS[${ADDON}]}
|
||||
if ! installAddon ${ADDON}; then
|
||||
|
||||
@@ -55,7 +55,7 @@ search --set=root --label "ARPL1"
|
||||
if [ -s /zImage -a -s /rd.gz ]; then
|
||||
menuentry 'Boot DSM' --id boot {
|
||||
echo "Loading kernel..."
|
||||
linux /bzImage-arpl console=ttyS0,115200n8
|
||||
linux /bzImage-arpl console=ttyS0,115200n8 quiet
|
||||
echo "Loading initramfs..."
|
||||
initrd /initrd-arpl
|
||||
echo "Booting..."
|
||||
@@ -66,7 +66,7 @@ fi
|
||||
|
||||
menuentry 'Configure loader' --id config {
|
||||
echo "Loading kernel..."
|
||||
linux /bzImage-arpl console=ttyS0,115200n8 IWANTTOCHANGETHECONFIG
|
||||
linux /bzImage-arpl console=ttyS0,115200n8 quiet IWANTTOCHANGETHECONFIG
|
||||
echo "Loading initramfs..."
|
||||
initrd /initrd-arpl
|
||||
echo "Booting..."
|
||||
|
||||
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.
@@ -1,5 +1,6 @@
|
||||
version: 1
|
||||
name: acpid
|
||||
system: true
|
||||
description: "Flexible and extensible daemon for delivering ACPI events"
|
||||
available-for:
|
||||
bromolow-3.10.108:
|
||||
@@ -30,7 +31,3 @@ available-for:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
modules: true
|
||||
purley-4.4.180:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
modules: false
|
||||
|
||||
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.
@@ -1,6 +1,6 @@
|
||||
version: 1
|
||||
name: 9p
|
||||
description: "Driver for Plan 9 Resource Sharing Support (9P2000)"
|
||||
name: alx
|
||||
description: "Driver for Qualcomm Atheros AR816x/AR817x ethernet adapters"
|
||||
available-for:
|
||||
bromolow-3.10.108:
|
||||
install-script: &script "install.sh"
|
||||
@@ -23,6 +23,3 @@ available-for:
|
||||
v1000-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
purley-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.
BIN
files/board/arpl/p3/addons/arcmsr/apollolake-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/apollolake-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/arcmsr/broadwell-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/broadwell-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/arcmsr/broadwellnk-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/broadwellnk-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/arcmsr/bromolow-3.10.108.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/bromolow-3.10.108.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/arcmsr/denverton-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/denverton-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/arcmsr/geminilake-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/geminilake-4.4.180.tgz
Normal file
Binary file not shown.
25
files/board/arpl/p3/addons/arcmsr/manifest.yml
Normal file
25
files/board/arpl/p3/addons/arcmsr/manifest.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
version: 1
|
||||
name: arcmsr
|
||||
description: "Driver for Areca ARC11xx/12xx/16xx/188x SAS/SATA RAID Controller"
|
||||
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/arcmsr/v1000-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/arcmsr/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.
@@ -23,6 +23,3 @@ available-for:
|
||||
v1000-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
purley-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
|
||||
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.
@@ -23,6 +23,3 @@ available-for:
|
||||
v1000-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
purley-4.4.180:
|
||||
install-script: *script
|
||||
modules: true
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
files/board/arpl/p3/addons/atlantic/apollolake-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/atlantic/apollolake-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/atlantic/broadwell-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/atlantic/broadwell-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/atlantic/broadwellnk-4.4.180.tgz
Normal file
BIN
files/board/arpl/p3/addons/atlantic/broadwellnk-4.4.180.tgz
Normal file
Binary file not shown.
BIN
files/board/arpl/p3/addons/atlantic/bromolow-3.10.108.tgz
Normal file
BIN
files/board/arpl/p3/addons/atlantic/bromolow-3.10.108.tgz
Normal file
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