Compare commits

..

183 Commits

Author SHA1 Message Date
Fabio Belavenuto
34362117da Merge pull request #117 from fbelavenuto/dev
Testing more github actions
2022-08-19 10:20:13 -03:00
Fabio Belavenuto
1cf68bce40 Testing more github actions 2022-08-19 10:20:00 -03:00
Fabio Belavenuto
d6ebcd1fbc Merge pull request #116 from fbelavenuto/install-addons-on-live
Separated script to install addons on boot
2022-08-19 10:18:27 -03:00
Fabio Belavenuto
d3f720092f Separated script to install addons on boot 2022-08-18 16:29:55 -03:00
Fabio Belavenuto
0303c3b28f Merge pull request #114 from fbelavenuto/img-gen
fix img-gen.sh little bug
2022-08-18 16:27:24 -03:00
Fabio Belavenuto
f421824af3 fix img-gen.sh little bug 2022-08-18 16:27:03 -03:00
Fabio Belavenuto
93ac809711 Merge pull request #113 from fbelavenuto/build-ordering
Build ordering
2022-08-18 14:38:20 -03:00
Fabio Belavenuto
69af175bea Build ordering 2022-08-18 14:38:04 -03:00
Fabio Belavenuto
2e960e564b Merge pull request #112 from fbelavenuto/dev
New version of igb module
2022-08-18 14:37:08 -03:00
Fabio Belavenuto
aa43b3669a New version of igb module 2022-08-18 14:35:39 -03:00
Fabio Belavenuto
f4e380831a Adding KSRC variable into docker 2022-08-18 10:06:32 -03:00
Fabio Belavenuto
aa85152cc2 new modules and fw 2022-08-18 08:33:00 -03:00
Fabio Belavenuto
376f1080f9 Merge pull request #109 from fbelavenuto/new-bn-updates
Adding MD5 hash to make the rss update files
2022-08-17 16:41:40 -03:00
Fabio Belavenuto
2cde38923c Adding MD5 hash to make the rss update files 2022-08-17 16:41:21 -03:00
Fabio Belavenuto
9c680d59f0 Merge pull request #108 from fbelavenuto/dev
Fix bugs into MAC-related stuff, organizing modules
2022-08-17 15:50:56 -03:00
Fabio Belavenuto
a9d4085587 Fix bugs into MAC-related stuff, organizing modules 2022-08-17 15:34:43 -03:00
Fabio Belavenuto
178956c781 Merge pull request #99 from fbelavenuto/keymap
Fixing keymap selection with layout
2022-08-15 17:17:13 -03:00
Fabio Belavenuto
4dde9e8b0b Fixing keymap selection with layout 2022-08-15 17:16:49 -03:00
Fabio Belavenuto
26c2d52565 Merge pull request #94 from fbelavenuto/93-grub-not-using-predictable-ifnames-for-network-interfaces
Testing cmdline net.ifnames=0 biosdevname=0
2022-08-12 11:15:02 -03:00
Fabio Belavenuto
1ad8f4ee62 Testing cmdline net.ifnames=0 biosdevname=0 2022-08-12 11:14:21 -03:00
Fabio Belavenuto
f76ad57835 Merge pull request #92 from fbelavenuto/88-dva3219-loader
Added as beta: DVA3219, DS1520+, FS2500, RS4021xs+
2022-08-11 17:34:40 -03:00
Fabio Belavenuto
2fd551ac60 Added as beta: DVA3219, DS1520+, FS2500, RS4021xs+
Added option to model menu to enable beta models
2022-08-11 17:34:07 -03:00
Fabio Belavenuto
6dcd73e940 Merge pull request #91 from fbelavenuto/89-no-space-left-on-device
Growing image size
2022-08-11 13:17:29 -03:00
Fabio Belavenuto
f245ccb104 Growing image size 2022-08-11 13:17:03 -03:00
Fabio Belavenuto
7ab80a64f7 Merge pull request #90 from fbelavenuto/tests-fs2500
Tests fs2500
2022-08-11 13:14:52 -03:00
Fabio Belavenuto
6d2925492d Added FS2500 and RS4021+ for tests. Fixed bug in new_bn.sh 2022-08-11 12:06:48 -03:00
Fabio Belavenuto
21a76c1155 testing fs2500 and dtbpatch 2022-08-11 09:29:21 -03:00
Fabio Belavenuto
260f61f01a Merge pull request #87 from fbelavenuto/vitioblk
Added virtio blk
2022-08-10 14:14:53 -03:00
Fabio Belavenuto
d0ca839d2c Added virtio blk 2022-08-10 14:13:59 -03:00
Fabio Belavenuto
bddddb89fc Merge pull request #86 from fbelavenuto/51-virtual-machine-manager-cluster-is-not-initialized
Loader init configfile with real MAC. Fixes many bugs with MAC
2022-08-10 13:19:45 -03:00
Fabio Belavenuto
14eeae6816 Loader init configfile with real MAC. Fixes many bugs with MAC 2022-08-10 13:19:01 -03:00
Fabio Belavenuto
3dc34b9fb9 Merge pull request #85 from fbelavenuto/42951
0.4-alpha1: new buildnumber 42951
2022-08-10 10:30:12 -03:00
Fabio Belavenuto
1243320769 0.4-alpha1: new buildnumber 42951 2022-08-10 10:08:24 -03:00
Fabio Belavenuto
4eb0732eaa Merge pull request #81 from fbelavenuto/dev
Dev
2022-08-09 12:39:38 -03:00
Fabio Belavenuto
b78e3735e2 Little fixes 2022-08-09 12:38:27 -03:00
Fabio Belavenuto
9fa97f9730 wip docker 2022-08-08 16:01:10 -03:00
Fabio Belavenuto
f654b72a19 Merge pull request #76 from fbelavenuto/dev
wip
2022-08-05 17:25:10 -03:00
Fabio Belavenuto
6ac2dea20a wip 2022-08-05 17:24:12 -03:00
Fabio Belavenuto
f19de0b526 Merge pull request #75 from fbelavenuto/dev
testing rss
2022-08-05 17:02:22 -03:00
Fabio Belavenuto
8b735d438d testing rss 2022-08-05 17:01:42 -03:00
Fabio Belavenuto
b444432de7 Merge pull request #74 from fbelavenuto/dev
Dev
2022-08-05 15:31:31 -03:00
Fabio Belavenuto
e75c252e1d Testing rss 2022-08-05 15:31:00 -03:00
Fabio Belavenuto
700f25fbbc wip 2022-08-05 13:24:59 -03:00
Fabio Belavenuto
18cc6326b8 Fixing custom MACs for DS3622 2022-08-05 11:25:57 -03:00
Fabio Belavenuto
96cd58db64 Merge pull request #72 from fbelavenuto/dev
Dev merge
2022-08-03 15:41:32 -03:00
Fabio Belavenuto
412f2fb1c5 Adding DS2422+ serial format 2022-08-03 15:20:38 -03:00
Fabio Belavenuto
8f85596b57 Little fixes 2022-08-03 09:50:39 -03:00
Fabio Belavenuto
d6f8467334 Merge pull request #68 from fbelavenuto/dev
Adding local install addons
2022-08-02 17:08:07 -03:00
Fabio Belavenuto
d99aa39809 Merge branch 'dev' of github.com:fbelavenuto/arpl into dev 2022-08-02 17:06:44 -03:00
Fabio Belavenuto
fe7d707d7f Adding local install addons 2022-08-02 17:06:38 -03:00
Fabio Belavenuto
bb14a64b42 Merge pull request #67 from fbelavenuto/dev
Adding local install addons
2022-08-02 16:59:06 -03:00
Fabio Belavenuto
dcb2037465 Adding local install addons 2022-08-02 16:57:25 -03:00
Fabio Belavenuto
41612dc08a More retention days 2022-08-01 14:20:43 -03:00
Fabio Belavenuto
3af65ffe91 Merge pull request #66 from fbelavenuto/dev
Addons misc and acpid installed by default
2022-08-01 14:20:09 -03:00
Fabio Belavenuto
12984cec6a Addons misc and acpid installed by default
Add remove flags restriction
2022-08-01 14:15:25 -03:00
Fabio Belavenuto
486ec72229 Merge pull request #65 from fbelavenuto/dev
Added samba
2022-07-29 16:26:44 -03:00
Fabio Belavenuto
b3fb638d69 Added samba
Validating netif_num
Gzip lkms
2022-07-29 16:21:02 -03:00
Fabio Belavenuto
71e44bc7a3 Merge pull request #64 from fbelavenuto/dev
wip
2022-07-29 13:24:13 -03:00
Fabio Belavenuto
09dba3251b wip 2022-07-29 13:23:34 -03:00
Fabio Belavenuto
1682713fed Merge pull request #61 from fbelavenuto/dev
Modules
2022-07-27 11:41:59 -03:00
Fabio Belavenuto
e678c2aa53 Cosmetics 2022-07-26 17:28:01 -03:00
Fabio Belavenuto
2bceaea550 Modules 2022-07-26 13:12:12 -03:00
Fabio Belavenuto
ae78abc404 Merge pull request #59 from fbelavenuto/dev
Changing addon/modules instalation (for addons with modules)
2022-07-25 17:26:04 -03:00
Fabio Belavenuto
71df9e5a92 Changing addon/modules instalation (for addons with modules)
On build change, check invalid addons
2022-07-25 17:24:15 -03:00
Fabio Belavenuto
a74537aa02 Merge pull request #58 from fbelavenuto/dev
Fixing synoinfo entries for SHR
2022-07-25 14:27:51 -03:00
Fabio Belavenuto
16716b2172 Fixing synoinfo entries for SHR
Little bug into add synoinfo entry
2022-07-25 13:08:31 -03:00
Fabio Belavenuto
027a412b65 Merge pull request #57 from fbelavenuto/dev
Dev
2022-07-25 12:35:25 -03:00
Fabio Belavenuto
4ea6b9ad5c Force action cache remake 2022-07-25 12:34:58 -03:00
Fabio Belavenuto
c0209e0aae Missing synoinfo entries 2022-07-25 11:41:31 -03:00
Fabio Belavenuto
2c3ad3e7fb Merge pull request #56 from fbelavenuto/dev
PATA modules, unified p1 and p2 size
2022-07-25 11:26:59 -03:00
Fabio Belavenuto
74f09ffcd9 Now kernel/ramdisk of DSM and ARPL are located in partition 3 2022-07-25 09:59:35 -03:00
Fabio Belavenuto
acd413ab61 Adding PATA drivers 2022-07-25 08:22:48 -03:00
Fabio Belavenuto
415ee7e75d Merge pull request #53 from fbelavenuto/dev
Various commits
2022-07-22 16:58:46 -03:00
Fabio Belavenuto
2fe9b3237e Modules compiled with DSM toolchain 2022-07-22 16:58:08 -03:00
Fabio Belavenuto
81c0e00b76 Little fixes 2022-07-22 15:59:00 -03:00
Fabio Belavenuto
1b766e4974 Docker: using DSM toolchain 2022-07-22 15:50:43 -03:00
Fabio Belavenuto
690af5115d Re-added Addon external download 2022-07-22 08:11:37 -03:00
Fabio Belavenuto
a6ec7c0c46 Merge pull request #50 from fbelavenuto/dev
Adding module firmwares
2022-07-21 17:24:21 -03:00
Fabio Belavenuto
37fe50a1c5 Adding module firmwares 2022-07-21 17:22:38 -03:00
Fabio Belavenuto
ce5f427837 Merge pull request #49 from fbelavenuto/dev
Synoinfo entries unified
2022-07-21 16:50:16 -03:00
Fabio Belavenuto
5dc0b6e705 Synoinfo entries unified:
Synoinfo entries from model config file are copyed to user config file when the user choose a build.
2022-07-21 16:49:04 -03:00
Fabio Belavenuto
ea67f64d31 Merge pull request #48 from fbelavenuto/dev
Fixing custom MAC address
2022-07-21 14:26:12 -03:00
Fabio Belavenuto
722c03a506 Fixing custom MAC address 2022-07-21 14:21:25 -03:00
Fabio Belavenuto
678c7b6591 Merge pull request #47 from fbelavenuto/dev
Update modules set DIRTY flag
2022-07-21 11:22:12 -03:00
Fabio Belavenuto
8f7318f90f Cosmetics
Update module sets DIRTY flag
2022-07-21 11:21:24 -03:00
Fabio Belavenuto
7b2a7b210a Added DS2422+ 42661 build 2022-07-19 14:22:40 -03:00
Fabio Belavenuto
14362aae17 Added option to boot into junior mode 2022-07-19 13:54:51 -03:00
Fabio Belavenuto
0e16f96fad Added option to boot into junior mode 2022-07-19 13:53:03 -03:00
Fabio Belavenuto
159b7172b0 Merge pull request #43 from fbelavenuto/dev
Removing no more necessary php
2022-07-19 12:44:47 -03:00
Fabio Belavenuto
75c637a6e4 Removing no more necessary php 2022-07-19 12:44:03 -03:00
Fabio Belavenuto
a3bb685def Merge pull request #42 from fbelavenuto/dev
Rewind vanilla e1000e
2022-07-19 12:30:10 -03:00
Fabio Belavenuto
42010a1dc0 Rewind vanilla e1000e 2022-07-19 12:01:44 -03:00
Fabio Belavenuto
a456c2b21e Merge pull request #41 from fbelavenuto/dev
Fixing modules
2022-07-19 09:54:32 -03:00
Fabio Belavenuto
917c5f7280 Fixing modules 2022-07-19 09:53:42 -03:00
Fabio Belavenuto
8b530f12d1 Merge pull request #40 from fbelavenuto/dev
Dev
2022-07-18 17:06:37 -03:00
Fabio Belavenuto
604728ecec Added Fusion SPI module 2022-07-18 17:05:30 -03:00
Fabio Belavenuto
de224baf98 Fixing e1000 module (kernel panic) 2022-07-18 14:48:16 -03:00
Fabio Belavenuto
6ee0672e74 Merge pull request #39 from fbelavenuto/dev
Dev
2022-07-18 13:19:05 -03:00
Fabio Belavenuto
ff422707b7 Replaced php scripts for alternatives
Add kpatch C code for patch DSM kernel
Fix ramdisk-common-init-script (wrong merge)
2022-07-18 13:15:26 -03:00
Fabio Belavenuto
9edb1cfe0f Adding title into boot screen 2022-07-18 10:46:03 -03:00
Fabio Belavenuto
755a3d6a39 Added "Define custom MAC" to cmdline menu 2022-07-18 10:30:58 -03:00
Fabio Belavenuto
a17dc55a17 Merge pull request #38 from fbelavenuto/dev
Dev
2022-07-18 10:10:03 -03:00
Fabio Belavenuto
b35a71f023 new mpt3sas module
new version
2022-07-18 10:09:33 -03:00
Fabio Belavenuto
b9a02143b1 Little bugs 2022-07-18 09:36:03 -03:00
Fabio Belavenuto
8091c22402 wip 2022-07-16 19:09:13 -03:00
Fabio Belavenuto
da93438455 Merge branch 'eudev' 2022-07-16 18:27:10 -03:00
Fabio Belavenuto
b35496d053 Using pocopico's mpt3sas 2022-07-16 18:15:51 -03:00
Fabio Belavenuto
4ee4c14090 Adding modules update menu option 2022-07-15 21:59:56 -03:00
Fabio Belavenuto
2269b4b209 Adding maxdisks manually 2022-07-15 20:33:27 -03:00
Fabio Belavenuto
4a1d78056c Testing eudev
Addons misc and acpid is optional now
2022-07-15 19:34:21 -03:00
Fabio Belavenuto
0b7c7fd816 Merge pull request #31 from fbelavenuto/dev
Fixing maxdisks/dtbpatch early bug
2022-07-15 15:59:55 -03:00
Fabio Belavenuto
84c405cdf7 Fixing maxdisks/dtbpatch early bug 2022-07-15 15:30:45 -03:00
Fabio Belavenuto
9560f40603 Update main.yml 2022-07-15 11:59:23 -03:00
Fabio Belavenuto
8718027acb Fixing bootable flag into image 2022-07-15 11:55:36 -03:00
Fabio Belavenuto
69151c65b2 Merge branch 'eudev' of github.com:fbelavenuto/arpl into eudev 2022-07-14 13:14:23 -03:00
Fabio Belavenuto
7f464a94e1 Merge branch 'dev' 2022-07-14 13:08:19 -03:00
Fabio Belavenuto
6df00babb3 change main.yml 2022-07-14 13:07:47 -03:00
Fabio Belavenuto
a21392c97e Merge pull request #30 from fbelavenuto/dev
merge dev
2022-07-14 13:04:54 -03:00
Fabio Belavenuto
d1070d37c3 Merge branch 'main' into dev 2022-07-14 13:04:12 -03:00
Fabio Belavenuto
db464ec087 Removed download addon
Little bug fixed
New version
2022-07-14 12:56:27 -03:00
Fabio Belavenuto
8093df3040 Eudev tests 2022-07-14 12:48:02 -03:00
Fabio Belavenuto
45f36ca380 Testing eudev 2022-07-13 23:21:29 -03:00
Fabio Belavenuto
9c372a2320 Adding more functions to docker image 2022-07-13 16:24:27 -03:00
Fabio Belavenuto
b44fe819d0 Reformuling modules/addons 2022-07-13 14:01:56 -03:00
Fabio Belavenuto
3512ca422a wip 2022-07-12 16:31:01 -03:00
Fabio Belavenuto
bbc44d9ba7 testes 2022-07-12 16:30:30 -03:00
Fabio Belavenuto
df1905b17d Adding linux vanilla source to docker image 2022-07-11 22:10:54 -03:00
Fabio Belavenuto
14e8ac2a5c Fix addons 2022-07-11 17:04:58 -03:00
Fabio Belavenuto
2225b6afd7 Adding buildroot package smartmontools 2022-07-11 14:22:24 -03:00
Fabio Belavenuto
fd6c9db110 Fix show menu "Show SATA(s) # ports and drives" to devicetree models.
Added alx addon
2022-07-11 12:15:49 -03:00
Fabio Belavenuto
466722e7ad Actions 2022-07-10 15:20:08 -03:00
Fabio Belavenuto
dfec0accde Merge pull request #25 from fbelavenuto/dev
Fixing addons
2022-07-10 15:10:37 -03:00
Fabio Belavenuto
1185a9144d Fixing addons 2022-07-10 14:59:54 -03:00
Fabio Belavenuto
4abaef8885 wip 2022-07-10 14:11:27 -03:00
Fabio Belavenuto
a990957148 Merge branch 'main' of github.com:fbelavenuto/arpl into dev 2022-07-10 13:31:27 -03:00
Fabio Belavenuto
c79acb8a8b Fix dtbpatch addon 2022-07-10 13:30:04 -03:00
Fabio Belavenuto
47b49ac259 Merge pull request #24 from fbelavenuto/dev
Changing version number
2022-07-10 12:48:37 -03:00
Fabio Belavenuto
6fac568cfc Merge branch 'main' of github.com:fbelavenuto/arpl into dev 2022-07-10 12:45:12 -03:00
Fabio Belavenuto
97ed86cf20 Version 0.2-alpha2 2022-07-10 12:43:31 -03:00
Fabio Belavenuto
f560f402b2 Merge pull request #23 from fbelavenuto/dev
Replacing addon 'qjs-dts' to addon 'dtbpatch'
2022-07-10 12:33:31 -03:00
Fabio Belavenuto
d0b839af26 Replacing addon 'qjs-dts' to addon 'dtbpatch' 2022-07-10 12:15:07 -03:00
Fabio Belavenuto
a8fef13c64 Merge pull request #21 from fbelavenuto/dev
Added a new step to call addons scripts.
2022-07-08 22:11:15 -03:00
Fabio Belavenuto
4a85944651 Added a new step to call addons scripts. 2022-07-08 21:51:20 -03:00
Fabio Belavenuto
1458074276 Addind missing dom_szmax for DoM 2022-07-08 15:00:24 -03:00
Fabio Belavenuto
fd1f06a7f3 Merge pull request #20 from fbelavenuto/dev
More addons
2022-07-08 14:37:33 -03:00
Fabio Belavenuto
2e4d14c25d More addons 2022-07-08 14:27:05 -03:00
Fabio Belavenuto
43338b435a Merge pull request #19 from fbelavenuto/dev
merge dev
2022-07-08 13:32:28 -03:00
Fabio Belavenuto
6ea54af667 Docker changes 2022-07-08 13:31:09 -03:00
Fabio Belavenuto
012b2d72ec Little adjust 2022-07-08 12:44:48 -03:00
Fabio Belavenuto
3dc56d40fe Merge pull request #18 from fbelavenuto/dev
testing actions
2022-07-08 10:07:18 -03:00
Fabio Belavenuto
58fbdd7b7b Merge branch 'main' into dev 2022-07-08 09:24:29 -03:00
Fabio Belavenuto
e6f5a9d415 testing actions 2022-07-08 09:22:46 -03:00
Fabio Belavenuto
cf1ac2a026 testing actions 2022-07-08 09:18:23 -03:00
Fabio Belavenuto
02ab29ace7 Merge pull request #17 from fbelavenuto/dev
Fixing synoinfo DS2422+
2022-07-08 09:06:46 -03:00
Fabio Belavenuto
d48e9f9fb6 Fixing synoinfo DS2422+
Adding maxdisks addon
2022-07-07 20:49:21 -03:00
Fabio Belavenuto
958369c5cc Merge pull request #16 from fbelavenuto/dev
merge dev
2022-07-07 16:00:19 -03:00
Fabio Belavenuto
863d949ae2 Removing workaroud, do not works with satadom 2022-07-07 15:54:07 -03:00
Fabio Belavenuto
b9c84664cd little fix 2022-07-07 15:07:44 -03:00
Fabio Belavenuto
d0ead7d18a Testing SATA DoM 2022-07-07 13:02:18 -03:00
Fabio Belavenuto
825f31287a More adjusts in actions 2022-07-07 08:28:12 -03:00
Fabio Belavenuto
73902b0609 Merge pull request #14 from green1052/patch-1
action cache update
2022-07-07 08:20:39 -03:00
green1052
c83e28613f Update main.yml 2022-07-07 17:07:49 +09:00
Fabio Belavenuto
378b10b7e3 Merge branch 'dev' 2022-07-06 21:46:31 -03:00
Fabio Belavenuto
66d8abb2f9 Adding vmdk image 2022-07-06 21:45:55 -03:00
Fabio Belavenuto
5fdf9afd22 Merge pull request #13 from fbelavenuto/dev
Adding buildroot external tree
2022-07-06 17:36:54 -03:00
Fabio Belavenuto
51b4d1666e Adding buildroot external tree
Adding r8125 and r8168 driver for loader
2022-07-06 17:36:08 -03:00
Fabio Belavenuto
5cc2f0bad3 Merge pull request #12 from fbelavenuto/dev
Fixing actions versioning
2022-07-06 13:23:43 -03:00
Fabio Belavenuto
20e6a1b030 Fixing actions
More drivers
2022-07-06 13:22:14 -03:00
Fabio Belavenuto
193a888417 Merge pull request #11 from fbelavenuto/dev
Implementing update function
2022-07-06 11:58:08 -03:00
Fabio Belavenuto
d9bae9bff3 Implementing update function 2022-07-06 11:57:41 -03:00
Fabio Belavenuto
4816e2b9d6 Try fix actions 2022-07-06 10:14:53 -03:00
Fabio Belavenuto
8be21e154f Merge branch 'dev' 2022-07-06 10:11:30 -03:00
Fabio Belavenuto
da0723baae Modules 2022-07-06 10:09:17 -03:00
Fabio Belavenuto
60ebe853a1 Adding i40e 2022-07-06 09:51:48 -03:00
Fabio Belavenuto
17b7e9c3d3 Adding ixgbe addon 2022-07-06 09:45:29 -03:00
Fabio Belavenuto
0fdd36fb66 Merge pull request #10 from fbelavenuto/dev
Fixing not needed modules
2022-07-06 09:38:04 -03:00
Fabio Belavenuto
9b623817d5 Fixing not needed modules 2022-07-06 09:36:22 -03:00
Fabio Belavenuto
285ef9beb8 Merge branch 'dev' 2022-07-05 21:48:48 -03:00
Fabio Belavenuto
fa46a643a3 Fix notneeded DS920
Update VERSION
2022-07-05 21:47:40 -03:00
Fabio Belavenuto
b76c39402e Detect maxdisks and internalportcfg automatically 2022-07-05 21:45:26 -03:00
Fabio Belavenuto
1adea60697 maxdisk option transfered to Synoinfo menu
Adding r816* to not needed modules section on DVA1622 config
2022-07-05 19:38:35 -03:00
Fabio Belavenuto
95957b3c0a Fixing DS920+ 2022-07-05 17:28:50 -03:00
Fabio Belavenuto
f234821abc Added geminilake platform to ehci-pci module 2022-07-05 15:30:28 -03:00
299 changed files with 2680 additions and 1658 deletions

View File

@@ -1,47 +1,33 @@
name: Build img
name: Build image
# Controls when the workflow will run
on:
# push:
push:
# branches:
# - main
# pull_request:
# When a release is published
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
tags:
- v*
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
with:
submodules: recursive
# Install missing buildroot dependency
- name: Install dependency
run: |
sudo apt-get update
sudo apt-get install -y libelf-dev
# Check cache
- name: Cache buildroot
id: cache
uses: actions/cache@v2
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'
@@ -52,9 +38,9 @@ jobs:
cp -Ru files/* .buildroot
cd .buildroot
echo "Generating default config"
make arpl_defconfig
make BR2_EXTERNAL=../external arpl_defconfig
echo "First make"
make
make BR2_EXTERNAL=../external
# Build incremental from cache
- name: Build image
@@ -68,50 +54,54 @@ jobs:
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
# 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"
cp -Ru files/* .buildroot/
VERSION=`cat VERSION`
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
make BR2_EXTERNAL=../external arpl_defconfig
echo "Version: ${VERSION}"
echo "Building..."
make
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
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: Image to burn
path: arpl.img
retention-days: 1
name: Images
path: |
arpl.img
arpl.vmdk
retention-days: 5
# Publish a release if is a tag
- name: Release
@@ -120,5 +110,6 @@ jobs:
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

4
.gitignore vendored
View File

@@ -1,9 +1,11 @@
!.gitkeep
.vscode
arpl.img*
arpl*.img
arpl*.vmdk
*.zip
.buildroot
test.sh
docker/Dockerfile
docker/cache
*.bak
*.o

View File

@@ -4,23 +4,27 @@ This particular project was created to facilitate my testing with Redpill and I
It is still in alpha stage, with little documentation, but it is functional. I'm Brazilian and my English is not good, so I apologize for my translations.
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.
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.
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.
# Use
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.
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.
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.
### 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.
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" if necessary.
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.
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.
Addons can be downloaded and added to the loader.
# Thanks
All code was based on the work of TTG, pocopico, jumkey and others involved in continuing TTG's original redpill-load project.

16
TODO
View File

@@ -1,5 +1,6 @@
A fazer
- Implementar update do bzimage e ramdisk online
- Checar se tem como atualizar microcode via addon/modules/whatever...
- Estudar acrescentar modo simples e avançado do menu
Concluidos:
- Generalizar código dos addons
@@ -18,6 +19,13 @@ 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
https://kb.synology.com/en-me/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have
- 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
- Mudar addons para colocar pacote completo na partição 3 e detectar dinâmicamente durante o boot do júnior
- Acertar flag DIRTY ao atualizar módulos, etc
- Consertar MAC custom
- Mudar synoinfo para ler do modelo e preencher no user_config, para usuário poder deletar entradas do modelo
- Validar netif_num e macX
- Descobrir como é o serial do DS2422+

View File

@@ -12,11 +12,8 @@ tasks:
cmds:
- ./build.sh
compile-lkms:
compile-kpatch:
dir: kpatch
cmds:
- ./compile-lkm.sh
compile-addons:
dir: addons
cmds:
- ./compile-addons.sh {{.CLI_ARGS}}
- make clean all
- mv kpatch ../files/board/arpl/overlayfs/opt/arpl/

View File

@@ -1 +1 @@
0.1-alpha3
0.4-alpha3

View File

@@ -3,15 +3,17 @@ ARG PLATFORMS="@@@PLATFORMS@@@"
ARG TOOLKIT_VER="@@@TOOLKIT_VER@@@"
# Copy downloaded toolkits
ADD cache /cache
ADD cache/$TOOLKIT_VER /cache
# Extract toolkits
RUN for V in ${PLATFORMS}; do \
echo "${V}" | while IFS=':' read PLATFORM KVER; do \
echo -e "${PLATFORM}\t${KVER}" >> /opt/platforms && \
echo "Extracting ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" && \
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; \
tar -xaf "/cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz" -C "/opt/${PLATFORM}" --strip-components=9 \
"usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-${TOOLKIT_VER}" && \
echo "Extracting ${PLATFORM}-toolchain.txz" && \
tar -xaf "/cache/${PLATFORM}-toolchain.txz" -C "/opt/${PLATFORM}" --strip-components=1; \
done; \
done
@@ -22,7 +24,8 @@ ENV SHELL=/bin/bash \
RUN apt update --yes && \
apt install --yes --no-install-recommends --no-install-suggests \
build-essential nano make && \
ca-certificates nano curl bc kmod git gettext texinfo autopoint \
build-essential make ncurses-dev libssl-dev autogen automake pkg-config libtool xsltproc gperf && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

@@ -6,41 +6,75 @@ function trap_cancel() {
sleep 2 || exit 1
}
trap trap_cancel SIGINT SIGTERM
cd `dirname $0`
# Read platforms/kerver version
echo "Reading platforms"
declare -A PLATFORMS
while read PLATFORM KVER; do
PLATFORMS[${PLATFORM}]="${KVER}"
done <../PLATFORMS
###############################################################################
function prepare() {
declare -A URLS
# Download toolkits
mkdir -p cache
URLS["apollolake"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28Apollolake%29/apollolake-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["broadwell"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28Broadwell%29/broadwell-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["broadwellnk"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28Broadwellnk%29/broadwellnk-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["bromolow"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20linux%203.10.108%20%28Bromolow%29/bromolow-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["denverton"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28Denverton%29/denverton-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["geminilake"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28GeminiLake%29/geminilake-${GCCLIB_VER}_x86_64-GPL.txz"
URLS["v1000"]="https://global.download.synology.com/download/ToolChain/toolchain/${TOOLCHAIN_VER}/Intel%20x86%20Linux%204.4.180%20%28V1000%29/v1000-${GCCLIB_VER}_x86_64-GPL.txz"
# Read platforms/kerver version
echo "Reading platforms"
declare -A PLATFORMS
while read PLATFORM KVER; do
PLATFORMS[${PLATFORM}]="${KVER}"
done <../PLATFORMS
# Download toolkits
mkdir -p cache
for PLATFORM in ${!PLATFORMS[@]}; do
KVER="${PLATFORMS[${PLATFORM}]}"
echo -n "Checking cache/${TOOLKIT_VER}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz... "
if [ ! -f "cache/${TOOLKIT_VER}/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"
echo "Downloading ${URL}"
curl -L "${URL}" -o "cache/${TOOLKIT_VER}/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
else
echo "OK"
fi
echo -n "Checking cache/${TOOLKIT_VER}/${PLATFORM}-toolchain.txz... "
if [ ! -f "cache/${TOOLKIT_VER}/${PLATFORM}-toolchain.txz" ]; then
URL=${URLS["${PLATFORM}"]}
echo "Downloading ${URL}"
curl -L "${URL}" -o "cache/${TOOLKIT_VER}/${PLATFORM}-toolchain.txz"
else
echo "OK"
fi
done
# Generate Dockerfile
echo "Generating Dockerfile"
cp Dockerfile.template Dockerfile
VALUE=""
for PLATFORM in ${!PLATFORMS[@]}; do
VALUE+="${PLATFORM}:${PLATFORMS[${PLATFORM}]} "
done
sed -i "s|@@@PLATFORMS@@@|${VALUE::-1}|g" Dockerfile
sed -i "s|@@@TOOLKIT_VER@@@|${TOOLKIT_VER}|g" Dockerfile
}
# 7.0
TOOLKIT_VER="7.0"
for PLATFORM in ${!PLATFORMS[@]}; do
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"
echo "Downloading ${URL}"
curl -L "${URL}" -o "cache/ds.${PLATFORM}-${TOOLKIT_VER}.dev.txz"
else
echo "OK"
fi
done
TOOLCHAIN_VER="7.0-41890"
GCCLIB_VER="gcc750_glibc226"
prepare
echo "Building ${TOOLKIT_VER}"
docker image rm fbelavenuto/syno-compiler:${TOOLKIT_VER} >/dev/null 2>&1
docker buildx build . --load --tag fbelavenuto/syno-compiler:${TOOLKIT_VER}
# Generate Dockerfile
echo "Generating Dockerfile"
cp Dockerfile.template Dockerfile
VALUE=""
for PLATFORM in ${!PLATFORMS[@]}; do
VALUE+="${PLATFORM}:${PLATFORMS[${PLATFORM}]} "
done
sed -i "s|@@@PLATFORMS@@@|${VALUE::-1}|g" Dockerfile
sed -i "s|@@@TOOLKIT_VER@@@|${TOOLKIT_VER}|g" Dockerfile
# Build
echo "Building... Drink a coffee and wait!"
docker image rm fbelavenuto/syno-compiler >/dev/null 2>&1
docker buildx build . --load --tag fbelavenuto/syno-compiler
# 7.1
TOOLKIT_VER="7.1"
TOOLCHAIN_VER="7.1-42661"
GCCLIB_VER="gcc850_glibc226"
prepare
echo "Building ${TOOLKIT_VER}"
docker image rm fbelavenuto/syno-compiler:${TOOLKIT_VER} >/dev/null 2>&1
docker buildx build . --load --tag fbelavenuto/syno-compiler:${TOOLKIT_VER} --tag fbelavenuto/syno-compiler:latest

View File

@@ -1,5 +1,31 @@
#!/usr/bin/env bash
set -e
###############################################################################
function export-vars() {
# Validate
if [ -z "${1}" ]; then
echo "Use: export-vars <platform>"
exit 1
fi
export KSRC="/opt/${1}/build"
export CROSS_COMPILE="/opt/${1}/bin/x86_64-pc-linux-gnu-"
export CFLAGS="-I/opt/${1}/include"
export LDFLAGS="-I/opt/${1}/lib"
export LD_LIBRARY_PATH="/opt/${1}/lib"
export ARCH=x86_64
}
###############################################################################
function shell() {
cp /opt/${2}/build/System.map /input
export-vars $2
shift 2
bash -l $@
}
###############################################################################
function compile-module {
# Validate
if [ -z "${1}" ]; then
@@ -14,12 +40,14 @@ function compile-module {
fi
done </opt/platforms
if [ $VALID -eq 0 ]; then
echo "Platform ${PLATFORM} not found."
echo "Platform ${1} not found."
exit 1
fi
echo "Compiling module for ${PLATFORM}-${KVER}..."
echo -e "Compiling module for \033[7m${PLATFORM}-${KVER}\033[0m..."
cp -R /input /tmp
make -C "/opt/${PLATFORM}" M="/tmp/input" modules
export-vars ${PLATFORM}
make -C "/opt/${PLATFORM}/build" M="/tmp/input" \
${PLATFORM^^}-Y=y ${PLATFORM^^}-M=m modules
while read F; do
strip -g "${F}"
echo "Copying `basename ${F}`"
@@ -27,6 +55,7 @@ function compile-module {
done < <(find /tmp/input -name \*.ko)
}
###############################################################################
function compile-lkm {
PLATFORM=${1}
if [ -z "${PLATFORM}" ]; then
@@ -34,22 +63,54 @@ function compile-lkm {
exit 1
fi
cp -R /input /tmp
make -C "/tmp/input" LINUX_SRC="/opt/${PLATFORM}" dev-v7
export-vars ${PLATFORM}
export LINUX_SRC="/opt/${PLATFORM}/build"
make -C "/tmp/input" dev-v7
strip -g "/tmp/input/redpill.ko"
mv "/tmp/input/redpill.ko" "/output/redpill-dev.ko"
make -C "/tmp/input" LINUX_SRC="/opt/${PLATFORM}" clean
make -C "/tmp/input" LINUX_SRC="/opt/${PLATFORM}" prod-v7
make -C "/tmp/input" clean
make -C "/tmp/input" prod-v7
strip -g "/tmp/input/redpill.ko"
mv "/tmp/input/redpill.ko" "/output/redpill-prod.ko"
}
###############################################################################
# function compile-drivers {
# while read platform kver; do
# SRC_PATH="/opt/${platform}"
# echo "Compiling for ${platform}-${kver}"
# cd /opt/linux-${kver}/drivers
# while read dir; do
# if [ -f "${dir}/Makefile" ]; then
# echo "Driver `basename ${dir}`"
# grep "CONFIG_.*/.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=n/g' > /tmp/env
# grep "CONFIG_.*\.o.*" "${dir}/Makefile" | sed 's/.*\(CONFIG_[^)]*\).*/\1=m/g' >> /tmp/env
# make -C "${SRC_PATH}" M=$(readlink -f "${dir}") clean
# cat /tmp/env | xargs -d '\n' make -C "${SRC_PATH}" M=$(readlink -f "${dir}") modules $@
# fi
# done < <(find -type d)
# DST_PATH="/output/compiled-mods/${platform}-${kver}"
# mkdir -p "${DST_PATH}"
# while read f; do
# strip -g "${f}"
# mv "${f}" "${DST_PATH}"
# done < <(find -name \*.ko)
# done </opt/platforms
# }
###############################################################################
###############################################################################
if [ $# -lt 1 ]; then
echo "Use: <command> (<params>)"
echo "Commands: bash | shell <platform> | compile-module <platform> | compile-lkm <platform>"
exit 1
fi
case $1 in
bash) bash -l ;;
bash) shift && bash -l $@ ;;
shell) shell $@ ;;
compile-module) compile-module $2 ;;
compile-lkm) compile-lkm $2 ;;
# compile-drivers) compile-drivers ;;
*) echo "Command not recognized: $1" ;;
esac

2
external/Config.in vendored Normal file
View File

@@ -0,0 +1,2 @@
source "$BR2_EXTERNAL_ARPL_PATH/r8168/Config.in"
source "$BR2_EXTERNAL_ARPL_PATH/r8125/Config.in"

2
external/external.desc vendored Normal file
View File

@@ -0,0 +1,2 @@
name: ARPL
desc: ARPL external packages

1
external/external.mk vendored Normal file
View File

@@ -0,0 +1 @@
include $(sort $(wildcard $(BR2_EXTERNAL_ARPL_PATH)/*/*.mk))

10
external/r8125/Config.in vendored Normal file
View 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
View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 fe2420e69ae653e989e8ae754d4e3b5740d62b6e19911d88553106aaeaac97b4 r8125-99cd3bc868e4ba82a473d8efaedad04fedb0c0f7.tar.gz

13
external/r8125/r8125.mk vendored Normal file
View 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
View 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
View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 36c4ba7779259c0eee8d496ba600e5935dc8ce7b978e1dc023e1ee7de713d97e r8168-52c98bd764e6dd22ff17876afa655e9e11237cc9.tar.gz

12
external/r8168/r8168.mk vendored Normal file
View 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))

View File

@@ -116,27 +116,64 @@ CONFIG_EFI_VARS=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=m
CONFIG_BLK_DEV_NVME=y
CONFIG_VMWARE_VMCI=m
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_SAS_ATA=y
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_HPSA=m
CONFIG_SCSI_3W_9XXX=m
CONFIG_SCSI_3W_SAS=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_AACRAID=m
CONFIG_SCSI_AIC7XXX=m
CONFIG_SCSI_AIC79XX=m
# CONFIG_AIC79XX_DEBUG_ENABLE is not set
CONFIG_SCSI_AIC94XX=m
CONFIG_SCSI_MVSAS=m
CONFIG_SCSI_MVUMI=m
CONFIG_SCSI_DPT_I2O=m
CONFIG_SCSI_ADVANSYS=m
CONFIG_SCSI_ARCMSR=m
CONFIG_SCSI_ESAS2R=m
CONFIG_MEGARAID_NEWGEN=y
CONFIG_MEGARAID_MM=m
CONFIG_MEGARAID_MAILBOX=m
CONFIG_MEGARAID_LEGACY=m
CONFIG_MEGARAID_SAS=m
CONFIG_SCSI_MPT2SAS=m
CONFIG_SCSI_MPI3MR=m
CONFIG_SCSI_SMARTPQI=m
CONFIG_SCSI_UFSHCD=m
CONFIG_SCSI_UFSHCD_PCI=m
CONFIG_SCSI_UFS_DWC_TC_PCI=m
CONFIG_SCSI_UFSHCD_PLATFORM=m
CONFIG_SCSI_UFS_CDNS_PLATFORM=m
CONFIG_SCSI_UFS_DWC_TC_PLATFORM=m
CONFIG_SCSI_HPTIOP=m
CONFIG_SCSI_BUSLOGIC=m
CONFIG_SCSI_MYRB=m
CONFIG_SCSI_MYRS=m
CONFIG_VMWARE_PVSCSI=m
CONFIG_SCSI_SNIC=m
CONFIG_SCSI_DMX3191D=m
CONFIG_SCSI_ISCI=m
CONFIG_SCSI_IPS=m
CONFIG_SCSI_INITIO=m
CONFIG_SCSI_INIA100=m
CONFIG_SCSI_STEX=m
CONFIG_SCSI_SYM53C8XX_2=m
CONFIG_SCSI_IPR=m
CONFIG_SCSI_QLOGIC_1280=m
CONFIG_SCSI_QLA_ISCSI=m
CONFIG_QEDI=m
CONFIG_SCSI_DC395x=m
CONFIG_SCSI_AM53C974=m
CONFIG_SCSI_WD719X=m
CONFIG_SCSI_PMCRAID=m
CONFIG_SCSI_PM8001=m
CONFIG_SCSI_VIRTIO=m
CONFIG_SCSI_DH=y
CONFIG_ATA=y
@@ -148,60 +185,165 @@ CONFIG_SATA_SIL=m
CONFIG_SATA_SIS=m
CONFIG_SATA_ULI=m
CONFIG_SATA_VIA=m
CONFIG_PATA_ALI=m
CONFIG_PATA_AMD=y
CONFIG_PATA_ARTOP=m
CONFIG_PATA_ATIIXP=m
CONFIG_PATA_ATP867X=m
CONFIG_PATA_CMD64X=m
CONFIG_PATA_EFAR=m
CONFIG_PATA_HPT366=m
CONFIG_PATA_HPT37X=m
CONFIG_PATA_HPT3X2N=m
CONFIG_PATA_HPT3X3=m
CONFIG_PATA_IT821X=m
CONFIG_PATA_JMICRON=m
CONFIG_PATA_NINJA32=m
CONFIG_PATA_NS87415=m
CONFIG_PATA_OLDPIIX=y
CONFIG_PATA_PDC2027X=m
CONFIG_PATA_PDC_OLD=m
CONFIG_PATA_RDC=m
CONFIG_PATA_SCH=y
CONFIG_PATA_SERVERWORKS=m
CONFIG_PATA_SIL680=m
CONFIG_PATA_TRIFLEX=m
CONFIG_PATA_VIA=m
CONFIG_PATA_WINBOND=m
CONFIG_ATA_GENERIC=y
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_MIRROR=y
CONFIG_DM_ZERO=y
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_SAS=m
CONFIG_FUSION_CTL=m
CONFIG_NETDEVICES=y
CONFIG_MACVLAN=m
CONFIG_IPVLAN=m
CONFIG_VXLAN=m
CONFIG_NETCONSOLE=y
CONFIG_VIRTIO_NET=m
CONFIG_ET131X=m
CONFIG_SLICOSS=m
CONFIG_ACENIC=m
CONFIG_ENA_ETHERNET=m
CONFIG_AMD8111_ETH=m
CONFIG_PCNET32=m
CONFIG_AMD_XGBE=m
CONFIG_AQTION=m
CONFIG_ATL1=m
CONFIG_ATL1E=m
CONFIG_ATL1C=m
CONFIG_ALX=m
CONFIG_B44=m
CONFIG_BCMGENET=m
CONFIG_CNIC=m
CONFIG_TIGON3=y
CONFIG_BNX2X=m
CONFIG_SYSTEMPORT=m
CONFIG_BNXT=m
CONFIG_BNA=m
CONFIG_MACB=m
CONFIG_THUNDER_NIC_PF=m
CONFIG_THUNDER_NIC_VF=m
CONFIG_LIQUIDIO=m
CONFIG_LIQUIDIO_VF=m
CONFIG_CHELSIO_T1=m
CONFIG_CHELSIO_T1_1G=y
CONFIG_CHELSIO_T3=m
CONFIG_NET_TULIP=y
CONFIG_CHELSIO_T4=m
CONFIG_CHELSIO_T4VF=m
CONFIG_ENIC=m
CONFIG_CX_ECAT=m
CONFIG_DNET=m
CONFIG_DL2K=m
CONFIG_SUNDANCE=m
CONFIG_BE2NET=m
# CONFIG_NET_VENDOR_GOOGLE is not set
CONFIG_HINIC=m
CONFIG_E100=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_E1000=m
CONFIG_E1000E=m
CONFIG_IGB=m
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
CONFIG_MYRI10GE=m
CONFIG_NATSEMI=m
CONFIG_NS83820=m
CONFIG_S2IO=m
CONFIG_VXGE=m
CONFIG_NFP=m
CONFIG_NI_XGE_MANAGEMENT_ENET=m
CONFIG_FORCEDETH=m
CONFIG_HAMACHI=m
CONFIG_YELLOWFIN=m
CONFIG_QLA3XXX=m
CONFIG_QLCNIC=m
CONFIG_NETXEN_NIC=m
CONFIG_QED=m
CONFIG_BNA=m
CONFIG_QEDE=m
CONFIG_QCOM_EMAC=m
CONFIG_R8169=m
CONFIG_RMNET=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_USB_NET_DRIVERS=m
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_RTL8152=m
CONFIG_USB_LAN78XX=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SR9700=m
CONFIG_USB_NET_SR9800=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CX82310_ETH=m
CONFIG_USB_NET_KALMIA=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_NET_INT51X1=m
CONFIG_USB_IPHETH=m
CONFIG_USB_SIERRA_NET=m
CONFIG_USB_VL600=m
CONFIG_USB_NET_CH9200=m
CONFIG_USB_NET_AQC111=m
CONFIG_USB_RTL8153_ECM=m
# CONFIG_WLAN is not set
CONFIG_VMXNET3=m
CONFIG_INPUT_EVDEV=y

View File

@@ -15,17 +15,17 @@ BOARD_PATH="${CONFIG_DIR}/board/arpl"
echo "Creating image file"
# Create image zeroed
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=250 conv=sync 2>/dev/null
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=500 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+50M\na\nt\n\n0b\nn\np\n\n\n+50M\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
@@ -40,8 +40,8 @@ sudo mount /dev/loop8p1 "${BINARIES_DIR}/p1"
sudo mount /dev/loop8p3 "${BINARIES_DIR}/p3"
echo "Copying files"
sudo cp "${BINARIES_DIR}/bzImage" "${BINARIES_DIR}/p1/bzImage-arpl"
sudo cp "${BINARIES_DIR}/rootfs.cpio.xz" "${BINARIES_DIR}/p1/initrd-arpl"
sudo cp "${BINARIES_DIR}/bzImage" "${BINARIES_DIR}/p3/bzImage-arpl"
sudo cp "${BINARIES_DIR}/rootfs.cpio.xz" "${BINARIES_DIR}/p3/initrd-arpl"
sudo cp -R "${BOARD_PATH}/p1/"* "${BINARIES_DIR}/p1"
sudo cp -R "${BOARD_PATH}/p3/"* "${BINARIES_DIR}/p3"
sync

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,18 @@
[global]
workgroup = WORKGROUP
server role = standalone server
obey pam restrictions = yes
map to guest = Bad User
usershare allow guests = yes
[arpl]
browseable = yes
public = yes
path = /mnt
guest ok = yes
printable = no
read only = no
writable = yes
create mask = 0600
directory mask = 0700
force user = root
force group = root

View File

@@ -9,12 +9,13 @@ loaderIsConfigured || die "Loader is not configured!"
# Print text centralized, if variable ${COLUMNS} is defined
clear
TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}"
printf "\033[1;44m%*s\n" $COLUMNS ""
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 ""
TITLE="BOOTING..."
if [ -z "${COLUMNS}" ]; then
echo -e "\033[1;33m${TITLE}\033[0m"
else
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"
fi
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"
# Check if DSM zImage changed, patch it if necessary
ZIMAGE_HASH="`readConfigKey "zimage-hash" "${USER_CONFIG_FILE}"`"
@@ -47,6 +48,9 @@ MODEL="`readConfigKey "model" "${USER_CONFIG_FILE}"`"
BUILD="`readConfigKey "build" "${USER_CONFIG_FILE}"`"
SN="`readConfigKey "sn" "${USER_CONFIG_FILE}"`"
echo -e "Model: \033[1;36m${MODEL}\033[0m"
echo -e "Build: \033[1;36m${BUILD}\033[0m"
declare -A CMDLINE
# Fixed values
@@ -74,11 +78,29 @@ 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
LOADER_DEVICE_NAME=`echo ${LOADER_DISK} | sed 's|/dev/||'`
SIZE=$((`cat /sys/block/${LOADER_DEVICE_NAME}/size`/2048+10))
# Read SATADoM type
DOM="`readModelKey "${MODEL}" "dom"`"
fi
# Validate netif_num
NETIF_NUM=${CMDLINE["netif_num"]}
MACS=0
for N in `seq 1 4`; do
[ -n "${CMDLINE["mac${N}"]}" ] && MACS=$((${MACS}+1))
done
if [ ${NETIF_NUM} -ne ${MACS} ]; then
echo -e "\033[1;33m*** netif_num is not equal to macX amount, set netif_num to ${MACS} ***\033[0m"
CMDLINE["netif_num"]=${MACS}
fi
# Prepare command line
CMDLINE_LINE=""
grep -q "force_junior" /proc/cmdline && CMDLINE_LINE+="force_junior "
[ ${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}]}"
@@ -88,14 +110,29 @@ done
# Escape special chars
CMDLINE_LINE=`echo ${CMDLINE_LINE} | sed 's/>/\\\\>/g'`
# Inform user
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 15 ]; then
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"
# Executes DSM kernel via KEXEC
history -a
history -w
sync
if [ "${EFI_BUG}" = "yes" -a ${EFI} -eq 1 ]; then
echo -e "\033[1;33mWarning, running kexec with --noefi param, strange things will happen!!\033[0m"

View File

@@ -1,245 +0,0 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
/**
* This file contains usual common functions used by patchers
*
* Most of the functions here are written to be C-like without utilizing any of the PHP's magic. This functionality is
* ultimately intended to be rewritten into a dynamic patcher in C. Making this code compatible wtih simple C (e.g.
* by not using fancy regexes) will make it slower in PHP but MUCH easier to rewrite into C later on.
*/
function perr(string $txt, $die = false)
{
fwrite(STDERR, $txt);
if ($die) {
die();
}
}
/**
* @return int
*/
function getELFSectionAddr(string $elf, string $section, int $pos)
{
$secAddr = exec(
sprintf('readelf -S \'%1$s\' | grep -E \'\s%2$s\s\' | awk -F\'%2$s\' \'{ print $2 }\' | awk \'{ print $%3$d }\'', $elf, str_replace('.', '\.', $section), $pos)
);
if (!$secAddr) {
perr("$section section not found in $elf file\n", true);
}
$secAddr = hexdec(substr($secAddr, -8));
perr("Found $section at " . decTo32bUFhex($secAddr) . " in $elf\n");
return $secAddr;
}
function getELFStringLoc(string $elf, string $text)
{
$strAddr = exec(
sprintf(
'readelf -p \'.rodata\' \'%s\' | grep \'%s\' | grep -oE \'\[(\s+)?.+\]\' | grep -oE \'[a-f0-9]+\'',
$elf, $text
)
);
if (!$strAddr) {
perr("$text string not found in $elf file's .rodata section\n", true);
}
$secAddr = hexdec(substr($strAddr, -8));
perr("Found \"$text\" at " . decTo32bUFhex($secAddr) . " in $elf\n");
return $secAddr;
}
function getArgFilePath(int $argn)
{
global $argv;
$file = realpath($argv[$argn]);
if (!is_file($file) || !$file) {
perr("Expected a readable file in argument $argn - found none\n", true);
}
return $file;
}
/**
* Converts decimal value to 32-bit little-endian hex value
*/
function decTo32bLEhex(int $dec)
{
$hex = str_pad(dechex($dec), 32 / 8 * 2, 'f', STR_PAD_LEFT); //32-bit hex
return implode('', array_reverse(str_split($hex, 2))); //make it little-endian
}
/**
* Converts decimal value to 32-bit user-friendly (and big-endian) hex value
*
* This function should really be used for printing
*/
function decTo32bUFhex(int $dec)
{
return implode(' ', str_split(str_pad(dechex($dec), 32 / 8 * 2, 'f', STR_PAD_LEFT), 2));
}
function rawToUFhex(string $raw)
{
$out = '';
for($i=0, $iMax = strlen($raw); $i < $iMax; $i++) {
$out .= sprintf('%02x', ord($raw[$i]));
if ($i+1 !== $iMax) {
$out .= ' ';
}
}
return $out;
}
/**
* Convert hex values to their binary/raw counterparts as-is
*/
function hex2raw(string $hex)
{
$bin = '';
for ($i = 0, $iMax = strlen($hex); $i < $iMax; $i += 2) {
$bin .= chr(hexdec($hex[$i] . $hex[$i + 1]));
}
return $bin;
}
const DIR_FWD = 1;
const DIR_RWD = -1;
function findSequence($fp, string $bin, int $pos, int $dir, int $maxToCheck)
{
if ($maxToCheck === -1) {
$maxToCheck = PHP_INT_MAX;
}
$len = strlen($bin);
do {
fseek($fp, $pos);
if (strcmp(fread($fp, $len), $bin) === 0) {
return $pos;
}
$pos = $pos + $dir;
$maxToCheck--;
} while (!feof($fp) && $pos != -1 && $maxToCheck != 0);
return -1;
}
/**
* Locates a pattern of bytes $searchSeqNum in a $fp stream starting from $pos seeking up to $maxToCheck
*
* @param array $searchSeqNum An array containing n elements (where n=length of the searched sequence). Each element can
* be a null (denoting "any byte"), singular hex/int value (e.g. 0xF5), or a range in a form
* of a two-element array (e.g. [0xF0, 0xF7])
*/
function findSequenceWithWildcard($fp, array $searchSeqNum, int $pos, int $maxToCheck)
{
if ($maxToCheck === -1) {
$maxToCheck = PHP_INT_MAX;
}
$bufLen = count($searchSeqNum);
if ($maxToCheck < $bufLen) {
perr("maxToCheck cannot be smaller than search sequence!", true);
}
//Convert all singular value to raw bytes while leaving arrays as numeric (performance reasons). As this loop is
//executed once per pattern it can be sub-optimal but more careful with data validation
$searchSeq = [];
foreach ($searchSeqNum as $idx => $num) {
if ($num === null) {
$searchSeq[] = null;
} elseif (is_array($num) && count($num) == 2 && is_int($num[0]) && is_int($num[1]) && $num[0] >= 0 &&
$num[0] <= 255 && $num[1] >= 0 && $num[1] <= 255 && $num[0] < $num[1]) {
$searchSeq[] = $num; //Leave them as numeric
} elseif (is_int($num) && $num >= 0 && $num <= 255) {
$searchSeq[] = chr($num);
} else {
perr("Found invalid search sequence at index $idx", true);
}
}
//$pos denotes start position but it's also used to mark where start of a potential pattern match was found
fseek($fp, $pos);
do { //This loop is optimized for speed
$buf = fread($fp, $bufLen);
if (!isset($buf[$bufLen-1])) {
break; //Not enough data = no match
}
$successfulLoops = 0;
foreach ($searchSeq as $byteIdx => $seekByte) {
if ($seekByte === null) { //any character
++$successfulLoops;
continue;
}
//element in the array can be a range [(int)from,(int)to] or a literal SINGLE byte
//if isset finds a second element it will mean for us that it's an array of 2 elements (as we don't expect
//a string longer than a single byte)
if (isset($seekByte[1])) {
$curByteNum = ord($buf[$byteIdx]);
if ($curByteNum < $seekByte[0] || $curByteNum > $seekByte[1]) {
break;
}
} elseif($buf[$byteIdx] !== $seekByte) { //If the byte doesn't match literally we know it's not a match
break;
}
++$successfulLoops;
}
if ($successfulLoops === $bufLen) {
return $pos;
}
fseek($fp, ++$pos);
$maxToCheck--;
} while (!feof($fp) && $maxToCheck != 0);
return -1;
}
/**
* @return resource
*/
function getFileMemMapped(string $path)
{
$fp = fopen('php://memory', 'r+');
fwrite($fp, file_get_contents($path)); //poor man's mmap :D
return $fp;
}
function saveStreamToFile($fp, string $path)
{
perr("Saving stream to $path ...\n");
$fp2 = fopen($path, 'w');
fseek($fp, 0);
while (!feof($fp)) {
fwrite($fp2, fread($fp, 8192));
}
fclose($fp2);
perr("DONE!\n");
}
/**
* Do not call this in time-sensitive code...
*/
function readAt($fp, int $pos, int $len)
{
fseek($fp, $pos);
return fread($fp, $len);
}

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env php
<?php
if ($argc < 2 || $argc > 2) {
fwrite(STDERR, "Usage: " . $argv[0] . " <file>\n");
die();
}
echo hash_file('crc32b', $argv[1]);
?>

View File

@@ -0,0 +1 @@
kmod

View File

@@ -1,20 +1,24 @@
ARPL_VERSION="0.1-alpha3"
ARPL_VERSION="0.4-alpha3"
# Define paths
TMP_PATH="/tmp"
UNTAR_PAT_PATH="${TMP_PATH}/pat"
RAMDISK_PATH="${TMP_PATH}/ramdisk"
LOG_FILE="${TMP_PATH}/log.txt"
USER_CONFIG_FILE="${BOOTLOADER_PATH}/user-config.yml"
MOD_ZIMAGE_FILE="${BOOTLOADER_PATH}/zImage"
MOD_RDGZ_FILE="${BOOTLOADER_PATH}/rd.gz"
ORI_ZIMAGE_FILE="${SLPART_PATH}/zImage"
ORI_RDGZ_FILE="${SLPART_PATH}/rd.gz"
ARPL_BZIMAGE_FILE="${CACHE_PATH}/bzImage-arpl"
ARPL_RAMDISK_FILE="${CACHE_PATH}/initrd-arpl"
MOD_ZIMAGE_FILE="${CACHE_PATH}/zImage-dsm"
MOD_RDGZ_FILE="${CACHE_PATH}/initrd-dsm"
ADDONS_PATH="${CACHE_PATH}/addons"
LKM_PATH="${CACHE_PATH}/lkms"
MODULES_PATH="${CACHE_PATH}/modules"
MODEL_CONFIG_PATH="/opt/arpl/model-configs"
INCLUDE_PATH="/opt/arpl/include"

View File

@@ -21,6 +21,14 @@ if [ $NUM_PARTITIONS -ne 3 ]; then
die "Loader disk not found!"
fi
# Shows title
clear
TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}"
printf "\033[1;44m%*s\n" $COLUMNS ""
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 ""
# Check partitions and ignore errors
fsck.vfat -aw ${LOADER_DISK}1 >/dev/null 2>&1 || true
fsck.ext2 -p ${LOADER_DISK}2 >/dev/null 2>&1 || true
@@ -34,7 +42,6 @@ mount ${LOADER_DISK}1 ${BOOTLOADER_PATH} || die "Can't mount ${BOOTLOADER_PATH}"
mount ${LOADER_DISK}2 ${SLPART_PATH} || die "Can't mount ${SLPART_PATH}"
mount ${LOADER_DISK}3 ${CACHE_PATH} || die "Can't mount ${CACHE_PATH}"
mkdir -p "${ADDONS_PATH}"
# Move/link SSH machine keys to/from cache volume
[ ! -d "${CACHE_PATH}/ssh" ] && cp -R "/etc/ssh" "${CACHE_PATH}/ssh"
rm -rf "/etc/ssh"
@@ -43,6 +50,10 @@ ln -s "${CACHE_PATH}/ssh" "/etc/ssh"
rm -rf ~/.bash_history
ln -s ${CACHE_PATH}/.bash_history ~/.bash_history
# Get first MAC address
MAC=`ip link show eth0 | awk '/ether/{print$2}'`
MACF=`echo ${MAC} | sed 's/://g'`
# If user config file not exists, initialize it
if [ ! -f "${USER_CONFIG_FILE}" ]; then
touch "${USER_CONFIG_FILE}"
@@ -50,12 +61,29 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then
writeConfigKey "model" "" "${USER_CONFIG_FILE}"
writeConfigKey "build" "" "${USER_CONFIG_FILE}"
writeConfigKey "sn" "" "${USER_CONFIG_FILE}"
writeConfigKey "maxdisks" "" "${USER_CONFIG_FILE}"
writeConfigKey "layout" "qwerty" "${USER_CONFIG_FILE}"
writeConfigKey "keymap" "" "${USER_CONFIG_FILE}"
writeConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
writeConfigKey "ramdisk-hash" "" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline" "{}" "${USER_CONFIG_FILE}"
writeConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
writeConfigKey "addons.misc" "" "${USER_CONFIG_FILE}"
writeConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}"
# Initialize with real MAC
writeConfigKey "cmdline.netif_num" "1" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline.mac1" "${MACF}" "${USER_CONFIG_FILE}"
fi
writeConfigKey "original-mac" "${MACF}" "${USER_CONFIG_FILE}"
# Set custom MAC if defined
MAC1=`readConfigKey "cmdline.mac1" "${USER_CONFIG_FILE}"`
if [ -n "${MAC1}" -a "${MAC1}" != "${MACF}" ]; then
MAC="${MAC1:0:2}:${MAC1:2:2}:${MAC1:4:2}:${MAC1:6:2}:${MAC1:8:2}:${MAC1:10:2}"
echo "Setting MAC to ${MAC}"
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
@@ -73,14 +101,6 @@ fi
writeConfigKey "vid" ${VID} "${USER_CONFIG_FILE}"
writeConfigKey "pid" ${PID} "${USER_CONFIG_FILE}"
# Shows title
clear
TITLE="Welcome to Automated Redpill Loader v${ARPL_VERSION}"
printf "\033[1;44m%*s\n" $COLUMNS ""
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
echo -en "Loader disk: \033[1;32m${LOADER_DISK}\033[0m ("
if [ "${BUS}" = "usb" ]; then
@@ -101,12 +121,13 @@ if [ ${SIZEOFDISK} -ne ${ENDSECTOR} ]; then
fi
# Load keymap name
LAYOUT="`readConfigKey "layout" "${USER_CONFIG_FILE}"`"
KEYMAP="`readConfigKey "keymap" "${USER_CONFIG_FILE}"`"
# Loads a keymap if is valid
if [ -f /usr/share/keymaps/i386/qwerty/${KEYMAP}.map.gz ]; then
echo -e "Loading keymap \033[1;32m${KEYMAP}\033[0m"
zcat /usr/share/keymaps/i386/qwerty/${KEYMAP}.map.gz | loadkeys
if [ -f /usr/share/keymaps/i386/${LAYOUT}/${KEYMAP}.map.gz ]; then
echo -e "Loading keymap \033[1;32m${LAYOUT}/${KEYMAP}\033[0m"
zcat /usr/share/keymaps/i386/${LAYOUT}/${KEYMAP}.map.gz | loadkeys
fi
# Decide if boot automatically
@@ -147,3 +168,9 @@ echo
echo -e "User config is on \033[1;32m${USER_CONFIG_FILE}\033[0m"
echo -e "Default SSH Root password is \033[1;31mRedp1lL-1s-4weSomE\033[0m"
echo
mkdir -p "${ADDONS_PATH}"
mkdir -p "${LKM_PATH}"
mkdir -p "${MODULES_PATH}"
install-addons.sh

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
. /opt/arpl/include/functions.sh
set -e
# Detect if has new local plugins to install/reinstall
for F in `ls ${CACHE_PATH}/*.addon 2>/dev/null`; do
ADDON=`basename "${F}" | sed 's|.addon||'`
rm -rf "${ADDONS_PATH}/${ADDON}"
mkdir -p "${ADDONS_PATH}/${ADDON}"
echo "Installing ${F} to ${ADDONS_PATH}/${ADDON}"
tar xaf "${F}" -C "${ADDONS_PATH}/${ADDON}"
rm -f "${F}"
done

Binary file not shown.

Binary file not shown.

View File

@@ -14,22 +14,12 @@ fi
# Get actual IP
IP=`ip route get 1.1.1.1 2>/dev/null | awk '{print$7}'`
# Define classes for hw detection
declare -A CLASSES
CLASSES["0100"]="SCSI"
CLASSES["0106"]="SATA"
CLASSES["0101"]="IDE"
CLASSES["0107"]="SAS"
CLASSES["0200"]="Ethernet"
CLASSES["0300"]="VGA"
CLASSES["0c03"]="USB Controller"
CLASSES["0c04"]="Fiber Channel"
# Dirty flag
DIRTY=0
MODEL="`readConfigKey "model" "${USER_CONFIG_FILE}"`"
BUILD="`readConfigKey "build" "${USER_CONFIG_FILE}"`"
LAYOUT="`readConfigKey "layout" "${USER_CONFIG_FILE}"`"
KEYMAP="`readConfigKey "keymap" "${USER_CONFIG_FILE}"`"
LKM="`readConfigKey "lkm" "${USER_CONFIG_FILE}"`"
SN="`readConfigKey "sn" "${USER_CONFIG_FILE}"`"
@@ -59,9 +49,9 @@ function backtitle() {
BACKTITLE+=" (no IP)"
fi
if [ -n "${KEYMAP}" ]; then
BACKTITLE+=" (${KEYMAP})"
BACKTITLE+=" (${LAYOUT}/${KEYMAP})"
else
BACKTITLE+=" (us)"
BACKTITLE+=" (qwerty/us)"
fi
echo ${BACKTITLE}
}
@@ -69,47 +59,67 @@ function backtitle() {
###############################################################################
# Shows available models to user choose one
function modelMenu() {
ITEMS=""
while read M; do
M="`basename ${M}`"
M="${M::-4}"
# Check id model is compatible with CPU
COMPATIBLE=1
for F in `readModelArray "${M}" "flags"`; do
if ! grep -q "^flags.*${F}.*" /proc/cpuinfo; then
COMPATIBLE=0
break
RESTRICT=1
FLGBETA=0
while true; do
echo "" > "${TMP_PATH}/menu"
FLGNEX=0
while read M; do
M="`basename ${M}`"
M="${M::-4}"
PLATFORM=`readModelKey "${M}" "platform"`
DT="`readModelKey "${M}" "dt"`"
BETA="`readModelKey "${M}" "beta"`"
[ "${BETA}" = "true" -a ${FLGBETA} -eq 0 ] && continue
# Check id model is compatible with CPU
COMPATIBLE=1
if [ ${RESTRICT} -eq 1 ]; then
for F in `readModelArray "${M}" "flags"`; do
if ! grep -q "^flags.*${F}.*" /proc/cpuinfo; then
COMPATIBLE=0
FLGNEX=1
break
fi
done
fi
done
[ ${COMPATIBLE} -eq 1 ] && ITEMS+="${M} "
done < <(find "${MODEL_CONFIG_PATH}" -maxdepth 1 -name \*.yml | sort)
dialog --clear --no-items \
--backtitle "`backtitle`" \
--menu "Choose the model" 0 0 0 \
${ITEMS} \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
resp=$(<${TMP_PATH}/resp)
[ -z "${resp}" ] && return
# If user change model, clean buildnumber and S/N
if [ "${MODEL}" != "${resp}" ]; then
MODEL=${resp}
writeConfigKey "model" "${MODEL}" "${USER_CONFIG_FILE}"
BUILD=""
writeConfigKey "build" "${BUILD}" "${USER_CONFIG_FILE}"
SN=""
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
# Delete old files
rm -f "${MOD_ZIMAGE_FILE}"
rm -f "${MOD_RDGZ_FILE}"
DIRTY=1
fi
[ "${DT}" = "true" ] && DT="-DT" || DT=""
[ ${COMPATIBLE} -eq 1 ] && echo "${M} \"\Zb${PLATFORM}${DT}\Zn\" " >> "${TMP_PATH}/menu"
done < <(find "${MODEL_CONFIG_PATH}" -maxdepth 1 -name \*.yml | sort)
[ ${FLGNEX} -eq 1 ] && echo "f \"\Z1Disable flags restriction\Zn\"" >> "${TMP_PATH}/menu"
[ ${FLGBETA} -eq 0 ] && echo "b \"\Z1Show beta models\Zn\"" >> "${TMP_PATH}/menu"
dialog --backtitle "`backtitle`" --colors --menu "Choose the model" 0 0 0 \
--file "${TMP_PATH}/menu" 2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
resp=$(<${TMP_PATH}/resp)
[ -z "${resp}" ] && return
if [ "${resp}" = "f" ]; then
RESTRICT=0
continue
fi
if [ "${resp}" = "b" ]; then
FLGBETA=1
continue
fi
# If user change model, clean buildnumber and S/N
if [ "${MODEL}" != "${resp}" ]; then
MODEL=${resp}
writeConfigKey "model" "${MODEL}" "${USER_CONFIG_FILE}"
BUILD=""
writeConfigKey "build" "${BUILD}" "${USER_CONFIG_FILE}"
SN=""
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
# Delete old files
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}"
DIRTY=1
fi
break
done
}
###############################################################################
# Shows available buildnumbers from a model to user choose one
function buildMenu() {
ITEMS="`readConfigEntriesArray "builds" "${MODEL_CONFIG_PATH}/${MODEL}.yml"`"
ITEMS="`readConfigEntriesArray "builds" "${MODEL_CONFIG_PATH}/${MODEL}.yml" | sort -r`"
dialog --clear --no-items --backtitle "`backtitle`" \
--menu "Choose a build number" 0 0 0 ${ITEMS} 2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
@@ -118,10 +128,23 @@ function buildMenu() {
if [ "${BUILD}" != "${resp}" ]; then
BUILD=${resp}
writeConfigKey "build" "${BUILD}" "${USER_CONFIG_FILE}"
DIRTY=1
# Delete synoinfo and reload model/build synoinfo
writeConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
while IFS="=" read KEY VALUE; do
writeConfigKey "synoinfo.${KEY}" "${VALUE}" "${USER_CONFIG_FILE}"
done < <(readModelMap "${MODEL}" "builds.${BUILD}.synoinfo")
# Check addons
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
while IFS="=" read ADDON PARAM; do
[ -z "${ADDON}" ] && continue
if ! checkAddonExist "${ADDON}" "${PLATFORM}" "${KVER}"; then
deleteConfigKey "addons.${ADDON}" "${USER_CONFIG_FILE}"
fi
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
# Remove old files
rm -f "${MOD_ZIMAGE_FILE}"
rm -f "${MOD_RDGZ_FILE}"
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}"
DIRTY=1
fi
}
@@ -149,8 +172,9 @@ function serialMenu() {
elif [ `validateSerial ${MODEL} ${SERIAL}` -eq 1 ]; then
break
fi
dialog --backtitle "`backtitle`" \
--msgbox "Invalid serial, please type a right one" 0 0
dialog --backtitle "`backtitle`" --title "Alert" \
--yesno "Invalid serial, continue?" 0 0
[ $? -eq 0 ] && break
done
break
elif [ "${resp}" = "a" ]; then
@@ -163,64 +187,7 @@ function serialMenu() {
}
###############################################################################
# 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
# Manage addons
function addonMenu() {
# Read 'platform' and kernel version to check if addon exists
PLATFORM="`readModelKey "${MODEL}" "platform"`"
@@ -231,25 +198,20 @@ function addonMenu() {
while IFS="=" read KEY VALUE; do
[ -n "${KEY}" ] && ADDONS["${KEY}"]="${VALUE}"
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
NEXT="h"
NEXT="a"
# 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" \
o "Download a external 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
@@ -258,6 +220,7 @@ function addonMenu() {
done < <(availableAddons "${PLATFORM}" "${KVER}")
if [ ! -f "${TMP_PATH}/menu" ] ; then
dialog --backtitle "`backtitle`" --msgbox "No available addons to add" 0 0
NEXT="e"
continue
fi
dialog --backtitle "`backtitle`" --menu "Select an addon" 0 0 0 \
@@ -317,8 +280,6 @@ function addonMenu() {
;;
o)
TEXT="please enter the complete URL to download.\n"
TEXT+="\Zb(Official addons location: https://github.com/fbelavenuto/arpl-addons/releases)\Zn\n"
TEXT+="Ex: https://github.com/fbelavenuto/arpl-addons/releases/download/v0.2/9p.addon"
dialog --backtitle "`backtitle`" --aspect 18 --colors --inputbox "${TEXT}" 0 0 \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && continue
@@ -329,7 +290,7 @@ function addonMenu() {
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
--msgbox "Check internet, URL or cache disk space" 0 0
return 1
fi
ADDON="`untarAddon "${TMP_PATH}/addon.tgz"`"
@@ -346,40 +307,22 @@ function addonMenu() {
done
}
###############################################################################
# Sets variables to configure maxdisks
# 1 - Number of disks
function setMaxDisks() {
CMDLINE['maxdisks']="${1}"
writeConfigKey "cmdline.maxdisks" "${1}" "${USER_CONFIG_FILE}"
INTPORTCFG=""
for I in `seq 1 ${1}`; do INTPORTCFG+="1"; done
INTPORTCFG="0x`printf "%x" "$((2#${INTPORTCFG}))"`"
CMDLINE['internalportcfg']="${INTPORTCFG}"
writeConfigKey "cmdline.internalportcfg" "${INTPORTCFG}" "${USER_CONFIG_FILE}"
}
###############################################################################
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}")
echo "a \"Add/edit an cmdline item\"" > "${TMP_PATH}/menu"
echo "d \"Delete cmdline item(s)\"" >> "${TMP_PATH}/menu"
echo "c \"Define a custom MAC\"" >> "${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
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
@@ -406,7 +349,7 @@ function cmdlineMenu() {
fi
ITEMS=""
for I in "${!CMDLINE[@]}"; do
ITEMS+="${I} ${CMDLINE[${I}]} off "
[ -z "${CMDLINE[${I}]}" ] && ITEMS+="${I} \"\" off " || ITEMS+="${I} ${CMDLINE[${I}]} off "
done
dialog --backtitle "`backtitle`" \
--checklist "Select cmdline to remove" 0 0 0 ${ITEMS} \
@@ -419,6 +362,29 @@ function cmdlineMenu() {
deleteConfigKey "cmdline.${I}" "${USER_CONFIG_FILE}"
done
;;
c)
while true; do
dialog --backtitle "`backtitle`" --title "User cmdline" \
--inputbox "Type a custom MAC address" 0 0 "${CMDLINE['mac1']}"\
2>${TMP_PATH}/resp
[ $? -ne 0 ] && break
MAC="`<"${TMP_PATH}/resp"`"
[ -z "${MAC}" ] && MAC="`readConfigKey "original-mac" "${USER_CONFIG_FILE}"`"
MAC1="`echo "${MAC}" | sed 's/://g'`"
[ ${#MAC1} -eq 12 ] && break
dialog --backtitle "`backtitle`" --title "User cmdline" --msgbox "Invalid MAC" 0 0
done
CMDLINE["mac1"]="${MAC1}"
CMDLINE["netif_num"]=1
writeConfigKey "cmdline.mac1" "${MAC1}" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline.netif_num" "1" "${USER_CONFIG_FILE}"
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} 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=""
for KEY in ${!CMDLINE[@]}; do
@@ -435,20 +401,8 @@ function cmdlineMenu() {
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
setMaxDisks ${VALUE}
else
dialog --backtitle "`backtitle`" --msgbox "Invalid number" 0 0
fi
;;
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: "
@@ -466,9 +420,11 @@ function cmdlineMenu() {
[ ${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
@@ -480,32 +436,38 @@ function cmdlineMenu() {
###############################################################################
function synoinfoMenu() {
# Get dt flag from model
DT="`readModelKey "${MODEL}" "dt"`"
# 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"
if [ "${DT}" != "true" ]; then
echo "x \"Set maxdisks manually\"" >> "${TMP_PATH}/menu"
fi
echo "s \"Show synoinfo entries\"" >> "${TMP_PATH}/menu"
echo "e \"Exit\"" >> "${TMP_PATH}/menu"
# 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
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 \
dialog --backtitle "`backtitle`" --title "Synoinfo entries" \
--inputbox "Type a name of synoinfo entry" 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}]}" \
NAME="`<"${TMP_PATH}/resp"`"
[ -z "${NAME}" ] && continue
dialog --backtitle "`backtitle`" --title "Synoinfo entries" \
--inputbox "Type a value of '${NAME}' entry" 0 0 "${SYNOINFO[${NAME}]}" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && continue
VALUE="`<"${TMP_PATH}/resp"`"
@@ -515,15 +477,15 @@ function synoinfoMenu() {
;;
d)
if [ ${#SYNOINFO[@]} -eq 0 ]; then
dialog --backtitle "`backtitle`" --msgbox "No user synoinfo to remove" 0 0
dialog --backtitle "`backtitle`" --msgbox "No synoinfo entries to remove" 0 0
continue
fi
ITEMS=""
for I in "${!SYNOINFO[@]}"; do
ITEMS+="${I} ${SYNOINFO[${I}]} off "
[ -z "${SYNOINFO[${I}]}" ] && ITEMS+="${I} \"\" off " || ITEMS+="${I} ${SYNOINFO[${I}]} off "
done
dialog --backtitle "`backtitle`" \
--checklist "Select synoinfo to remove" 0 0 0 ${ITEMS} \
--checklist "Select synoinfo entry to remove" 0 0 0 ${ITEMS} \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && continue
RESP=`<"${TMP_PATH}/resp"`
@@ -534,20 +496,21 @@ function synoinfoMenu() {
done
DIRTY=1
;;
x)
MAXDISKS=`readConfigKey "maxdisks" "${USER_CONFIG_FILE}"`
dialog --backtitle "`backtitle`" --title "Maxdisks" \
--inputbox "Type a value for maxdisks" 0 0 "${MAXDISKS}" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && continue
VALUE="`<"${TMP_PATH}/resp"`"
[ "${VALUE}" != "${MAXDISKS}" ] && writeConfigKey "maxdisks" "${VALUE}" "${USER_CONFIG_FILE}"
;;
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" \
dialog --backtitle "`backtitle`" --title "Synoinfo entries" \
--aspect 18 --msgbox "${ITEMS}" 0 0
;;
e) return ;;
@@ -556,26 +519,13 @@ function synoinfoMenu() {
}
###############################################################################
# Where the magic happens :D
function make() {
clear
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
# Extract linux and ramdisk files from the DSM .pat
function extractDsmFiles() {
PAT_URL="`readModelKey "${MODEL}" "builds.${BUILD}.pat.url"`"
PAT_HASH="`readModelKey "${MODEL}" "builds.${BUILD}.pat.hash"`"
RAMDISK_HASH="`readModelKey "${MODEL}" "builds.${BUILD}.pat.ramdisk-hash"`"
ZIMAGE_HASH="`readModelKey "${MODEL}" "builds.${BUILD}.pat.zimage-hash"`"
# Check if all addon exists
while IFS="=" read ADDON PARAM; do
[ -z "${ADDON}" ] && continue
if ! checkAddonExist "${ADDON}" "${PLATFORM}" "${KVER}"; then
dialog --backtitle "`backtitle`" --title "Error" --aspect 18 \
--msgbox "Addon ${ADDON} not found!" 0 0
return 1
fi
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
if [ ${RAMCACHE} -eq 0 ]; then
OUT_PATH="${CACHE_PATH}/dl"
echo "Cache in disk"
@@ -585,7 +535,6 @@ function make() {
fi
mkdir -p "${OUT_PATH}"
UNTAR_PAT_PATH="${TMP_PATH}/pat"
PAT_FILE="${MODEL}-${BUILD}.pat"
PAT_PATH="${OUT_PATH}/${PAT_FILE}"
EXTRACTOR_PATH="${CACHE_PATH}/extractor"
@@ -716,6 +665,24 @@ function make() {
cp "${UNTAR_PAT_PATH}/zImage" "${ORI_ZIMAGE_FILE}"
cp "${UNTAR_PAT_PATH}/rd.gz" "${ORI_RDGZ_FILE}"
echo "OK"
}
function make() {
clear
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
# Check if all addon exists
while IFS="=" read ADDON PARAM; do
[ -z "${ADDON}" ] && continue
if ! checkAddonExist "${ADDON}" "${PLATFORM}" "${KVER}"; then
dialog --backtitle "`backtitle`" --title "Error" --aspect 18 \
--msgbox "Addon ${ADDON} not found!" 0 0
return 1
fi
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
[ ! -f "${ORI_ZIMAGE_FILE}" -o ! -f "${ORI_RDGZ_FILE}" ] && extractDsmFiles
/opt/arpl/zimage-patch.sh
if [ $? -ne 0 ]; then
@@ -780,19 +747,180 @@ function editUserConfig() {
###############################################################################
# Shows available keymaps to user choose one
function keymapMenu() {
dialog --backtitle "`backtitle`" --default-item "${LAYOUT}" --no-items \
--menu "Choose a layout" 0 0 0 "azerty" "bepo" "carpalx" "colemak" \
"dvorak" "fgGIod" "neo" "olpc" "qwerty" "qwertz" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
LAYOUT="`<${TMP_PATH}/resp`"
OPTIONS=""
while read KM; do
OPTIONS+="${KM::-7} "
done < <(cd /usr/share/keymaps/i386/qwerty; ls *.map.gz)
dialog --backtitle "`backtitle`" --no-items \
done < <(cd /usr/share/keymaps/i386/${LAYOUT}; ls *.map.gz)
dialog --backtitle "`backtitle`" --no-items --default-item "${KEYMAP}" \
--menu "Choice a keymap" 0 0 0 ${OPTIONS} \
2>/tmp/resp
[ $? -ne 0 ] && return
resp=`cat /tmp/resp 2>/dev/null`
[ -z "${resp}" ] && return
KEYMAP=${resp}
writeConfigKey "layout" "${LAYOUT}" "${USER_CONFIG_FILE}"
writeConfigKey "keymap" "${KEYMAP}" "${USER_CONFIG_FILE}"
zcat /usr/share/keymaps/i386/qwerty/${KEYMAP}.map.gz | loadkeys
zcat /usr/share/keymaps/i386/${LAYOUT}/${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" \
m "Update modules" \
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 "${ARPL_BZIMAGE_FILE}"
mv /tmp/rootfs.cpio.xz "${ARPL_RAMDISK_FILE}"
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
for PKG in `ls /tmp/addons/*.addon`; do
ADDON=`basename ${PKG} | sed 's|.addon||'`
rm -rf "${ADDONS_PATH}/${ADDON}"
mkdir -p "${ADDONS_PATH}/${ADDON}"
tar xaf "${PKG}" -C "${ADDONS_PATH}/${ADDON}" >/dev/null 2>&1
done
DIRTY=1
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 last version" 0 0
continue
fi
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
--infobox "Extracting last version" 0 0
rm -rf "${LKM_PATH}/"*
unzip /tmp/rp-lkms.zip -d "${LKM_PATH}" >/dev/null 2>&1
DIRTY=1
dialog --backtitle "`backtitle`" --title "Update LKMs" --aspect 18 \
--msgbox "LKMs updated with success!" 0 0
;;
m)
unset PLATFORMS
declare -A PLATFORMS
while read M; do
M="`basename ${M}`"
M="${M::-4}"
P=`readModelKey "${M}" "platform"`
ITEMS="`readConfigEntriesArray "builds" "${MODEL_CONFIG_PATH}/${M}.yml"`"
for B in ${ITEMS}; do
KVER=`readModelKey "${M}" "builds.${B}.kver"`
PLATFORMS["${P}-${KVER}"]=""
done
done < <(find "${MODEL_CONFIG_PATH}" -maxdepth 1 -name \*.yml | sort)
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
--infobox "Checking last version" 0 0
TAG=`curl --insecure -s https://api.github.com/repos/fbelavenuto/arpl-modules/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 Modules" --aspect 18 \
--msgbox "Error checking new version" 0 0
continue
fi
for P in ${!PLATFORMS[@]}; do
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
--infobox "Downloading ${P} modules" 0 0
curl --insecure -s -L "https://github.com/fbelavenuto/arpl-modules/releases/download/${TAG}/${P}.tgz" -o "/tmp/${P}.tgz"
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
--msgbox "Error downloading ${P}.tgz" 0 0
continue
fi
rm "${MODULES_PATH}/${P}.tgz"
mv "/tmp/${P}.tgz" "${MODULES_PATH}/${P}.tgz"
done
DIRTY=1
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
--msgbox "Modules updated with success!" 0 0
;;
e) return ;;
esac
done
}
###############################################################################
@@ -806,7 +934,7 @@ while true; do
echo "n \"Choose a Build Number\"" >> "${TMP_PATH}/menu"
echo "s \"Choose a serial number\"" >> "${TMP_PATH}/menu"
if [ -n "${BUILD}" ]; then
echo "a \"Addons/drivers\"" >> "${TMP_PATH}/menu"
echo "a \"Addons\"" >> "${TMP_PATH}/menu"
echo "x \"Cmdline menu\"" >> "${TMP_PATH}/menu"
echo "i \"Synoinfo menu\"" >> "${TMP_PATH}/menu"
echo "l \"Switch LKM version: \Z4${LKM}\Zn\"" >> "${TMP_PATH}/menu"
@@ -817,6 +945,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" \
@@ -839,8 +968,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"

View File

@@ -0,0 +1,87 @@
id: "DS1520+"
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
small_info_path: "https://example.com/null"
security_version_server: "https://example.com/smallupdate"
cmdline: &cmdline
intel_iommu: igfx_off
HddEnableDynamicPower: 1
vender_format_version: 2
synoboot2:
syno_ttyS0: "serial,0x3f8"
syno_ttyS1: "serial,0x2f8"
platform: "geminilake"
unique: "synology_geminilake_1520+"
beta: true
dom: 2
serial:
prefix:
- "0000"
middle: "XXX"
suffix: "alpha"
disks: 6
dt: true
builds:
42218:
ver: "7.0.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS1520%2B_42218.pat"
hash: "06947c58f25bd591f7fa3c58ad9473777481bdd7a049b42d1cb585ca01b053ee"
ramdisk-hash: "f0a275587c51acdb4d58a7f0d82d70f31e54228d0fbf7575d5d425dae75d1969"
zimage-hash: "74d513aaa3e30d8aa4f80e202d94a68a552e9c0472f8470e133ad29080556f55"
md5-hash: "f56200a8be1aed4eb287a51b373adb1f"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-common-post-init-script.patch"
42661:
ver: "7.1.0"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1/42661-1/DSM_DS1520%2B_42661.pat"
hash: "3a8499c5f72d7241b81781ec741d4019eaa506e6e7a4fd17ce54fb149f6ffae6"
ramdisk-hash: "b18f14b8420a217d7b6dd3696786ecccfbe7c325d342475531a68a7df831cffc"
zimage-hash: "1d0e5b76e08e3483f6bf06d23b5978ec498b855bde23db1f96f343db4c43337d"
md5-hash: "1d8ecfcb2a956488ae355c79a72bb9ec"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS1520%2B_42951.pat"
hash: "32063eb34a0e29402c7774d60bb3b7247f894c60e676a437de00cd21b9b68cdb"
ramdisk-hash: "1afd618cd6799087320343a48a3992594730e2e807110f2770a4cf3f708f8ccd"
zimage-hash: "bbfa903358576e5545c3c3c021c292637360f0925de5e59cb3e785f92db71fd3"
md5-hash: "5fd40dc13c83ff14bc10fd43a7d19606"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -1,27 +1,11 @@
id: "DS1621+"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
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"
update_server: "http://example.com/"
update_server_ssl: "https://example.com/"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
@@ -34,6 +18,8 @@ cmdline: &cmdline
syno_ttyS0: "serial,0x3f8"
syno_ttyS1: "serial,0x2f8"
platform: "v1000"
unique: "synology_v1000_1621+"
dom: 2
serial:
prefix:
- "2080"
@@ -47,7 +33,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -57,18 +42,17 @@ builds:
hash: "19f56827ba8bf0397d42cd1d6f83c447f092c2c1bbb70d8a2ad3fbd427e866df"
ramdisk-hash: "73512c7bceb34cf7f7f93c2703db60496da0e27274fc45e5aefa0366c9734d6e"
zimage-hash: "f4648d0dd6b29ef6149b0ff46afe1fe32f81730aa79af72f37ffd3647c76f586"
md5-hash: "f82cbabbfef3fdf2cba45da77d14959b"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-common-post-init-script.patch"
- "ramdisk-common-network-hosts.patch"
42661:
ver: "7.1.0"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -78,8 +62,28 @@ builds:
hash: "381077302a89398a9fb5ec516217578d6f33b0219fe95135e80fd93cddbf88c4"
ramdisk-hash: "8fd5eb40fb088af97d3beee85b6275c2ceb368b08453eb5a5d00d42cc7d578d1"
zimage-hash: "d939b5937be00a644aae64c33633619a7c310433e60a515c77bbef00b0a7e6b6"
md5-hash: "b4b72eb8d4e84b2e2a8c29fc0a1ac6aa"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
- "ramdisk-common-network-hosts.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS1621%2B_42951.pat"
hash: "127bc3a5405761915f8a4669c925defd39b31b9740064af357ff2db928314ac9"
ramdisk-hash: "12553531c3e8820241babc6b5176ea6f417368e80740c086b6897a67c8783f6e"
zimage-hash: "d28951da0eb41286fbe37ffdfc880271787573d68226e5d26321819cf2d2e6e2"
md5-hash: "4e52301c56ae5e7b03ff9ea1f8392d43"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -1,25 +1,13 @@
id: "DS2422+"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
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/"
support_disk_compatibility: "no"
support_memory_compatibility: "no"
supportraidgroup: "no"
supportssdcache: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
@@ -30,10 +18,13 @@ cmdline: &cmdline
syno_ttyS0: "serial,0x3f8"
syno_ttyS1: "serial,0x2f8"
platform: "v1000"
unique: "synology_v1000_2422+"
dom: 2
serial:
prefix:
- "0000"
middle: "XXX"
- "2140"
- "2180"
middle: "SLR"
suffix: "numeric"
disks: 12
dt: true
@@ -43,7 +34,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -53,9 +43,47 @@ builds:
hash: "415c54934d483a2557500bc3a2e74588a0cec1266e1f0d9a82a7d3aace002471"
ramdisk-hash: "2b5b8dd90b2e6020ffccc2719d8bc16d9935421754a8c088d6b31dbca4e4ff7b"
zimage-hash: "38281a90036fffcb41cd17f05a6c7e9a1d5740a78c135980fb0c3a6d0ca1485f"
md5-hash: "9293156f98e642c181aed63b0b3df4c8"
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
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1/42661-1/DSM_DS2422%2B_42661.pat"
hash: "c38fee0470c592b679ab52a64eac76b2a3912fb2e6aba65a65abb5aa05a98d4c"
ramdisk-hash: "bb109132e96b1e26d5e3d44557944f7518168d8cb18e35d6254c0dfe7fb19382"
zimage-hash: "d939b5937be00a644aae64c33633619a7c310433e60a515c77bbef00b0a7e6b6"
md5-hash: "9ea5e0fe94c01072da36e2f69172abb3"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS2422%2B_42951.pat"
hash: "ff2e444040f8105079260396649466d791fc8c6613c52ed78d993a784547476d"
ramdisk-hash: "a3a7571bf0220dfe53f750a554c1b570ce4a66792b0dc1c9f2d093f5d7d212b5"
zimage-hash: "d28951da0eb41286fbe37ffdfc880271787573d68226e5d26321819cf2d2e6e2"
md5-hash: "40da0cb929793e3d165f5958d4a5533b"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -1,34 +1,24 @@
id: "DS3615xs"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
supportraidgroup: "no"
supportssdcache: "no"
esataportcfg: "0x0"
usbportcfg: "0x8700"
rss_server: "http://example.com/null.xml"
rss_server_ssl: "https://example.com/null.xml"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
small_info_path: "https://example.com/null"
updateurl: "http://example.com/"
myds_region_api_base_url: "https://example.com"
cmdline: &cmdline
syno_hdd_powerup_seq: 0
HddHotplug: 0
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "bromolow"
unique: "synology_bromolow_3615xs"
serial:
prefix:
prefix:
- "1130"
- "1230"
- "1330"
@@ -36,13 +26,13 @@ serial:
middle: "LWN"
suffix: "numeric"
disks: 12
dom: 1
builds:
42218:
ver: "7.0.1"
kver: "3.10.108"
rd-compressed: false
efi-bug: yes
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -52,11 +42,11 @@ builds:
hash: "dddd26891815ddca02d0d53c1d42e8b39058b398a4cc7b49b80c99f851cf0ef7"
ramdisk-hash: "4c90c3c7ee25b5fcc651552e80a9364d22823c863c834c5f43e3344a3a68af78"
zimage-hash: "d29b695612710376734cb5c5b5ae4f2d8afc49ffd640387e1c86010f6c7d2c8a"
md5-hash: "ea1c30f644bacae2e0b1ef914bc663db"
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:
@@ -64,7 +54,6 @@ builds:
kver: "3.10.108"
rd-compressed: false
efi-bug: yes
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -74,9 +63,30 @@ builds:
hash: "1e95d8c63981bcf42ea2eaedfbc7acc4248ff16d129344453b7479953f9ad145"
ramdisk-hash: "8ee5df65bcfd25c3d1999262153dcff625714d98789bc8065e217773f8d070d8"
zimage-hash: "3017542c92232cb5477b0e11d82d708a9909320350b1740aab58359e85f82351"
md5-hash: "271b34cb2a0c23d63178aef3bf45a6ae"
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"
42951:
ver: "7.1.1"
kver: "3.10.108"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS3615xs_42951.pat"
hash: "f1de39322babe5664a30e0d16b9ce3d73aeb30742cb7b8def09f40d1577fc5a2"
ramdisk-hash: "0e353b4a8b1f8efa40e6f853a8d16553dfdf1ebc10bcabbe8dfa7803343c26ef"
zimage-hash: "6c535aa513dedc6c2a2b43158e1298c9ea67bf5f909cc19a904e24b51028820b"
md5-hash: "1f6831d8706d8337f06a6028037fe120"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,26 +1,14 @@
id: "DS3617xs"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- xhci_pci
- xhci_hcd
- uhci_hcd
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
supportraidgroup: "no"
supportssdcache: "no"
esataportcfg: "0x00"
usbportcfg: "0x8700"
rss_server: "http://example.com/null.xml"
rss_server_v2: "https://example.com/autoupdate/v2/getList"
rss_server_ssl: "https://example.com/null.xml"
update_server: "http://example.com/"
update_server_ssl: "https://example.com/"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
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
syno_hdd_powerup_seq: 0
@@ -28,8 +16,9 @@ cmdline: &cmdline
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "broadwell"
unique: "synology_broadwell_3617xs"
dom: 1
serial:
prefix:
- "1130"
@@ -45,7 +34,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -55,11 +43,11 @@ builds:
hash: "d65ee4ed5971e38f6cdab00e1548183435b53ba49a5dca7eaed6f56be939dcd2"
ramdisk-hash: "1b2e86fbf4006f6aa40dcd674ad449feed8b0b8317a71e2bb8bb986a74e08c57"
zimage-hash: "28a75e0b680517d39374260eb981b8ca9ace8810b121a30b8036fa09cfcb77fc"
md5-hash: "8972088c38acd07aa92a8b573a1b7bc3"
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:
@@ -67,7 +55,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -77,9 +64,30 @@ builds:
hash: "0a5a243109098587569ab4153923f30025419740fb07d0ea856b06917247ab5c"
ramdisk-hash: "da3c2a170fea24052d817cbc4bb5b610a5b05288758d746b60a294ed614239fb"
zimage-hash: "9598f66b75e5b303e571241696e02fe7c0add80f13564f8c6b8c0daaf3cb3018"
md5-hash: "94e6263912bc758ee3db81c62a94a8f6"
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"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS3617xs_42951.pat"
hash: "d879a5be878c59492e4059a833f17d826ed33fb46552b54759e9c37c6ed17a21"
ramdisk-hash: "82148561e561e5a3cb5d88cac47515db6d8426771d8965b1b91b7eab6d1e4a10"
zimage-hash: "7f354665843d73779ba28a1c610c7fb31526b717ce354d459d7e28b2d05257ab"
md5-hash: "d6c61c7c84320ccc684b76ae6219e650"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,42 +1,26 @@
id: "DS3622xs+"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- r8168
- r8169
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
esataportcfg: "0x00"
support_bde_internal_10g: "no"
support_disk_compatibility: "no"
support_memory_compatibility: "no"
supportraidgroup: "no"
supportssdcache: "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"
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"
esataportcfg: "0x00"
support_bde_internal_10g: "no"
support_oob_ctl: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml" # http://update7.synology.com/autoupdate/genRSS.php
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml" # https://update7.synology.com/autoupdate/genRSS.php
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json" # https://update7.synology.com/autoupdate/v2/getList
small_info_path: "https://example.com/null" # https://update7.synology.com/smallupdate
security_version_server: "https://example.com/smallupdate" # https://update7.synology.com/securityVersion
cmdline: &cmdline
syno_hdd_powerup_seq: 0
HddHotplug: 0
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "broadwellnk"
unique: "synology_broadwellnk_3622xs+"
dom: 1
serial:
prefix:
- "2030"
@@ -52,7 +36,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -62,11 +45,11 @@ builds:
hash: "f38329b8cdc5824a8f01fb1e377d3b1b6bd23da365142a01e2158beff5b8a424"
ramdisk-hash: "a95d4ab06189460f3b3d13a33e421887b5f3ea09a10535ae0d4c92beb7ff631d"
zimage-hash: "06964b68e5ccdedd4363dff3986f99686d3c9cb5225e8e4c3d840a1d9cd1330b"
md5-hash: "bc0235e45a8423f4c46dc0d9699759b5"
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:
@@ -74,7 +57,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -84,9 +66,30 @@ builds:
hash: "53d0a4f1667288b6e890c4fdc48422557ff26ea8a2caede0955c5f45b560cccd"
ramdisk-hash: "df8a055d6bc901229f0ba53ed5b4fe024bdf9a1b42f0c32483adefcdac14db4d"
zimage-hash: "e073dd84054f652811e0ae1932af2c7cdbd5fb6e5f18f265097072b8af4605e8"
md5-hash: "7af76cca8226ecf95b25630bffa76b3d"
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"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS3622xs%2B_42951.pat"
hash: "11f34ae65b13f7feace40e6a7c2399150ef2b4f4eb3a6dcec0be52fca265f151"
ramdisk-hash: "469d76399eb94fee0cb135c6e178cdea797290671f6bf0ae896d7387f66dc952"
zimage-hash: "9134fc61aea7f687d62728470b8847e640693c444e0afd130882b728ab553fea"
md5-hash: "b34b7b7d21af459ae0ba6ea1f9974de6"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,29 +1,15 @@
id: "DS918+"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
esataportcfg: "0x00"
support_led_brightness_adjustment: ""
support_leds_lp3943: ""
buzzeroffen: "0xffff"
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/"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
syno_hdd_powerup_seq: 0
@@ -31,8 +17,9 @@ cmdline: &cmdline
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "apollolake"
unique: "synology_apollolake_918+"
dom: 2
serial:
prefix:
- "1780"
@@ -50,7 +37,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -60,11 +46,11 @@ builds:
hash: "a403809ab2cd476c944fdfa18cae2c2833e4af36230fa63f0cdee31a92bebba2"
ramdisk-hash: "4b7a7a271a3b2158d9193a4f0e75c59590949ad7b4e26d546f46cc2ee8504d51"
zimage-hash: "338ba514066da01d0c1f770418916b9b96f5355d88a7b55b398d2726db591fdb"
md5-hash: "71c028f92497e4722998e4208fe75774"
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:
@@ -72,7 +58,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -82,9 +67,30 @@ builds:
hash: "4e8a9d82a8a1fde5af9a934391080b7bf6b91811d9583acb73b90fb6577e22d7"
ramdisk-hash: "ef8c87b6e68226339e5623d048252f5be3089c0831e41298a4695f2bfa65f00e"
zimage-hash: "9ce0d3452f08afaf95d52292ff20cbac6d69e17d5b9953377e4ac90c9ac7397d"
md5-hash: "2c49260d2646a0944b56933f7d4029fb"
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"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS918%2B_42951.pat"
hash: "4035aeea248be9c952298a875050625a2485caf46bcd2f9f1c3b21cc8194304b"
ramdisk-hash: "0eb6433108d8ca1ac1c9b7bf5c35c54c1c0b400f4fcca2c5e95194494fc26686"
zimage-hash: "bb0657c7111a31eaf27e51957ce6f83c6ed48b863666d1ea0a25ed52df3a4020"
md5-hash: "fbdd1584dfcb1898df5f66a886a6e9b7"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,25 +1,11 @@
id: "DS920+"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
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/"
support_disk_compatibility: "no"
support_memory_compatibility: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
intel_iommu: "igfx_off"
@@ -29,6 +15,9 @@ cmdline: &cmdline
syno_ttyS1: "serial,0x2f8"
vender_format_version: 2
platform: "geminilake"
unique: "synology_geminilake_920+"
dom: 2
dt: true
serial:
prefix:
- "2030"
@@ -44,28 +33,26 @@ builds:
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_DS920%2B_42218.pat"
hash: "73053911bd118b432d5a2036dc62d518eed83b78b32c1eb23696d59725a14892"
ramdisk-hash: "e39890f4bef2e5e4eea956996b0dd92d081c6d9e7c393331131e65bbad1a17a9"
zimage-hash: "74d513aaa3e30d8aa4f80e202d94a68a552e9c0472f8470e133ad29080556f55"
hash: "fe2a4648f76adeb65c3230632503ea36bbac64ee88b459eb9bfb5f3b8c8cebb3"
ramdisk-hash: "f7dd1317f24ec6b9bac839e37f66b59030218c7f97c06f73f1f54ed0f892c4aa"
zimage-hash: "346b68f662b50f47d3ee6c2bc9de6302e4b60436142c24ee88b620c7afd1ba06"
md5-hash: "7764ad4fca0a11ae0ebd7ccd4a49e1aa"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-common-post-init-script.patch"
- "ramdisk-common-network-hosts.patch"
42661:
ver: "7.1.0"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -75,8 +62,28 @@ builds:
hash: "8076950fdad2ca58ea9b91a12584b9262830fe627794a0c4fc5861f819095261"
ramdisk-hash: "c8ad44826c87e065a3b05f354a639c0a86cb2fa47b88e11949604d53f3e80048"
zimage-hash: "1d0e5b76e08e3483f6bf06d23b5978ec498b855bde23db1f96f343db4c43337d"
md5-hash: "fa3936a53299b1a1142e4c614e2b360c"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
- "ramdisk-common-network-hosts.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DS920%2B_42951.pat"
hash: "412b94e64fb46bc7732de55bec0892e6ee51529364ae2aa2473d04aa48b9a3bd"
ramdisk-hash: "1026791ed6b9387fc0fcaec68c4606be35d29582ed7501a2fdf02d62c017e368"
zimage-hash: "bbfa903358576e5545c3c3c021c292637360f0925de5e59cb3e785f92db71fd3"
md5-hash: "9fcb2a54b13f4e6acc3947c2165a464b"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -1,27 +1,12 @@
id: "DVA1622"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
buzzeroffen: "0xffff"
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/"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
intel_iommu: "igfx_off"
@@ -32,6 +17,8 @@ cmdline: &cmdline
syno_ttyS0: "serial,0x3f8"
syno_ttyS1: "serial,0x2f8"
platform: "geminilake"
unique: "synology_geminilake_dva1622"
dom: 2
serial:
prefix:
- "2030"
@@ -48,7 +35,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -58,8 +44,28 @@ builds:
hash: "f1484cf302627072ca393293cd73e61dc9e09d479ef028b216eae7c12f7b7825"
ramdisk-hash: "6290945ba61f652aec83725f81f5a47bd5e4cdbeb86241c33825154140e164ec"
zimage-hash: "1d0e5b76e08e3483f6bf06d23b5978ec498b855bde23db1f96f343db4c43337d"
md5-hash: "27515a2e7c2f2113ccf8955bf22f3974"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
- "ramdisk-common-network-hosts.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DVA1622_42951.pat"
hash: "2771636333fe1f1f08ad7e80100c0c1224edf1290cea2df848e8d019992b1271"
ramdisk-hash: "920336ce890b099b4192cc41e1773e501392b9611cc09c8f96a4e8ed8ddfdfad"
zimage-hash: "bbfa903358576e5545c3c3c021c292637360f0925de5e59cb3e785f92db71fd3"
md5-hash: "6e119d8eb2c0a175a56b0bbba1f43372"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -0,0 +1,93 @@
id: "DVA3219"
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
esataportcfg: "0x00"
support_bde_internal_10g: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
small_info_path: "https://example.com/null"
security_version_server: "https://example.com/smallupdate"
cmdline: &cmdline
syno_hdd_powerup_seq: 0
HddHotplug: 0
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "denverton"
unique: "synology_denverton_dva3219"
beta: true
dom: 2
serial:
prefix:
- "1930"
- "1940"
middle: "RFR"
suffix: "alpha"
flags:
- "fma"
disks: 4
builds:
42218:
ver: "7.0.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DVA3219_42218.pat"
hash: "3557df23ff6af9bbb0cf46872ba2fc09c344eb303a38e8283dbc9a46e5eae979"
ramdisk-hash: "6820f900bf2870660541b83f9741a0b70e05e8871bc41c006c9d688105c97f7c"
zimage-hash: "ef97f2d64f3f7f8c5e3f4e8fee613d385d7888826f56e119f1885a722c95c7cc"
md5-hash: "40917aaf18d069f862f9536ac5504385"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-common-post-init-script.patch"
- "ramdisk-common-disable-disabled-ports.patch"
42661:
ver: "7.1.0"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1/42661-1/DSM_DVA3219_42661.pat"
hash: "01596eaf7310a56b504fde5743262f721dd0be2836e53d2d74386e14f509bec4"
ramdisk-hash: "a62ef4468db4e6c7eab04bb810c603c65e201aebbcc8994423b0c95dd215e4c5"
zimage-hash: "5222b5efaf7af28ff3833fd37f13100c30acba1ee201a15b2ee360e66e75b48e"
md5-hash: "5c4dea4a45d96e1a6d5bcc041d300079"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"
42951:
ver: "7.1.1"
kver: ""
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DVA3219_42951.pat"
hash: "74fc31feb6788ace9ae2ea162e77fb273ae503acecf58abcaa8d60380be2d4ab"
ramdisk-hash: "cbaee3c024e6c4752aca2a8e37d8e0bbaae6740c19c633a5fb2d1ecf2e8fb253"
zimage-hash: "fb4f70d6f67f77b99973113208590363efcdc6c5856c3a5efb85abd75d750260"
md5-hash: "309b02195fb52239ee6fdfafdf157cd1"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,28 +1,13 @@
id: "DVA3221"
modules-notneeded: &modules-notneeded
- ahci
- ata_piix
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
esataportcfg: "0x00"
support_bde_internal_10g: "no"
support_disk_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"
update_server: "http://example.com/"
update_server_ssl: "https://example.com/"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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
syno_hdd_powerup_seq: 0
@@ -30,8 +15,9 @@ cmdline: &cmdline
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
platform: "denverton"
unique: "synology_denverton_dva3221"
dom: 2
serial:
prefix:
- "2030"
@@ -49,7 +35,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -59,11 +44,11 @@ builds:
hash: "01f101d7b310c857e54b0177068fb7250ff722dc9fa2472b1a48607ba40897ee"
ramdisk-hash: "0825958923a5e67d967389769cff5fb7a04a25b98a2826c4c1e8aa7b8146dc8b"
zimage-hash: "ef97f2d64f3f7f8c5e3f4e8fee613d385d7888826f56e119f1885a722c95c7cc"
md5-hash: "b8bd6562290d06dd3a7360f3af330bec"
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:
@@ -71,7 +56,6 @@ builds:
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -81,9 +65,30 @@ builds:
hash: "ed3207db40b7bac4d96411378558193b7747ebe88f0fc9c26c59c0b5c688c359"
ramdisk-hash: "0ff061f453bc9888b16c59baaf3617bfa6ee42044122eb1dd0eaaa18b3832381"
zimage-hash: "5222b5efaf7af28ff3833fd37f13100c30acba1ee201a15b2ee360e66e75b48e"
md5-hash: "d433ae251ba95754edde1586851d1e0a"
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"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_DVA3221_42951.pat"
hash: "c16020a308e71eab73a5acfce5290d13e1a1a0960fa7887acad3f9b4a71e56eb"
ramdisk-hash: "491f8863b8a1ee36837dcb7e145f793ca840793d3da2c1e67ce8c5f4df096e80"
zimage-hash: "fb4f70d6f67f77b99973113208590363efcdc6c5856c3a5efb85abd75d750260"
md5-hash: "59c68430cb9cd20322cb287334a4017b"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -0,0 +1,87 @@
id: "FS2500"
synoinfo: &synoinfo
support_disk_compatibility: "no"
support_memory_compatibility: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
small_info_path: "https://example.com/null"
security_version_server: "https://example.com/smallupdate"
cmdline: &cmdline
intel_iommu: igfx_off
SMBusHddDynamicPower: 1
vender_format_version: 2
synoboot2:
syno_ttyS0: "serial,0x3f8"
syno_ttyS1: "serial,0x2f8"
platform: "v1000"
unique: "synology_v1000_fs2500"
beta: true
dom: 2
serial:
prefix:
- "0000"
middle: "XXX"
suffix: "alpha"
disks: 12
dt: true
builds:
42218:
ver: "7.0.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_FS2500_42218.pat"
hash: "4d060be8afec548fdb042bc8095524f10ff200033cab74df37ae07f3de5eaa69"
ramdisk-hash: "cbe9099c57f23ba53415574b011580218fa55a0bdb83c4e4bba9e27100e5379d"
zimage-hash: "f6816165a52b1f53ce44a45878fe06641da34e9478947f826a236c1a6548f8fd"
md5-hash: ""
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-common-post-init-script.patch"
42661:
ver: "7.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1/42661-1/DSM_FS2500_42661.pat"
hash: "f8343ac070b43fe62d02af6ac9a9c61f8c9852b6b2c79b933629409113e1d3e6"
ramdisk-hash: "698e9b1d719d3032a9a2b91ca08078c632b3265590147b2f6c9ca200c826e987"
zimage-hash: "d939b5937be00a644aae64c33633619a7c310433e60a515c77bbef00b0a7e6b6"
md5-hash: "e071c4984d041309f151de29b9ba82b5"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42661-post-init-script.patch"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_FS2500_42951.pat"
hash: "a878c928d7133c3bf3e10e8d3fb43ca7449a57f01d240a3c80de51cdd43af5c3"
ramdisk-hash: "a248103b1b47f800753b627394af8768698b74944d156cb6e40c80cd6ba8556f"
zimage-hash: "d28951da0eb41286fbe37ffdfc880271787573d68226e5d26321819cf2d2e6e2"
md5-hash: "7b48e21c1f2090bb01d5f14a8e16a435"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"

View File

@@ -1,50 +1,37 @@
id: "RS4021xs+"
modules-notneeded: &modules-notneeded
- ahci
- i40e
- ixgbe
- igb
- e1000e
- dca
- etxhci_hcd
- xhci_hcd
- ehci-pci
- uhci_hcd
synoinfo: &synoinfo
support_bde_internal_10g: "no"
support_disk_compatibility: "no"
supportraidgroup: "no"
esataportcfg: "0x00"
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/"
support_memory_compatibility: "no"
rss_server: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_ssl: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.xml"
rss_server_v2: "https://raw.githubusercontent.com/fbelavenuto/arpl/main/rss.json"
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"
support_bde_internal_10g: "no"
esataportcfg: "0x0"
cmdline: &cmdline
syno_hdd_powerup_seq: 0
HddHotplug: 0
vender_format_version: 2
syno_port_thaw: 1
syno_hdd_detect: 0
syno_port_thaw: 1
vender_format_version: 2
platform: "broadwellnk"
unique: "synology_broadwellnk_rs4021xs+"
beta: true
dom: 2
serial:
prefix:
- "0000"
middle: "XXX"
suffix: "numeric"
suffix: "alpha"
disks: 16
dt: false
builds:
42218:
ver: "7.0.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -52,21 +39,20 @@ builds:
pat:
url: "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_RS4021xs%2B_42218.pat"
hash: "7afca3970ac7324d7431c1484d4249939bedd4c18ac34187f894c43119edf3a1"
ramdisk-hash: "3510afe5b3dfe3662bfe054c1728c8794911da431718b533cd03d2a2c061ffd5"
zimage-hash: "b4cc62e9953f226960de98b65887e17dd6df5fa0ad28f665e0b4660dbd5f2fa8"
ramdisk-hash: "3aa9d810064747fca6d0a3ab4c979bd82b49fc0d166dfe714261c2a22145cc70"
zimage-hash: "17607e1739c8acc9903272ebd981bccb27b51057cdcb3cc446e5c5149db452d3"
md5-hash: "46d9eb6aba71dbd61ba0394e575b6d58"
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"
ver: "7.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
modules-notneeded: *modules-notneeded
cmdline:
<<: *cmdline
synoinfo:
@@ -76,9 +62,30 @@ builds:
hash: "496b64e431dafa34cdebb92da8ac736bf1610fe157f03df7e6d11152d60991f5"
ramdisk-hash: "143e475fe73c0adb3377361402b4baad21448476e844e55e16d1ed51ffc4c971"
zimage-hash: "e073dd84054f652811e0ae1932af2c7cdbd5fb6e5f18f265097072b8af4605e8"
md5-hash: "ddbbbcf8ccb8d9d345df3e08debc66f6"
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"
42951:
ver: "7.1.1"
kver: "4.4.180"
rd-compressed: false
efi-bug: no
cmdline:
<<: *cmdline
synoinfo:
<<: *synoinfo
pat:
url: "https://global.download.synology.com/download/DSM/release/7.1.1/42951/DSM_RS4021xs%2B_42951.pat"
hash: "7c9e076f3007662f63e34fd478fc48f32dee766f1ddc712f25ae91a2e56e078c"
ramdisk-hash: "c4d23a068a66499c50c9772fc5c90cc38dfcba5c45dcab085eda5d07d720046b"
zimage-hash: "9134fc61aea7f687d62728470b8847e640693c444e0afd130882b728ab553fea"
md5-hash: "e2d11981bba84b2eb6ba62b8bf2d2d28"
patch:
- "ramdisk-common-disable-root-pwd.patch"
- "ramdisk-common-init-script.patch"
- "ramdisk-42951-post-init-script.patch"
- "ramdisk-42661-disable-disabled-ports.patch"

View File

@@ -1,141 +0,0 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
/**
* A quick tool for patching the boot_params check in the DSM kernel image
* This lets you tinker with the initial ramdisk contents without disabling mount() features and modules loading
*
* The overall pattern we need to find is:
* - an CDECL function
* - does "LOCK OR [const-ptr],n" 4x
* - values of ORs are 1/2/4/8 respectively
* - [const-ptr] is always the same
*
* Usage: php patch-boot_params-check.php vmlinux vmlinux-mod
*/
require __DIR__ . '/common.php';
if ($argc < 2 || $argc > 3) {
perr("Usage: " . $argv[0] . " <inFile> [<outFile>]\n", true);
}
$file = getArgFilePath(1);
perr("\nGenerating patch for $file\n");
//The function will reside in init code part. We don't care we may potentially search beyond as we expect it to be found
$codeAddr = getELFSectionAddr($file, '.init.text', 3);
//Finding a function boundary is non-trivial really as patters can vary, we can have multiple exit points, and in CISC
// there are many things which may match e.g. "PUSH EBP". Implementing even a rough disassembler is pointless.
//However, we can certainly cheat here as we know with CDECL a non-empty function will always contain one or more
// PUSH (0x41) R12-R15 (0x54-57) sequences. Then we can search like a 1K forward for these characteristic LOCK OR.
const PUSH_R12_R15_SEQ = [0x41, [0x54, 0x57]];
const PUSH_R12_R15_SEQ_LEN = 2;
const LOCK_OR_LOOK_AHEAD = 1024;
const LOCK_OR_PTR_SEQs = [
[0xF0, 0x80, null, null, null, null, null, 0x01],
[0xF0, 0x80, null, null, null, null, null, 0x02],
[0xF0, 0x80, null, null, null, null, null, 0x04],
[0xF0, 0x80, null, null, null, null, null, 0x08],
];
const LOCK_OR_PTR_SEQs_NUM = 4; //how many sequences we are expecting
const LOCK_OR_PTR_SEQ_LEN = 8; //length of a single sequence
$fp = getFileMemMapped($file); //Read the whole file to memory to make fseet/fread much faster
$pos = $codeAddr; //Start from where code starts
$orsPos = null; //When matched it will contain our resulting file offsets to LOCK(); OR BYTE PTR [rip+...],0x calls
perr("Looking for f() candidates...\n");
do {
$find = findSequenceWithWildcard($fp, PUSH_R12_R15_SEQ, $pos, -1);
if ($find === -1) {
break; //no more "functions" left
}
perr("\rAnalyzing f() candidate @ " . decTo32bUFhex($pos));
//we found something looking like PUSH R12-R15, now find the ORs
$orsPos = []; //file offsets where LOCK() calls should start
$orsPosNum = 0; //Number of LOCK(); OR ptr sequences found
$seqPos = $pos;
foreach (LOCK_OR_PTR_SEQs as $idx => $seq) {
$find = findSequenceWithWildcard($fp, $seq, $seqPos, LOCK_OR_LOOK_AHEAD);
if ($find === -1) {
break; //Seq not found - there's no point to look further
}
$orsPos[] = $find;
++$orsPosNum;
$seqPos = $find + LOCK_OR_PTR_SEQ_LEN; //Next search will start after the current sequence code
}
//We can always move forward by the function token length (obvious) but if we couldn't find any LOCK-OR tokens
// we can skip the whole look ahead distance. We CANNOT do that if we found even a single token because the next one
// might have been just after the look ahead distance
if ($orsPosNum !== LOCK_OR_PTR_SEQs_NUM) {
$pos += PUSH_R12_R15_SEQ_LEN;
if ($orsPosNum === 0) {
$pos += LOCK_OR_LOOK_AHEAD;
}
continue; //Continue the main search loop to find next function candidate
}
//We found LOCK(); OR ptr sequences so we can print some logs and collect ptrs (as this is quite expensive)
$seqPtrsDist = [];
perr("\n[?] Found possible f() @ " . decTo32bUFhex($pos) . "\n");
$ptrOffset = null;
$equalJumps = 0;
foreach (LOCK_OR_PTR_SEQs as $idx => $seq) {
//data will have the following bytes:
// [0-LOCK()] [1-OR()] [2-BYTE-PTR] [3-OFFS-b3] [4-OFFS-b2] [5-OFFS-b1] [6-OFFS-b1] [7-NUMBER]
$seqData = readAt($fp, $orsPos[$idx], LOCK_OR_PTR_SEQ_LEN);
$newPtrOffset = //how far it "jumps"
$orsPos[$idx] +
(unpack('V', $seqData[3] . $seqData[4] . $seqData[5] . $seqData[6])[1]); //u32 bit LE
if($ptrOffset === null) {
$ptrOffset = $newPtrOffset; //Save the first one to compare in the next loop
++$equalJumps;
} elseif ($ptrOffset === $newPtrOffset) {
++$equalJumps;
}
perr(
"\t[+] Found LOCK-OR#$idx sequence @ " . decTo32bUFhex($orsPos[$idx]) . " => " .
rawToUFhex($seqData) . " [RIP+(dec)$newPtrOffset]\n"
);
}
if ($equalJumps !== 4) {
perr("\t[-] LOCK-OR PTR offset mismatch - $equalJumps/" . LOCK_OR_PTR_SEQs_NUM . " matched\n");
//If the pointer checking failed we can at least move beyond the last LOCK-OR found as we know there's no valid
// sequence of LOCK-ORs there
$pos = $orsPos[3];
continue;
}
perr("\t[+] All $equalJumps LOCK-OR PTR offsets equal - match found!\n");
break;
} while(!feof($fp));
if ($orsPos === null) { //There's a small chance no candidates with LOCK ORs were found
perr("Failed to find matching sequences", true);
}
//Patch offsets
foreach ($orsPos as $seqFileOffset) {
//The offset will point at LOCK(), we need to change the OR (0x80 0x0d) to AND (0x80 0x25) so the two bytes after
$seqFileOffset = $seqFileOffset+2;
perr("Patching OR to AND @ file offset (dec)$seqFileOffset\n");
fseek($fp, $seqFileOffset);
fwrite($fp, "\x25"); //0x0d is OR, 0x25 is AND
}
if (!isset($argv[2])) {
perr("No output file specified - discarding data\n");
exit;
}
saveStreamToFile($fp, $argv[2]);
fclose($fp);

View File

@@ -1,85 +0,0 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
/**
* A quick tool for patching the ramdisk check in the DSM kernel image
* This lets you tinker with the initial ramdisk contents without disabling mount() features and modules loading
*
* Usage: php patch-ramdisk-check.php vmlinux vmlinux-mod
*/
require __DIR__ . '/common.php';
if ($argc < 2 || $argc > 3) {
perr("Usage: " . $argv[0] . " <inFile> [<outFile>]\n", true);
}
$file = getArgFilePath(1);
perr("\nGenerating patch for $file\n");
//Strings (e.g. error for printk()) reside in .rodata - start searching there to save time
$rodataAddr = getELFSectionAddr($file, '.rodata', 2);
//Locate the precise location of "ramdisk error" string
$rdErrAddr = getELFStringLoc($file, '3ramdisk corrupt');
//offsets will be 32 bit in ASM and in LE
$errPrintAddr = $rodataAddr + $rdErrAddr;
$errPrintCAddrLEH = decTo32bLEhex($errPrintAddr - 1); //Somehow rodata contains off-by-one sometimes...
$errPrintAddrLEH = decTo32bLEhex($errPrintAddr);
perr("LE arg addr: " . $errPrintCAddrLEH . "\n");
$fp = getFileMemMapped($file); //Read the whole file to memory to make fseet/fread much faster
//Find the printk() call argument
$printkPos = findSequence($fp, hex2raw($errPrintCAddrLEH), 0, DIR_FWD, -1);
if ($printkPos === -1) {
perr("printk pos not found!\n", true);
}
perr("Found printk arg @ " . decTo32bUFhex($printkPos) . "\n");
//double check if it's a MOV reg,VAL (where reg is EAX/ECX/EDX/EBX/ESP/EBP/ESI/EDI)
fseek($fp, $printkPos - 3);
$instr = fread($fp, 3);
if (strncmp($instr, "\x48\xc7", 2) !== 0) {
perr("Expected MOV=>reg before printk error, got " . bin2hex($instr) . "\n", true);
}
$dstReg = ord($instr[2]);
if ($dstReg < 192 || $dstReg > 199) {
perr("Expected MOV w/reg operand [C0-C7], got " . bin2hex($instr[2]) . "\n", true);
}
$movPos = $printkPos - 3;
perr("Found printk MOV @ " . decTo32bUFhex($movPos) . "\n");
//now we should seek a reasonable amount (say, up to 32 bytes) for a sequence of CALL x => TEST EAX,EAX => JZ
$testPos = findSequence($fp, "\x85\xc0", $movPos, DIR_RWD, 32);
if ($testPos === -1) {
perr("Failed to find TEST eax,eax\n", true);
}
$jzPos = $testPos + 2;
fseek($fp, $jzPos);
$jz = fread($fp, 2);
if ($jz[0] !== "\x74") {
perr("Failed to find JZ\n", true);
}
$jzp = "\xEB" . $jz[1];
perr('OK - patching ' . bin2hex($jz) . " (JZ) to " . bin2hex($jzp) . " (JMP) @ $jzPos\n");
fseek($fp, $jzPos); //we should be here already
perr("Patched " . fwrite($fp, $jzp) . " bytes in memory\n");
if (!isset($argv[2])) {
perr("No output file specified - discarding data\n");
exit;
}
if (!isset($argv[2])) {
perr("No output file specified - discarding data\n");
exit;
}
saveStreamToFile($fp, $argv[2]);
fclose($fp);

View File

@@ -9,7 +9,8 @@ do
if [ "$arg" = "elevator-iosched" ]; then
insmod /usr/lib/modules/rp.ko
rm /usr/lib/modules/rp.ko
rm /sbin/modprobe
rm /usr/sbin/modprobe
ln -s /usr/bin/kmod /usr/sbin/modprobe
exit 0
fi
done

View File

@@ -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

View File

@@ -0,0 +1,31 @@
--- a/usr/sbin/init.post
+++ b/usr/sbin/init.post
@@ -31,7 +31,28 @@
OptPrjQuota="$(GetPQMountOpt "${RootMountPath}")"
# shellcheck disable=SC2046
Mount "${RootMountPath}" /tmpRoot -o barrier=1,noatime ${OptPrjQuota}
+############################################################################################
+SED_PATH='/tmpRoot/usr/bin/sed'
+@@@CONFIG-MANIPULATORS-TOOLS@@@
+
+@@@CONFIG-GENERATED@@@
+
+UPSTART="/tmpRoot/usr/share/init"
+
+if ! echo; then
+ _replace_in_file '^start on' '#start on' $UPSTART/tty.conf
+ _replace_in_file "console output" "console none" $UPSTART/syno_poweroff_task.conf
+ _replace_in_file "console output" "console none" $UPSTART/burnin_loader.conf
+ _replace_in_file "console output" "console none" $UPSTART/udevtrigger.conf
+ _replace_in_file "console output" "console none" $UPSTART/bs-poweroff.conf
+ _replace_in_file "console output" "console none" $UPSTART/udevd.conf
+else
+ _replace_in_file '^#start on' 'start on' $UPSTART/tty.conf
+fi
+
+/addons/addons.sh late
+############################################################################################
Mkdir -p /tmpRoot/initrd
Umount /proc >/dev/null 2>&1

View File

@@ -1,11 +1,37 @@
--- a/linuxrc.syno.impl
+++ b/linuxrc.syno.impl
@@ -155,6 +155,8 @@ fi
@@ -38,6 +38,8 @@
UnknownSynoPartitionMigrationFlag="/.unknown_syno_partition_migrate"
IncompatibleRootDevice="/.incompatible_root_device"
+/addons/addons.sh early
+
UmountRoot()
{
grep "^${RootDevice}" /proc/mounts && /bin/umount -f ${Mnt}
@@ -59,6 +61,7 @@
fi
UmountRoot
+ /addons/addons.sh jrExit
exit $1
}
@@ -155,6 +158,8 @@
# insert basic USB modules for detect f401/FDT
echo "Insert basic USB modules..."
SYNOLoadModules $USB_MODULES
+SYNOLoadModules "usb-storage"
+/addons/addons.sh rd
+
+/addons/addons.sh modules
# insert Etron USB3.0 drivers
@@ -209,6 +214,8 @@
fi
fi
+/addons/addons.sh patches
+
if [ "$SupportDualhead" = "yes" ]; then
# Run HA script
/etc.defaults/AHAtasks check_stage

View File

@@ -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

View File

@@ -44,10 +44,7 @@ RD_COMPRESSED="`readModelKey "${MODEL}" "builds.${BUILD}.rd-compressed"`"
declare -A SYNOINFO
declare -A ADDONS
# Read more config
while IFS="=" read KEY VALUE; do
[ -n "${KEY}" ] && SYNOINFO["${KEY}"]="${VALUE}"
done < <(readModelMap "${MODEL}" "builds.${BUILD}.synoinfo")
# Read synoinfo and addons from config
while IFS="=" read KEY VALUE; do
[ -n "${KEY}" ] && SYNOINFO["${KEY}"]="${VALUE}"
done < <(readConfigMap "synoinfo" "${USER_CONFIG_FILE}")
@@ -81,25 +78,48 @@ done
sed -e "/@@@CONFIG-GENERATED@@@/ {" -e "r ${TMP_PATH}/rp.txt" -e 'd' -e '}' -i "${RAMDISK_PATH}/sbin/init.post"
rm "${TMP_PATH}/rp.txt"
# Copying LKM to /usr/lib/modules/rp.ko
echo -n "."
cp "${LKM_PATH}/rp-${PLATFORM}-${KVER}-${LKM}.ko" "${RAMDISK_PATH}/usr/lib/modules/rp.ko"
# Extract modules to ramdisk
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
gzip -dc "${CACHE_PATH}/modules/${PLATFORM}-${KVER}.tgz" | tar xf - -C "${TMP_PATH}/modules"
for F in `ls "${TMP_PATH}/modules/"*.ko`; do
M=`basename ${F}`
# Skip existent modules
# [ -f "${RAMDISK_PATH}/usr/lib/modules/${M}" ] || mv "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
cp "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
done
mkdir -p "${RAMDISK_PATH}/usr/lib/firmware"
gzip -dc "${CACHE_PATH}/modules/firmware.tgz" | tar xf - -C "${RAMDISK_PATH}/usr/lib/firmware"
# Clean
rm -rf "${TMP_PATH}/modules"
# Copying fake modprobe
echo -n "."
# Copying fake modprobe
cp "${PATCH_PATH}/iosched-trampoline.sh" "${RAMDISK_PATH}/usr/sbin/modprobe"
# Copying LKM to /usr/lib/modules
gzip -dc "${LKM_PATH}/rp-${PLATFORM}-${KVER}-${LKM}.ko.gz" > "${RAMDISK_PATH}/usr/lib/modules/rp.ko"
# Addons
MAXDISKS=`readConfigKey "maxdisks" "${USER_CONFIG_FILE}"`
# Check if model needs Device-tree dynamic patch
DT="`readModelKey "${MODEL}" "dt"`"
[ "${DT}" = "true" ] && ADDONS['qjs-dtb']="" # Add system addon "qjs-dtb"
ADDONS['misc']="" # Add system addon "misc"
mkdir -p "${RAMDISK_PATH}/addons"
echo -n "."
#/proc/sys/kernel/syno_install_flag
mkdir -p "${RAMDISK_PATH}/addons"
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"
# Required eudev and dtbpatch/maxdisks
installAddon eudev
echo "/addons/eudev.sh \${1} " >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
if [ "${DT}" = "true" ]; then
installAddon dtbpatch
echo "/addons/dtbpatch.sh \${1} " >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
else
installAddon maxdisks
echo "/addons/maxdisks.sh \${1} ${MAXDISKS}" >> "${RAMDISK_PATH}/addons/addons.sh" 2>"${LOG_FILE}" || dieLog
fi
# User addons
for ADDON in ${!ADDONS[@]}; do
PARAMS=${ADDONS[${ADDON}]}
if ! installAddon ${ADDON}; then
@@ -110,6 +130,9 @@ for ADDON in ${!ADDONS[@]}; do
done
chmod +x "${RAMDISK_PATH}/addons/addons.sh"
# Build modules dependencies
/opt/arpl/depmod -a -b ${RAMDISK_PATH} 2>/dev/null
# Reassembly ramdisk
echo -n "."
if [ "${RD_COMPRESSED}" == "true" ]; then

View File

@@ -56,8 +56,7 @@ gzip -cd "${SCRIPT_DIR}/zImage_template.gz" > "${ZIMAGE_MOD}"
dd if="${VMLINUX_MOD}" of="${ZIMAGE_MOD}" bs=16494 seek=1 conv=notrunc >"${LOG_FILE}" 2>&1 || dieLog
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=15745134 seek=1 conv=notrunc >"${LOG_FILE}" 2>&1 || dieLog
RUN_SIZE=$(objdump -h ${VMLINUX_MOD} | sh "${SCRIPT_DIR}/calc_run_size.sh")
RUN_SIZE=`objdump -h ${VMLINUX_MOD} | sh "${SCRIPT_DIR}/calc_run_size.sh"`
size_le $RUN_SIZE | dd of=$ZIMAGE_MOD bs=15745210 seek=1 conv=notrunc >"${LOG_FILE}" 2>&1 || dieLog
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=15745244 seek=1 conv=notrunc >"${LOG_FILE}" 2>&1 || dieLog
# cksum $ZIMAGE_MOD # https://blog.box.com/crc32-checksums-the-good-the-bad-and-the-ugly
size_le $(($((16#$(php "${SCRIPT_DIR}/crc32.php" "${ZIMAGE_MOD}"))) ^ 0xFFFFFFFF)) | dd of="${ZIMAGE_MOD}" conv=notrunc oflag=append >"${LOG_FILE}" 2>&1 || dieLog
size_le $(($((16#`crc32 "${ZIMAGE_MOD}" | awk '{print$1}'`)) ^ 0xFFFFFFFF)) | dd of="${ZIMAGE_MOD}" conv=notrunc oflag=append >"${LOG_FILE}" 2>&1 || dieLog

View File

@@ -12,14 +12,11 @@ echo -n "."
# Extract vmlinux
/opt/arpl/bzImage-to-vmlinux.sh "${ORI_ZIMAGE_FILE}" "${TMP_PATH}/vmlinux" >"${LOG_FILE}" 2>&1 || dieLog
echo -n "."
# Patch boot params
/opt/arpl/patch-boot_params-check.php "${TMP_PATH}/vmlinux" "${TMP_PATH}/vmlinux-mod1" >"${LOG_FILE}" 2>&1 || dieLog
echo -n "."
# Patch ramdisk check
/opt/arpl/patch-ramdisk-check.php "${TMP_PATH}/vmlinux-mod1" "${TMP_PATH}/vmlinux-mod2" >"${LOG_FILE}" 2>&1 || dieLog
# Patch boot params and ramdisk check
/opt/arpl/kpatch "${TMP_PATH}/vmlinux" "${TMP_PATH}/vmlinux-mod" >"${LOG_FILE}" 2>&1 || dieLog
echo -n "."
# rebuild zImage
/opt/arpl/vmlinux-to-bzImage.sh "${TMP_PATH}/vmlinux-mod2" "${MOD_ZIMAGE_FILE}" >"${LOG_FILE}" 2>&1 || dieLog
/opt/arpl/vmlinux-to-bzImage.sh "${TMP_PATH}/vmlinux-mod" "${MOD_ZIMAGE_FILE}" >"${LOG_FILE}" 2>&1 || dieLog
echo -n "."
# Update HASH of new DSM zImage

View File

@@ -6,7 +6,7 @@ terminal_input console
terminal_output console
set default="0"
set timeout="3"
set timeout="5"
set timeout_style="menu"
insmod loadenv
@@ -51,11 +51,18 @@ if serial --unit=0 --speed=115200; then
fi
insmod search
search --set=root --label "ARPL1"
if [ -s /zImage -a -s /rd.gz ]; then
search --set=root --label "ARPL3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
menuentry 'Boot DSM' --id boot {
echo "Loading kernel..."
linux /bzImage-arpl console=ttyS0,115200n8
linux /bzImage-arpl console=ttyS0,115200n8 quiet net.ifnames=0 biosdevname=0
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."
}
menuentry 'Force re-install DSM' --id junior {
echo "Loading kernel..."
linux /bzImage-arpl console=ttyS0,115200n8 quiet net.ifnames=0 biosdevname=0 force_junior
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."
@@ -66,7 +73,7 @@ fi
menuentry 'Configure loader' --id config {
echo "Loading kernel..."
linux /bzImage-arpl console=ttyS0,115200n8 IWANTTOCHANGETHECONFIG
linux /bzImage-arpl console=ttyS0,115200n8 quiet net.ifnames=0 biosdevname=0 IWANTTOCHANGETHECONFIG
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."

View File

@@ -1,25 +1,25 @@
version: 1
name: 9p
description: "Driver for Plan 9 Resource Sharing Support (9P2000)"
description: "Driver for virtio 9p"
available-for:
bromolow-3.10.108:
install-script: &script "install.sh"
modules: true
copy: "bromolow-3.10.108"
apollolake-4.4.180:
install-script: *script
modules: true
copy: "apollolake-4.4.180"
broadwell-4.4.180:
install-script: *script
modules: true
copy: "broadwell-4.4.180"
broadwellnk-4.4.180:
install-script: *script
modules: true
copy: "broadwellnk-4.4.180"
denverton-4.4.180:
install-script: *script
modules: true
copy: "denverton-4.4.180"
geminilake-4.4.180:
install-script: *script
modules: true
copy: "geminilake-4.4.180"
v1000-4.4.180:
install-script: *script
modules: true
copy: "v1000-4.4.180"

Binary file not shown.

View File

@@ -1,32 +1,14 @@
version: 1
name: acpid
description: "Flexible and extensible daemon for delivering ACPI events"
all:
install-script: "install.sh"
copy: "all"
available-for:
bromolow-3.10.108:
install-script: "install.sh"
copy: "all"
modules: true
apollolake-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true
broadwell-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true
broadwellnk-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true
denverton-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true
geminilake-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true
v1000-4.4.180:
install-script: "install.sh"
copy: "all"
modules: true

View File

@@ -1,25 +0,0 @@
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

View File

@@ -1,25 +0,0 @@
version: 1
name: atl1c
description: "Driver for Atheros L1C Gigabit Ethernet adapters"
available-for:
bromolow-3.10.108:
install-script: &script "install.sh"
modules: true
apollolake-4.4.180:
install-script: *script
modules: true
broadwell-4.4.180:
install-script: *script
modules: true
broadwellnk-4.4.180:
install-script: *script
modules: true
denverton-4.4.180:
install-script: *script
modules: true
geminilake-4.4.180:
install-script: *script
modules: true
v1000-4.4.180:
install-script: *script
modules: true

View File

@@ -1,25 +0,0 @@
version: 1
name: atl1e
description: "Driver for Atheros L1E Gigabit Ethernet adapters"
available-for:
bromolow-3.10.108:
install-script: &script "install.sh"
modules: true
apollolake-4.4.180:
install-script: *script
modules: true
broadwell-4.4.180:
install-script: *script
modules: true
broadwellnk-4.4.180:
install-script: *script
modules: true
denverton-4.4.180:
install-script: *script
modules: true
geminilake-4.4.180:
install-script: *script
modules: true
v1000-4.4.180:
install-script: *script
modules: true

Some files were not shown because too many files have changed in this diff Show More