diff --git a/README.md b/README.md index 0d6aefcd..3df51dba 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,12 @@ 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. The most important kernel modules are built into the DSM ramdisk image for automatic peripheral detection. +# Use + 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. +## It is highly recommended to use an SSD for the loader in the case of the option via DoM or a fast USB flash drive + 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, type or randomly create a serial number, add/remove addons, 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. Changing 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. @@ -20,7 +24,8 @@ Another important point is that the loader detects whether or not the CPU has th I developed a simple patch to no longer display the DUMMY port error on models without device-tree, the user will be able to install without having to worry about it. +# Thanks + 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. - diff --git a/TODO b/TODO index f6a931a6..cb873c3d 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ A fazer - Descobrir como é o serial do DS2422+ - Estudar acrescentar modo simples e avançado do menu - Mudar synoinfo para ler do modelo e preencher no user_config, para usuário poder deletar entradas do modelo - - Acertar flag DIRTY ao atualizar módulos, etc Concluidos: - Generalizar código dos addons @@ -26,5 +25,5 @@ Concluidos: - Melhorar opções de HD, talvez criar um menu a parte - Implementar update do bzimage e ramdisk online - Mudar addons para colocar pacote completo na partição 3 e detectar dinâmicamente durante o boot do júnior - -https://kb.synology.com/en-me/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have + - Acertar flag DIRTY ao atualizar módulos, etc + - Consertar MAC custom diff --git a/VERSION b/VERSION index 824452d5..1c012c5b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3-alpha3 +0.3-alpha4 diff --git a/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd b/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd new file mode 100755 index 00000000..61757860 --- /dev/null +++ b/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Start/stop dhcpcd +# + +DAEMON=/usr/sbin/dhcpcd +CONFIG=/etc/dhcpcd.conf +PIDFILE=/var/run/dhcpcd/pid + +[ -f $CONFIG ] || exit 0 + +case "$1" in + start) + echo "Starting dhcpcd..." + start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -- -f "$CONFIG" + ;; + stop) + echo "Stopping dhcpcd..." + start-stop-daemon -K -x "$DAEMON" -p "$PIDFILE" -o + ;; + reload|force-reload) + echo "Reloading dhcpcd configuration..." + "$DAEMON" -s reload + ;; + restart) + "$0" stop + sleep 1 # Prevent race condition: ensure dhcpcd stops before start. + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 +esac diff --git a/files/board/arpl/overlayfs/opt/arpl/boot.sh b/files/board/arpl/overlayfs/opt/arpl/boot.sh index 3f5f2346..f06c01f2 100755 --- a/files/board/arpl/overlayfs/opt/arpl/boot.sh +++ b/files/board/arpl/overlayfs/opt/arpl/boot.sh @@ -102,18 +102,19 @@ echo -e "Cmdline:\n\033[1;36m${CMDLINE_LINE}\033[0m" # Wait for an IP COUNT=0 -echo -n "IP: " +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" + echo -e ": \033[1;32m${IP}\033[0m" break elif [ ${COUNT} -eq 15 ]; then - echo -e "\033[1;31mERROR\033[0m" + echo -e ": \033[1;31mERROR\033[0m" break fi COUNT=$((${COUNT}+1)) sleep 1 + echo -n "." done echo -e "\033[1;37mLoading DSM kernel...\033[0m" diff --git a/files/board/arpl/overlayfs/opt/arpl/include/consts.sh b/files/board/arpl/overlayfs/opt/arpl/include/consts.sh index 2f04360c..fe4bc559 100644 --- a/files/board/arpl/overlayfs/opt/arpl/include/consts.sh +++ b/files/board/arpl/overlayfs/opt/arpl/include/consts.sh @@ -1,5 +1,5 @@ -ARPL_VERSION="0.3-alpha3" +ARPL_VERSION="0.3-alpha4" # Define paths TMP_PATH="/tmp" diff --git a/files/board/arpl/overlayfs/opt/arpl/init.sh b/files/board/arpl/overlayfs/opt/arpl/init.sh index 4800f2e6..94162708 100755 --- a/files/board/arpl/overlayfs/opt/arpl/init.sh +++ b/files/board/arpl/overlayfs/opt/arpl/init.sh @@ -59,6 +59,14 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}" fi +# Set custom MAC if defined +MAC1=`readConfigKey "cmdline.mac1" "${USER_CONFIG_FILE}"` +if [ -n "${MAC1}" ]; then + MAC="${MAC1:0:2}:${MAC1:2:2}:${MAC1:4:2}:${MAC1:6:2}:${MAC1:8:2}:${MAC1:10:2}" + ip link set dev eth0 address ${MAC} >/dev/null 2>&1 && \ + (/etc/init.d/S41dhcpcd restart >/dev/null 2>&1 &) || true +fi + # Get the VID/PID if we are in USB VID="0x0000" PID="0x0000" diff --git a/files/board/arpl/overlayfs/opt/arpl/menu.sh b/files/board/arpl/overlayfs/opt/arpl/menu.sh index ff7c2934..e904b1ca 100755 --- a/files/board/arpl/overlayfs/opt/arpl/menu.sh +++ b/files/board/arpl/overlayfs/opt/arpl/menu.sh @@ -315,6 +315,11 @@ function cmdlineMenu() { writeConfigKey "cmdline.mac1" "${MAC1}" "${USER_CONFIG_FILE}" writeConfigKey "cmdline.netif_num" "1" "${USER_CONFIG_FILE}" fi + /etc/init.d/S30arpl-mac restart 2>&1 | dialog --backtitle "`backtitle`" \ + --title "User cmdline" --progressbox "Changing mac" 20 70 + /etc/init.d/S41dhcpcd restart 2>&1 | dialog --backtitle "`backtitle`" \ + --title "User cmdline" --progressbox "Renewing IP" 20 70 + IP=`ip route get 1.1.1.1 2>/dev/null | awk '{print$7}'` ;; s) ITEMS="" diff --git a/files/board/arpl/p3/addons/acpid/all.tgz b/files/board/arpl/p3/addons/acpid/all.tgz index f0dcd6ee..4a81b23b 100644 Binary files a/files/board/arpl/p3/addons/acpid/all.tgz and b/files/board/arpl/p3/addons/acpid/all.tgz differ diff --git a/files/board/arpl/p3/addons/dtbpatch/all.tgz b/files/board/arpl/p3/addons/dtbpatch/all.tgz index e49d1b84..522cd9d1 100644 Binary files a/files/board/arpl/p3/addons/dtbpatch/all.tgz and b/files/board/arpl/p3/addons/dtbpatch/all.tgz differ diff --git a/files/board/arpl/p3/addons/eudev/all.tgz b/files/board/arpl/p3/addons/eudev/all.tgz index 4f8b4d22..74963b01 100644 Binary files a/files/board/arpl/p3/addons/eudev/all.tgz and b/files/board/arpl/p3/addons/eudev/all.tgz differ diff --git a/files/board/arpl/p3/addons/maxdisks/all.tgz b/files/board/arpl/p3/addons/maxdisks/all.tgz index f0fa162e..d5926f2d 100644 Binary files a/files/board/arpl/p3/addons/maxdisks/all.tgz and b/files/board/arpl/p3/addons/maxdisks/all.tgz differ diff --git a/files/board/arpl/p3/addons/misc/all.tgz b/files/board/arpl/p3/addons/misc/all.tgz index c518bca4..86bbe85f 100644 Binary files a/files/board/arpl/p3/addons/misc/all.tgz and b/files/board/arpl/p3/addons/misc/all.tgz differ diff --git a/files/board/arpl/p3/modules/apollolake-4.4.180.tgz b/files/board/arpl/p3/modules/apollolake-4.4.180.tgz index ce572006..aec2abd2 100644 Binary files a/files/board/arpl/p3/modules/apollolake-4.4.180.tgz and b/files/board/arpl/p3/modules/apollolake-4.4.180.tgz differ diff --git a/files/board/arpl/p3/modules/broadwell-4.4.180.tgz b/files/board/arpl/p3/modules/broadwell-4.4.180.tgz index 34b4a8c1..4c27381c 100644 Binary files a/files/board/arpl/p3/modules/broadwell-4.4.180.tgz and b/files/board/arpl/p3/modules/broadwell-4.4.180.tgz differ diff --git a/files/board/arpl/p3/modules/broadwellnk-4.4.180.tgz b/files/board/arpl/p3/modules/broadwellnk-4.4.180.tgz index 755ddff7..5bfb5f50 100644 Binary files a/files/board/arpl/p3/modules/broadwellnk-4.4.180.tgz and b/files/board/arpl/p3/modules/broadwellnk-4.4.180.tgz differ diff --git a/files/board/arpl/p3/modules/denverton-4.4.180.tgz b/files/board/arpl/p3/modules/denverton-4.4.180.tgz index 7823c28c..751b4d57 100644 Binary files a/files/board/arpl/p3/modules/denverton-4.4.180.tgz and b/files/board/arpl/p3/modules/denverton-4.4.180.tgz differ diff --git a/files/board/arpl/p3/modules/geminilake-4.4.180.tgz b/files/board/arpl/p3/modules/geminilake-4.4.180.tgz index 20e23c9e..25c2515e 100644 Binary files a/files/board/arpl/p3/modules/geminilake-4.4.180.tgz and b/files/board/arpl/p3/modules/geminilake-4.4.180.tgz differ diff --git a/files/board/arpl/p3/modules/v1000-4.4.180.tgz b/files/board/arpl/p3/modules/v1000-4.4.180.tgz index 18830c6d..4c2c33fa 100644 Binary files a/files/board/arpl/p3/modules/v1000-4.4.180.tgz and b/files/board/arpl/p3/modules/v1000-4.4.180.tgz differ