Compare commits

..

762 Commits
1.1.11 ... page

Author SHA1 Message Date
AuxXxilium
f641768cb3 data: update 2025-02-03 19:36:00 2025-02-03 19:36:00 +01:00
AuxXxilium
4f144a0def page: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-02-03 19:19:14 +01:00
AuxXxilium
8ae8f8df0c page: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-02-03 18:49:04 +01:00
AuxXxilium
be2e7feb02 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-21 22:53:42 +01:00
AuxXxilium
a48d83985f custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-18 17:44:17 +01:00
AuxXxilium
6869b56e31 Revert "custom: disable build"
This reverts commit 058eaae0ea.
2025-01-17 15:09:43 +01:00
AuxXxilium
012091e05f custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-15 17:39:56 +01:00
AuxXxilium
058eaae0ea custom: disable build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-15 17:18:50 +01:00
AuxXxilium
ffa145873f custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-06 07:41:22 +01:00
AuxXxilium
3e1991e4c1 data: update 2024-12-31 20:35:34 2024-12-31 20:35:34 +01:00
AuxXxilium
e0ca47ee26 data: update 2024-12-17 00:17:21 2024-12-17 00:17:21 +01:00
AuxXxilium
3eec766122 data: update 2024-11-25 19:02:52 2024-11-28 18:00:09 +01:00
AuxXxilium
9043a3756f tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-28 17:59:56 +01:00
AuxXxilium
0be01ac539 custom: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-01 15:31:36 +01:00
AuxXxilium
f8fe619bff custom: test
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-01 15:16:20 +01:00
AuxXxilium
2082e3371e data: update 2024-10-31 23:11:28 2024-11-01 15:14:06 +01:00
AuxXxilium
e03a6ad3db custom: test
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-01 15:13:52 +01:00
AuxXxilium
da6347ea79 custom: add branch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-24 20:20:18 +02:00
AuxXxilium
9eb7d9dd0d data: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-19 17:36:28 +02:00
AuxXxilium
fdc63b005e activation: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-15 17:12:55 +02:00
AuxXxilium
e08c4f886a custom: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-15 17:11:49 +02:00
AuxXxilium
a1e8df07f8 activation: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-15 17:10:56 +02:00
AuxXxilium
0f28e7fc89 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-14 20:57:06 +02:00
AuxXxilium
e84cbce7a0 custom: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-14 19:59:47 +02:00
AuxXxilium
91a9406b19 page: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-12 17:20:50 +02:00
AuxXxilium
778fa948fd Revert "custom: disable build"
This reverts commit b86d54e19c.
2024-10-06 20:48:58 +02:00
AuxXxilium
12945db984 custom: remove ova
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-06 20:48:53 +02:00
AuxXxilium
ca0ecfc020 data: update 2024-09-29 23:22:51 2024-10-06 16:33:40 +02:00
AuxXxilium
b86d54e19c custom: disable build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-06 16:33:22 +02:00
AuxXxilium
bdf8f992ed data: update 2024-09-11 07:53:52 2024-09-11 07:53:52 +02:00
AuxXxilium
634062a438 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-09-08 00:45:03 +02:00
AuxXxilium
a94a362339 custom: test
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-09-08 00:29:06 +02:00
AuxXxilium
b4b26b1ca0 data: update 2024-09-07 22:18:00 2024-09-07 22:18:00 +02:00
AuxXxilium
fb1492ad4b func: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-09-07 21:58:31 +02:00
AuxXxilium
7b49310250 data: update 2024-09-01 14:50:01 2024-09-07 17:26:08 +02:00
AuxXxilium
246d248cef custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-09-07 17:25:53 +02:00
AuxXxilium
bcc4d404df data: update 2024-08-29 20:34:45 2024-09-01 06:34:43 -04:00
AuxXxilium
153bae756f custom: enable
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-09-01 06:29:08 -04:00
AuxXxilium
01716ba3c0 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-29 20:12:26 +02:00
AuxXxilium
7c3d530e05 data: update 2024-08-29 18:22:43 2024-08-29 18:22:43 +02:00
AuxXxilium
68d8835e00 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-29 18:00:24 +02:00
AuxXxilium
73eb722fd4 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-27 14:55:37 -04:00
AuxXxilium
79de600567 data: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-26 11:04:34 -04:00
AuxXxilium
6e74eadbfb data: update 2024-08-22 18:23:28 2024-08-26 11:04:32 -04:00
AuxXxilium
1c86fbd3c1 custom: disable
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-26 11:04:16 -04:00
AuxXxilium
fa65b258c9 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-08-18 03:40:36 +02:00
AuxXxilium
bdd394002a addons: remove codecpatch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-28 20:59:06 +02:00
AuxXxilium
40659b8de0 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-24 21:29:00 +02:00
AuxXxilium
555c4ce89e custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-21 23:05:52 +02:00
AuxXxilium
d1c1dac206 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-21 22:38:51 +02:00
AuxXxilium
9f21be1470 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-19 19:53:33 +02:00
AuxXxilium
8f06ef3c60 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-08 15:58:34 +02:00
AuxXxilium
a825ee4dde custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-07 22:27:03 +02:00
AuxXxilium
92f91d91c0 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-07 22:21:40 +02:00
AuxXxilium
d9aebaff87 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-07 22:17:39 +02:00
AuxXxilium
32d22ed14f models: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-05 19:14:06 +02:00
AuxXxilium
1fdf662ca5 addons: add more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-06-02 09:47:06 +02:00
AuxXxilium
5d2545ef8a custom: rewrite addon message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-21 11:22:30 +02:00
AuxXxilium
0df097bad0 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-17 20:56:26 +02:00
AuxXxilium
04e1852ffc page: update links
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 22:03:02 +02:00
AuxXxilium
ed411a95b7 cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:57:33 +02:00
AuxXxilium
72cfd2f7d3 build: update theme link
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:51:57 +02:00
AuxXxilium
c30eef3cbf readme: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:48:09 +02:00
AuxXxilium
f44c736657 build: change lkm link
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:47:33 +02:00
AuxXxilium
c5aa32c6ce Update README.md
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:30:25 +02:00
AuxXxilium
92a353d3a8 tree: change some description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 21:16:09 +02:00
AuxXxilium
ec01a5126f boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 16:07:24 +02:00
AuxXxilium
f2c6263cb1 arc-functions: rewrite legacy to bios
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 12:06:11 +02:00
AuxXxilium
e482a702af arc-functions: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 12:00:13 +02:00
AuxXxilium
84ab5bf0b1 arc-functions: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 11:42:08 +02:00
AuxXxilium
e14850f5c0 build: fix func
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 11:26:07 +02:00
AuxXxilium
8be27421b2 arc: add check for cpufreqscaling possibility in addon selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-04 11:09:10 +02:00
AuxXxilium
3058bfcaef build: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 21:35:33 +02:00
AuxXxilium
87da7b769f build: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 21:32:33 +02:00
AuxXxilium
6dc0961ed9 grub: move theme to own repo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 21:02:21 +02:00
AuxXxilium
f0734f72a7 functions: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 16:24:07 +02:00
AuxXxilium
6ec5f4c626 functions: rewrite description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 16:22:10 +02:00
AuxXxilium
0f0ea39c7d functions: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 16:15:46 +02:00
AuxXxilium
8e6e7846a0 arc/network: rework some functions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 16:12:19 +02:00
AuxXxilium
c0bd33bb0d arc: rework menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 16:01:43 +02:00
AuxXxilium
b0d697dc71 functions: fix random serials
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 15:56:39 +02:00
AuxXxilium
41a566ee09 arc-functions: add more cmdline options to description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 11:43:31 +02:00
AuxXxilium
b248964f31 addons: revert old changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-03 09:30:44 +02:00
AuxXxilium
da7f251d25 arc: add some sleep
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 21:26:20 +02:00
AuxXxilium
b56817e224 arc: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 21:05:51 +02:00
AuxXxilium
856a57ddc5 arc: fix model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 20:48:54 +02:00
AuxXxilium
3cf4385250 network: update automated
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 20:26:31 +02:00
AuxXxilium
88761b2cfd arc: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 20:22:59 +02:00
AuxXxilium
9b7d53c9a1 init/boot/arc-functions: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 20:18:04 +02:00
AuxXxilium
0235c8d817 arc/network: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 20:06:24 +02:00
AuxXxilium
6c7f225a49 boot: remove kvm64
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 18:13:15 +02:00
AuxXxilium
acf4f9211b tree: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-02 18:10:00 +02:00
AuxXxilium
87c79edf9d ramdisk: fix SA6400 patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 19:58:54 +02:00
AuxXxilium
d472f5a6af activation: add missing p
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 18:45:58 +02:00
AuxXxilium
b840e13562 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 17:31:28 +02:00
AuxXxilium
e69a29cc7d custom: update addons
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 17:18:52 +02:00
AuxXxilium
8fc70c4c83 activation: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 17:11:10 +02:00
AuxXxilium
fe1ed0cf70 activation: rewrite a bit
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:42:33 +02:00
AuxXxilium
8428e53e15 activation: do some sytling
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:39:23 +02:00
AuxXxilium
68349b237e activation: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:33:47 +02:00
AuxXxilium
0e74f9bad2 activation: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:31:29 +02:00
AuxXxilium
4d6603f1a2 activation: style a bit
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:21:47 +02:00
AuxXxilium
604f385239 activation: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:16:02 +02:00
AuxXxilium
693c2aba31 activation: add new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 15:12:25 +02:00
AuxXxilium
e79c40ddb2 arc-functions: rewrite OK to save for editboxes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 14:09:05 +02:00
AuxXxilium
0a6fe79d66 arc-functions: rewrite storagepanel message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 13:55:47 +02:00
AuxXxilium
4eb9bc24ab update: fix update mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 13:27:02 +02:00
AuxXxilium
443918476a arc: add more storagepanel options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 13:02:51 +02:00
AuxXxilium
153ca6f6a8 update: fix ip
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 12:55:24 +02:00
AuxXxilium
77f3e4f075 ramdisk: remove dots
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 12:24:10 +02:00
AuxXxilium
1d67b8b6e7 boot: reduce empty lines
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 12:07:10 +02:00
AuxXxilium
a6d278cf93 tree: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-01 11:00:17 +02:00
AuxXxilium
00a3d0059a arc_functios: add cmdline entry
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-30 21:56:51 +02:00
AuxXxilium
dce0015056 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-29 19:31:30 +02:00
AuxXxilium
5e8b536a25 arc-functions: rewrite some messages
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 21:41:14 +02:00
AuxXxilium
fd2f0142b3 arc-functions: update greplogs
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 21:38:01 +02:00
AuxXxilium
c6b2f212fc arc-functions: fix dsmconfig backup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 21:01:38 +02:00
AuxXxilium
0eec1462ea arc-functions: fix grep log file
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 20:56:44 +02:00
AuxXxilium
72d1d2f896 arc-functions: ask for build after restore
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 20:27:01 +02:00
AuxXxilium
723a1c0723 functions: fix dsmroot functions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 20:20:40 +02:00
AuxXxilium
3515566dfb arc-functions: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 20:17:28 +02:00
AuxXxilium
ba998b0377 network: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 13:58:33 +02:00
AuxXxilium
a27c5ea529 network: fix mac for non arc models
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-28 00:18:20 +02:00
AuxXxilium
804ad9a9da grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 22:31:22 +02:00
AuxXxilium
1791f9c656 arc: fix qr color
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 21:52:41 +02:00
AuxXxilium
e6cf132c7d grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 20:20:33 +02:00
AuxXxilium
004f16e9f8 init: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:48:41 +02:00
AuxXxilium
b3b47717a6 boot/init: rewrite headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:43:30 +02:00
AuxXxilium
b00f6a3936 tree: fix update 4
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:39:04 +02:00
AuxXxilium
87e2930a13 tree: update part 4
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:27:54 +02:00
AuxXxilium
63ec74cde1 boot: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:19:44 +02:00
AuxXxilium
4c2d76c5a5 tree: update part 3
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:11:29 +02:00
AuxXxilium
a0de872664 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 19:05:30 +02:00
AuxXxilium
dabbfe13ac arc: add offline fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 18:56:02 +02:00
AuxXxilium
cb00347822 tree: update part 2
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 18:50:56 +02:00
AuxXxilium
4b52c96cb6 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 18:24:14 +02:00
AuxXxilium
667b839b72 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 17:54:54 +02:00
AuxXxilium
ed958ed151 Revert "init/boot: fix arc title"
This reverts commit 12651789f6.
2024-04-27 12:54:23 +02:00
AuxXxilium
12651789f6 init/boot: fix arc title
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 12:45:31 +02:00
AuxXxilium
c341a405be grub: update theme
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 12:45:17 +02:00
AuxXxilium
3862e7f7d8 grub: update theme
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 12:31:02 +02:00
AuxXxilium
abb53b8cf0 custom: rewrite arc patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 12:29:05 +02:00
AuxXxilium
9deeba61d8 grub: add theme
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-27 12:11:47 +02:00
AuxXxilium
268bae540a arc: add automated update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-26 17:10:42 +02:00
AuxXxilium
c63f3e96b1 tree: update part 1
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-26 16:46:45 +02:00
AuxXxilium
afdf914ee0 custom: add back amepatch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-25 00:01:48 +02:00
AuxXxilium
e132109a3c arc: add optimized values to automated build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-24 17:02:21 +02:00
AuxXxilium
001bfae3bd boot: fix mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 21:12:20 +02:00
AuxXxilium
5ea8a18b3e grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 19:29:57 +02:00
AuxXxilium
477c649ac4 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 17:53:31 +02:00
AuxXxilium
efb880f3cc arc: multiple rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 17:46:06 +02:00
AuxXxilium
151f4fa730 arc: some optimization
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 16:50:26 +02:00
AuxXxilium
820268107d boot: reorder things
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 16:36:20 +02:00
AuxXxilium
a3f1a493b4 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 16:36:20 +02:00
AuxXxilium
7972da393b arc: cleanup code
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 00:34:54 +02:00
AuxXxilium
c0f5992f4e automated: fix arc patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-23 00:29:21 +02:00
AuxXxilium
08c3056fd2 update: rework update mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-22 20:57:29 +02:00
AuxXxilium
22db16e476 boot: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-22 20:34:51 +02:00
AuxXxilium
ed3854b123 amepatch: remove for now
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 23:24:30 +02:00
AuxXxilium
191dd50bd6 arc: fix summary
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 19:52:38 +02:00
AuxXxilium
bde0789b18 bulk: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 19:19:40 +02:00
AuxXxilium
47008ac14a custom: add line ending
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 15:14:33 +02:00
AuxXxilium
572c02f332 custom: space footer
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 15:12:21 +02:00
AuxXxilium
ea34e6ee56 custom: more coloring
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 15:09:53 +02:00
AuxXxilium
a13f66a760 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 15:05:38 +02:00
AuxXxilium
f89563ab62 Revert "ui: change coloring"
This reverts commit a4cd47230d.
2024-04-21 15:00:21 +02:00
AuxXxilium
2dfb71e7e9 arc: fix model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 14:56:38 +02:00
AuxXxilium
11f9fa4f0b arc: fix model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:59:48 +02:00
AuxXxilium
a4cd47230d ui: change coloring
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:53:47 +02:00
AuxXxilium
c9b841a38b custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:43:19 +02:00
AuxXxilium
71af1aaa68 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:38:32 +02:00
AuxXxilium
5b957c5037 custom: style
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:34:31 +02:00
AuxXxilium
0c425aa3b5 custom: color
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:33:45 +02:00
AuxXxilium
0a57cca2cc custom: logo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:31:13 +02:00
AuxXxilium
5cfbeb20ee custom: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:28:12 +02:00
AuxXxilium
1ca3a91cc4 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 13:26:31 +02:00
AuxXxilium
97b16fe34d storage: remove msg
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 11:36:06 +02:00
AuxXxilium
fe22c28416 arc: rework model list
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 11:33:07 +02:00
AuxXxilium
79e99e4b21 custom: add warning
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 01:00:04 +02:00
AuxXxilium
08f4286f34 arc: update informations
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-21 00:54:29 +02:00
AuxXxilium
c7f201aae5 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 23:44:43 +02:00
AuxXxilium
32024ba629 storage: ahciremap not experimental anymore
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 15:54:56 +02:00
AuxXxilium
14e37549d1 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 01:51:44 +02:00
AuxXxilium
206d85d688 build: fix local
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 00:31:46 +02:00
AuxXxilium
57c91c47fd func: fix build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 00:28:49 +02:00
AuxXxilium
ded8593007 tree: syntax fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-20 00:22:58 +02:00
AuxXxilium
a719af9aa2 vmlinux: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 23:27:27 +02:00
AuxXxilium
4ba6bbb892 zImage_patch: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 23:17:17 +02:00
AuxXxilium
8095ffd081 update: rewrite lkm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 23:07:05 +02:00
AuxXxilium
5517606314 custom: fix logo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 15:52:48 +02:00
AuxXxilium
e720a5c8fa storage: fix remap option
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 15:33:03 +02:00
AuxXxilium
b062cd98d2 arc: fix model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 15:32:48 +02:00
AuxXxilium
d63b36ffa9 custom: add more options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 15:24:43 +02:00
AuxXxilium
cabcd0c8be informations: sync with wiki
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-19 15:14:33 +02:00
AuxXxilium
8d4668a3a9 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-18 21:29:22 +02:00
AuxXxilium
6c0a8cadb5 storage: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-18 21:15:54 +02:00
AuxXxilium
63c67ecb10 init: add cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-18 21:05:22 +02:00
AuxXxilium
98f6dff07c arc: rewrite usb mount option
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-18 20:50:23 +02:00
AuxXxilium
2b0ae0bece tree: multiple rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 21:13:55 +02:00
AuxXxilium
8c296be1fc arc-functions: rename in sysinfo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 17:05:10 +02:00
AuxXxilium
577688f202 arc: rename drives to disks
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 17:01:29 +02:00
AuxXxilium
8a75bc5c52 custom: cleanup addons
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 16:59:53 +02:00
AuxXxilium
787ede78a7 custom: remove acpid from addons
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 16:58:40 +02:00
AuxXxilium
028d169c12 arc: add acpid as system addon
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 16:57:32 +02:00
AuxXxilium
72722a3c33 arc: fix mount switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-16 16:25:02 +02:00
AuxXxilium
dbf782823e arc: set getdata to 5 loop (before 3)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 21:14:21 +02:00
AuxXxilium
35e6fd1b6f tree: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 21:06:37 +02:00
AuxXxilium
85fbe94941 usb: rewrite usbmount feature
automated: let dsm choose
internal: mount internal drives
external: mount internal and external drives
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 20:53:50 +02:00
AuxXxilium
0df9dae75c custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 20:19:27 +02:00
AuxXxilium
fe27b4aeca boot: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 18:14:05 +02:00
AuxXxilium
d7fe71cfed arc: fix value reading
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 18:13:26 +02:00
AuxXxilium
b877cbc1c3 backup: remove online backup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 18:10:29 +02:00
AuxXxilium
d6a827619c boot: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 18:04:51 +02:00
AuxXxilium
badfe66deb boot: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 17:52:57 +02:00
AuxXxilium
ae19bd0d71 boot: blacklist scsi_tramsport_sas
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 17:44:28 +02:00
AuxXxilium
46b6192656 init/functions: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 17:09:46 +02:00
AuxXxilium
0c3e50dc4a arc: only show sort drives if DT model is selected
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 17:03:02 +02:00
AuxXxilium
657bd2d2e1 arc: activate HBA for all models in selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 17:01:32 +02:00
AuxXxilium
abebed3014 arc: remove modulescopy switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 16:56:03 +02:00
AuxXxilium
74f572887b arc-functions: add 60_Bay to storagepanel selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-15 16:55:43 +02:00
AuxXxilium
45d7d0dad3 tree: full update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-13 21:24:04 +02:00
AuxXxilium
75c5a6d4e3 arc-functions: fix format menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-10 21:12:51 +02:00
AuxXxilium
9b2befe300 functions: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-10 21:02:57 +02:00
AuxXxilium
7e8ba9ba1c custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 21:37:01 +02:00
AuxXxilium
89ebdb901c init/boot: remove empty lines
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 20:40:50 +02:00
AuxXxilium
a85e81ae5d custom. remove empty line
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:31:27 +02:00
AuxXxilium
1b1fe7c256 custom: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:29:30 +02:00
AuxXxilium
6e43f1b3ff init: add missing efi check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:25:45 +02:00
AuxXxilium
0f88f78196 custom: rework notice
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:24:20 +02:00
AuxXxilium
01944587e5 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:21:06 +02:00
AuxXxilium
979bbde4cb custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:17:09 +02:00
AuxXxilium
1ac787073d custom: add arc patch and wiki notice
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:09:48 +02:00
AuxXxilium
300b752f58 arc: rewrite some messages
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 19:05:28 +02:00
AuxXxilium
56640ebd5b custom: add macsys and notice
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 18:59:34 +02:00
AuxXxilium
3707be39f4 arc-functions: fix full-sysinfo mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 18:16:34 +02:00
AuxXxilium
b37c3961a2 arc: rename update storage map
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-09 17:07:31 +02:00
AuxXxilium
04afea242b readme: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 18:13:41 +02:00
AuxXxilium
9a5e4ae392 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 17:05:36 +02:00
AuxXxilium
356ec9390a arc-functions: fix format/clone
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 17:02:32 +02:00
AuxXxilium
73c8bb5c37 build: update custom
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 16:17:16 +02:00
AuxXxilium
b792fb5714 github: update custom
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 16:13:15 +02:00
AuxXxilium
8eaee542a4 arc: rearrange menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 15:56:12 +02:00
AuxXxilium
e50edf81bb modulelist: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 14:42:03 +02:00
AuxXxilium
31d7b0e477 init: rewrite automated logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 14:24:24 +02:00
AuxXxilium
87ef19dd84 init: automated
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-07 13:57:51 +02:00
AuxXxilium
717a4373bb data: update 2024-04-06 21:23:42 2024-04-06 21:23:42 +02:00
AuxXxilium
b6efdd270b automated: first try
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 21:21:55 +02:00
AuxXxilium
0e60e6eb7d init: do not overwrite kvm user setting
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 18:32:56 +02:00
AuxXxilium
ca84921f5e grub: prepare for next step
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 18:30:54 +02:00
AuxXxilium
4ab946174d arc: fix acpid
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 18:26:44 +02:00
AuxXxilium
0e2a88f4fe build: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 10:11:33 +02:00
AuxXxilium
6b786e6ad1 storage: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-06 09:44:53 +02:00
AuxXxilium
0089a9f88a init: prepare for next
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 23:44:19 +02:00
AuxXxilium
27e7ce9714 consts: add more for next update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 21:03:38 +02:00
AuxXxilium
76f778e157 tree: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 21:01:29 +02:00
AuxXxilium
a2424df910 arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 20:01:02 +02:00
AuxXxilium
bb56bc35da arc: add reboot to recovery
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 19:38:44 +02:00
AuxXxilium
6409cf2bc0 boot: add text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 19:21:23 +02:00
AuxXxilium
6adb469518 arc: show correct informations for broadwellnkv2
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 18:31:27 +02:00
AuxXxilium
8352ec7f95 arc: rework offline mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 17:42:42 +02:00
AuxXxilium
23cd524923 consts: add preset config
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 17:42:25 +02:00
AuxXxilium
cbd30c7c8f Revert "build: update"
This reverts commit 21ada277c2.
2024-04-05 13:57:30 +02:00
AuxXxilium
78417d5992 arc: init new model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 13:35:27 +02:00
AuxXxilium
21ada277c2 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-05 13:34:58 +02:00
AuxXxilium
99e0cac0e6 arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-04 16:24:13 +02:00
AuxXxilium
cf323d4e44 arc: fix features in modelselection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-04 16:22:55 +02:00
AuxXxilium
454b105022 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-03 20:58:31 +02:00
AuxXxilium
99a7ba6ebe arc: add usb mount for DT (testing only)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-02 21:26:09 +02:00
AuxXxilium
6b559cf213 tree: fix some logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-02 21:18:45 +02:00
AuxXxilium
d48537ab9e arc: update model chart
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-04-02 20:14:41 +02:00
AuxXxilium
efb5d31494 init: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 21:45:28 +02:00
AuxXxilium
3ff1b5994e boot/init: rewrite headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 19:28:59 +02:00
AuxXxilium
fee5748d8d func: fix build not clean addon file
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 14:23:15 +02:00
AuxXxilium
9a63f65691 network: clear arcmac after it is written
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 01:06:51 +01:00
AuxXxilium
23314233b5 arc: do the correct steps after escape
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 01:02:18 +01:00
AuxXxilium
40036025d0 arc-functions: do the correct steps after escape
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 00:58:24 +01:00
AuxXxilium
6d184dbbe6 arc-functions: fix format
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 00:51:18 +01:00
AuxXxilium
2faa9b0c14 arc: remove USB Mount Switch from Menu (DT)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-31 00:19:11 +01:00
AuxXxilium
92104e1e06 arc: changes in arc config summary
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:32:01 +01:00
AuxXxilium
b78073e3e9 arc: fix url/hash for offline mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:28:08 +01:00
AuxXxilium
69766961a9 arc/arc-functions: add more and fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:25:12 +01:00
AuxXxilium
bfd918f44b init: reduce code
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:11:03 +01:00
AuxXxilium
4649315606 functions: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:10:49 +01:00
AuxXxilium
0f06a1f39e arc-functions: fix save modifications to disk
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 23:10:33 +01:00
AuxXxilium
a15899c6e6 boot: rewrite cmdline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 18:06:06 +01:00
AuxXxilium
e143e8d756 arc-functions: fix cloneLoader
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 17:30:04 +01:00
AuxXxilium
f9d90a95b1 boot: rework cmdline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 17:29:43 +01:00
AuxXxilium
e22929fe19 arc: more rewrite for model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 17:04:48 +01:00
AuxXxilium
2ea905db0a arc: rewrite model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-30 16:05:58 +01:00
AuxXxilium
d9fe87fdd5 tree: more syntax fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-29 18:28:44 +01:00
AuxXxilium
4c5f3f7d45 tree: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-29 18:18:39 +01:00
AuxXxilium
ba1698ae27 boot: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-29 13:58:12 +01:00
AuxXxilium
886a8b1aae arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-29 11:58:43 +01:00
AuxXxilium
6137a92abf build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 23:34:47 +01:00
AuxXxilium
2a57882d4a tree: rework some dialogs
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 17:34:19 +01:00
AuxXxilium
c0738e3823 network: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 16:41:00 +01:00
AuxXxilium
d43fb06545 network: more rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 16:36:15 +01:00
AuxXxilium
9d047ee82f custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 15:50:47 +01:00
AuxXxilium
5d5abfcdb6 arc/network: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 12:31:24 +01:00
AuxXxilium
87aadb5f59 arc: nic rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-28 12:18:07 +01:00
AuxXxilium
fcbc999ecd boot: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 21:04:26 +01:00
AuxXxilium
4e08289221 boot: remove last empty space
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 20:56:52 +01:00
AuxXxilium
8471beaefe tree: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 20:44:37 +01:00
AuxXxilium
85cb39e0bd arc/boot: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 20:23:39 +01:00
AuxXxilium
bf98d39909 arc: more rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 20:08:37 +01:00
AuxXxilium
763d1ce665 tree: remove dmidecode (not compatible with virtualbox)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 00:42:16 +01:00
AuxXxilium
5aa9cf94df network: fix option not showing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-27 00:17:43 +01:00
AuxXxilium
e25b411979 arc/network: final fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 20:49:23 +01:00
AuxXxilium
354a96f590 network: remove empty line in selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 20:21:15 +01:00
AuxXxilium
5ff537fb6a tree: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 20:20:18 +01:00
AuxXxilium
b534b0d471 tree: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 19:53:30 +01:00
AuxXxilium
c3ef78d6b2 tree: multiple rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 19:34:05 +01:00
AuxXxilium
0e7bb3b8bf network: rework (remove single nic function and fake all mac)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-26 19:33:54 +01:00
AuxXxilium
f3b5f1c8da ramdisk: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-25 20:11:16 +01:00
AuxXxilium
6e2323db3e consts: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-25 20:11:01 +01:00
AuxXxilium
060676bf13 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-25 17:58:28 +01:00
AuxXxilium
1bb6e60a87 arc: cleanup menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-24 20:56:23 +01:00
AuxXxilium
8cd274122a custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-24 11:17:01 +01:00
AuxXxilium
401c69c672 grub: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-24 11:13:01 +01:00
AuxXxilium
e73b71baf0 arc: rewrite part 3
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-22 17:53:41 +01:00
AuxXxilium
035e0abfd8 boot: move arc to top
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-21 20:25:38 +01:00
AuxXxilium
c718f77dcd arc: add offline check and move storagemap command
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-21 19:59:49 +01:00
AuxXxilium
e6b9336c60 arc: fix old typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 21:33:22 +01:00
AuxXxilium
98deb46e68 arc: rewrite part 2 sort things
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 21:31:25 +01:00
AuxXxilium
57dfc0e9c8 arc: rewrite part 2
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 21:27:54 +01:00
AuxXxilium
3a4cf15b7b arc: add information files
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 17:11:26 +01:00
AuxXxilium
4214641773 arc: more rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 17:11:08 +01:00
AuxXxilium
e370ed2664 arc: rework part 1
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-20 16:54:31 +01:00
AuxXxilium
c1a7272cc6 arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-17 19:11:07 +01:00
AuxXxilium
02d2b526ff arc: logic rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-17 19:06:33 +01:00
AuxXxilium
02b242a11d storage: remove empty space
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-17 18:52:24 +01:00
Christian
18b892e161 arc: rewrite settings
Signed-off-by: Christian <info@auxxxilium.tech>
2024-03-17 16:20:21 +01:00
Christian
e96855ff78 arc: update 2024-03-17 13:59:01 +01:00
Christian
ed7bc9b61a arc: remove some warning
Signed-off-by: Christian <info@auxxxilium.tech>
2024-03-17 12:59:41 +01:00
Christian
1635d9c9fe storage: rewrite
Signed-off-by: Christian <info@auxxxilium.tech>
2024-03-17 12:51:53 +01:00
Christian
918a2090ba arc: disable sa6400 code
Signed-off-by: Christian <info@auxxxilium.tech>
2024-03-17 11:45:58 +01:00
AuxXxilium
fca422e9ed arc: replace full sysinfo with networkdiag
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-17 01:28:00 +01:00
AuxXxilium
c7f5069231 arc: add networkdiag to sysinfo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-17 01:26:22 +01:00
AuxXxilium
3a55c53e28 arc: add warning for nvmeonly to config steps
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-16 21:08:05 +01:00
AuxXxilium
bb8d96ac46 grub: update to 2.12
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-16 20:37:15 +01:00
AuxXxilium
89137812aa build: update grub to 2.12
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-16 20:06:03 +01:00
AuxXxilium
2bf3fa9f2d credits: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-16 14:37:17 +01:00
AuxXxilium
267f2881ff arc: remove sata check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-15 20:58:03 +01:00
AuxXxilium
31733093cf arc: rewrite vmx/svm check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-15 17:09:06 +01:00
AuxXxilium
61d5753e54 custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-15 17:08:44 +01:00
AuxXxilium
1837b4df83 storage: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-14 20:21:33 +01:00
AuxXxilium
b66031424f arc: fix some functions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-10 22:15:27 +01:00
AuxXxilium
fabdfb2cdc arc: fix format mmc
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-10 19:53:37 +01:00
AuxXxilium
f771c7f28f custom: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-10 19:44:50 +01:00
AuxXxilium
9f98401b16 modules: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-10 13:01:30 +01:00
AuxXxilium
b3f920863d storage: fix code style
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-09 20:34:10 +01:00
AuxXxilium
66248195ce build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 20:18:52 +01:00
AuxXxilium
ea4c06626b arc: cleanup addonselection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 20:07:20 +01:00
AuxXxilium
9931ee5582 arc: remove some infotext
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 19:15:27 +01:00
AuxXxilium
7d55930d1f arc: fix fullsysinfo output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 19:12:46 +01:00
AuxXxilium
2dd68c0e11 arc: fix typo in menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 19:11:31 +01:00
AuxXxilium
cb54098f16 arc: fix sysinfo output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 16:49:09 +01:00
AuxXxilium
5e07d1c545 network: add alternate way to get ip
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 16:15:57 +01:00
AuxXxilium
d0104cb79e arc: add full sysinfo to menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 16:07:37 +01:00
AuxXxilium
e54b778c90 build: switch to buildroot 2023.08.x
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 16:07:23 +01:00
AuxXxilium
dac42e4472 arc: add back multi switch for usbmount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 16:01:01 +01:00
AuxXxilium
7dabba74d9 arc: rewrite disks function
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-08 15:53:14 +01:00
AuxXxilium
e0650a5d3e arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-07 22:43:39 +01:00
AuxXxilium
38f6e6d3dc usbmount: sync code with disks addon
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-07 22:40:59 +01:00
AuxXxilium
8f149167b0 arc: fix format disks
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 23:05:19 +01:00
AuxXxilium
646f61798c arc: add multi switch for usbmount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 21:49:51 +01:00
AuxXxilium
9eb7453184 arc: change usbmount values
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 20:51:57 +01:00
AuxXxilium
a5bb353350 build: back to buildroot 2023.02.x (fast and stable)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 20:48:20 +01:00
AuxXxilium
cb669d9775 arc: rename kvm support
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 20:25:48 +01:00
AuxXxilium
556d5b7ebd arc: fix format disks and add force enable ssh in dsm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 20:14:16 +01:00
AuxXxilium
ea854b23cb Revert "build: update buildroot to 2023.11.x and linux 5.15.x LTS"
This reverts commit c2b507e7aa.
2024-03-06 19:36:24 +01:00
AuxXxilium
c2b507e7aa build: update buildroot to 2023.11.x and linux 5.15.x LTS
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 18:38:10 +01:00
AuxXxilium
f0b2b0f474 arc: rewrite synoinfo output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 18:33:22 +01:00
AuxXxilium
1e744f9857 arc: add more sysinfo information
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-06 18:06:59 +01:00
AuxXxilium
4584ceda7b arc: more rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 22:41:18 +01:00
AuxXxilium
950fb81473 arc: fix dialog
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 22:26:35 +01:00
AuxXxilium
461c05ebeb storage: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 22:24:14 +01:00
AuxXxilium
2608924895 storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:51:41 +01:00
AuxXxilium
3a6b8493c4 arc: deactivate some code
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:48:22 +01:00
AuxXxilium
44b563c0cf arc: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:38:54 +01:00
AuxXxilium
38aa36424f build: update local script
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:35:22 +01:00
AuxXxilium
6deb50e7a2 arc: fix harddrive count
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:32:02 +01:00
AuxXxilium
4750f70fb5 arc: add optimized values in synoinfo section
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 21:01:22 +01:00
AuxXxilium
a2336b04c6 storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 20:37:27 +01:00
AuxXxilium
cc19e2bf6a tree: fix tar commands
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 20:14:13 +01:00
AuxXxilium
37bb3cec92 arc: add device class 0100 functions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 19:53:24 +01:00
AuxXxilium
b147f8011c build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 19:27:50 +01:00
AuxXxilium
7024947637 arc/ramdisk: rework usb mount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-05 19:13:11 +01:00
Christian
143ca700a4 storage: fix 2024-03-05 14:33:36 +01:00
AuxXxilium
2928c37c12 tree: multiple readwrite and cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-04 19:32:45 +01:00
AuxXxilium
3f9d35a261 arc: let us change usbmount on dt
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-03 23:55:31 +01:00
AuxXxilium
c6491de152 init/boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-03 00:40:25 +01:00
AuxXxilium
b1308d5d6c arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 22:12:07 +01:00
AuxXxilium
03539316c3 arc/init: some more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 21:27:57 +01:00
AuxXxilium
5bd5e6d805 arc: add warning for DT and SAS/SCSI Controller
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 21:12:22 +01:00
AuxXxilium
46d23584a0 arc: set more timeout
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 21:00:20 +01:00
AuxXxilium
afc2b86c60 arc: fix new version check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 20:55:20 +01:00
AuxXxilium
4cba743c1a ramdisk: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 16:07:58 +01:00
AuxXxilium
e8be612215 arc: add modulescopy switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 11:55:05 +01:00
AuxXxilium
0dee9d1ebe tree: some rewrites
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 11:31:24 +01:00
AuxXxilium
f7a12eae33 ramdisk: fix missing space
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 11:14:15 +01:00
AuxXxilium
febc6c2c62 tree: only enable staticip for loader, not for dsm.
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-02 00:08:04 +01:00
AuxXxilium
572a7ac370 arc: shorten update warning
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-01 15:56:18 +01:00
AuxXxilium
22c4763b3a make: add emmc elif
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-01 15:32:48 +01:00
AuxXxilium
731afcfaeb boot: add additional boot flag
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-01 15:30:58 +01:00
AuxXxilium
2d475703af arc: rename menu entries
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-01 15:28:29 +01:00
AuxXxilium
574a97057b arc: add back VMM/KVM Switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-03-01 15:20:47 +01:00
AuxXxilium
74fc625245 grub: rename
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 20:05:40 +01:00
AuxXxilium
36524d8639 arc: add custom modules
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:54:51 +01:00
AuxXxilium
741181ec0b arc: fix menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:53:07 +01:00
AuxXxilium
e6ff0f87b8 grub: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:34:47 +01:00
AuxXxilium
285a798210 init: cleanup duplicate code
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:26:29 +01:00
AuxXxilium
47c4a434e9 tree: fix typos
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:20:19 +01:00
AuxXxilium
9e13145b63 ramdisk: fix missing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:13:57 +01:00
AuxXxilium
6e79d5ecac ramdisk: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 19:10:02 +01:00
AuxXxilium
b62a351ad1 arc: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-29 18:57:58 +01:00
AuxXxilium
1136fed19e init: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-24 23:15:47 +01:00
AuxXxilium
7d00b2daa5 boot: add check for blacklisting
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-24 14:42:14 +01:00
AuxXxilium
2a674c4a56 arc: check confdone in thermal options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-24 12:56:43 +01:00
AuxXxilium
2982333771 network: add option to apply all arc mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-24 12:52:56 +01:00
AuxXxilium
6657ef4d33 arc: reset build after selecting custom storagepanel
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-24 12:52:38 +01:00
AuxXxilium
070e89430c Revert "boot/init: remove sata disk warning"
This reverts commit 0aa465d03a.
2024-02-21 20:31:20 +01:00
AuxXxilium
0a8eb11b86 arc: remove KVM Support switch, let force load modules
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-21 19:48:39 +01:00
AuxXxilium
82e5679e0c init: remove timer
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-21 19:44:16 +01:00
AuxXxilium
0aa465d03a boot/init: remove sata disk warning
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 23:28:46 +01:00
AuxXxilium
862dc7c3fc arc: fix menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 23:28:38 +01:00
AuxXxilium
98c5aa1b6f init: fix boot again
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 23:07:28 +01:00
AuxXxilium
0b9faa3e65 credits: add KodeCR for NVMe Install script
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 23:00:40 +01:00
AuxXxilium
2154050a92 arc: shorten headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 22:57:53 +01:00
AuxXxilium
98244a7469 init: fix boot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 22:56:59 +01:00
AuxXxilium
008c79ffe1 init: fix ip
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 22:55:45 +01:00
AuxXxilium
ba78371c56 boot/init: set default netmask if not found
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 20:50:57 +01:00
AuxXxilium
2c8c1ced78 boot/network: add macsys "arc"
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 20:40:25 +01:00
AuxXxilium
6816869c96 init: fix ip settings
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 20:14:10 +01:00
AuxXxilium
cfea2262a0 storage: update description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-20 20:13:55 +01:00
AuxXxilium
47c3bddbe3 Revert "init: set kernelload to kexec"
This reverts commit d6a999b616.
2024-02-20 19:10:15 +01:00
AuxXxilium
c89adcfadf grub: edit config
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-19 23:11:00 +01:00
AuxXxilium
d6a999b616 init: set kernelload to kexec
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-19 19:18:32 +01:00
AuxXxilium
2a044b04b8 arc: cleanup reset function
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-19 19:04:03 +01:00
AuxXxilium
83bfe179c9 arc: update kvmsupport check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-19 19:02:24 +01:00
AuxXxilium
8ce5471661 arc: rework, check for KVMSUPPORT, add KVMSUPPORT switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-19 18:53:28 +01:00
AuxXxilium
9b948e3932 boot: rework emmcboot implamentation
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-18 20:34:06 +01:00
AuxXxilium
fea9a19924 boot: add biosdevname=0
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-18 20:06:46 +01:00
AuxXxilium
f580b450ff arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-18 15:49:15 +01:00
AuxXxilium
33ac94646e arc: sysinfo - rename SCSI to Raid/SCSI
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 23:39:18 +01:00
AuxXxilium
d81ce78096 arc: change menu order
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 21:38:50 +01:00
AuxXxilium
6b57d7ac21 boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 17:43:39 +01:00
AuxXxilium
9df4f3619b boot: remove space
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 16:32:58 +01:00
AuxXxilium
a987b4209a arc: add description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 15:14:44 +01:00
AuxXxilium
a575a3d023 arc: fix typos
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 15:10:05 +01:00
AuxXxilium
565a3d87ae arc: fix headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 13:37:29 +01:00
AuxXxilium
eb6594a3a1 boot: set default kernelpanic timeout to 5
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 12:33:52 +01:00
AuxXxilium
beb78fadd7 tree: more rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 12:26:23 +01:00
AuxXxilium
bda2fdf360 tree: rework more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-17 01:08:36 +01:00
AuxXxilium
3bebbf3f33 arc: add update information to headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 19:29:54 +01:00
AuxXxilium
1aa4c9ad8c network: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 19:17:59 +01:00
AuxXxilium
b0b8f60cee git: rework bug template
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 19:10:36 +01:00
AuxXxilium
92dd16a242 arc: fix some typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 19:06:58 +01:00
AuxXxilium
78a6018991 Revert "storage: update function"
This reverts commit 8b3ce0aca7.
2024-02-16 19:06:41 +01:00
AuxXxilium
9d4be10e65 boot: add description
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 18:38:30 +01:00
AuxXxilium
42afc5e550 network: rework static ip function
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 18:36:36 +01:00
AuxXxilium
ae013fedec arc: remove unused entry from cmdline menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 18:01:42 +01:00
AuxXxilium
8b3ce0aca7 storage: update function
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-16 00:01:44 +01:00
AuxXxilium
15376b4317 addons: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-15 23:55:16 +01:00
AuxXxilium
b4dba6ef55 network: rework ip/mac functions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-15 23:46:55 +01:00
AuxXxilium
5154dbd75c arc/boot/init: remove bootcount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-15 21:02:22 +01:00
AuxXxilium
7b972ed9d9 boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 22:38:51 +01:00
AuxXxilium
1ad321651d boot: remove blank
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 22:20:31 +01:00
AuxXxilium
4ab446dc11 usbmount: add force selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 22:13:09 +01:00
AuxXxilium
eba9b1c44f arc: rework usb mount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 21:41:22 +01:00
AuxXxilium
0a6b47f50b boot: show warning if ssh/web access if detected
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 21:11:25 +01:00
AuxXxilium
61a5a595a0 arc: update usb mount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 20:55:55 +01:00
AuxXxilium
f19d61dcd0 build: disable useless 4GB build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 20:09:37 +01:00
AuxXxilium
b235b6c991 arc: rework usb mount for nonDT
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-13 20:04:23 +01:00
AuxXxilium
625c557521 arc/boot: rewrite boot and remove persistant direct boot (to avoid recovery loop)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-12 18:45:05 +01:00
AuxXxilium
34c2a5f773 arc: fix typos
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-12 18:22:51 +01:00
AuxXxilium
8e0c009ba8 arc: try something new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-11 23:44:16 +01:00
AuxXxilium
087a45e476 arc: remove usb switch -> we can use expands addon
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 20:49:55 +01:00
AuxXxilium
cc4183e1bb arc: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 11:49:24 +01:00
AuxXxilium
262b343131 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 11:31:26 +01:00
AuxXxilium
9d7c299855 include: sync
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 11:22:20 +01:00
AuxXxilium
4bc9add26e ramdisk: fix patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 11:10:01 +01:00
AuxXxilium
424c557c52 arc: remove warranty warning
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 10:50:08 +01:00
AuxXxilium
be7a3fc0c0 arc: rework some features
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 10:21:30 +01:00
AuxXxilium
1dbabc8d2a arc: rewrite usbmount value
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-10 10:06:43 +01:00
AuxXxilium
eb90463958 arc: remove kvmswitch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-06 21:12:44 +01:00
AuxXxilium
dfb56270f9 tree: some rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-06 20:12:53 +01:00
AuxXxilium
29135fafff arc: add warning for arc patch user
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-03 15:18:40 +01:00
AuxXxilium
bd2fc25b6f arc: add DSM force Reinstall to menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-02 20:20:36 +01:00
AuxXxilium
1fe8fe1f96 build: update dev build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-01 19:52:30 +01:00
AuxXxilium
4527f25eab arc: rework make
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-01 19:47:46 +01:00
AuxXxilium
e18c36b421 arc: remove a dialog from build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-02-01 19:41:27 +01:00
AuxXxilium
b9d268dca7 ramdisk: arrange system addons
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-31 16:38:26 +01:00
AuxXxilium
e76549997d arc/boot: fix network list, enable mmc boot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-31 16:28:21 +01:00
AuxXxilium
2593b2dad5 boot: a bit more styling
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 20:45:04 +01:00
AuxXxilium
cb064ac485 boot: some output styling
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 20:31:03 +01:00
AuxXxilium
3c6762fb86 boot: formate text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 20:18:47 +01:00
AuxXxilium
42cb176dc3 arc/boot: rewrite EFI to UEFI
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 20:13:30 +01:00
AuxXxilium
fdc678b5a7 boot: play with something
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 20:09:37 +01:00
AuxXxilium
c241f79f57 arc: remove pat_hash/url from offline mdoe
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 18:11:37 +01:00
AuxXxilium
bed27600ff boot: remove cmdline output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 17:50:29 +01:00
AuxXxilium
8cf31c4ff3 boot: add empty line to separate sections
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-30 00:13:38 +01:00
AuxXxilium
627ea738c0 boot: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 20:56:24 +01:00
AuxXxilium
14be7398c4 arc: rework kvmsupport
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 20:29:25 +01:00
AuxXxilium
5e86905c21 arc: fix bootcount reset
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 20:04:01 +01:00
AuxXxilium
9a23e1e376 arc/boot/init: remove bootwait counter
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 20:01:58 +01:00
AuxXxilium
de361bb52c arc: rewrite kvmsupport
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 19:56:08 +01:00
AuxXxilium
b1cbfb341e arc: rewrite message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 19:22:45 +01:00
AuxXxilium
3695e8b897 arc: rewrite kvm support
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 19:20:49 +01:00
AuxXxilium
2e2b96f6e9 arc: rewrite kvm prerequisites
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-29 17:20:59 +01:00
AuxXxilium
6283c6f479 arc: remove empty line
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 18:13:13 +01:00
AuxXxilium
28212b4255 arc: fix menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:59:18 +01:00
AuxXxilium
32b67690db arc: fix storagepanel settings
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:32:57 +01:00
AuxXxilium
7e9024ecd1 github: update more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:24:22 +01:00
AuxXxilium
323570d170 github: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:15:24 +01:00
AuxXxilium
fe1023ed34 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:12:50 +01:00
AuxXxilium
f2b6a8892a github: update files
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 17:12:36 +01:00
AuxXxilium
4299a7aa4b ramdisk: remove modulelist
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 15:01:59 +01:00
AuxXxilium
af9bdcbb90 arc: add storagepanel option
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 14:50:08 +01:00
AuxXxilium
c313485eec modulelist: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 14:47:15 +01:00
AuxXxilium
7a3a62ce1d boot: remove loader disk message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 14:46:56 +01:00
AuxXxilium
bff841e5fd arc/network: rework some dialog
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 13:01:17 +01:00
AuxXxilium
c196fe7c7b network: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-28 12:47:54 +01:00
AuxXxilium
03c21e5e54 arc: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 19:21:46 +01:00
AuxXxilium
51850d1fb1 arc: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 18:55:52 +01:00
AuxXxilium
73375029de arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 18:13:04 +01:00
AuxXxilium
dbf14f133e arc: set .pat values to 0 for offlinemode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 18:03:50 +01:00
AuxXxilium
a0976b9679 arc: reread kvmsupport value
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 17:59:35 +01:00
AuxXxilium
454dcef52a arc: add cpuflags check to arc
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 17:57:40 +01:00
AuxXxilium
8f7847e126 arc: add kvmsupport switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 17:26:58 +01:00
AuxXxilium
6b4f9245e9 init: fix text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-27 14:55:23 +01:00
AuxXxilium
6994efca64 arc: fix some styling
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-26 18:15:43 +01:00
AuxXxilium
f29306919b build: clean local before pull new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-24 20:04:23 +01:00
AuxXxilium
d22f00a3b0 git: add missing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-24 20:02:51 +01:00
AuxXxilium
4ea0f723cc arc: rename loader settings to misc settings
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-24 18:19:06 +01:00
AuxXxilium
c30210a1c6 arc: move addons, modules to arc section
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-24 18:17:31 +01:00
AuxXxilium
c4eee9d887 arc: fix unused additional button
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-24 18:11:43 +01:00
AuxXxilium
d2f9f703ad build: try something new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 21:33:55 +01:00
AuxXxilium
243b20d75d arc: fix usbmount values
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 19:59:31 +01:00
AuxXxilium
374882d473 arc: fix reconfiguring message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 19:50:09 +01:00
AuxXxilium
c82eb4c0f9 arc: set maxdisks for usbmount to 26
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 19:46:57 +01:00
AuxXxilium
39092c7470 arc: fix usbmount for nonDT
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 19:44:18 +01:00
AuxXxilium
6884b0b7e9 arc: test some usb changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-22 18:40:53 +01:00
AuxXxilium
d3621f2e27 arc: fix boot message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-21 12:12:29 +01:00
AuxXxilium
c75350f32b tree: multiple rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-21 12:04:42 +01:00
AuxXxilium
f2d8a4ab0f arc: add networkdiag to sysinfo, add greplog to dev section, rewrite menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-21 12:04:24 +01:00
AuxXxilium
fb305c0dff arc: reset bootcounter in different scenaries
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-20 16:06:04 +01:00
AuxXxilium
bb2828c018 arc: set usb mount to auto
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-20 15:11:16 +01:00
AuxXxilium
2a753e7893 arc: fix cmdline menu output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-20 13:28:52 +01:00
AuxXxilium
c7708790a9 build: check for next
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-20 12:44:45 +01:00
AuxXxilium
08af7db88c ramdisk: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 22:03:30 +01:00
AuxXxilium
42298499c0 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 21:46:08 +01:00
AuxXxilium
652573e9a7 arc: usb mount add missing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 21:43:43 +01:00
AuxXxilium
8a7c50ed86 arc: add new usb mount options and some rewrites
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 20:10:57 +01:00
AuxXxilium
dbff7bd920 arc: cmdline menu fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 18:10:58 +01:00
AuxXxilium
ff89c559d0 arc: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 18:03:14 +01:00
AuxXxilium
3d09e6bf8f arc/addons/modules: more checks and fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 17:54:30 +01:00
AuxXxilium
314765ddae ramdisk: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 17:46:32 +01:00
AuxXxilium
a750049929 arc: add missing
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-19 16:14:04 +01:00
Christian
64457e4b98 ramdisk: sync with eudev
Signed-off-by: Christian <info@auxxxilium.tech>
2024-01-19 00:39:55 +01:00
AuxXxilium
9a5e2b6be7 ramdisk: more logs
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-18 21:25:11 +01:00
AuxXxilium
bd0676920b arc: link depmod/modinfo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-18 21:22:25 +01:00
AuxXxilium
4070ee18cd build: speed up local build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-18 21:22:11 +01:00
AuxXxilium
70a8bc10ea grub: order some things
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 18:22:55 +01:00
AuxXxilium
b7ded840a6 ramdisk: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 17:21:43 +01:00
AuxXxilium
d468b2f9bf ramdisk: try something new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 17:11:36 +01:00
AuxXxilium
eaa206b176 ramdisk: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 16:43:21 +01:00
AuxXxilium
a4d5e5fdce zimage: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 16:40:46 +01:00
AuxXxilium
1f836b44d1 grub: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 16:23:46 +01:00
AuxXxilium
f0eb9fd106 ramdisk: remove expands
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 14:54:09 +01:00
AuxXxilium
0c6a201d71 ramdisk: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 14:40:54 +01:00
AuxXxilium
33d31ffe8e ramdisk: add back force copy lkm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 14:40:09 +01:00
AuxXxilium
fe61073ecc ramdisk: fix serial
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 14:38:07 +01:00
AuxXxilium
a46c7b7f61 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 14:32:36 +01:00
AuxXxilium
a707e93f5a ramdisk: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-17 07:08:13 +01:00
AuxXxilium
7473d329d0 arc: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 19:28:38 +01:00
AuxXxilium
0657479299 arc: fix IP output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 19:26:51 +01:00
AuxXxilium
992c8a157c ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 19:25:18 +01:00
AuxXxilium
ba102b082e ramdisk: add new addon as system
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 19:09:22 +01:00
AuxXxilium
a9e5781a35 ramdisk: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 19:04:48 +01:00
AuxXxilium
cb7c1fd653 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-16 17:09:05 +01:00
AuxXxilium
a709cb90fb arc: fix syno text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 20:07:21 +01:00
AuxXxilium
9f73849e5a Revert "ramdisk: disable network patch"
This reverts commit 71b7a65e4a.
2024-01-14 16:41:23 +01:00
AuxXxilium
97a934c639 boot: fix coloring
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 16:40:58 +01:00
AuxXxilium
937fc71a36 grep: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 16:40:55 +01:00
AuxXxilium
4b16cbb433 grep: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 10:18:06 +01:00
AuxXxilium
506ee2b173 grep: add utility to get log file from syno partition
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 10:12:40 +01:00
AuxXxilium
71b7a65e4a ramdisk: disable network patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 10:12:10 +01:00
AuxXxilium
56158f81fa sysinfo: fix output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-14 08:52:39 +01:00
AuxXxilium
e4b5a87b9b boot: fix last coloring
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 22:00:29 +01:00
AuxXxilium
a65f4cb8be init/boot: fix colors
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 21:58:11 +01:00
AuxXxilium
f10034acbb init/boot: fix coloring
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 18:17:27 +01:00
AuxXxilium
8a88ebfd1e init/boot: fix nic list
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 18:04:58 +01:00
AuxXxilium
ce9c4ee36f Revert "grub/boot: use new eth name scheme (for testing)"
This reverts commit 470c62d6ea.
2024-01-13 14:07:54 +01:00
AuxXxilium
e4d036a202 init/boot: change ip timeout
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 14:07:46 +01:00
AuxXxilium
5c999baa72 arc: ip bugfix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 12:55:05 +01:00
AuxXxilium
0db93601be network: rework nic count function
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 12:40:04 +01:00
AuxXxilium
a83cf4214a ramdisk: add hwdb to copy from buildroot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 12:16:27 +01:00
AuxXxilium
470c62d6ea grub/boot: use new eth name scheme (for testing)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 11:50:34 +01:00
AuxXxilium
50fee27ffa build: fix local compile
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 04:49:31 +01:00
AuxXxilium
8ded12b895 arc: remove update loader (cause more issue than help)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-13 02:04:50 +01:00
AuxXxilium
a307d43364 arc: thermal shutdown only for DT and per platform
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-11 23:38:57 +01:00
AuxXxilium
35734b3e62 arc: fix thermal rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-11 23:12:58 +01:00
AuxXxilium
7d8c25296e arc: add thermal shutdown options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-11 17:07:53 +01:00
AuxXxilium
bb611570d7 arc: add backup/restore hardware encryption key
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-11 16:32:39 +01:00
AuxXxilium
7b57b6f48d boot/init: force wol
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-10 22:31:27 +01:00
AuxXxilium
ad582845f8 boot/init: rewrite ip getting
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-10 20:28:02 +01:00
AuxXxilium
e1c697e9dc boot/init: change nic timeout
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-10 20:02:17 +01:00
AuxXxilium
b3b25d3e67 arc: modify title
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-07 18:34:56 +01:00
AuxXxilium
15ad1ff59d bootwait: set to 0
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-07 18:31:51 +01:00
AuxXxilium
940140abb4 ramdisk: rework epyc7002 modification
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-06 04:06:15 +01:00
AuxXxilium
44ef73d314 ramdisk: force copy lkm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-06 04:03:23 +01:00
AuxXxilium
9d2642dad9 build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-05 19:31:00 +01:00
AuxXxilium
d464dc5336 build: try something new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-05 19:28:41 +01:00
AuxXxilium
1d55067ab0 ramdisk: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-05 19:28:32 +01:00
AuxXxilium
ddd83b7e57 arc: if emmc is not used to boot loader, remove emmc modules to prevent periodic remount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-04 19:34:39 +01:00
AuxXxilium
0e64c35b87 Revert "grub/boot: add network community fix for dell systems"
This reverts commit f143c83ab6.
2024-01-04 09:49:13 +01:00
AuxXxilium
35e9794bcb arc: rename settings to patch (back)
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-04 09:42:13 +01:00
AuxXxilium
12f1e027b7 arc: set higher timeout for syno/git api while make
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-04 07:07:28 +01:00
AuxXxilium
4f2f59a639 arc: fix update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-03 16:52:15 +01:00
AuxXxilium
ac0dc5b747 modules: remove realtek switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-01 20:06:08 +01:00
AuxXxilium
ae52c2b388 arc: fix offline mode detection in sysinfo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-01-01 18:47:55 +01:00
AuxXxilium
5f3e7cf629 boot: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 23:24:30 +01:00
AuxXxilium
eae6d0b553 readme: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 20:04:06 +01:00
AuxXxilium
3d3ece5639 arc: add config warning to usbmenu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 19:56:48 +01:00
AuxXxilium
97236bd32b arc: add offline check for backup/restore
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 19:54:51 +01:00
AuxXxilium
2e349afb51 arc: rewrite cancel to exit
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 19:52:31 +01:00
AuxXxilium
b8ae414e7c arc: modify topline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 19:39:36 +01:00
AuxXxilium
10348e5522 arc: add full diag and upload
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 19:37:11 +01:00
AuxXxilium
d3a0a297e3 boot: little fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 18:15:33 +01:00
AuxXxilium
ef5f820852 arc: little fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-30 18:15:24 +01:00
AuxXxilium
506684b274 github: update bugreport template
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-29 19:38:53 +01:00
AuxXxilium
f32b281d50 boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-29 19:32:05 +01:00
AuxXxilium
76365a4237 grub/boot: modify
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-29 19:19:44 +01:00
AuxXxilium
f143c83ab6 grub/boot: add network community fix for dell systems
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-29 19:12:00 +01:00
AuxXxilium
476244d2bd arc: fix offline mode switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-29 15:14:10 +01:00
AuxXxilium
a75c40a345 arc: fix ipv6
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-28 16:25:14 +01:00
AuxXxilium
02699471c6 arc: fix offline mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-28 00:00:50 +01:00
AuxXxilium
5558e11d16 arc: introduce offlinemode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-27 23:17:55 +01:00
AuxXxilium
d377309584 arc: add github as backup connection to build step
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-27 18:31:17 +01:00
AuxXxilium
831c6e41f0 tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 21:40:54 +01:00
AuxXxilium
d0c11fc1d5 tree: add ipv6 switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 20:29:35 +01:00
AuxXxilium
57a5c74537 network: add second custom mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 20:06:48 +01:00
AuxXxilium
7c7c83f178 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 19:58:42 +01:00
AuxXxilium
17220756a0 boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 19:58:31 +01:00
AuxXxilium
b6245d0b62 ramdisk: enable usb install
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 19:17:36 +01:00
AuxXxilium
76c03cc02a ramdisk: change way to get patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 18:00:07 +01:00
AuxXxilium
206a20ea7a storage: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 17:46:28 +01:00
AuxXxilium
4725f2fc9f boot: rewrite boot message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 17:34:10 +01:00
AuxXxilium
ee6110b1d7 arc: add cleanup old to make step
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 17:28:09 +01:00
AuxXxilium
0f82a21132 arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 17:21:31 +01:00
AuxXxilium
308dcf937b network: remane NIC to ETH
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 16:55:51 +01:00
AuxXxilium
6a503c12e5 tree: rename NIC to ETH
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 16:47:40 +01:00
AuxXxilium
8dbf892b08 sysinfo: add output for config version
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-23 16:46:51 +01:00
AuxXxilium
bc09832c5e format: fix format menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-22 01:42:05 +01:00
AuxXxilium
c08629cbe8 boot/init: add disk warning
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-21 22:28:24 +01:00
AuxXxilium
071e76e242 arc: build change text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-21 22:10:39 +01:00
AuxXxilium
47208226fc arc: format build step
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-21 21:01:43 +01:00
AuxXxilium
909519625d ramdisk: rename
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-21 00:54:05 +01:00
AuxXxilium
92fd8eccdc ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-21 00:50:25 +01:00
AuxXxilium
15ef8f8dfe boot: rewrite Sata Information
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-20 23:28:15 +01:00
AuxXxilium
4bd83788f1 arc: rebuild menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-20 23:17:22 +01:00
AuxXxilium
41e8bc36fb ramdisk: disable ipv6 while init
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-20 20:06:22 +01:00
AuxXxilium
c8d43386de modules: fix realtek switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-16 15:03:37 +01:00
AuxXxilium
7e5e7bc33b modules: add realtek module switch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-16 14:05:36 +01:00
AuxXxilium
5678f71576 network: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-13 18:33:24 +01:00
AuxXxilium
a742ad6468 cmdline: remove i915 fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-10 19:42:15 +01:00
AuxXxilium
519b3a1417 arc: add back SAS/SCSI check for model selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-10 19:02:21 +01:00
AuxXxilium
dc53c70ea5 ramdisk: rename SA6400 patches
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-10 18:57:49 +01:00
AuxXxilium
c4fa16c545 arc: fix cmdline menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-08 21:17:52 +01:00
AuxXxilium
dd3ddd0749 arc: fix menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-08 15:40:49 +01:00
AuxXxilium
2ceb9533d8 readme: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-05 00:20:58 +01:00
AuxXxilium
1f25ea58b6 storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-03 16:15:28 +01:00
AuxXxilium
7452d7c702 arc: fix reset
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-03 14:30:35 +01:00
AuxXxilium
4a47b3b03b arc: fix recovery
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-03 14:15:28 +01:00
AuxXxilium
badcf85c7d readme: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-02 15:48:40 +01:00
AuxXxilium
c42716608a storage: fix remap
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-02 15:45:24 +01:00
AuxXxilium
3c86f5893d ramdisk: formate
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-02 00:00:23 +01:00
AuxXxilium
a1d4d22e21 ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 23:48:31 +01:00
AuxXxilium
418e79176f addons: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 23:38:59 +01:00
AuxXxilium
bc793ae6ce arc: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 20:42:12 +01:00
AuxXxilium
d4c8b093d3 arc: fix addons for non SA6400
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 20:33:21 +01:00
AuxXxilium
4d6f8341d9 addons: fix selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 19:56:42 +01:00
AuxXxilium
a8e0f8eb42 arc: fix modules for epyc7002
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 19:41:41 +01:00
AuxXxilium
0dcff700e5 arc/addons: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 19:33:47 +01:00
AuxXxilium
81a95c2030 arc: fix update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 18:59:08 +01:00
AuxXxilium
04d44d4b15 arc: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 17:29:22 +01:00
AuxXxilium
17a2ba569f ramdisk: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 15:49:23 +01:00
AuxXxilium
5e93c79c9f arc: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-12-01 15:35:33 +01:00
AuxXxilium
d62e8ce830 storage: rewrite logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-30 19:46:53 +01:00
AuxXxilium
e2ee78e60f storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-29 23:17:25 +01:00
AuxXxilium
0ead7065f6 Revert "addons: fix copy"
This reverts commit 6169e66d76.
2023-11-29 00:10:16 +01:00
AuxXxilium
6169e66d76 addons: fix copy
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-28 23:38:32 +01:00
AuxXxilium
6edaef90d2 Revert "addons: fix copy"
This reverts commit a778e23f1c.
2023-11-28 23:31:50 +01:00
AuxXxilium
8b52074d98 sysinfo: fix subversions
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-27 22:15:17 +01:00
AuxXxilium
a778e23f1c addons: fix copy
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 15:01:21 +01:00
AuxXxilium
5f4928cb3d arc: change description in addon selection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 01:04:59 +01:00
AuxXxilium
273f58a74a credits: rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 00:56:00 +01:00
AuxXxilium
370d535a63 sysinfo: rename to nic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 00:51:30 +01:00
AuxXxilium
ffd121feaf init/boot: fix nic amount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 00:50:24 +01:00
AuxXxilium
f8d602ec3d storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-26 00:42:33 +01:00
AuxXxilium
55b7ce7f27 arc/storage: add scsi controller
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-25 21:50:18 +01:00
AuxXxilium
7d2438c3c1 restore: fix restore with code
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-23 20:28:09 +01:00
AuxXxilium
6b936a8691 storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 20:05:40 +01:00
AuxXxilium
6d1a9ee1b5 storage: fix mmc
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:44:17 +01:00
AuxXxilium
0daa0a4761 storage: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:43:24 +01:00
AuxXxilium
64fd492710 storage: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:35:04 +01:00
AuxXxilium
320757c2cf arc/storage: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:31:15 +01:00
AuxXxilium
c23c854fc7 sysinfo: rename some things
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:29:44 +01:00
AuxXxilium
5b3dc824e8 sysinfo/storage: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:23:14 +01:00
AuxXxilium
22acdc65c3 cmdline: add i915 patch to cmdline section
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:18:20 +01:00
AuxXxilium
203d59c6ee storage: add mmc as drivetype
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 19:17:56 +01:00
AuxXxilium
e7c63fa0a5 menu: rename some options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-21 18:58:52 +01:00
AuxXxilium
8f57b5f44f build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-20 21:20:29 +01:00
AuxXxilium
ea33490987 arc: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-20 21:01:38 +01:00
AuxXxilium
c67932c6db functions: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-20 20:09:38 +01:00
AuxXxilium
196164f2ac arc reloaded: full rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-20 19:56:57 +01:00
AuxXxilium
d8453a83de init/boot: add force wol
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-15 22:50:28 +01:00
AuxXxilium
521afcf051 init: fix amount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-15 16:24:55 +01:00
AuxXxilium
f988fd9d4c boot: fix amount
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-15 15:22:16 +01:00
AuxXxilium
3257fd0320 arc: test network rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-15 13:35:38 +01:00
AuxXxilium
ff5cb61528 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-09 16:38:57 +01:00
AuxXxilium
e935a0b576 build: add 4GB images for vm
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-09 16:32:06 +01:00
AuxXxilium
e13fe4f19c arc: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-07 23:42:50 +01:00
AuxXxilium
5f4b1b8ddd arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-06 18:58:03 +01:00
AuxXxilium
32ce93d919 tree: syntax rewrite and fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-06 18:54:17 +01:00
AuxXxilium
eeed605fa3 boot: allow second custom mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-06 18:46:06 +01:00
AuxXxilium
a2bc2e5309 build: fix local compile
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-06 18:40:07 +01:00
AuxXxilium
f4935217cf arc: fix password reset
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-05 21:30:05 +01:00
AuxXxilium
3ab09900d7 arc: update credits
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 21:58:40 +01:00
AuxXxilium
688c61b50a arc: fix credits
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 21:50:32 +01:00
AuxXxilium
49aea33aad arc: add credits to menu
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 21:44:18 +01:00
AuxXxilium
8d387227d9 tree: codestyle fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 15:29:09 +01:00
AuxXxilium
eef719f531 Revert "update: remove "update" option"
This reverts commit f60b7b7326.

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 15:21:27 +01:00
AuxXxilium
d4f2d24b56 tree: fix syntax
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 14:56:10 +01:00
AuxXxilium
9fd40a4824 arc: rework reset dsm password
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 14:37:20 +01:00
AuxXxilium
4d38251c71 arc: check for loader disk
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:53:41 +01:00
AuxXxilium
9399e8c64f Revert "arc: rework"
This reverts commit 182cd15501.
2023-11-04 11:53:19 +01:00
AuxXxilium
1253b49138 build: add default br to local build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:37:58 +01:00
AuxXxilium
182cd15501 arc: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:15:24 +01:00
AuxXxilium
94caf2ee41 arc: rework dsm password reset
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:13:06 +01:00
AuxXxilium
506f8fd62e init: set default hddsort "false"
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:06:47 +01:00
AuxXxilium
ce153408a8 build: add resize img
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:06:23 +01:00
AuxXxilium
92b38f4c54 build: add option to choose buildroot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 11:04:44 +01:00
AuxXxilium
54b86ff461 arc/storage: rewrite for SAS & DT
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-04 10:55:31 +01:00
AuxXxilium
b1694ade0c tree: rework all patch apply
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 21:24:47 +01:00
AuxXxilium
26f5504dee ramdisk: add ipv6 dhcp to preconfigured
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 21:04:26 +01:00
AuxXxilium
4f0631c109 ramdisk: modify
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 21:02:09 +01:00
AuxXxilium
2a905ff87e ramdisk: modify
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 20:53:42 +01:00
AuxXxilium
68e8ff243e ramdisk: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 20:51:40 +01:00
AuxXxilium
289614a1f7 arc: change menu order
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 20:47:32 +01:00
AuxXxilium
c1c21236df usb: update usb mount config
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 19:13:01 +01:00
AuxXxilium
f60b7b7326 update: remove "update" option
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 19:10:48 +01:00
AuxXxilium
e1fa81dc44 arc: fix format disks
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 17:16:11 +01:00
AuxXxilium
20c22de6c7 build: add back vmdk
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 14:01:17 +01:00
AuxXxilium
1de2928a03 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-03 00:07:30 +01:00
AuxXxilium
eea69fd8ec build: fix codestyle
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 21:11:42 +01:00
AuxXxilium
a79a3cf45f build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 21:08:59 +01:00
AuxXxilium
cf081f1783 arc/tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 21:01:31 +01:00
AuxXxilium
c2145344f8 arc: fix typo in headline
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 20:41:14 +01:00
AuxXxilium
9d47aadb14 build: fix local build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 20:30:51 +01:00
AuxXxilium
2085e367e8 arc: init reloaded
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2023-11-02 20:15:04 +01:00
83 changed files with 3088 additions and 9870 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1,4 +1,3 @@
# These are supported funding model platforms
github: AuxXxilium
buy_me_a_coffee: auxxxilium

View File

@@ -1,17 +0,0 @@
---
name: Bug report
about: Create a Bug Report
title: ''
labels: bug
assignees: ''
---
**Describe the Bug**
First read Wiki to find a Solution. If you can't find a Solution, provide a clear and concise description of what the bug is.
**Screenshots**
Actual Screenshot from Systeminfo (Config Mode - Sysinfo) or use new "Full Sysinfo - Upload" Function provide the Code!!! <- IMPORTANT
**Hardware**
Add your Hardware Informations here. CPU / Board / Networkcontroller / Storagecontroller / ...

View File

@@ -1,8 +0,0 @@
---
name: Custom Build
about: Create a Customized Build
title: ''
labels: 'custom'
assignees: ''
---

View File

@@ -1,14 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your Feature request related to a Problem? Please describe.**
A clear and concise Description of what the Problem is. Ex. I'm always frustrated when [...]
**Additional Context**
Add any other Context or Screenshots about the Feature request here.

View File

@@ -1,259 +0,0 @@
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Build Arc Image Development
on:
workflow_dispatch:
inputs:
runs:
description: "runs-on"
type: choice
options:
- ubuntu-latest
- self-hosted
version:
description: "version (1.0.0)"
required: true
type: string
next:
description: "next"
default: true
type: boolean
stable:
description: "stable"
default: true
type: boolean
jobs:
build:
runs-on: ${{ inputs.runs }}
steps:
- name: Checkout
uses: actions/checkout@main
# Install Dependencies
- name: Install Dependencies
if: ${{ inputs.runs == 'ubuntu-latest' }}
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils cpio xz-utils lz4 lzma bzip2 gzip zstd
# sudo snap install yq
if ! command -v yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then
sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq
fi
df -h
# Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Buildroot
run: |
. scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies"
getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
getCustom "files/p3/custom"
getOffline "files/p3/configs"
getLKMs "files/p3/lkms"
getTheme "files/p1/boot/grub"
getBuildrootx "brx"
getBuildroots "brs"
# Export Dependencies Version to env
echo "ADDONTAG=${ADDONTAG}" >> $GITHUB_ENV
echo "MODULETAG=${MODULETAG}" >> $GITHUB_ENV
echo "CONFIGTAG=${CONFIGTAG}" >> $GITHUB_ENV
echo "PATCHTAG=${PATCHTAG}" >> $GITHUB_ENV
echo "CUSTOMTAG=${CUSTOMTAG}" >> $GITHUB_ENV
echo "LKMTAG=${LKMTAG}" >> $GITHUB_ENV
echo "THEMETAG=${THEMETAG}" >> $GITHUB_ENV
echo "BRXTAG=${BRXTAG}" >> $GITHUB_ENV
echo "BRSTAG=${BRSTAG}" >> $GITHUB_ENV
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "OK"
# Build incremental
- name: Build Next Image
if: ${{ inputs.next == true }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}-dev"
ARC_BRANCH="next"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "ARC_BUILD=${ARC_BUILD}" >> $GITHUB_ENV
echo "ARC_VERSION=${ARC_VERSION}" >> $GITHUB_ENV
echo "ARC_BRANCH=${ARC_BRANCH}" >> $GITHUB_ENV
echo "Create Arc Image"
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
[ ! -f "brx/bzImage-arc" ] || [ ! -f "brx/initrd-arc" ] && return 1
echo "Repack initrd"
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sudo sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
echo "Image Converter"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
qemu-img convert -p -f raw -O vhdx ${IMAGE_FILE} arc.vhdx
# Zip image and generate checksum
- name: Pack Next Image
if: ${{ inputs.next == true }}
run: |
if [ -n "${{ env.ARC_VERSION }}" ]; then
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.img.zip" arc.img
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhdx.zip" arc.vhdx
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
fi
# Cleanup
- name: Cleanup
run: |
rm -rf "arc.img" "arc.vmdk" "arc-dyn.vmdk" "arc.vhdx" "arc-flat.vmdk"
# Build incremental
- name: Build Stable Image
if: ${{ inputs.stable }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}-dev"
ARC_BRANCH="stable"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "ARC_BUILD=${ARC_BUILD}" >> $GITHUB_ENV
echo "ARC_VERSION=${ARC_VERSION}" >> $GITHUB_ENV
echo "ARC_BRANCH=${ARC_BRANCH}" >> $GITHUB_ENV
echo "Create Arc Image"
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
[ ! -f "brs/bzImage-arc" ] || [ ! -f "brs/initrd-arc" ] && return 1
echo "Repack initrd"
cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
#cp -f "brs/initrd-arc" "files/p3/initrd-arc"
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sudo sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
echo "Image Converter"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
qemu-img convert -p -f raw -O vhdx ${IMAGE_FILE} arc.vhdx
# Zip image and generate checksum
- name: Pack Stable Image
if: ${{ inputs.stable }}
run: |
if [ -n "${{ env.ARC_VERSION }}" ]; then
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.img.zip" arc.img
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhdx.zip" arc.vhdx
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
fi
# Publish a release if is a tag
- name: Release
if: success() && env.ARC_VERSION != ''
uses: ncipollo/release-action@v1
with:
tag: ${{ env.ARC_VERSION }}
prerelease: true
makeLatest: false
allowUpdates: true
body: |
### Note:
- Development Build
### Information:
- Full Changelog is available in my Discord
- Discord Account for Arc Patch needed
### Dependencies:
- Addons: ${{ env.ADDONTAG }}
- Modules: ${{ env.MODULETAG }}
- Configs: ${{ env.CONFIGTAG }}
- Patches: ${{ env.PATCHTAG }}
- Custom: ${{ env.CUSTOMTAG }}
- LKMs: ${{ env.LKMTAG }}
- Buildroot Stable: ${{ env.BRSTAG }}
- Buildroot Next: ${{ env.BRXTAG }}
### Release
- ${{ env.BUILD_TIME }}
artifacts: |
arc-*.zip
update-*.zip

View File

@@ -1,297 +0,0 @@
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Build Arc Image
on:
workflow_dispatch:
inputs:
runs:
description: "runs-on"
type: choice
options:
- ubuntu-latest
- self-hosted
version:
description: "version (1.0.0)"
required: true
type: string
notice:
description: "Notice here"
required: false
type: string
latest:
description: "latest"
default: true
type: boolean
prerelease:
description: "pre release"
default: false
type: boolean
next:
description: "next"
default: true
type: boolean
stable:
description: "stable"
default: true
type: boolean
clean:
description: "clean"
default: false
type: boolean
jobs:
build:
runs-on: ${{ inputs.runs }}
steps:
- name: Checkout
uses: actions/checkout@main
- name: Delete releases and workflows runs
if: ${{ inputs.clean == true }}
uses: ophub/delete-releases-workflows@main
with:
delete_releases: true
releases_keep_latest: 1
delete_workflows: false
delete_tags: true
gh_token: ${{ secrets.GITHUB_TOKEN }}
# Install Dependencies
- name: Install Dependencies
if: ${{ inputs.runs == 'ubuntu-latest' }}
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils cpio xz-utils lz4 lzma bzip2 gzip zstd
# sudo snap install yq
if ! command -v yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then
sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq
fi
df -h
# Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Dependencies for all Image
run: |
. scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies"
getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
getCustom "files/p3/custom"
getOffline "files/p3/configs"
getLKMs "files/p3/lkms"
getTheme "files/p1/boot/grub"
getBuildrootx "brx"
getBuildroots "brs"
# Export Dependencies Version to env
echo "ADDONTAG=${ADDONTAG}" >> $GITHUB_ENV
echo "MODULETAG=${MODULETAG}" >> $GITHUB_ENV
echo "CONFIGTAG=${CONFIGTAG}" >> $GITHUB_ENV
echo "PATCHTAG=${PATCHTAG}" >> $GITHUB_ENV
echo "CUSTOMTAG=${CUSTOMTAG}" >> $GITHUB_ENV
echo "LKMTAG=${LKMTAG}" >> $GITHUB_ENV
echo "THEMETAG=${THEMETAG}" >> $GITHUB_ENV
echo "BRXTAG=${BRXTAG}" >> $GITHUB_ENV
echo "BRSTAG=${BRSTAG}" >> $GITHUB_ENV
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "OK"
# Build incremental
- name: Build Next Image
if: ${{ inputs.next == true }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}"
ARC_BRANCH="next"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "ARC_BUILD=${ARC_BUILD}" >> $GITHUB_ENV
echo "ARC_VERSION=${ARC_VERSION}" >> $GITHUB_ENV
echo "ARC_BRANCH=${ARC_BRANCH}" >> $GITHUB_ENV
echo "Create Arc Image"
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
[ ! -f "brx/bzImage-arc" ] || [ ! -f "brx/initrd-arc" ] && return 1
echo "Repack initrd"
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sudo sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
echo "Image Converter"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
qemu-img convert -p -f raw -O vhdx ${IMAGE_FILE} arc.vhdx
echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc.ova"
# Zip image and generate checksum
- name: Pack Next Image
if: ${{ inputs.next == true }}
run: |
if [ -n "${{ env.ARC_VERSION }}" ]; then
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.img.zip" arc.img
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhdx.zip" arc.vhdx
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.ova.zip" arc.ova
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
fi
# Cleanup
- name: Cleanup
run: |
rm -rf "arc.img" "arc.ova" "arc.vmdk" "arc-dyn.vmdk" "arc.vhdx" "arc-flat.vmdk"
# Build incremental
- name: Build Stable Image
if: ${{ inputs.stable == true }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}"
ARC_BRANCH="stable"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "ARC_BUILD=${ARC_BUILD}" >> $GITHUB_ENV
echo "ARC_VERSION=${ARC_VERSION}" >> $GITHUB_ENV
echo "ARC_BRANCH=${ARC_BRANCH}" >> $GITHUB_ENV
echo "Create Arc Image"
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
[ ! -f "brs/bzImage-arc" ] || [ ! -f "brs/initrd-arc" ] && return 1
echo "Repack initrd"
cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
#cp -f "brs/initrd-arc" "files/p3/initrd-arc"
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sudo sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
echo "Image Converter"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
qemu-img convert -p -f raw -O vhdx ${IMAGE_FILE} arc.vhdx
echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc.ova"
# Zip image and generate checksum
- name: Pack Stable Image
if: ${{ inputs.stable == true }}
run: |
if [ -n "${{ env.ARC_VERSION }}" ]; then
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.img.zip" arc.img
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhdx.zip" arc.vhdx
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.ova.zip" arc.ova
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
fi
# Publish a release if is a tag
- name: Release
if: success() && env.ARC_VERSION != ''
uses: ncipollo/release-action@v1
with:
tag: ${{ env.ARC_VERSION }}
prerelease: ${{ inputs.prerelease }}
makeLatest: ${{ inputs.latest }}
allowUpdates: true
body: |
### Note:
- ${{ inputs.notice }}
### Information:
- Full Changelog is available in my Discord
- Discord Account for Arc Patch needed
### Versions:
- stable: Stable Image (Full Image, all dependencies are included, less hardware support)
- next: Next Image (Full Image, all dependencies are included, more hardware support, new features to test)
### Dependencies:
- Addons: ${{ env.ADDONTAG }}
- Modules: ${{ env.MODULETAG }}
- Configs: ${{ env.CONFIGTAG }}
- Patches: ${{ env.PATCHTAG }}
- Custom: ${{ env.CUSTOMTAG }}
- LKMs: ${{ env.LKMTAG }}
- Buildroot Stable: ${{ env.BRSTAG }}
- Buildroot Next: ${{ env.BRXTAG }}
### Release
- ${{ env.BUILD_TIME }}
artifacts: |
arc-*.zip
update-*.zip

View File

@@ -1,318 +0,0 @@
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Custom Build
on:
issues:
types:
- labeled
jobs:
build:
if: github.event.label.name == 'custom'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Init Env
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
- name: Check Custom
shell: python
run: |
# -*- coding: utf-8 -*-
import json, subprocess
def set_output(name, value):
subprocess.call(["echo '{}={}' >> $GITHUB_ENV".format(name, value)], shell=True)
issuetitle = ${{ toJSON(github.event.issue.title) }};
issuebody = ${{ toJSON(github.event.issue.body) }};
MODEL = ''
PRODUCTVER = ''
ADDONS = ''
KERNEL = ''
FORMAT = ''
BRANCH = ''
try:
jsonbody = json.loads(issuebody)
MODEL = jsonbody.get('model', '')
PRODUCTVER = jsonbody.get('version', '')
ADDONS = jsonbody.get('addons', '')
KERNEL = jsonbody.get('kernel', '')
FORMAT = jsonbody.get('format', '')
BRANCH = jsonbody.get('branch', '')
except ValueError as e:
pass
set_output("MODEL", MODEL)
set_output("PRODUCTVER", PRODUCTVER)
set_output("ADDONS", ADDONS)
set_output("KERNEL", KERNEL)
set_output("FORMAT", FORMAT)
set_output("BRANCH", BRANCH)
# calculates the version number and push
- name: Calculate Version
run: |
# Calculate Version
VERSION="`date +'%y.%-m.%-d'`-custom"
echo "Version: ${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Update Comment Building
id: comment
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hi @${{ github.event.issue.user.login }}.
building arc-${{ env.MODEL }}-${{ env.VERSION }}, it will be uploaded here and sent to your email later..
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
----
# Install dependencies
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y jq gawk cpio gettext libelf-dev qemu-utils busybox dialog curl sed
sudo pip install -r scripts/requirements.txt
sudo snap install yq
# Build incremental
- name: Build image
run: |
. scripts/func.sh
function writeConfigKey() {
[ "${2}" = "{}" ] && sudo yq eval '.'${1}' = {}' --inplace "${3}" 2>/dev/null || sudo yq eval '.'${1}' = "'"${2}"'"' --inplace "${3}" 2>/dev/null
}
TAG="$(curl -m 5 -kL https://api.github.com/repos/AuxXxilium/arc/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')"
curl -kL "https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}-${{ env.BRANCH }}.img.zip" -o "/tmp/arc.img.zip"
unzip -o "/tmp/arc.img.zip" -d "/tmp"
echo "Modify Arc Image"
IMAGE_FILE="/tmp/arc.img"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting image file"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
echo "Set Custom Config"
PRESET_CONFIG_FILE="/tmp/p1/user-config.yml"
sudo touch "${PRESET_CONFIG_FILE}"
MODEL="${{ env.MODEL }}"
writeConfigKey "model" "${MODEL}" "${PRESET_CONFIG_FILE}"
PRODUCTVER="${{ env.PRODUCTVER }}"
PJ="$(python scripts/functions.py getpats4mv -m "${MODEL}" -v "${PRODUCTVER:0:3}")"
PAT_URL=$(echo "${PJ}" | jq -r ".\"${PRODUCTVER}\".url")
PAT_HASH=$(echo "${PJ}" | jq -r ".\"${PRODUCTVER}\".sum")
writeConfigKey "productver" "${PRODUCTVER:0:3}" "${PRESET_CONFIG_FILE}"
writeConfigKey "paturl" "${PAT_URL}" "${PRESET_CONFIG_FILE}"
writeConfigKey "pathash" "${PAT_HASH}" "${PRESET_CONFIG_FILE}"
if [ "${{ env.MODEL }}" = "SA6400" ]; then
writeConfigKey "kernel" "${{ env.KERNEL }}" "${PRESET_CONFIG_FILE}"
fi
writeConfigKey "addons" "{}" "${PRESET_CONFIG_FILE}"
if [ -n "${{ env.ADDONS }}" ]; then
for A in $(echo "${{ env.ADDONS }}" | tr ',' ' ' | sed 's/\[//g' | sed 's/\]//g'); do
VALUE=""
writeConfigKey "addons.\"${A}\"" "${VALUE}" "${PRESET_CONFIG_FILE}"
done
fi
writeConfigKey "automated" "true" "${PRESET_CONFIG_FILE}"
echo "$(cat "${PRESET_CONFIG_FILE}")"
sudo echo "arc-${MODEL}-${PRODUCTVER:0:3}-${TAG}" >"/tmp/automated"
sudo mv -f "/tmp/automated" "/tmp/p3/automated"
DSM_FILE="${PAT_HASH}.tar"
DSM_URL="https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODEL/+/%2B}/${PRODUCTVER:0:3}/${PAT_HASH}.tar"
sudo curl -skL "${DSM_URL}" -o "/tmp/${DSM_FILE}"
[ -f "/tmp/${DSM_FILE}" ] && echo "dsm: download successful" || exit 1
sudo mkdir -p "/tmp/p3/users"
sudo mv -f "/tmp/${DSM_FILE}" "/tmp/p3/users/${DSM_FILE}"
echo "Syncing files"
sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
cp -f "${IMAGE_FILE}" "arc.img"
if [ "${{ env.FORMAT }}" = "dyn" ]; then
echo "Image Converter -> dyn"
qemu-img convert arc.img -O vmdk -o adapter_type=lsilogic,compat6 arc-dyn.vmdk
elif [ "${{ env.FORMAT }}" = "flat" ]; then
echo "Image Converter -> flat"
qemu-img convert arc.img -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat,compat6 arc.vmdk
elif [ "${{ env.FORMAT }}" = "vhdx" ]; then
echo "Image Converter -> vhdx"
qemu-img convert arc.img -O vhdx -o subformat=dynamic arc.vhdx
elif [ "${{ env.FORMAT }}" = "ova" ]; then
echo "Image Converter -> ova"
convertova "arc.img" "arc.ova"
fi
# Zip image and generate checksum
- name: Pack
run: |
if [ "${{ env.FORMAT }}" = "img" ]; then
zip -9 "arc-${{ env.MODEL }}-${{ env.VERSION }}.img.zip" arc.img
UPLOAD="$(curl -k -F "file=@arc-${{ env.MODEL }}-${{ env.VERSION }}.img.zip" "https://file.io")"
if ! echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+'; then
echo "Upload failed"
exit 1
fi
elif [ "${{ env.FORMAT }}" = "dyn" ]; then
zip -9 "arc-${{ env.MODEL }}-${{ env.VERSION }}.vmdk-dyn.zip" arc-dyn.vmdk
UPLOAD="$(curl -k -F "file=@arc-${{ env.MODEL }}-${{ env.VERSION }}.vmdk-dyn.zip" "https://file.io")"
if ! echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+'; then
echo "Upload failed"
exit 1
fi
elif [ "${{ env.FORMAT }}" = "flat" ]; then
zip -9 "arc-${{ env.MODEL }}-${{ env.VERSION }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
UPLOAD="$(curl -k -F "file=@arc-${{ env.MODEL }}-${{ env.VERSION }}.vmdk-flat.zip" "https://file.io")"
if ! echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+'; then
echo "Upload failed"
exit 1
fi
elif [ "${{ env.FORMAT }}" = "vhdx" ]; then
zip -9 "arc-${{ env.MODEL }}-${{ env.VERSION }}.vhdx.zip" arc.vhdx
UPLOAD="$(curl -k -F "file=@arc-${{ env.MODEL }}-${{ env.VERSION }}.vhdx.zip" "https://file.io")"
if ! echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+'; then
echo "Upload failed"
exit 1
fi
elif [ "${{ env.FORMAT }}" = "ova" ]; then
zip -9 "arc-${{ env.MODEL }}-${{ env.VERSION }}.ova.zip" arc.ova
UPLOAD="$(curl -k -F "file=@arc-${{ env.MODEL }}-${{ env.VERSION }}.ova.zip" "https://file.io")"
if ! echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+'; then
echo "Upload failed"
exit 1
fi
fi
EMAIL=$(curl -s -H "Authorization: token ${{ secrets.ACTION }}" "https://api.github.com/users/${{ github.event.issue.user.login }}" | jq -r '.email')
FIOURL="$(echo "${UPLOAD}" | grep -oP '"link":\s*"\K[^"]+')"
echo "EMAIL=${EMAIL}" >> $GITHUB_ENV
echo "FIOURL=${FIOURL}" >> $GITHUB_ENV
- name: Send mail
if: success() && env.EMAIL != 'null'
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 587
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: arc-${{ env.model }}-${{ env.VERSION }}
to: ${{ env.EMAIL }}
from: ${{ secrets.MAIL_USERNAME }}
body: |
${{ env.FIOURL }}
- name: Update Comment Success
if: success()
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.comment.outputs.comment-id }}
update-mode: replace
body: |
Hi @${{ github.event.issue.user.login }}.
arc-${{ env.MODEL }}-${{ env.VERSION }} is ready to download: ${{ env.FIOURL }}
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
If this will not work, do not use customized Versions!
----
- name: Update Comment Fail
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.comment.outputs.comment-id }}
update-mode: replace
body: |
Hi @${{ github.event.issue.user.login }}.
arc-${{ env.MODEL }}-${{ env.PRODUCTVER }}-${{ env.VERSION }} failed to build and package, please try again.
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
If this will not work, do not use customized Versions!
----
- name: Close Issues
if: success()
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
comment:
if: github.event.label.name == 'bug'
runs-on: ubuntu-latest
steps:
- name: Init Env
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
- name: Check Issues
run: |
if echo "${{ github.event.issue.body }}" | grep -q "Screenshots"; then
echo "FALG=true" >> $GITHUB_ENV
else
echo "FALG=false" >> $GITHUB_ENV
fi
- name: Create Issues comment
if: env.FALG == 'false'
uses: actions-cool/issues-helper@v3
with:
actions: "create-comment"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
**Describe the Bug**
A clear and concise description of what the bug is.
**Screenshots**
Screenshot the Systeminfo (Arc - Sysinfo) or use new "Full Sysinfo - Upload" Function provide the Code!!! <- IMPORTANT
**Hardware**
Add your Hardware Informations here. CPU / Board / Networkcontroller / Storagecontroller / ...
- name: Close Issues
if: env.FALG == 'false'
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}

View File

@@ -34,11 +34,16 @@ jobs:
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y build-essential libtool pkgconf libzstd-dev liblzma-dev libssl-dev # kmodule dependencies
sudo apt install -y build-essential libtool pkgconf libzstd-dev liblzma-dev libssl-dev busybox dialog curl xz-utils cpio sed qemu-utils
- name: Get Release Data for Arc
YQ=$(command -v yq)
if [ -z "${YQ}" ] || ! ${YQ} --version 2>/dev/null | grep -q "v4."; then
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O "${YQ:-"/usr/bin/yq"}" && chmod +x "${YQ:-"/usr/bin/yq"}"
fi
- name: Get Addon Data for Arc
run: |
REPO="${{ github.server_url }}/${{ github.repository }}"
REPO="https://github.com/AuxXxilium/arc-addons"
PRERELEASE="true"
TAG=""
@@ -49,28 +54,46 @@ jobs:
TAG="${LATESTURL##*/}"
fi
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
rm -f arc-${TAG}.img.zip
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${REPO}/releases/download/${TAG}/arc-${TAG}.img.zip" -o "arc-${TAG}.img.zip")
rm -f addons.zip
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${REPO}/releases/download/${TAG}/addons-${TAG}.zip" -o "addons.zip")
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 ]; then
echo "Download failed"
exit 1
fi
unzip arc-${TAG}.img.zip -d "arc"
mkdir -p "mnt/p3/addons"
unzip addons.zip -d "mnt/p3/addons"
for i in $(find "mnt/p3/addons" -type f -name "*.addon"); do
if [ -f "${i}" ]; then
mkdir -p "mnt/p3/addons/$(basename "${i}" .addon)"
tar -xaf "${i}" -C "mnt/p3/addons/$(basename "${i}" .addon)"
fi
done
rm -f addons.zip
sudo ./localbuild.sh create arc/ws arc/arc.img
if [ $? -ne 0 ]; then
echo "create failed"
- name: Get Config Data for Arc
run: |
REPO="https://github.com/AuxXxilium/arc-configs"
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
TAG="${LATESTURL##*/}"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
rm -f configs.zip
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${REPO}/releases/download/${TAG}/configs-${TAG}.zip" -o "configs.zip")
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 ]; then
echo "Download failed"
exit 1
fi
mkdir -p "mnt/p3/configs"
unzip configs.zip -d "mnt/p3/configs"
rm -f configs.zip
- name: Get data
run: |
pip install -r scripts/requirements.txt
python scripts/func.py getmodels -w "arc/ws" -j "docs/models.json"
python scripts/func.py getaddons -w "arc/ws" -j "docs/addons.json"
python scripts/func.py getmodules -w "arc/ws" -j "docs/modules.json"
python scripts/func.py getpats -w "arc/ws" -j "docs/pats.json"
python scripts/functions.py getmodels -w "." -j "docs/models.json"
python scripts/functions.py getaddons -w "." -j "docs/addons.json"
python scripts/functions.py getpats -w "." -j "docs/pats.json"
- name: Upload to Artifacts
if: success()

View File

@@ -1,55 +0,0 @@
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Grub
on:
workflow_dispatch:
inputs:
push:
description: "push"
default: false
type: boolean
jobs:
grub:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization environment
run : |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y autoconf automake autopoint gettext build-essential bison flex libtool dosfstools e2fsprogs
sudo apt install -y libfreetype6-dev unifont fonts-dejavu libfuse-dev liblzma-dev libzfslinux-dev
- name: Make Grub
run: |
. scripts/grub.sh "grub-2.12" "i386-pc i386-efi x86_64-efi"
- name: Check and Push
if: success() && inputs.push == true
run: |
if [ -f "grub.img.gz" ]; then
echo "Copy img ..."
mv -f grub.img.gz files/initrd/opt/arc/grub.img.gz
echo "Git push ..."
git pull
status=$(git status -s | grep -E 'grub.img.gz' | awk '{printf " %s", $2}')
if [ -n "${status}" ]; then
git add ${status}
git commit -m "grub: update $(date +%Y-%m-%d" "%H:%M:%S)"
git push -f
fi
else
echo "No change ..."
fi

View File

@@ -1,6 +1,6 @@
<center><img width="845" alt="arc_loader" src="https://github.com/AuxXxilium/AuxXxilium/assets/67025065/ef975a36-9f3e-4cfb-813c-402db69611e7"></center>
The Arc Loader is a customized Redpill Loader for DSM 7.x (Xpenology) with enhanced Hardwaresupport, Addons, guided(semi-automated) Installation and more. Multiple customization options are built-in. It is modified to run on different Hardware (see Wiki for more Informations).
Arc is a customized Redpill Loader for DSM 7.x (Xpenology) with enhanced Hardwaresupport, Addons, Extensions, guided(semi-automated) Installation and more. Multiple customization options are built-in. It is modified to run on different Hardware (see Wiki for more Informations).
- Commercial use is not permitted and strictly forbidden!!!
- DSM and all Parts are under Copyright / Ownership or Registered Trademark by Synology Inc.
@@ -17,11 +17,7 @@ The Arc Loader is a customized Redpill Loader for DSM 7.x (Xpenology) with enhan
- <a href="https://github.com/AuxXxilium">Overview</a>
- <a href="https://auxxxilium.tech/wiki">FAQ & Wiki</a>
- <a href="https://github.com/AuxXxilium/arc/releases?q=prerelease%3Afalse&expanded=true">Download latest Build</a>
### Developer
- <a href="https://github.com/AuxXxilium">AuxXxilium</a>
- <a href="https://github.com/FulcrumCode">Fulcrum</a>
- <a href="https://auxxxilium.github.io/arc">Customized Build with automated Config</a>
### Thanks
Code is based on the work of TTG, pocopico, jumkey, fbelavenuto, wjz304 and others involved in continuing TTG's original redpill-load project.
For code and ideas based on the work of TTG, pocopico, jumkey, fbelavenuto, wjz304 and others involved in continuing TTG's original redpill-load project.

View File

@@ -1,20 +0,0 @@
# https://taskfile.dev
version: "3"
tasks:
build-img-n:
cmds:
- git pull
- ./img-gen-n.sh
build-img-s:
cmds:
- git pull
- ./img-gen-s.sh
compile-kpatch:
dir: kpatch
cmds:
- make clean all
- mv kpatch ../files/p3/system/

178
docs/addons.json Normal file
View File

@@ -0,0 +1,178 @@
{
"acpid": {
"system": false,
"description": "Daemon for delivering ACPI events (Powerbutton, etc.)"
},
"addincards": {
"system": false,
"description": "Remove the Modelrestrictions for official Addin Cards"
},
"allowdowngrade": {
"system": false,
"description": "Allow Downgrade for AME, MediaServer, SynoPhotos, SS and VideoStation on DSM 7.2.2"
},
"amepatch": {
"system": false,
"description": "Dynamic Licensepatch for AME - Force download HEVC Codec (Don't use with codecpatch)"
},
"arcdns": {
"system": false,
"description": "Dynamic DNS client for arcdns.tech - Modify in DSM DynDNS Settings"
},
"beep": {
"system": false,
"description": "Beep at startup and shutdown (requires motherboard with buzzer)"
},
"bootwait": {
"system": false,
"description": "Boot process waits until boot device (`/dev/synoboot`) and PCIe Device are available"
},
"codecpatch": {
"system": false,
"description": "Enables transcoding for DSM - Force download AAC + HEVC Codec (Don't use with amepatch)"
},
"cpufreqscaling": {
"system": false,
"description": "Enable CPU Freqscaling for DSM - Modify in Arc DSM Options"
},
"cpuinfo": {
"system": false,
"description": "Add real CPU Information to DSM System"
},
"dbgutils": {
"system": false,
"description": "Binaries to facilitate debug in the junior mode"
},
"deduplication": {
"system": false,
"description": "Force enable Deduplication (Only for SSD)"
},
"disks": {
"system": true,
"description": "Config disks related setting"
},
"dsmconfigbackup": {
"system": false,
"description": "Automatically backup Systemconfig Settings to the Bootloader Disk(/mnt/p1/dsmbackup) at Shutdown"
},
"eudev": {
"system": true,
"description": "eudev + kmod will assist with auto module loading"
},
"expands": {
"system": false,
"description": "Expanded miscellaneous, updated usb.map, ca-certificates.crt and more"
},
"hdddb": {
"system": false,
"description": "Add Disks to DSM compatibility DiskDB and bypass Memory Limitation"
},
"i915": {
"system": false,
"description": "Automatically replace the device ID of i915 module. (Intel 2nd - 9th Gen)"
},
"ledcontrol": {
"system": false,
"description": "Add Ugreen Ledcontrol to DSM (Need sensors Addon)"
},
"localrss": {
"system": true,
"description": "rss for bootloader pat"
},
"lsiutil": {
"system": false,
"description": "A tool for working with some LSI RAID controllers"
},
"misc": {
"system": true,
"description": "Miscellaneous functions"
},
"mountloader": {
"system": true,
"description": "Add a script to mount/unmount loader disk in the DSM scheduled task"
},
"notify": {
"system": true,
"description": "Add Arc Notification System"
},
"nvmecache": {
"system": false,
"description": "Enable M.2 as Cache (for DS918+ RS1619xs+ DS1019+ DS1621xs+)"
},
"nvmesystem": {
"system": false,
"description": "Enable DSM installation to NVMe M.2 SSDs. (Only use if you have only NVMe M.2 SSDs installed)"
},
"nvmevolume": {
"system": false,
"description": "Enable M.2 as Volume (for non supported Models)"
},
"optional": {
"system": false,
"description": "Disable some DSM logs and help with Disk hibernation"
},
"photosfacepatch": {
"system": false,
"description": "Face Detection Patch for Syno Photos (Best with iGPU)"
},
"powersched": {
"system": false,
"description": "Utility to configure RTC according to DSM power schedule (If supported)"
},
"reboottoloader": {
"system": false,
"description": "Add ability to reboot to Loader from Inside DSM"
},
"redpill": {
"system": true,
"description": "Delay redpill for epyc7002"
},
"remotefs": {
"system": false,
"description": "Allow remote NFS/CIFS shared folder be used in VideoStation, AudioStation and PhotoStation"
},
"revert": {
"system": true,
"description": "Revert all Modifications"
},
"sensors": {
"system": false,
"description": "Install sensors package to monitor temperature of CPU and other components"
},
"sequentialio": {
"system": false,
"description": "Enables sequential I/O for SSD caches (Can cause overheating) - Modify in Arc DSM Options"
},
"setrootpw": {
"system": false,
"description": "Set root password and enable ssh/sftp. Please modify PW=\"\" to the desired password in DSM Task Scheduler and run the task"
},
"smartctl": {
"system": false,
"description": "Fix SMART information for HBA devices. @Phachd"
},
"sortnetif": {
"system": false,
"description": "Sort network interface names: sorted by busid"
},
"sspatch": {
"system": false,
"description": "Dynamic License Patch for SS 9.2.x (Not for DVA 3219)"
},
"storagepanel": {
"system": false,
"description": "Automated Storagepanel selection - Modify in Arc DSM Options"
},
"updatenotify": {
"system": false,
"description": "Arc Loader Update Notifications in DSM"
},
"ups": {
"system": false,
"description": "Force UPS to shut down in Standby mode"
},
"wol": {
"system": true,
"description": "Force enable the Wake-on-lan on all nic"
}
}

BIN
docs/arc_loader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

360
docs/custom.html Normal file
View File

@@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="en-US" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
data-a11y-animated-images="system">
<head>
<meta charset="utf-8" />
<link rel="dns-prefetch" href="https://github.githubassets.com" />
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com" />
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com" />
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/" />
<link rel="preconnect" href="https://github.githubassets.com" crossorigin />
<link rel="preconnect" href="https://avatars.githubusercontent.com" />
<link crossorigin="anonymous" media="all" rel="stylesheet"
href="https://github.githubassets.com/assets/light-0eace2597ca3.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet"
href="https://github.githubassets.com/assets/dark-a167e256da9c.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet"
href="https://github.githubassets.com/assets/primer-711f412bb361.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet"
href="https://github.githubassets.com/assets/global-78704364aaba.css" />
<style>
select,
.input-style {
width: 100%;
}
.textarea-style {
width: 100%;
}
a {
color: #ff0000;
text-decoration: none;
}
.State--merged {
background-color: #ff0000;
}
.btn-primary {
background-color: #333333;
}
.btn-primary:disabled {
background-color: #111111;
}
.btn:disabled {
background-color: #111111;
}
</style>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js"></script>
<!-- <script src="https://fastly.jsdelivr.net/npm/marked/marked.min.js"></script> -->
<script type="application/javascript">
var repo = "AuxXxilium/arc"
var _models = {};
var _addons = {};
var _pats = {};
function httpGetAsync(theUrl, callback) {
let xmlHttpReq = new XMLHttpRequest();
xmlHttpReq.onreadystatechange = function () {
if (xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200)
callback(xmlHttpReq.responseText);
};
xmlHttpReq.open("GET", theUrl, true); // true for asynchronous
xmlHttpReq.send(null);
}
window.onload = function () {
init();
}
function init() {
httpGetAsync("https://raw.githubusercontent.com/AuxXxilium/arc/page/docs/models.json", function (result) {
_models = JSON.parse(result);
httpGetAsync("https://raw.githubusercontent.com/AuxXxilium/arc/page/docs/pats.json", function (result) {
_pats = JSON.parse(result);
httpGetAsync("https://raw.githubusercontent.com/AuxXxilium/arc/page/docs/addons.json", function (result) {
_addons = JSON.parse(result);
$("#model").on("change", changeModel);
$("#version").on("change", changeVersion);
$("#kernel").on("change", changeKernel);
$('#addons').val("acpid,cpuinfo,powersched");
setModels();
});
});
});
}
function setModels() {
var models = [];
for (var P in _models) {
models = models.concat(_models[P]["models"]);
}
$("#model")[0].options.length = 0;
for (var i = 0; i < models.length; i++) {
var model = models[i];
$("#model").append(`<option value="${model}">${model}</option>`);
}
changeModel();
}
function changeModel() {
model = $("#model").val();
var versions = [];
if (model in _pats) {
versions = Object.keys(_pats[model]);
versions.sort((a, b) => b.localeCompare(a))
}
$("#version")[0].options.length = 0;
for (var i = 0; i < versions.length; i++) {
var version = versions[i];
$("#version").append(`<option value="${version}">${version}</option>`);
}
changeproductsimage();
changeVersion();
}
function changeproductsimage() {
//var model = $("#model").val().replace("#","").replace("+","plus");
//$('#products').html(`<img src="https://www.synology.cn/img/products/detail/${model}/heading.png" width="20%">`);
var model = $("#model").val().replace("#", "").replace("+", "%2B");
$('#products').html(`<img src="https://www.synology.com/api/products/getPhoto?product=${model}&type=img_s&sort=0" width="30%">`);
}
function changeVersion() {
createAddonsBtn();
changeKernel();
}
function createAddonsBtn() {
var extstr = $('#addons').val().split(",");
var idx = 1;
var html = `<div class="form-group-body" id="addons_btns">`;
var selectedModel = $("#model").val();
var platform = null;
// Parse models.json to get the platform for the selected model
$.getJSON('models.json', function(modelsData) {
for (var key in modelsData) {
if (modelsData[key].models.includes(selectedModel)) {
platform = key;
break;
}
}
// Parse addons.json to generate buttons
$.getJSON('addons.json', function(addonsData) {
for (var ext in addonsData) {
// Skip system addons
if (addonsData[ext]["system"] == true) {
continue;
}
var dispar = "";
if (!addonsData[ext][platform]) {
dispar = "disabled";
}
var par = "";
if (extstr.includes(ext)) {
par = "btn-danger";
}
html += `<button type="button" class="btn btn-primary btn-sm mt-2 ${par}" id="btn_${ext}" ${par} ${dispar} onclick="return onclickext('addons', '${ext}')" autofocus="" title="${addonsData[ext]["description"]}">${ext}</button>&nbsp;`;
}
html += `</div>`;
$('#addons_btns').html(html);
});
});
}
function changeKernel() {
var model = $("#model").val();
var version = $("#version").val().split(".").slice(0, 2).join(".");
var kernel = $("#kernel").val();
if (model == "SA6400" && version == "7.2") {
$("#kernel_item").show();
} else {
$("#kernel_item").hide();
}
}
function onclickext(type, ext) {
var btnobj = $("#btn_" + ext);
var extstr = $('#' + type).val().split(",");
if (btnobj.hasClass("btn-danger")) {
extstr.map((val, i) => {
if (val === ext) {
extstr.splice(i, 1);
}
});
btnobj.removeClass("btn-danger");
} else {
btnobj.addClass("btn-danger");
extstr.push(ext);
}
extstr.map((val, i) => {
if (val === "") {
extstr.splice(i, 1);
}
});
$('#' + type).val(extstr.join(","));
}
function createIssues() {
var form = document.getElementById("inputs");
let formData = new FormData(form);
var title = "custom";
var body = {};
var _parameters = ["title", "branch", "format", "model", "version", "kernel", "addons"];
for (var key in _parameters) {
var name = _parameters[key];
if ($("#" + name).is(":hidden")) { continue; }
if (name == "title") {
if ($("#" + name).val()) {
title += " " + $("#" + name).val();
} else {
title += " " + new Date().toISOString().substr(0, 10);
}
continue;
}
if ($("#" + name).val()) {
body[name] = $("#" + name).val();
}
}
body = JSON.stringify(body).replace(/\+/g, "%2b");
window.location.href = `https://github.com/${repo}/issues/new?assignees=&labels=custom&projects=&template=custom_build.md&title=${title}&body=${body}`;
}
</script>
<title>Arc Loader - Custom</title>
</head>
<body class="logged-in env-production page-responsive" style="word-wrap: break-word">
<div class="application-main left-0 text-left p-3 mx-auto container-xl px-3 px-md-4 px-lg-5 mt-4">
<pre id="logo">
<img src="https://raw.githubusercontent.com/AuxXxilium/arc/page/docs/arc_loader.png" width="60%" style="margin-left: 100px; margin-right: 100px;">
</pre>
<div class="image" id="products" style="height: 70px; margin-left: 35%;">
<img src="https://www.synology.com/img/products/detail/SA6400/heading.png" width="30%">
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group-header">
<p>&nbsp;</p>
</div>
<div class="form-group-body">
<p>&nbsp;</p>
</div>
<div class="form-group-body">
<p>&nbsp;</p>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group-header">
<label class="color-fg-default text-mono f4">Build is based on <img alt="GitHub Release" src="https://img.shields.io/github/v/release/AuxXxilium/arc?display_name=release&style=flat-square"></label>
</div>
<div class="form-group-body">
<label class="color-fg-default text-mono f4">You should only use custom Builds, if you don't have physical access or online connection for destination device.<br />
Custom builds are not stable everytime, have limited features and there will no Arc Patch be available!!!<br />
To get full features and options, use <a href="https://github.com/AuxXxilium/arc">Arc Loader</a>! Check the <a href="https://auxxxilium.tech/wiki" target="_blank">Wiki</a> before you start a build.</label>
</div>
<div class="form-group-body">
<p>&nbsp;</p>
</div>
</div>
<div class="form-group mt-1 mb-2" id="title_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Title:</label>
</div>
<div class="form-group-body">
<input class="form-control input-contrast input-sm" type="text" id="title" name="inputs[title]"
value="" />
</div>
</div>
<div class="form-group mt-1 mb-2" id="format_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Branch:</label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="branch" name="inputs[branch]"
value="">
<option selected="selected" value="evo">evolution</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="format_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Format:</label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="format" name="inputs[format]"
value="">
<option selected="selected" value="img">img</option>
<option value="dyn">vmdk-dyn</option>
<option value="flat">vmdk-flat</option>
<option value="vhdx">vhdx</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="model_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Model: <a href="https://auxxxilium.tech/wiki/arc-loader-arc-loader/modell-plattform-auswaehlen/" target="_blank">More Information</a></label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="model" name="inputs[model]"
value="">
<option selected="selected" value="SA6400">SA6400</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="version_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Version:</label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="version" name="inputs[version]"
value="">
<option selected="selected" value="7.2">7.2</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="kernel_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Kernel: (only for SA6400)</label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="kernel" name="inputs[kernel]"
value="">
<option selected="selected" value="official">official</option>
<option value="custom">custom</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="addons_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f5">Addons: <a href="https://auxxxilium.tech/wiki/arc-loader-arc-loader/addons/" target="_blank">More Information</a></label>
</div>
<div class="form-group-body">
<textarea class="textarea-style input-contrast input-sm" type="text" id="addons" name="inputs[addons]"
disabled></textarea>
<div class="form-group-body" id="addons_btns">
</div>
</div>
</div>
<div class="form-group-body">
<p>&nbsp;</p>
</div>
<div class="workflow-dispatch">
<form id="inputs"><button type="button" class="btn State--merged" onclick="return createIssues()" autofocus="">Start Build</button></form>
</div>
</div>
<footer class="footer width-full container-xl mt-3 text-center color-fg-muted">
<a aria-label="AuxXxilium" title="GitHub" class="footer-octicon mr-2" href="https://github.com/AuxXxilium">
<img class="avatar rounded-2 avatar-user" src="https://avatars.githubusercontent.com/u/67025065?v=4"
width="40" height="40" alt="AuxXxilium" />
</a>
<span>Copyright © 2024 by <a href="https://github.com/AuxXxilium">AuxXxilium</a><br>&nbsp;</span>
</footer>
</body>
</html>

6
docs/index.html Normal file
View File

@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<script language="javascript"> location.replace("./custom.html")</script>
</head>
</html>

171
docs/models.json Normal file
View File

@@ -0,0 +1,171 @@
{
"apollolake": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1019+",
"DS620slim",
"DS218+",
"DS418play",
"DS718+",
"DS918+"
]
},
"broadwell": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"FS3400",
"RS3618xs",
"DS3617xs",
"DS3617xsII",
"FS2017",
"RS18017xs+",
"RS3617RPxs",
"RS3617xs+",
"RS4017xs+"
]
},
"broadwellnk": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1621xs+",
"DS3622xs+",
"FS3600",
"RS1619xs+",
"RS3621RPxs",
"RS3621xs+",
"RS4021xs+",
"SA3400",
"SA3600",
"DS3018xs",
"FS1018"
]
},
"broadwellnkv2": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"FS3410",
"SA3410",
"SA3610"
]
},
"broadwellntbap": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"SA3200D",
"SA3400D"
]
},
"denverton": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1819+",
"DS2419+",
"DS2419+II",
"DVA3219",
"DVA3221",
"RS820+",
"RS820RP+",
"DS1618+",
"RS2418+",
"RS2418RP+",
"RS2818RP+"
]
},
"geminilake": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1520+",
"DS220+",
"DS224+",
"DS420+",
"DS423+",
"DS720+",
"DS920+",
"DVA1622"
]
},
"purley": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"FS6400",
"HD6500"
]
},
"r1000": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1522+",
"DS723+",
"DS923+",
"RS422+"
]
},
"v1000": {
"productvers": {
"7.0": "4.4.180",
"7.1": "4.4.180",
"7.2": "4.4.302"
},
"models": [
"DS1621+",
"DS1821+",
"DS1823xs+",
"DS2422+",
"FS2500",
"RS1221+",
"RS1221RP+",
"RS2421+",
"RS2421RP+",
"RS2423+",
"RS2423RP+",
"RS2821RP+",
"RS822+",
"RS822RP+"
]
},
"epyc7002": {
"productvers": {
"7.1": "7.1-5.10.55",
"7.2": "7.2-5.10.55"
},
"models": [
"SA6400"
]
}
}

2084
docs/pats.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,323 +0,0 @@
#!/usr/bin/env bash
set -e
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
# Clear logs for dbgutils addons
rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
[ "${BUILDDONE}" = "false" ] && die "Loader build not completed!"
ARC_BRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
# Get Loader Disk Bus
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
BUS=$(getBus "${LOADER_DISK}")
FBI=$(cat /sys/class/graphics/fb*/name 2>/dev/null | head -1)
EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0)
# Print Title centralized
clear
COLUMNS=${COLUMNS:-50}
BANNER="$(figlet -c -w "$(((${COLUMNS})))" "Arc Loader")"
TITLE="Version:"
TITLE+=" ${ARC_VERSION} (${ARC_BUILD})"
[ -n "${ARC_BRANCH}" ] && TITLE+=" | Branch: ${ARC_BRANCH}"
printf "\033[1;30m%*s\n" ${COLUMNS} ""
printf "\033[1;30m%*s\033[A\n" ${COLUMNS} ""
printf "\033[1;34m%*s\033[0m\n" ${COLUMNS} "${BANNER}"
printf "\033[1;34m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
TITLE="Boot:"
[ ${EFI} -eq 1 ] && TITLE+=" [UEFI]" || TITLE+=" [BIOS]"
TITLE+=" [${BUS}]"
printf "\033[1;34m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
# Check if DSM zImage/Ramdisk is changed, patch it if necessary, update Files if necessary
ZIMAGE_HASH="$(readConfigKey "zimage-hash" "${USER_CONFIG_FILE}")"
ZIMAGE_HASH_CUR="$(sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print $1}')"
RAMDISK_HASH="$(readConfigKey "ramdisk-hash" "${USER_CONFIG_FILE}")"
RAMDISK_HASH_CUR="$(sha256sum "${ORI_RDGZ_FILE}" | awk '{print $1}')"
if [ "${ZIMAGE_HASH_CUR}" != "${ZIMAGE_HASH}" ] || [ "${RAMDISK_HASH_CUR}" != "${RAMDISK_HASH}" ]; then
echo -e "\033[1;31mDSM zImage/Ramdisk changed!\033[0m"
livepatch
echo
fi
# Read model/system variables
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
MODELID="$(readConfigKey "modelid" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
BUILDNUM="$(readConfigKey "buildnum" "${USER_CONFIG_FILE}")"
SMALLNUM="$(readConfigKey "smallnum" "${USER_CONFIG_FILE}")"
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
CPU="$(echo $(cat /proc/cpuinfo 2>/dev/null | grep 'model name' | uniq | awk -F':' '{print $2}'))"
RAMTOTAL="$(awk '/MemTotal:/ {printf "%.0f\n", $2 / 1024 / 1024 + 0.5}' /proc/meminfo 2>/dev/null)"
VENDOR="$(dmesg 2>/dev/null | grep -i "DMI:" | head -1 | sed 's/\[.*\] DMI: //i')"
DSMINFO="$(readConfigKey "boot.dsminfo" "${USER_CONFIG_FILE}")"
SYSTEMINFO="$(readConfigKey "boot.systeminfo" "${USER_CONFIG_FILE}")"
DISKINFO="$(readConfigKey "boot.diskinfo" "${USER_CONFIG_FILE}")"
if [ "${DSMINFO}" = "true" ]; then
echo -e "\033[1;37mDSM:\033[0m"
echo -e "Model: \033[1;37m${MODELID:-${MODEL}}\033[0m"
echo -e "Platform: \033[1;37m${PLATFORM}\033[0m"
echo -e "Version: \033[1;37m${PRODUCTVER} (${BUILDNUM}$([ ${SMALLNUM:-0} -ne 0 ] && echo "u${SMALLNUM}"))\033[0m"
echo -e "LKM: \033[1;37m${LKM}\033[0m"
echo
fi
if [ "${SYSTEMINFO}" = "true" ]; then
echo -e "\033[1;37mSystem:\033[0m"
echo -e "Vendor: \033[1;37m${VENDOR}\033[0m"
echo -e "CPU: \033[1;37m${CPU}\033[0m"
echo -e "Memory: \033[1;37m${RAMTOTAL}GB\033[0m"
echo
fi
if [ "${DISKINFO}" = "true" ]; then
echo -e "\033[1;37mDisks:\033[0m"
echo -e "Disks: \033[1;37m$(lsblk -dpno NAME | grep -v "${LOADER_DISK}" | wc -l)\033[0m"
fi
if ! readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q nvmesystem; then
HASATA=0
for D in $(lsblk -dpno NAME); do
[ "${D}" = "${LOADER_DISK}" ] && continue
if echo "sata sas scsi" | grep -qw "$(getBus "${D}")"; then
HASATA=1
break
fi
done
[ ${HASATA} -eq 0 ] && echo -e "\033[1;31m*** Please insert at least one Sata/SAS/SCSI Disk for System installation, except for the Bootloader Disk. ***\033[0m"
fi
# Read necessary variables
VID="$(readConfigKey "vid" "${USER_CONFIG_FILE}")"
PID="$(readConfigKey "pid" "${USER_CONFIG_FILE}")"
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
KERNELPANIC="$(readConfigKey "kernelpanic" "${USER_CONFIG_FILE}")"
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
MODBLACKLIST="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
declare -A CMDLINE
# Automated Cmdline
CMDLINE['syno_hw_version']="${MODELID:-${MODEL}}"
CMDLINE['vid']="${VID:-"0x46f4"}" # Sanity check
CMDLINE['pid']="${PID:-"0x0001"}" # Sanity check
CMDLINE['sn']="${SN}"
# Boot Cmdline
if grep -q "force_junior" /proc/cmdline; then
CMDLINE['force_junior']=""
fi
if grep -q "recovery" /proc/cmdline; then
CMDLINE['force_junior']=""
CMDLINE['recovery']=""
fi
if [ ${EFI} -eq 1 ]; then
CMDLINE['withefi']=""
else
CMDLINE['noefi']=""
fi
# DSM Cmdline
if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 5 ]; then
if [ "${BUS}" != "usb" ]; then
SZ=$(blockdev --getsz ${LOADER_DISK} 2>/dev/null) # SZ=$(cat /sys/block/${LOADER_DISK/\/dev\//}/size)
SS=$(blockdev --getss ${LOADER_DISK} 2>/dev/null) # SS=$(cat /sys/block/${LOADER_DISK/\/dev\//}/queue/hw_sector_size)
SIZE=$((${SZ:-0} * ${SS:-0} / 1024 / 1024 + 10))
# Read SATADoM type
SATADOM="$(readConfigKey "satadom" "${USER_CONFIG_FILE}")"
CMDLINE['synoboot_satadom']="${SATADOM:-2}"
CMDLINE['dom_szmax']="${SIZE}"
fi
CMDLINE["elevator"]="elevator"
else
CMDLINE["split_lock_detect"]="off"
fi
if [ "${DT}" = "true" ]; then
CMDLINE["syno_ttyS0"]="serial,0x3f8"
CMDLINE["syno_ttyS1"]="serial,0x2f8"
else
CMDLINE["SMBusHddDynamicPower"]="1"
CMDLINE["syno_hdd_detect"]="0"
CMDLINE["syno_hdd_powerup_seq"]="0"
fi
CMDLINE["HddHotplug"]="1"
CMDLINE["vender_format_version"]="2"
CMDLINE['skip_vender_mac_interfaces']="0,1,2,3,4,5,6,7"
CMDLINE['earlyprintk']=""
CMDLINE['earlycon']="uart8250,io,0x3f8,115200n8"
CMDLINE['console']="ttyS0,115200n8"
CMDLINE['consoleblank']="600"
# CMDLINE['no_console_suspend']="1"
CMDLINE['root']="/dev/md0"
CMDLINE['loglevel']="15"
CMDLINE['log_buf_len']="32M"
CMDLINE['rootwait']=""
CMDLINE['panic']="${KERNELPANIC:-0}"
# DSM Specific Cmdline
CMDLINE['pcie_aspm']="off"
CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
[ $(cat /proc/cpuinfo | grep Intel | wc -l) -gt 0 ] && CMDLINE["intel_pstate"]="passive"
# CMDLINE['nointremap']="" # no need
# CMDLINE['split_lock_detect']="off" # no need
# CMDLINE['nox2apic']="" # check platform
# CMDLINE['nomodeset']=""
if echo "apollolake geminilake purley" | grep -wq "${PLATFORM}"; then
CMDLINE["nox2apic"]=""
fi
#if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ] && [ "${BUS}" != "mmc" ] && [ "${EMMCBOOT}" != "true" ]; then
# if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "sdhci"; then
# [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
# CMDLINE['modprobe.blacklist']+="sdhci,sdhci_pci,sdhci_acpi"
# fi
# fi
if [ "${DT}" = "true" ] && ! echo "epyc7002 purley broadwellnkv2" | grep -wq "${PLATFORM}"; then
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "mpt3sas"; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="mpt3sas"
fi
fi
# CMDLINE['kvm.ignore_msrs']="1"
# CMDLINE['kvm.report_ignored_msrs']="0"
if echo "apollolake geminilake" | grep -wq "${PLATFORM}"; then
CMDLINE["intel_iommu"]="igfx_off"
fi
if echo "purley broadwellnkv2" | grep -wq "${PLATFORM}"; then
CMDLINE["SASmodel"]="1"
fi
# NIC Cmdline
ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
ETHM=$(readConfigKey "${MODEL}.ports" "${S_FILE}" 2>/dev/null)
ETHN=$(echo ${ETHX} | wc -w)
[ -z "${ETHM}" ] && ETHM="${ETHN}"
NIC=0
for N in ${ETHX}; do
MAC="$(readConfigKey "${N}" "${USER_CONFIG_FILE}")"
[ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${N}/address 2>/dev/null | tr '[:upper:]' '[:lower:]')" || NIC=$((NIC + 1))
[ ${NIC} -le ${ETHM} ] && CMDLINE["mac${NIC}"]="${MAC}"
[ ${NIC} -ge ${ETHM} ] && break
done
CMDLINE['netif_num']="${NIC}"
# Read user network settings
while IFS=': ' read -r KEY VALUE; do
[ -n "${KEY}" ] && CMDLINE["network.${KEY}"]="${VALUE}"
done < <(readConfigMap "network" "${USER_CONFIG_FILE}")
# Read user cmdline
while IFS=': ' read -r KEY VALUE; do
[ -n "${KEY}" ] && CMDLINE["${KEY}"]="${VALUE}"
done < <(readConfigMap "cmdline" "${USER_CONFIG_FILE}")
# Prepare command line
CMDLINE_LINE=""
for KEY in ${!CMDLINE[@]}; do
VALUE="${CMDLINE[${KEY}]}"
CMDLINE_LINE+=" ${KEY}"
[ -n "${VALUE}" ] && CMDLINE_LINE+="=${VALUE}"
done
CMDLINE_LINE=$(echo "${CMDLINE_LINE}" | sed 's/^ //') # Remove leading space
echo "${CMDLINE_LINE}" >"${PART1_PATH}/cmdline.yml"
# Boot
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
if [ "${DIRECTBOOT}" = "true" ]; then
CMDLINE_DIRECT=$(echo ${CMDLINE_LINE} | sed 's/>/\\\\>/g') # Escape special chars
grub-editenv ${USER_GRUBENVFILE} set dsm_cmdline="${CMDLINE_DIRECT}"
grub-editenv ${USER_GRUBENVFILE} set next_entry="direct"
_bootwait || true
echo -e "\033[1;34mReboot with Directboot\033[0m"
reboot
exit 0
elif [ "${DIRECTBOOT}" = "false" ]; then
grub-editenv ${USER_GRUBENVFILE} unset dsm_cmdline
grub-editenv ${USER_GRUBENVFILE} unset next_entry
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=30
IPCON=""
if [ "${ARCPATCH}" = "true" ]; then
echo -e "\033[1;37mDetected ${ETHN} NIC\033[0m | \033[1;34mUsing ${NIC} NIC for Arc Patch:\033[0m"
else
echo -e "\033[1;37mDetected ${ETHN} NIC:\033[0m"
fi
echo
[ ! -f /var/run/dhcpcd/pid ] && /etc/init.d/S41dhcpcd restart >/dev/null 2>&1 || true
sleep 3
for N in ${ETHX}; do
COUNT=0
DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
while true; do
if [ "0" = "$(cat /sys/class/net/${N}/carrier 2>/dev/null)" ]; then
echo -e "\r${DRIVER}: \033[1;37mNOT CONNECTED\033[0m"
break
fi
COUNT=$((COUNT + 1))
IP="$(getIP "${N}")"
if [ -n "${IP}" ]; then
SPEED=$(ethtool ${N} 2>/dev/null | grep "Speed:" | awk '{print $2}')
if [[ "${IP}" =~ ^169\.254\..* ]]; then
echo -e "\r${DRIVER} (${SPEED}): \033[1;37mLINK LOCAL (No DHCP server found.)\033[0m"
else
echo -e "\r${DRIVER} (${SPEED}): \033[1;37m${IP}\033[0m"
[ -z "${IPCON}" ] && IPCON="${IP}"
fi
break
fi
if [ -z "$(cat /sys/class/net/${N}/carrier 2>/dev/null)" ]; then
echo -e "\r${DRIVER}: \033[1;37mDOWN\033[0m"
break
fi
if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then
echo -e "\r${DRIVER}: \033[1;37mTIMEOUT\033[0m"
break
fi
sleep 1
done
done
_bootwait || true
DSMLOGO="$(readConfigKey "boot.dsmlogo" "${USER_CONFIG_FILE}")"
if [ "${DSMLOGO}" = "true" ] && [ -c "/dev/fb0" ]; then
[[ "${IPCON}" =~ ^169\.254\..* ]] && IPCON=""
[ -n "${IPCON}" ] && URL="http://${IPCON}:5000" || URL="http://find.synology.com/"
python3 ${ARC_PATH}/include/functions.py makeqr -d "${URL}" -l "6" -o "${TMP_PATH}/qrcode_boot.png"
[ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true
fi
for T in $(w 2>/dev/null | grep -v 'TTY' | awk '{print $2}'); do
if [ -w "/dev/${T}" ]; then
[ -n "${IPCON}" ] && echo -e "Use \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\033[0m\n" >"/dev/${T}" 2>/dev/null || echo -e "Try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\nNo IP found.\033[0m\n" >"/dev/${T}" 2>/dev/null
fi
done
# # Unload all network interfaces
# for D in $(readlink /sys/class/net/*/device/driver); do rmmod -f "$(basename ${D})" 2>/dev/null || true; done
# Unload all graphics drivers
# for D in $(lsmod | grep -E '^(nouveau|amdgpu|radeon|i915)' | awk '{print $1}'); do rmmod -f "${D}" 2>/dev/null || true; done
# for I in $(find /sys/devices -name uevent -exec bash -c 'cat {} 2>/dev/null | grep -Eq "PCI_CLASS=0?30[0|1|2]00" && dirname {}' \;); do
# [ -e ${I}/reset ] && cat ${I}/vendor >/dev/null | grep -iq 0x10de && echo 1 >${I}/reset || true # Proc open nvidia driver when booting
# done
echo -e "\033[1;37mLoading DSM Kernel...\033[0m"
# Executes DSM kernel via KEXEC
KEXECARGS="-a"
if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 4 ] && [ ${EFI} -eq 1 ]; then
echo -e "\033[1;33mWarning, running kexec with --noefi param, strange things will happen!!\033[0m"
KEXECARGS+=" --noefi"
fi
kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog
echo -e "\033[1;37mBooting DSM...\033[0m"
# Boot to DSM
[ "${KERNELLOAD}" = "kexec" ] && kexec -e || poweroff
fi

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
read_u8() {
dd if="${1}" bs=1 skip="$((${2}))" count=1 2>/dev/null | od -An -tu1 | grep -Eo '[0-9]+'
}
read_u32() {
dd if="${1}" bs=1 skip="$((${2}))" count=4 2>/dev/null | od -An -tu4 | grep -Eo '[0-9]+'
}
set -x
setup_size=$(read_u8 "${1}" 0x1f1)
payload_offset=$(read_u32 "${1}" 0x248)
payload_length=$(read_u32 "${1}" 0x24c)
inner_pos=$(((setup_size + 1) * 512))
tail -c+$(($inner_pos + 1)) "${1}" | tail -c+$(($payload_offset + 1)) | head -c "${payload_length}" | head -c $(($payload_length - 4)) | unlzma >"${2}"

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
#
# Calculate the amount of space needed to run the kernel, including room for
# the .bss and .brk sections.
#
# Usage:
# objdump -h a.out | sh calc_run_size.sh
NUM='\([0-9a-fA-F]*[ \t]*\)'
OUT=$(sed -n 's/^[ \t0-9]*.b[sr][sk][ \t]*'"${NUM}${NUM}${NUM}${NUM}"'.*/0x\1 0x\4/p')
if [ -z "${OUT}" ]; then
echo "Never found .bss or .brk file offset" >&2
exit 1
fi
read -r sizeA offsetA sizeB offsetB <<<$(echo ${OUT} | awk '{printf "%d %d %d %d", strtonum($1), strtonum($2), strtonum($3), strtonum($4)}')
runSize=$((offsetA + sizeA + sizeB))
# BFD linker shows the same file offset in ELF.
if [ "${offsetA}" -ne "${offsetB}" ]; then
# Gold linker shows them as consecutive.
endSize=$((offsetB + sizeB))
if [ "${endSize}" -ne "${runSize}" ]; then
printf "sizeA: 0x%x\n" ${sizeA} >&2
printf "offsetA: 0x%x\n" ${offsetA} >&2
printf "sizeB: 0x%x\n" ${sizeB} >&2
printf "offsetB: 0x%x\n" ${offsetB} >&2
echo ".bss and .brk are non-contiguous" >&2
exit 1
fi
fi
printf "%d\n" ${runSize}
exit 0

View File

@@ -1,60 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# ----------------------------------------------------------------------
# extract-vmlinux - Extract uncompressed vmlinux from a kernel image
#
# Inspired from extract-ikconfig
# (c) 2009,2010 Dick Streefland <dick@streefland.net>
#
# (c) 2011 Corentin Chary <corentin.chary@gmail.com>
#
# ----------------------------------------------------------------------
check_vmlinux() {
# Use readelf to check if it's a valid ELF
# TODO: find a better to way to check that it's really vmlinux
# and not just an elf
readelf -h $1 >/dev/null 2>&1 || return 1
cat $1
exit 0
}
try_decompress() {
# The obscure use of the "tr" filter is to work around older versions of
# "grep" that report the byte offset of the line instead of the pattern.
# Try to find the header ($1) and decompress from here
for pos in $(tr "$1\n$2" "\n$2=" <"$img" | grep -abo "^$2"); do
pos=${pos%%:*}
tail -c+$pos "$img" | $3 >$tmp 2>/dev/null
check_vmlinux $tmp
done
}
# Check invocation:
me=${0##*/}
img=$1
if [ $# -ne 1 ] || [ ! -s "$img" ]; then
echo "Usage: $me <kernel-image>" >&2
exit 2
fi
# Prepare temp files:
tmp=$(mktemp /tmp/vmlinux-XXX)
trap "rm -f $tmp" 0
# That didn't work, so retry after decompression.
try_decompress '\037\213\010' xy gunzip
try_decompress '\3757zXZ\000' abcde unxz
try_decompress 'BZh' xy bunzip2
try_decompress '\135\0\0\0' xxx unlzma
try_decompress '\211\114\132' xy 'lzop -d'
try_decompress '\002!L\030' xxx 'lz4 -d'
try_decompress '(\265/\375' xxx unzstd
# Finally check for uncompressed images or objects:
check_vmlinux $img
# Bail out:
echo "$me: Cannot find vmlinux." >&2

Binary file not shown.

View File

@@ -1,114 +0,0 @@
###############################################################################
# Return list of available addons
# 1 - Platform
function availableAddons() {
if [ -z "${1}" ]; then
echo ""
return 1
fi
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
local ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
for D in $(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort); do
[ ! -f "${D}/manifest.yml" ] && continue
local ADDON=$(basename ${D})
local AVAILABLE="$(readConfigKey "${1}" "${D}/manifest.yml")"
[ "${AVAILABLE}" = false ] && continue
local SYSTEM=$(readConfigKey "system" "${D}/manifest.yml")
[ "${SYSTEM}" = true ] && continue
if [[ "${ARCOFFLINE}" = "true" || -z "${ARCCONF}" ]] && [[ "${ADDON}" = "amepatch" || "${ADDON}" = "arcdns" ]]; then
continue
fi
if [ "${MACHINE}" != "Native" ] && [ "${ADDON}" = "cpufreqscaling" ]; then
continue
fi
if echo "${PAT_URL}" 2>/dev/null | grep -vq "7.2.2"; then
if [ "${ADDON}" = "allowdowngrade" ]; then
continue
fi
fi
local DESC="$(readConfigKey "description" "${D}/manifest.yml")"
local BETA="$(readConfigKey "beta" "${D}/manifest.yml")"
local TARGET="$(readConfigKey "target" "${D}/manifest.yml")"
[ "${BETA}" = true ] && BETA="(Beta) " || BETA=""
if [ "${TARGET}" = "app" ]; then
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t\Z4${BETA}${DESC}\Zn"
elif [ "${TARGET}" = "system" ]; then
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t\Z1${BETA}${DESC}\Zn"
else
[ "${AVAILABLE}" = true ] && echo -e "${ADDON}\t${BETA}${DESC}"
fi
done
}
###############################################################################
# Check if addon exist
# 1 - Addon id
# 2 - Platform
# Return ERROR if not exists
function checkAddonExist() {
if [ -z "${1}" ] || [ -z "${2}" ]; then
return 1 # ERROR
fi
# First check generic files
if [ -f "${ADDONS_PATH}/${1}/all.tgz" ]; then
return 0 # OK
fi
return 1 # ERROR
}
###############################################################################
# Install Addon into ramdisk image
# 1 - Addon id
# Return ERROR if not installed
function installAddon() {
if [ -z "${1}" ]; then
return 1
fi
local ADDON="${1}"
mkdir -p "${TMP_PATH}/${ADDON}"
local HAS_FILES=0
# First check generic files
if [ -f "${ADDONS_PATH}/${ADDON}/all.tgz" ]; then
tar -zxf "${ADDONS_PATH}/${ADDON}/all.tgz" -C "${TMP_PATH}/${ADDON}"
HAS_FILES=1
fi
# If has files to copy, copy it, else return error
[ ${HAS_FILES} -ne 1 ] && return 1
cp -f "${TMP_PATH}/${ADDON}/install.sh" "${RAMDISK_PATH}/addons/${ADDON}.sh" 2>"${LOG_FILE}"
chmod +x "${RAMDISK_PATH}/addons/${ADDON}.sh"
[ -d ${TMP_PATH}/${ADDON}/root ] && (cp -rnf "${TMP_PATH}/${ADDON}/root/"* "${RAMDISK_PATH}/" 2>"${LOG_FILE}")
rm -rf "${TMP_PATH}/${ADDON}"
return 0
}
###############################################################################
# Untar an addon to correct path
# 1 - Addon file path
# Return name of addon on sucess or empty on error
function untarAddon() {
if [ -z "${1}" ]; then
echo ""
return 1
fi
rm -rf "${TMP_PATH}/addon"
mkdir -p "${TMP_PATH}/addon"
tar -xaf "${1}" -C "${TMP_PATH}/addon" || return
local ADDON=$(readConfigKey "name" "${TMP_PATH}/addon/manifest.yml")
[ -z "${ADDON}" ] && return
rm -rf "${ADDONS_PATH}/${ADDON}"
mv -f "${TMP_PATH}/addon" "${ADDONS_PATH}/${ADDON}"
echo "${ADDON}"
}
###############################################################################
# Detect if has new local plugins to install/reinstall
function updateAddon() {
for F in $(ls ${ADDONS_PATH}/*.addon 2>/dev/null); do
local 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
}

View File

@@ -1 +0,0 @@
###############################################################################

View File

@@ -1,71 +0,0 @@
###############################################################################
# Delete a key in config file
# 1 - Path of Key
# 2 - Path of yaml config file
function deleteConfigKey() {
yq eval 'del(.'${1}')' --inplace "${2}" 2>/dev/null
}
###############################################################################
# Write to yaml config file
# 1 - Path of Key
# 2 - Value
# 3 - Path of yaml config file
function writeConfigKey() {
[ "${2}" = "{}" ] && yq eval '.'${1}' = {}' --inplace "${3}" 2>/dev/null || yq eval '.'${1}' = "'"${2}"'"' --inplace "${3}" 2>/dev/null
}
###############################################################################
# Read key value from yaml config file
# 1 - Path of key
# 2 - Path of yaml config file
# Return Value
function readConfigKey() {
RESULT=$(yq eval '.'${1}' | explode(.)' "${2}" 2>/dev/null)
[ "${RESULT}" = "null" ] && echo "" || echo "${RESULT}"
}
###############################################################################
# Write to yaml config file if key not exists
# 1 - Path of Key
# 2 - Value
# 3 - Path of yaml config file
function initConfigKey() {
[ -z "$(readConfigKey "${1}" "${3}")" ] && writeConfigKey "${1}" "${2}" "${3}" || true
}
###############################################################################
# Read Entries as map(key=value) from yaml config file
# 1 - Path of key
# 2 - Path of yaml config file
# Returns map of values
function readConfigMap() {
yq eval '.'${1}' | explode(.) | to_entries | map([.key, .value] | join(": ")) | .[]' "${2}" 2>/dev/null
}
###############################################################################
# Read an array from yaml config file
# 1 - Path of key
# 2 - Path of yaml config file
# Returns array/map of values
function readConfigArray() {
yq eval '.'${1}'[]' "${2}" 2>/dev/null
}
###############################################################################
# Read Entries as array from yaml config file
# 1 - Path of key
# 2 - Path of yaml config file
# Returns array of values
function readConfigEntriesArray() {
yq eval '.'${1}' | explode(.) | to_entries | map([.key])[] | .[]' "${2}" 2>/dev/null
}
###############################################################################
# Check yaml config file
# 1 - Path of yaml config file
# Returns error information
function checkConfigFile() {
yq eval "${1}" 2>&1
}

View File

@@ -1,50 +0,0 @@
# Define paths
PART1_PATH="/mnt/p1"
PART2_PATH="/mnt/p2"
PART3_PATH="/mnt/p3"
TMP_PATH="/tmp"
[ -f "${PART1_PATH}/ARC-BRANCH" ] && ARC_BRANCH=$(cat "${PART1_PATH}/ARC-BRANCH") || ARC_BRANCH="null"
[ -f "${PART1_PATH}/ARC-VERSION" ] && ARC_VERSION=$(cat "${PART1_PATH}/ARC-VERSION") || ARC_VERSION="null"
[ -f "${PART1_PATH}/ARC-BUILD" ] && ARC_BUILD=$(cat "${PART1_PATH}/ARC-BUILD") || ARC_BUILD="null"
ARC_TITLE="Arc ${ARC_VERSION}"
RAMDISK_PATH="${TMP_PATH}/ramdisk"
LOG_FILE="${TMP_PATH}/log.txt"
TMP_UP_PATH="${TMP_PATH}/upload"
USER_GRUB_CONFIG="${PART1_PATH}/boot/grub/grub.cfg"
USER_GRUBENVFILE="${PART1_PATH}/boot/grub/grubenv"
USER_CONFIG_FILE="${PART1_PATH}/user-config.yml"
GRUB_PATH="${PART1_PATH}/boot/grub"
ORI_ZIMAGE_FILE="${PART2_PATH}/zImage"
ORI_RDGZ_FILE="${PART2_PATH}/rd.gz"
ARC_BZIMAGE_FILE="${PART3_PATH}/bzImage-arc"
ARC_RAMDISK_FILE="${PART3_PATH}/initrd-arc"
ARC_RAMDISK_USER_FILE="${PART3_PATH}/initrd-user"
MOD_ZIMAGE_FILE="${PART3_PATH}/zImage-dsm"
MOD_RDGZ_FILE="${PART3_PATH}/initrd-dsm"
ADDONS_PATH="${PART3_PATH}/addons"
MODULES_PATH="${PART3_PATH}/modules"
MODEL_CONFIG_PATH="${PART3_PATH}/configs"
PATCH_PATH="${PART3_PATH}/patches"
LKMS_PATH="${PART3_PATH}/lkms"
CUSTOM_PATH="${PART3_PATH}/custom"
USER_UP_PATH="${PART3_PATH}/users"
UNTAR_PAT_PATH="${PART3_PATH}/DSM"
S_FILE="${MODEL_CONFIG_PATH}/serials.yml"
P_FILE="${MODEL_CONFIG_PATH}/platforms.yml"
D_FILE="${MODEL_CONFIG_PATH}/data.yml"
EXTRACTOR_PATH="${PART3_PATH}/extractor"
EXTRACTOR_BIN="syno_extract_system_patch"
HTTPPORT=$(grep -i '^HTTP_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2)
[ -z "${HTTPPORT}" ] && HTTPPORT=7080 || true
DUFSPORT=$(grep -i '^DUFS_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2)
[ -z "${DUFSPORT}" ] && DUFSPORT=7304 || true
TTYDPORT=$(grep -i '^TTYD_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2)
[ -z "${TTYDPORT}" ] && TTYDPORT=7681 || true

View File

@@ -1,112 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
import os, click
WORK_PATH = os.path.abspath(os.path.dirname(__file__))
@click.group()
def cli():
"""
The CLI is a commands to Arc.
"""
pass
def mutually_exclusive_options(ctx, param, value):
other_option = "file" if param.name == "data" else "data"
if value is not None and ctx.params.get(other_option) is not None:
raise click.UsageError(f"Illegal usage: `{param.name}` is mutually exclusive with `{other_option}`.")
return value
def validate_required_param(ctx, param, value):
if not value and "file" not in ctx.params and "data" not in ctx.params:
raise click.MissingParameter(param_decls=[param.name])
return value
def __fullversion(ver):
out = ver
arr = ver.split('-')
if len(arr) > 0:
a = arr[0].split('.')[0] if len(arr[0].split('.')) > 0 else '0'
b = arr[0].split('.')[1] if len(arr[0].split('.')) > 1 else '0'
c = arr[0].split('.')[2] if len(arr[0].split('.')) > 2 else '0'
d = arr[1] if len(arr) > 1 else '00000'
e = arr[2] if len(arr) > 2 else '0'
out = '{}.{}.{}-{}-{}'.format(a,b,c,d,e)
return out
@cli.command()
@click.option("-d", "--data", type=str, callback=mutually_exclusive_options, is_eager=True, help="The data of QRCode.")
@click.option("-f", "--file", type=str, callback=mutually_exclusive_options, is_eager=True, help="The file of QRCode.")
@click.option("--validate", is_flag=True, callback=validate_required_param, expose_value=False, is_eager=True)
@click.option("-l", "--location", type=click.IntRange(0, 7), required=True, help="The location of QRCode. (range 0<=x<=7)")
@click.option("-o", "--output", type=str, required=True, help="The output file of QRCode.")
def makeqr(data, file, location, output):
"""
Generate a QRCode.
"""
try:
import fcntl, struct
import qrcode
from PIL import Image
FBIOGET_VSCREENINFO = 0x4600
FBIOPUT_VSCREENINFO = 0x4601
FBIOGET_FSCREENINFO = 0x4602
FBDEV = "/dev/fb0"
if data is not None:
qr = qrcode.QRCode(version=1, box_size=10, error_correction=qrcode.constants.ERROR_CORRECT_H, border=4,)
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image(fill_color="grey", back_color="black")
img = img.convert("RGBA")
pixels = img.load()
for i in range(img.size[0]):
for j in range(img.size[1]):
if pixels[i, j] == (255, 255, 255, 255):
pixels[i, j] = (255, 255, 255, 0)
if os.path.exists(os.path.join(WORK_PATH, "logo.png")):
icon = Image.open(os.path.join(WORK_PATH, "logo.png"))
icon = icon.convert("RGBA")
img.paste(icon.resize((int(img.size[0] / 5), int(img.size[1] / 5))), (int((img.size[0] - int(img.size[0] / 5)) / 2), int((img.size[1] - int(img.size[1] / 5)) / 2),),)
if file is not None:
img = Image.open(file)
# img = img.convert("RGBA")
# pixels = img.load()
# for i in range(img.size[0]):
# for j in range(img.size[1]):
# if pixels[i, j] == (255, 255, 255, 255):
# pixels[i, j] = (255, 255, 255, 0)
(xres, yres) = (1920, 1080)
with open(FBDEV, "rb") as fb:
vi = fcntl.ioctl(fb, FBIOGET_VSCREENINFO, bytes(160))
res = struct.unpack("I" * 40, vi)
if res[0] != 0 and res[1] != 0:
(xres, yres) = (res[0], res[1])
xqr, yqr = (int(xres / 8), int(xres / 8))
img = img.resize((xqr, yqr))
alpha = Image.new("RGBA", (xres, yres), (0, 0, 0, 0))
if int(location) not in range(0, 8):
location = 0
loc = (img.size[0] * int(location), alpha.size[1] - img.size[1])
alpha.paste(img, loc)
alpha.save(output)
except:
pass
if __name__ == "__main__":
cli()

View File

@@ -1,633 +0,0 @@
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/consts.sh"
. "${ARC_PATH}/include/configFile.sh"
. "${ARC_PATH}/include/addons.sh"
###############################################################################
# Check loader disk
function checkBootLoader() {
while read KNAME RO; do
[ -z "${KNAME}" ] && continue
[ "${RO}" = "0" ] && continue
hdparm -r0 "${KNAME}" >/dev/null 2>&1 || true
done <<<$(lsblk -pno KNAME,RO 2>/dev/null)
[ ! -w "${PART1_PATH}" ] && return 1
[ ! -w "${PART2_PATH}" ] && return 1
[ ! -w "${PART3_PATH}" ] && return 1
command -v awk >/dev/null 2>&1 || return 1
command -v cut >/dev/null 2>&1 || return 1
command -v sed >/dev/null 2>&1 || return 1
command -v tar >/dev/null 2>&1 || return 1
return 0
}
###############################################################################
# Just show error message and dies
function die() {
echo -e "\033[1;41m$@\033[0m"
exit 1
}
###############################################################################
# Show error message with log content and dies
function dieLog() {
echo -en "\n\033[1;41mUNRECOVERY ERROR: "
cat "${LOG_FILE}"
echo -e "\033[0m"
sleep 3
exit 1
}
###############################################################################
# Check if a item exists into array
# 1 - Item
# 2.. - Array
# Return 0 if exists
function arrayExistItem() {
EXISTS=1
ITEM="${1}"
shift
for i in "$@"; do
[ "${i}" = "${ITEM}" ] || continue
EXISTS=0
break
done
return ${EXISTS}
}
###############################################################################
# Generate a number with 6 digits from 1 to 30000
function random() {
printf "%06d" $((${RANDOM} % 30000 + 1))
}
###############################################################################
# Generate a hexa number from 0x00 to 0xFF
function randomhex() {
printf "&02X" "$((${RANDOM} % 255 + 1))"
}
###############################################################################
# Generate a random letter
function genRandomLetter() {
for i in A B C D E F G H J K L M N P Q R S T V W X Y Z; do
echo ${i}
done | sort -R | tail -1
}
###############################################################################
# Generate a random digit (0-9A-Z)
function genRandomValue() {
for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F G H J K L M N P Q R S T V W X Y Z; do
echo ${i}
done | sort -R | tail -1
}
###############################################################################
# Generate a random serial number for a model
# 1 - Model
# 2 - Arc
# Returns serial number
function generateSerial() {
PREFIX="$(readConfigArray "${1}.prefix" "${S_FILE}" 2>/dev/null | sort -R | tail -1)"
MIDDLE="$(readConfigArray "${1}.middle" "${S_FILE}" 2>/dev/null | sort -R | tail -1)"
if [ "${2}" = "true" ]; then
SUFFIX="arc"
else
SUFFIX="$(readConfigKey "${1}.suffix" "${S_FILE}" 2>/dev/null)"
fi
local SERIAL="${PREFIX:-"0000"}${MIDDLE:-"XXX"}"
case "${SUFFIX:-"alpha"}" in
numeric)
SERIAL+="$(random)"
;;
alpha)
SERIAL+="$(genRandomLetter)$(genRandomValue)$(genRandomValue)$(genRandomValue)$(genRandomValue)$(genRandomValue)"
;;
arc)
SERIAL+="$(readConfigKey "${1}.serial" "${S_FILE}" 2>/dev/null)"
;;
esac
SERIAL="$(echo "${SERIAL}" | tr '[:lower:]' '[:upper:]')"
echo "${SERIAL}"
return 0
}
###############################################################################
# Generate a MAC address for a model
# 1 - Model
# 2 - Amount of MACs to generate
# 3 - Arc MAC
# Returns serial number
function generateMacAddress() {
MACPRE="$(readConfigKey "${1}.macpre" "${S_FILE}")"
if [ "${3}" = "true" ]; then
MACSUF="$(readConfigKey "${1}.mac" "${S_FILE}" 2>/dev/null)"
else
MACSUF="$(printf '%02x%02x%02x' $((${RANDOM} % 256)) $((${RANDOM} % 256)) $((${RANDOM} % 256)))"
fi
NUM=${2:-1}
local MACS=""
for I in $(seq 1 ${NUM}); do
MACS+="$(printf '%06x%06x' $((0x${MACPRE:-"001132"})) $(($((0x${MACSUF})) + ${I})))"
[ ${I} -lt ${NUM} ] && MACS+=" "
done
MACS="$(echo "${MACS}" | tr '[:upper:]' '[:lower:]')"
echo "${MACS}"
return 0
}
###############################################################################
# Validate a serial number for a model
# 1 - Model
# 2 - Serial number to test
# Returns 1 if serial number is invalid
function validateSerial() {
PREFIX="$(readConfigArray "${1}.prefix" "${S_FILE}" 2>/dev/null)"
MIDDLE="$(readConfigArray "${1}.middle" "${S_FILE}" 2>/dev/null)"
SUFFIX="$(readConfigKey "${1}.suffix" "${S_FILE}" 2>/dev/null)"
P=${2:0:4}
M=${2:4:3}
S=${2:7}
L=${#2}
if [ ${L} -ne 13 ]; then
return 1
fi
if ! arrayExistItem ${P} ${PREFIX}; then
return 1
fi
if ! arrayExistItem ${M} ${MIDDLE}; then
return 1
fi
case "${SUFFIX:-"alpha"}" in
numeric)
if ! echo "${S}" | grep -q "^[0-9]\{6\}$"; then
return 1
fi
;;
alpha)
if ! echo "${S}" | grep -q "^[A-Z][0-9][0-9][0-9][0-9][A-Z]$"; then
return 1
fi
;;
esac
return 0
}
###############################################################################
# Check if a item exists into array
# 1 - Item
# 2.. - Array
# Return 0 if exists
function arrayExistItem() {
EXISTS=1
ITEM="${1}"
shift
for i in "$@"; do
[ "${i}" = "${ITEM}" ] || continue
EXISTS=0
break
done
return ${EXISTS}
}
###############################################################################
# Get values in .conf K=V file
# 1 - key
# 2 - file
function _get_conf_kv() {
grep "${1}" "${2}" | sed "s|^${1}=\"\(.*\)\"$|\1|g"
}
###############################################################################
# Replace/remove/add values in .conf K=V file
# 1 - name
# 2 - new_val
# 3 - path
function _set_conf_kv() {
# Delete
if [ -z "${2}" ]; then
sed -i "${3}" -e "s/^${1}=.*$//"
return $?;
fi
# Replace
if grep -q "^${1}=" "${3}"; then
sed -i "${3}" -e "s\"^${1}=.*\"${1}=\\\"${2}\\\"\""
return $?
fi
# Add if doesn't exist
echo "${1}=\"${2}\"" >>"${3}"
}
###############################################################################
# sort netif busid
function _sort_netif() {
local ETHLIST=""
local ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
for N in ${ETHX}; do
local MAC="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g; s/.*/\L&/')"
local BUS="$(ethtool -i ${N} 2>/dev/null | grep bus-info | cut -d' ' -f2)"
ETHLIST="${ETHLIST}${BUS} ${MAC} ${N}\n"
done
local ETHLISTTMPB="$(echo -e "${ETHLIST}" | sort)"
local ETHLIST="$(echo -e "${ETHLISTTMPB}" | grep -v '^$')"
local ETHSEQ="$(echo -e "${ETHLIST}" | awk '{print $3}' | sed 's/eth//g')"
local ETHNUM="$(echo -e "${ETHLIST}" | wc -l)"
# sort
if [ ! "${ETHSEQ}" = "$(seq 0 $((${ETHNUM:0} - 1)))" ]; then
/etc/init.d/S41dhcpcd stop >/dev/null 2>&1
/etc/init.d/S40network stop >/dev/null 2>&1
for i in $(seq 0 $((${ETHNUM:0} - 1))); do
ip link set dev eth${i} name tmp${i}
done
I=0
for i in ${ETHSEQ}; do
ip link set dev tmp${i} name eth${I}
I=$((${I} + 1))
done
/etc/init.d/S40network start >/dev/null 2>&1
/etc/init.d/S41dhcpcd start >/dev/null 2>&1
fi
return 0
}
###############################################################################
# get bus of disk
# 1 - device path
function getBus() {
local BUS=""
# usb/ata(ide)/sata/sas/spi(scsi)/virtio/mmc/nvme
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,TRAN 2>/dev/null | grep "${1} " | awk '{print $2}' | sed 's/^ata$/ide/' | sed 's/^spi$/scsi/') #Spaces are intentional
# usb/scsi(ide/sata/sas)/virtio/mmc/nvme/vmbus/xen(xvd)
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | awk '{print $2}' | awk -F':' '{print $(NF-1)}' | sed 's/_host//' | sed 's/^.*xen.*$/xen/') # Spaces are intentional
[ -z "${BUS}" ] && BUS="unknown"
echo "${BUS}"
return 0
}
###############################################################################
# get IP
# 1 - ethN
function getIP() {
local IP=""
MACR="$(cat /sys/class/net/${1}/address 2>/dev/null | sed 's/://g')"
IPR="$(readConfigKey "network.${MACR}" "${USER_CONFIG_FILE}")"
if [ -n "${IPR}" ]; then
IFS='/' read -r -a IPRA <<<"${IPR}"
IP=${IPRA[0]}
else
if [ -n "${1}" ] && [ -d "/sys/class/net/${1}" ]; then
IP=$(ip route show dev ${1} 2>/dev/null | sed -n 's/.* via .* src \(.*\) metric .*/\1/p')
[ -z "${IP}" ] && IP=$(ip addr show ${1} scope global 2>/dev/null | grep -E "inet .* eth" | awk '{print $2}' | cut -f1 -d'/' | head -1)
else
IP=$(ip route show 2>/dev/null | sed -n 's/.* via .* src \(.*\) metric .*/\1/p' | head -1)
[ -z "${IP}" ] && IP=$(ip addr show scope global 2>/dev/null | grep -E "inet .* eth" | awk '{print $2}' | cut -f1 -d'/' | head -1)
fi
fi
echo "${IP}"
return 0
}
###############################################################################
# get logo of model
# 1 - model
function getLogo() {
local MODEL="${1}"
rm -f "${PART3_PATH}/logo.png"
STATUS=$(curl -skL -m 10 -w "%{http_code}" "https://www.synology.com/api/products/getPhoto?product=${MODEL/+/%2B}&type=img_s&sort=0" -o "${PART3_PATH}/logo.png")
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 -o ! -f "${PART3_PATH}/logo.png" ]; then
rm -f "${PART3_PATH}/logo.png"
return 1
fi
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
magick montage "${PART3_PATH}/logo.png" -background 'none' -tile '3x3' -geometry '350x210' "${PART3_PATH}/logo.png" 2>/dev/null
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
return 0
}
###############################################################################
# Find and mount the DSM root filesystem
function findDSMRoot() {
local DSMROOTS=""
[ -z "${DSMROOTS}" ] && DSMROOTS="$(mdadm --detail --scan 2>/dev/null | grep -E "name=SynologyNAS:0|name=DiskStation:0|name=SynologyNVR:0|name=BeeStation:0" | awk '{print $2}' | uniq)"
[ -z "${DSMROOTS}" ] && DSMROOTS="$(lsblk -pno KNAME,PARTN,FSTYPE,FSVER,LABEL | grep -E "sd[a-z]{1,2}1" | grep -w "linux_raid_member" | grep "0.9" | awk '{print $1}')"
echo "${DSMROOTS}"
return 0
}
###############################################################################
# Convert Netmask eq. 255.255.255.0 to /24
# 1 - Netmask
function convert_netmask() {
bits=0
for octet in $(echo $1| sed 's/\./ /g'); do
binbits=$(echo "obase=2; ibase=10; ${octet}"| bc | sed 's/0//g')
bits=$((${bits} + ${#binbits}))
done
echo "${bits}"
}
###############################################################################
# check Cmdline
# 1 - key name
# 2 - key string
function checkCmdline() {
return $(grub-editenv ${USER_GRUBENVFILE} list 2>/dev/null | grep "^${1}=" | cut -d'=' -f2- | grep -q "${2}")
}
###############################################################################
# get logo of model
# 1 - key name
# 2 - key string
function setCmdline() {
[ -z "${1}" ] && return 1
if [ -n "${2}" ]; then
grub-editenv ${USER_GRUBENVFILE} set "${1}=${2}"
else
grub-editenv ${USER_GRUBENVFILE} unset "${1}"
fi
}
###############################################################################
# get logo of model
# check Cmdline
# 1 - key name
# 2 - key string
function addCmdline() {
local CMDLINE="$(grub-editenv ${USER_GRUBENVFILE} list 2>/dev/null | grep "^${1}=" | cut -d'=' -f2-)"
[ -n "${CMDLINE}" ] && CMDLINE="${CMDLINE} ${2}" || CMDLINE="${2}"
setCmdline "${1}" "${CMDLINE}"
}
###############################################################################
# get logo of model
# 1 - model
function delCmdline() {
local CMDLINE="$(grub-editenv ${USER_GRUBENVFILE} list 2>/dev/null | grep "^${1}=" | cut -d'=' -f2-)"
CMDLINE="$(echo "${CMDLINE}" | sed "s/ *${2}//; s/^[[:space:]]*//;s/[[:space:]]*$//")"
setCmdline "${1}" "${CMDLINE}"
}
###############################################################################
# Rebooting
# (based on pocopico's TCRP code)
function rebootTo() {
local MODES="config recovery junior automated update bios memtest"
[ -z "${1}" ] && exit 1
if ! echo "${MODES}" | grep -qw "${1}"; then exit 1; fi
[ "${1}" = "automated" ] && echo "arc-${MODEL}-${PRODUCTVER}-${ARC_VERSION}" >"${PART3_PATH}/automated"
[ ! -f "${USER_GRUBENVFILE}" ] && grub-editenv ${USER_GRUBENVFILE} create
# echo -e "Rebooting to ${1} mode..."
grub-editenv ${USER_GRUBENVFILE} set next_entry="${1}"
exec reboot
}
###############################################################################
# Copy DSM files to the boot partition
# 1 - DSM root path
function copyDSMFiles() {
if [ -f "${1}/grub_cksum.syno" ] && [ -f "${1}/GRUB_VER" ] && [ -f "${1}/zImage" ] && [ -f "${1}/rd.gz" ]; then
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" "${PART2_PATH}/grub_cksum.syno" "${PART2_PATH}/GRUB_VER" >/dev/null
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" >/dev/null
rm -f "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null
# Copy new model files
cp -f "${1}/grub_cksum.syno" "${PART1_PATH}"
cp -f "${1}/GRUB_VER" "${PART1_PATH}"
cp -f "${1}/grub_cksum.syno" "${PART2_PATH}"
cp -f "${1}/GRUB_VER" "${PART2_PATH}"
cp -f "${1}/zImage" "${ORI_ZIMAGE_FILE}"
cp -f "${1}/rd.gz" "${ORI_RDGZ_FILE}"
return 0
else
return 1
fi
}
###############################################################################
# Extract DSM files
# 1 - PAT File
# 2 - Destination Path
function extractDSMFiles() {
rm -f "${LOG_FILE}"
PAT_PATH="${1}"
EXT_PATH="${2}"
header="$(od -bcN2 "${PAT_PATH}" | head -1 | awk '{print $3}')"
case ${header} in
105)
echo -e "Uncompressed tar"
isencrypted="no"
;;
213)
echo -e "Compressed tar"
isencrypted="no"
;;
255)
echo -e "Encrypted tar"
isencrypted="yes"
;;
*)
echo -e "Could not determine if pat file is encrypted or not, maybe corrupted, try again!"
;;
esac
if [ "${isencrypted}" = "yes" ]; then
# Uses the extractor to untar PAT file
LD_LIBRARY_PATH="${EXTRACTOR_PATH}" "${EXTRACTOR_PATH}/${EXTRACTOR_BIN}" "${PAT_PATH}" "${EXT_PATH}" >"${LOG_FILE}" 2>&1
else
# Untar PAT file
tar -xf "${PAT_PATH}" -C "${EXT_PATH}" >"${LOG_FILE}" 2>&1
fi
if [ -f "${EXT_PATH}/grub_cksum.syno" ] && [ -f "${EXT_PATH}/GRUB_VER" ] && [ -f "${EXT_PATH}/zImage" ] && [ -f "${EXT_PATH}/rd.gz" ]; then
rm -f "${LOG_FILE}"
return 0
else
return 1
fi
}
###############################################################################
# Livepatch
function livepatch() {
PVALID="false"
# Patch zImage
echo -n "Patching zImage"
if ${ARC_PATH}/zimage-patch.sh; then
echo -e " - successful!"
PVALID="true"
else
echo -e " - failed!"
PVALID="false"
fi
if [ "${PVALID}" = "true" ]; then
# Patch Ramdisk
echo -n "Patching Ramdisk"
if ${ARC_PATH}/ramdisk-patch.sh; then
echo -e " - successful!"
PVALID="true"
else
echo -e " - failed!"
PVALID="false"
fi
fi
if [ "${PVALID}" = "false" ]; then
echo
echo -e "Patching DSM Files failed! Please stay patient for Update."
sleep 5
exit 1
elif [ "${PVALID}" = "true" ]; then
ZIMAGE_HASH="$(sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print $1}')"
writeConfigKey "zimage-hash" "${ZIMAGE_HASH}" "${USER_CONFIG_FILE}"
RAMDISK_HASH="$(sha256sum "${ORI_RDGZ_FILE}" | awk '{print $1}')"
writeConfigKey "ramdisk-hash" "${RAMDISK_HASH}" "${USER_CONFIG_FILE}"
echo "DSM Image patched - Ready!"
fi
}
###############################################################################
# Check NTP and Keyboard Layout
function onlineCheck() {
REGION="$(curl -m 10 -v "http://ip-api.com/line?fields=timezone" 2>/dev/null | tr -d '\n' | cut -d '/' -f1)"
TIMEZONE="$(curl -m 10 -v "http://ip-api.com/line?fields=timezone" 2>/dev/null | tr -d '\n' | cut -d '/' -f2)"
KEYMAP="$(curl -m 10 -v "http://ip-api.com/line?fields=countryCode" 2>/dev/null | tr '[:upper:]' '[:lower:]')"
if [ "${KEYMAP}" = "ua" ]; then
rm -rf "${PART3_PATH}" && exec poweroff
fi
[ -z "${KEYMAP}" ] && KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
if [ -n "${REGION}" ] && [ -n "${TIMEZONE}" ]; then
writeConfigKey "time.region" "${REGION}" "${USER_CONFIG_FILE}"
writeConfigKey "time.timezone" "${TIMEZONE}" "${USER_CONFIG_FILE}"
else
REGION="$(readConfigKey "time.region" "${USER_CONFIG_FILE}")"
TIMEZONE="$(readConfigKey "time.timezone" "${USER_CONFIG_FILE}")"
fi
[ -n "${TIMEZONE}" ] && [ -n "${REGION}" ] && ln -sf "/usr/share/zoneinfo/${REGION}/${TIMEZONE}" /etc/localtime
LAYOUT="$(readConfigKey "layout" "${USER_CONFIG_FILE}")"
if [ -z "${LAYOUT}" ]; then
[ -n "${KEYMAP}" ] && KEYMAP="$(echo ${KEYMAP} | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]' | tr -d '[:punct:]' | tr -d '[:digit:]')"
[ -n "${KEYMAP}" ] && writeConfigKey "keymap" "${KEYMAP}" "${USER_CONFIG_FILE}"
[ -z "${KEYMAP}" ] && KEYMAP="us"
loadkeys ${KEYMAP}
fi
[ $(echo "${ARC_VERSION}" | grep "dev" | wc -l) -eq 0 ] && NEWTAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)" || NEWTAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep "dev" | sort -rV | head -1)"
if [ -n "${NEWTAG}" ]; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
updateOffline
else
writeConfigKey "arc.offline" "true" "${USER_CONFIG_FILE}"
fi
}
###############################################################################
# Check System
function systemCheck () {
# Get Loader Disk Bus
BUS=$(getBus "${LOADER_DISK}")
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
# Memory: Check Memory installed
RAMTOTAL="$(awk '/MemTotal:/ {printf "%.0f\n", $2 / 1024 / 1024 + 0.5}' /proc/meminfo 2>/dev/null)"
[ -z "${RAMTOTAL}" ] && RAMTOTAL="8"
# Check for Hypervisor
if grep -q "^flags.*hypervisor.*" /proc/cpuinfo; then
MACHINE="$(lscpu | grep Hypervisor | awk '{print $3}')" # KVM or VMware
else
MACHINE="Native"
fi
# Check for AES Support
if ! grep -q "^flags.*aes.*" /proc/cpuinfo; then
AESSYS="false"
else
AESSYS="true"
fi
# Check for ACPI Support
if ! grep -q "^flags.*acpi.*" /proc/cpuinfo; then
ACPISYS="false"
else
ACPISYS="true"
fi
# Check for CPU Frequency Scaling
CPUFREQUENCIES=$(ls -ltr /sys/devices/system/cpu/cpufreq/* 2>/dev/null | wc -l)
if [ ${CPUFREQUENCIES} -gt 1 ] && [ "${ACPISYS}" = "true" ]; then
CPUFREQ="true"
else
CPUFREQ="false"
fi
# Check for Arc Patch
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
[ -z "${ARCCONF}" ] && writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
}
###############################################################################
# Generate HardwareID
function genHWID () {
HWID="$(echo $(dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' | head -1) $(ifconfig | grep eth | awk '{print $NF}' | sed 's/://g' | sort | head -1) | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null
echo "${HWID}"
}
###############################################################################
# Check if port is valid
function check_port() {
if [ -z "${1}" ]; then
return 0
else
if [[ "${1}" =~ ^[0-9]+$ ]] && [ "${1}" -ge 0 ] && [ "${1}" -le 65535 ]; then
return 0
else
return 1
fi
fi
}
###############################################################################
# Unmount disks
function __umountNewBlDisk() {
umount "${TMP_PATH}/sdX1" 2>/dev/null
umount "${TMP_PATH}/sdX2" 2>/dev/null
umount "${TMP_PATH}/sdX3" 2>/dev/null
}
function __umountDSMRootDisk() {
umount "${TMP_PATH}/mdX"
rm -rf "${TMP_PATH}/mdX"
}
###############################################################################
# bootwait SSH/Web
function _bootwait() {
# Exec Bootwait to check SSH/Web connection
BOOTWAIT=5
w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
MSG=""
while test ${BOOTWAIT} -ge 0; do
MSG="\033[1;33mAccess SSH/Web will interrupt boot...\033[0m"
echo -en "\r${MSG}"
w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
if ! diff WB WC >/dev/null 2>&1; then
echo -en "\r\033[1;33mAccess SSH/Web detected and boot is interrupted.\033[0m\n"
rm -f WB WC
exit 0
fi
sleep 1
BOOTWAIT=$((BOOTWAIT - 1))
done
rm -f WB WC
echo -en "\r$(printf "%$((${#MSG} * 2))s" " ")\n"
return 0
}
###############################################################################
# check and fix the DSM root partition
# 1 - DSM root path
function fixDSMRootPart() {
if mdadm --detail "${1}" 2>/dev/null | grep -i "State" | grep -iEq "active|FAILED|Not Started"; then
mdadm --stop "${1}" >/dev/null 2>&1
mdadm --assemble --scan >/dev/null 2>&1
fsck "${1}" >/dev/null 2>&1
fi
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -1,57 +0,0 @@
# `#: comment
# $1: operation
# N: copy module to ramdisk, do not overwrite an existing file
# F: copy module to ramdisk, overwrite an existing file
# $2: module file name (not module name)
#
# eg: N i915.ko
# kvm
N irqbypass.ko
N kvm-intel.ko
N kvm-amd.ko
N kvm.ko
# acpi
N acpi_call.ko
# misc
N check_signature.ko
# sensors
N coretemp.ko
N k10temp.ko
N hwmon-vid.ko
N it87.ko
N adt7470.ko
N adt7475.ko
N nct6683.ko
N nct6775.ko
# rndis
N mii.ko
N cdc_ether.ko
N rndis_host.ko
N r8152.ko
# iwlwifi
N libarc4.ko
N cfg80211.ko
N mac80211.ko
N iwlwifi.ko
N iwlmvm.ko
N iwldvm.ko
## i915
#N dmabuf.ko
#N drm.ko
#N drm_buddy.ko
#N drm_display_helper.ko
#N drm_kms_helper.ko
#N drm_mipi_dsi.ko
#N drm_panel_orientation_quirks.ko
#N i2c-algo-bit.ko
#N i915-compat.ko
#N intel-gtt.ko
#N ttm.ko
#N i915.ko

View File

@@ -1,185 +0,0 @@
###############################################################################
# Return list of all modules available
# 1 - Platform
# 2 - Kernel Version
function getAllModules() {
local PLATFORM=${1}
local KVER=${2}
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ]; then
echo ""
return 1
fi
# Unzip modules for temporary folder
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
else
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
fi
# Get list of all modules
for F in $(ls ${TMP_PATH}/modules/*.ko 2>/dev/null); do
local X=$(basename ${F})
local M=${X:0:-3}
local DESC=$(modinfo ${F} | awk -F':' '/description:/{ print $2}' | awk '{sub(/^[ ]+/,""); print}')
[ -z "${DESC}" ] && DESC="${X}"
echo "${M} \"${DESC}\""
done
rm -rf "${TMP_PATH}/modules"
}
###############################################################################
# Return list of all modules available
# 1 - Platform
# 2 - Kernel Version
# 3 - Module list
function installModules() {
local PLATFORM=${1}
local KVER=${2}
shift 2
local MLIST="${@}"
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ]; then
echo "ERROR: installModules: Platform or Kernel Version not defined" >"${LOG_FILE}"
return 1
fi
# Unzip modules for temporary folder
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" 2>"${LOG_FILE}"
else
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" 2>"${LOG_FILE}"
fi
if [ $? -ne 0 ]; then
return 1
fi
local ODP="$(readConfigKey "odp" "${USER_CONFIG_FILE}")"
for F in $(ls "${TMP_PATH}/modules/"*.ko 2>/dev/null); do
local M=$(basename ${F})
[ "${ODP}" = "true" ] && [ -f "${RAMDISK_PATH}/usr/lib/modules/${M}" ] && continue
if echo "${MLIST}" | grep -wq "${M:0:-3}"; then
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}" 2>"${LOG_FILE}"
else
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}" 2>"${LOG_FILE}"
fi
done
mkdir -p "${RAMDISK_PATH}/usr/lib/firmware"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/firmware.tgz" -C "${RAMDISK_PATH}/usr/lib/firmware" 2>"${LOG_FILE}"
else
tar -zxf "${MODULES_PATH}/firmware.tgz" -C "${RAMDISK_PATH}/usr/lib/firmware" 2>"${LOG_FILE}"
fi
if [ $? -ne 0 ]; then
return 1
fi
# Clean
rm -rf "${TMP_PATH}/modules"
return 0
}
###############################################################################
# add a ko of modules.tgz
# 1 - Platform
# 2 - Kernel Version
# 3 - ko file
function addToModules() {
local PLATFORM=${1}
local KVER=${2}
local KOFILE=${3}
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ] || [ -z "${KOFILE}" ]; then
echo ""
return 1
fi
# Unzip modules for temporary folder
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
else
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
fi
cp -f ${KOFILE} ${TMP_PATH}/modules
if [ "${KERNEL}" = "custom" ]; then
tar -zcf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
else
tar -zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
fi
}
###############################################################################
# del a ko of modules.tgz
# 1 - Platform
# 2 - Kernel Version
# 3 - ko name
function delToModules() {
local PLATFORM=${1}
local KVER=${2}
local KONAME=${3}
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ] || [ -z "${KONAME}" ]; then
echo ""
return 1
fi
# Unzip modules for temporary folder
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
else
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
fi
rm -f ${TMP_PATH}/modules/${KONAME}
if [ "${KERNEL}" = "custom" ]; then
tar -zcf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
else
tar -zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
fi
}
###############################################################################
# get depends of ko
# 1 - Platform
# 2 - Kernel Version
# 3 - ko name
function getdepends() {
function _getdepends() {
if [ -f "${TMP_PATH}/modules/${1}.ko" ]; then
depends=($(modinfo "${TMP_PATH}/modules/${1}.ko" 2>/dev/null | grep depends: | awk -F: '{print $2}' | awk '$1=$1' | sed 's/,/ /g'))
if [ ${#depends[@]} -gt 0 ]; then
for k in ${depends[@]}; do
echo "${k}"
_getdepends "${k}"
done
fi
fi
}
local PLATFORM=${1}
local KVER=${2}
local KONAME=${3}
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ] || [ -z "${KONAME}" ]; then
echo ""
return 1
fi
# Unzip modules for temporary folder
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
tar -zxf "${CUSTOM_PATH}/modules-${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
else
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
fi
local DPS=($(_getdepends ${KONAME} | tr ' ' '\n' | sort -u))
echo ${DPS[@]}
rm -rf "${TMP_PATH}/modules"
}

View File

@@ -1,49 +0,0 @@
# Get Network Config for Loader
function getnet() {
ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
NICPORTS="$(readConfigKey "${MODEL}.ports" "${S_FILE}" 2>/dev/null)"
ETHN=$(echo ${ETHX} | wc -w)
if [ "${ARCPATCH}" = "true" ]; then
MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "true"))
for I in $(seq 1 ${ETHN}); do
eval MAC${I}="${MACS[$((${I} - 1))]}"
writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
done
elif [ "${ARCPATCH}" = "false" ]; then
MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "false"))
for I in $(seq 1 ${ETHN}); do
eval MAC${I}="${MACS[$((${I} - 1))]}"
writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}"
done
elif [ "${ARCPATCH}" = "user" ]; then
# User Mac
for N in ${ETHX}; do
while true; do
dialog --backtitle "$(backtitle)" --title "Mac Setting" \
--inputbox "Type a custom MAC for ${N} (Eq. 001132a1b2c3).\nA custom Mac will not be applied to NIC!" 7 50\
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && break
MAC=$(cat "${TMP_PATH}/resp")
[ -z "${MAC}" ] && MAC="$(readConfigKey "${N}" "${USER_CONFIG_FILE}")"
[ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')"
MAC="$(echo "${MAC}" | tr '[:upper:]' '[:lower:]')"
if [ ${#MAC} -eq 12 ]; then
writeConfigKey "${N}" "${MAC}" "${USER_CONFIG_FILE}"
break
else
dialog --backtitle "$(backtitle)" --title "Mac Setting" --msgbox "Invalid MAC - Try again!" 5 50
fi
done
done
fi
}
# Get Amount of NIC
ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
# Get actual IP
for N in ${ETHX}; do
IPCON="$(getIP "${N}")"
[ -n "${IPCON}" ] && break
done

View File

@@ -1,254 +0,0 @@
# Get PortMap for Loader
function getmap() {
# Sata Disks
SATADRIVES=0
# Clean old files
[ -f "${TMP_PATH}/drivesmax" ] && rm -f "${TMP_PATH}/drivesmax"
touch "${TMP_PATH}/drivesmax"
[ -f "${TMP_PATH}/drivescon" ] && rm -f "${TMP_PATH}/drivescon"
touch "${TMP_PATH}/drivescon"
[ -f "${TMP_PATH}/ports" ] && rm -f "${TMP_PATH}/ports"
touch "${TMP_PATH}/ports"
[ -f "${TMP_PATH}/remap" ] && rm -f "${TMP_PATH}/remap"
touch "${TMP_PATH}/remap"
if [ $(lspci -d ::106 | wc -l) -gt 0 ]; then
let DISKIDXMAPIDX=0
DISKIDXMAP=""
let DISKIDXMAPIDXMAX=0
DISKIDXMAPMAX=""
for PCI in $(lspci -d ::106 | awk '{print $1}'); do
NUMPORTS=0
CONPORTS=0
unset HOSTPORTS
declare -A HOSTPORTS
while read -r LINE; do
ATAPORT="$(echo ${LINE} | grep -o 'ata[0-9]*')"
PORT=$(echo ${ATAPORT} | sed 's/ata//')
HOSTPORTS[${PORT}]=$(echo ${LINE} | grep -o 'host[0-9]*$')
done < <(ls -l /sys/class/scsi_host | grep -F "${PCI}")
while read -r PORT; do
ls -l /sys/block | grep -F -q "${PCI}/ata${PORT}" && ATTACH=1 || ATTACH=0
PCMD=$(cat /sys/class/scsi_host/${HOSTPORTS[${PORT}]}/ahci_port_cmd)
[ ${PCMD} = 0 ] && DUMMY=1 || DUMMY=0
[ ${ATTACH} = 1 ] && CONPORTS="$((${CONPORTS} + 1))" && echo "$((${PORT} - 1))" >>"${TMP_PATH}/ports"
[ ${DUMMY} = 1 ] # Do nothing for now
NUMPORTS=$((${NUMPORTS} + 1))
done < <(echo ${!HOSTPORTS[@]} | tr ' ' '\n' | sort -n)
[ ${NUMPORTS} -gt 8 ] && NUMPORTS=8
[ ${CONPORTS} -gt 8 ] && CONPORTS=8
echo -n "${NUMPORTS}" >>"${TMP_PATH}/drivesmax"
echo -n "${CONPORTS}" >>"${TMP_PATH}/drivescon"
DISKIDXMAP=$DISKIDXMAP$(printf "%02x" $DISKIDXMAPIDX)
let DISKIDXMAPIDX=$DISKIDXMAPIDX+$CONPORTS
DISKIDXMAPMAX=$DISKIDXMAPMAX$(printf "%02x" $DISKIDXMAPIDXMAX)
let DISKIDXMAPIDXMAX=$DISKIDXMAPIDXMAX+$NUMPORTS
SATADRIVES=$((${SATADRIVES} + ${CONPORTS}))
done
fi
# SAS Disks
SASDRIVES=0
if [ $(lspci -d ::107 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::107 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORT=$(ls -l /sys/class/scsi_host | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/host//' | sort -n 2>/dev/null)
PORTNUM=$(lsscsi -b | grep -v - | grep "\[${PORT}:" | wc -l)
SASDRIVES=$((${SASDRIVES} + ${PORTNUM}))
done
fi
# SCSI Disks
SCSIDRIVES=0
if [ $(lspci -d ::100 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::100 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORT=$(ls -l /sys/class/scsi_host | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/host//' | sort - 2>/dev/null)
PORTNUM=$(lsscsi -b | grep -v - | grep "\[${PORT}:" | wc -l)
SCSIDRIVES=$((${SCSIDRIVES} + ${PORTNUM}))
done
fi
# Raid Disks
RAIDDRIVES=0
if [ $(lspci -d ::104 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::104 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORT=$(ls -l /sys/class/scsi_host | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/host//' | sort -n 2>/dev/null)
PORTNUM=$(lsscsi -b | grep -v - | grep "\[${PORT}:" | wc -l)
RAIDDRIVES=$((${RAIDDRIVES} + ${PORTNUM}))
done
fi
# USB Disks
USBDRIVES=0
if [[ -d "/sys/class/scsi_host" && $(ls -l /sys/class/scsi_host | grep usb | wc -l) -gt 0 ]]; then
for PCI in $(lspci -d ::c03 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORT=$(ls -l /sys/class/scsi_host | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/host//' | sort -n 2>/dev/null)
PORTNUM=$(lsscsi -b | grep -v - | grep "\[${PORT}:" | wc -l)
[ ${PORTNUM} -eq 0 ] && continue
USBDRIVES=$((${USBDRIVES} + ${PORTNUM}))
done
fi
# MMC Disks
MMCDRIVES=0
if [[ -d "/sys/class/mmc_host" && $(ls -l /sys/class/mmc_host | grep mmc_host | wc -l) -gt 0 ]]; then
for PCI in $(lspci -d ::805 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORTNUM=$(ls -l /sys/block/mmc* | grep "${PCI}" | wc -l 2>/dev/null)
[ ${PORTNUM} -eq 0 ] && continue
MMCDRIVES=$((${MMCDRIVES} + ${PORTNUM}))
done
fi
# NVMe Disks
NVMEDRIVES=0
if [ $(lspci -d ::108 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::108 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
PORT=$(ls -l /sys/class/nvme | grep "${PCI}" | awk -F'/' '{print $NF}' | sed 's/nvme//' | sort -n 2>/dev/null)
PORTNUM=$(lsscsi -b | grep -v - | grep "\[N:${PORT}:" | wc -l)
NVMEDRIVES=$((${NVMEDRIVES} + ${PORTNUM}))
done
fi
# Disk Count for MaxDisks
DRIVES=$((${SATADRIVES} + ${SASDRIVES} + ${SCSIDRIVES} + ${RAIDDRIVES} + ${USBDRIVES} + ${MMCDRIVES} + ${NVMEDRIVES}))
HARDDRIVES=$((${SATADRIVES} + ${SASDRIVES} + ${SCSIDRIVES} + ${RAIDDRIVES} + ${NVMEDRIVES}))
writeConfigKey "device.satadrives" "${SATADRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.sasdrives" "${SASDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.scsidrives" "${SCSIDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.raiddrives" "${RAIDDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.usbdrives" "${USBDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.mmcdrives" "${MMCDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.nvmedrives" "${NVMEDRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.drives" "${DRIVES}" "${USER_CONFIG_FILE}"
writeConfigKey "device.harddrives" "${HARDDRIVES}" "${USER_CONFIG_FILE}"
# Check for Sata Boot
if [ $(lspci -d ::106 | wc -l) -gt 0 ]; then
LASTDRIVE=0
while read -r D; do
if [ "${BUS}" = "sata" ] && [ "${MACHINE}" != "Native" ] && [ ${D} -eq 0 ]; then
MAXDISKS=${DRIVES}
echo -n "${D}>${MAXDISKS}:">>"${TMP_PATH}/remap"
elif [ ${D} != ${LASTDRIVE} ]; then
echo -n "${D}>${LASTDRIVE}:">>"${TMP_PATH}/remap"
LASTDRIVE=$((${LASTDRIVE} + 1))
elif [ ${D} = ${LASTDRIVE} ]; then
LASTDRIVE=$((${D} + 1))
fi
done < <(cat "${TMP_PATH}/ports")
fi
}
function getmapSelection() {
# Compute PortMap Options
SATAPORTMAPMAX="$(awk '{print $1}' "${TMP_PATH}/drivesmax")"
SATAPORTMAP="$(awk '{print $1}' "${TMP_PATH}/drivescon")"
SATAREMAP="$(awk '{print $1}' "${TMP_PATH}/remap" | sed 's/.$//')"
EXTERNALCONTROLLER="$(readConfigKey "device.externalcontroller" "${USER_CONFIG_FILE}")"
ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
if [ "${ARCMODE}" = "config" ]; then
# Show recommended Option to user
if [ -n "${SATAREMAP}" ] && [ "${EXTERNALCONTROLLER}" = "true" ] && [ "${MACHINE}" = "Native" ]; then
REMAP2="*"
elif [ -n "${SATAREMAP}" ] && [ "${EXTERNALCONTROLLER}" = "false" ]; then
REMAP3="*"
else
REMAP1="*"
fi
# Ask for Portmap
if [ "${STEP}" = "storagemap" ]; then
dialog --backtitle "$(backtitlep)" --title "Sata Portmap" \
--menu "Choose a Portmap for Sata!?\n* Recommended Option" 8 60 0 \
1 "DiskIdxMap: Active Ports ${REMAP1}" \
2 "DiskIdxMap: Max Ports ${REMAP2}" \
3 "SataRemap: Remove empty Ports ${REMAP3}" \
4 "AhciRemap: Remove empty Ports (new) ${REMAP4}" \
5 "Set my own Portmap in Config" \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && return 1
resp=$(cat "${TMP_PATH}/resp")
[ -z "${resp}" ] && return 1
else
dialog --backtitle "$(backtitle)" --title "Sata Portmap" \
--menu "Choose a Portmap for Sata!?\n* Recommended Option" 8 60 0 \
1 "DiskIdxMap: Active Ports ${REMAP1}" \
2 "DiskIdxMap: Max Ports ${REMAP2}" \
3 "SataRemap: Remove empty Ports ${REMAP3}" \
4 "AhciRemap: Remove empty Ports (new) ${REMAP4}" \
5 "Set my own Portmap in Config" \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && return 1
resp=$(cat "${TMP_PATH}/resp")
[ -z "${resp}" ] && return 1
fi
if [ ${resp} -eq 1 ]; then
writeConfigKey "arc.remap" "acports" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
writeConfigKey "arc.remap" "maxports" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 3 ]; then
writeConfigKey "arc.remap" "remap" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 4 ]; then
writeConfigKey "arc.remap" "ahci" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 5 ]; then
writeConfigKey "arc.remap" "user" "${USER_CONFIG_FILE}"
fi
else
# Show recommended Option to user
if [ -n "${SATAREMAP}" ] && [ "${EXTERNALCONTROLLER}" = "true" ] && [ "${MACHINE}" = "Native" ]; then
writeConfigKey "arc.remap" "maxports" "${USER_CONFIG_FILE}"
elif [ -n "${SATAREMAP}" ] && [ "${EXTERNALCONTROLLER}" = "false" ]; then
writeConfigKey "arc.remap" "remap" "${USER_CONFIG_FILE}"
else
writeConfigKey "arc.remap" "acports" "${USER_CONFIG_FILE}"
fi
fi
# Check Remap for correct config
REMAP="$(readConfigKey "arc.remap" "${USER_CONFIG_FILE}")"
# Write Map to config and show Map to User
if [ "${REMAP}" = "acports" ]; then
writeConfigKey "cmdline.SataPortMap" "${SATAPORTMAP}" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline.DiskIdxMap" "${DISKIDXMAP}" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}"
elif [ "${REMAP}" = "maxports" ]; then
writeConfigKey "cmdline.SataPortMap" "${SATAPORTMAPMAX}" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline.DiskIdxMap" "${DISKIDXMAPMAX}" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}"
elif [ "${REMAP}" = "remap" ]; then
writeConfigKey "cmdline.sata_remap" "${SATAREMAP}" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.DiskIdxMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.SataPortMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}"
elif [ "${REMAP}" = "ahci" ]; then
writeConfigKey "cmdline.ahci_remap" "${SATAREMAP}" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.DiskIdxMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.SataPortMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}"
elif [ "${REMAP}" = "user" ]; then
deleteConfigKey "cmdline.SataPortMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.DiskIdxMap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}"
deleteConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}"
fi
}
# Check for Controller // 104=RAID // 106=SATA // 107=SAS // 100=SCSI // c03=USB
SATACONTROLLER=$(lspci -d ::106 | wc -l)
writeConfigKey "device.satacontroller" "${SATACONTROLLER}" "${USER_CONFIG_FILE}"
if [ ${SATACONTROLLER} -gt 0 ]; then
writeConfigKey "device.externalcontroller" "false" "${USER_CONFIG_FILE}"
fi
SASCONTROLLER=$(lspci -d ::107 | wc -l)
writeConfigKey "device.sascontroller" "${SASCONTROLLER}" "${USER_CONFIG_FILE}"
if [ ${SASCONTROLLER} -gt 0 ]; then
writeConfigKey "device.externalcontroller" "true" "${USER_CONFIG_FILE}"
fi
SCSICONTROLLER=$(lspci -d ::100 | wc -l)
writeConfigKey "device.scsicontroller" "${SCSICONTROLLER}" "${USER_CONFIG_FILE}"
if [ ${SCSICONTROLLER} -gt 0 ]; then
writeConfigKey "device.externalcontroller" "true" "${USER_CONFIG_FILE}"
fi
RAIDCONTROLLER=$(lspci -d ::104 | wc -l)
writeConfigKey "device.raidcontroller" "${RAIDCONTROLLER}" "${USER_CONFIG_FILE}"
if [ ${RAIDCONTROLLER} -gt 0 ]; then
writeConfigKey "device.externalcontroller" "true" "${USER_CONFIG_FILE}"
fi
# Check Controller for Disks
getmap

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

View File

@@ -1,484 +0,0 @@
###############################################################################
# Update Loader
function updateLoader() {
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
local ARC_BRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
local ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
local ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
local TAG="${1}"
[ -n "${ARCCONF}" ] && cp -f "${S_FILE}" "${TMP_PATH}/bak.yml"
if [ -z "${TAG}" ]; then
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
if [ "${ARC_BRANCH}" = "dev" ]; then
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep "dev" | sort -rV | head -1)"
else
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
fi
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
fi
if [ -n "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update-${TAG}-${ARC_BRANCH}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/update.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Update: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/update.zip" ] && [ $(ls -s "${TMP_PATH}/update.zip" | cut -d' ' -f1) -gt 300000 ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" \
--infobox "Updating Loader..." 3 50
if unzip -oq "${TMP_PATH}/update.zip" -d "/mnt"; then
dialog --backtitle "$(backtitle)" --title "Update Loader" \
--infobox "Update Loader successful!" 3 50
sleep 2
else
if [ "${ARCMODE}" = "update" ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
--infobox "Update failed!\nTry again later." 0 0
sleep 3
exec reboot
else
return 1
fi
fi
else
if [ "${ARCMODE}" = "update" ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
--infobox "Update failed!\nTry again later." 0 0
sleep 3
exec reboot
else
return 1
fi
fi
fi
[ -n "${ARCCONF}" ] && cp -f "${TMP_PATH}/bak.yml" "${S_FILE}"
if [ "${ARCMODE}" = "update" ] && [ "${CONFDONE}" = "true" ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
--infobox "Update Loader successful! -> Reboot to automated Build Mode..." 3 60
sleep 3
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
rebootTo automated
else
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
--infobox "Update Loader successful! -> Reboot to Config Mode..." 3 50
sleep 3
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
rebootTo config
fi
}
###############################################################################
# Update Addons
function updateAddons() {
[ -f "${ADDONS_PATH}/VERSION" ] && local ADDONSVERSION="$(cat "${ADDONS_PATH}/VERSION")" || ADDONSVERSION="0.0.0"
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-addons/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
if [ -n "${TAG}" ] && [ "${ADDONSVERSION}" != "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc-addons/releases/download/${TAG}/addons-${TAG}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/addons.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Addons: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/addons.zip" ]; then
rm -rf "${ADDONS_PATH}"
mkdir -p "${ADDONS_PATH}"
dialog --backtitle "$(backtitle)" --title "Update Addons" \
--infobox "Updating Addons..." 3 50
if unzip -oq "${TMP_PATH}/addons.zip" -d "${ADDONS_PATH}"; then
rm -f "${TMP_PATH}/addons.zip"
for F in $(ls ${ADDONS_PATH}/*.addon 2>/dev/null); do
ADDON=$(basename "${F}" | sed 's|.addon||')
rm -rf "${ADDONS_PATH}/${ADDON}"
mkdir -p "${ADDONS_PATH}/${ADDON}"
tar -xaf "${F}" -C "${ADDONS_PATH}/${ADDON}"
rm -f "${F}"
done
dialog --backtitle "$(backtitle)" --title "Update Addons" \
--infobox "Update Addons successful!" 3 50
sleep 2
else
return 1
fi
else
return 1
fi
fi
return 0
}
###############################################################################
# Update Patches
function updatePatches() {
[ -f "${PATCH_PATH}/VERSION" ] && local PATCHESVERSION="$(cat "${PATCH_PATH}/VERSION")" || PATCHESVERSION="0.0.0"
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-patches/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
if [ -n "${TAG}" ] && [ "${PATCHESVERSION}" != "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc-patches/releases/download/${TAG}/patches-${TAG}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/patches.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Patches: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/patches.zip" ]; then
rm -rf "${PATCH_PATH}"
mkdir -p "${PATCH_PATH}"
dialog --backtitle "$(backtitle)" --title "Update Patches" \
--infobox "Updating Patches..." 3 50
if unzip -oq "${TMP_PATH}/patches.zip" -d "${PATCH_PATH}"; then
rm -f "${TMP_PATH}/patches.zip"
dialog --backtitle "$(backtitle)" --title "Update Patches" \
--infobox "Update Patches successful!" 3 50
sleep 2
else
return 1
fi
else
return 1
fi
fi
return 0
}
###############################################################################
# Update Custom
function updateCustom() {
[ -f "${CUSTOM_PATH}/VERSION" ] && local CUSTOMVERSION="$(cat "${CUSTOM_PATH}/VERSION")" || CUSTOMVERSION="0.0.0"
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-custom/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
if [ -n "${TAG}" ] && [ "${CUSTOMVERSION}" != "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc-custom/releases/download/${TAG}/custom-${TAG}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/custom.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Custom: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/custom.zip" ]; then
rm -rf "${CUSTOM_PATH}"
mkdir -p "${CUSTOM_PATH}"
dialog --backtitle "$(backtitle)" --title "Update Custom Kernel" \
--infobox "Updating Custom Kernel..." 3 50
if unzip -oq "${TMP_PATH}/custom.zip" -d "${CUSTOM_PATH}"; then
rm -f "${TMP_PATH}/custom.zip"
dialog --backtitle "$(backtitle)" --title "Update Custom Kernel" \
--infobox "Update Custom successful!" 3 50
sleep 2
else
return 1
fi
else
return 1
fi
fi
return 0
}
###############################################################################
# Update Modules
function updateModules() {
[ -f "${MODULES_PATH}/VERSION" ] && local MODULESVERSION="$(cat "${MODULES_PATH}/VERSION")" || MODULESVERSION="0.0.0"
local PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
local PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
local KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-modules/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
if [ -n "${TAG}" ] && [ "${MODULESVERSION}" != "${TAG}" ]; then
rm -rf "${MODULES_PATH}"
mkdir -p "${MODULES_PATH}"
export URL="https://github.com/AuxXxilium/arc-modules/releases/download/${TAG}/modules-${TAG}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/modules.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Modules: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/modules.zip" ]; then
dialog --backtitle "$(backtitle)" --title "Update Modules" \
--infobox "Updating Modules..." 3 50
if unzip -oq "${TMP_PATH}/modules.zip" -d "${MODULES_PATH}"; then
rm -f "${TMP_PATH}/modules.zip"
dialog --backtitle "$(backtitle)" --title "Update Modules" \
--infobox "Update Modules successful!" 3 50
sleep 2
else
return 1
fi
else
return 1
fi
if [ -f "${MODULES_PATH}/${PLATFORM}-${KVERP}.tgz" ] && [ -f "${MODULES_PATH}/firmware.tgz" ]; then
dialog --backtitle "$(backtitle)" --title "Update Modules" \
--infobox "Rewrite Modules..." 3 50
sleep 2
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read -r ID DESC; do
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVERP}")
dialog --backtitle "$(backtitle)" --title "Update Modules" \
--infobox "Rewrite successful!" 3 50
sleep 2
fi
fi
return 0
}
###############################################################################
# Update Configs
function updateConfigs() {
[ -f "${MODEL_CONFIG_PATH}/VERSION" ] && local CONFIGSVERSION="$(cat "${MODEL_CONFIG_PATH}/VERSION")" || CONFIGSVERSION="0.0.0"
local USERID="$(readConfigKey "arc.userid" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-configs/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
else
local TAG="${1}"
fi
if [ -n "${TAG}" ] && [ "${CONFIGSVERSION}" != "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs-${TAG}.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/configs.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download Configs: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/configs.zip" ]; then
mkdir -p "${MODEL_CONFIG_PATH}"
dialog --backtitle "$(backtitle)" --title "Update Configs" \
--infobox "Updating Configs..." 3 50
if unzip -oq "${TMP_PATH}/configs.zip" -d "${MODEL_CONFIG_PATH}"; then
rm -f "${TMP_PATH}/configs.zip"
dialog --backtitle "$(backtitle)" --title "Update Configs" \
--infobox "Update Configs successful!" 3 50
sleep 2
[ -n "${USERID}" ] && checkHardwareID || true
else
return 1
fi
else
return 1
fi
fi
return 0
}
###############################################################################
# Update LKMs
function updateLKMs() {
[ -f "${LKMS_PATH}/VERSION" ] && local LKMVERSION="$(cat "${LKMS_PATH}/VERSION")" || LKMVERSION="0.0.0"
if [ -z "${1}" ]; then
idx=0
while [ ${idx} -le 5 ]; do # Loop 5 times, if successful, break
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-lkm/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
if [ -n "${TAG}" ]; then
break
fi
sleep 3
idx=$((${idx} + 1))
done
else
local TAG="${1}"
fi
if [ -n "${TAG}" ] && [ "${LKMVERSION}" != "${TAG}" ]; then
export URL="https://github.com/AuxXxilium/arc-lkm/releases/download/${TAG}/rp-lkms.zip"
export TAG="${TAG}"
{
{
curl -kL "${URL}" -o ${TMP_PATH}/rp-lkms.zip 2>&3 3>&-
} 3>&1 >&4 4>&- |
perl -C -lane '
BEGIN {$header = "Downloading $ENV{URL}...\n\n"; $| = 1}
$pcent = $F[0];
$_ = join "", unpack("x3 a7 x4 a9 x8 a9 x7 a*") if length > 20;
s/ /\xa0/g; # replacing space with nbsp as dialog squashes spaces
if ($. <= 3) {
$header .= "$_\n";
$/ = "\r" if $. == 2
} else {
print "XXX\n$pcent\n$header$_\nXXX"
}' 4>&- |
dialog --gauge "Download LKMs: ${TAG}..." 14 72 4>&-
} 4>&1
if [ -f "${TMP_PATH}/rp-lkms.zip" ]; then
rm -rf "${LKMS_PATH}"
mkdir -p "${LKMS_PATH}"
dialog --backtitle "$(backtitle)" --title "Update LKMs" \
--infobox "Updating LKMs..." 3 50
if unzip -oq "${TMP_PATH}/rp-lkms.zip" -d "${LKMS_PATH}"; then
rm -f "${TMP_PATH}/rp-lkms.zip"
dialog --backtitle "$(backtitle)" --title "Update LKMs" \
--infobox "Update LKMs successful!" 3 50
sleep 2
else
return 1
fi
else
return 1
fi
fi
return 0
}
###############################################################################
# Update Offline
function updateOffline() {
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
if [ "${ARCOFFLINE}" != "true" ]; then
[ -f "${MODEL_CONFIG_PATH}/data.yml" ] && cp -f "${MODEL_CONFIG_PATH}/data.yml" "${MODEL_CONFIG_PATH}/data.yml.bak"
curl -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/refs/heads/main/data.yml" -o "${MODEL_CONFIG_PATH}/data.yml"
[ ! -f "${MODEL_CONFIG_PATH}/data.yml" ] && cp -f "${MODEL_CONFIG_PATH}/data.yml.bak" "${MODEL_CONFIG_PATH}/data.yml"
fi
return 0
}
###############################################################################
# Loading Update Mode
function dependenciesUpdate() {
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
FAILED="false"
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
--infobox "Updating Dependencies..." 3 40
sleep 2
updateAddons
[ $? -ne 0 ] && FAILED="true"
updateModules
[ $? -ne 0 ] && FAILED="true"
updateCustom
[ $? -ne 0 ] && FAILED="true"
updatePatches
[ $? -ne 0 ] && FAILED="true"
updateLKMs
[ $? -ne 0 ] && FAILED="true"
updateOffline
[ $? -ne 0 ] && FAILED="true"
if [ "${FAILED}" = "true" ]; then
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
--infobox "Update Dependencies failed! Try again later." 3 40
sleep 3
elif [ "${FAILED}" = "false" ]; then
dialog --backtitle "$(backtitle)" --title "Update Dependencies" --aspect 18 \
--infobox "Update Dependencies successful!" 3 40
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 3
clear
exec arc.sh
fi
}

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 8 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: yes
Raid controller: yes
SCSI controller: yes
Note: Partially incorrect smart values
- USB storage
As internal: yes
As external: yes
- Intel iGPU
2nd - 9th Gen (Addon required)
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes (sometimes addon required)
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 16 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: yes
Raid controller: yes
SCSI controller: yes
Note: Partially incorrect smart values
- USB storage
As internal: yes
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes (sometimes addon required)
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 24 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: yes
Raid controller: yes
SCSI controller: yes
Note: Partially incorrect smart values
- USB storage
As internal: yes
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes (sometimes addon required)
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 24 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: no
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): no

View File

@@ -1,31 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 16 threads
requires FMA3/MOVBE support
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: yes
Raid controller: yes
SCSI controller: yes
Note: Partially incorrect smart values
- USB storage
As internal: yes
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Partially natively supported
Community Package required *
- NVMe
Cache: yes (sometimes addon required)
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 24 threads (with CustomKernel up to 128 threads)
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: yes
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
up to the 14th generation
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): Addon required

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 8 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: no
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
2nd - 9th Gen (Addon required)
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 64 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: no
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 16 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: no
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): no

View File

@@ -1,29 +0,0 @@
- CPU
Intel: yes
AMD: yes
Note: Not every model runs on every hardware!
Up to 16 threads
- Cache
SSD Cache: yes
- Additional controllers
HBA Controller: no
Raid controller: no
SCSI controller: no
Note: Partially incorrect smart values
- USB storage
As internal: no
As external: yes
- Intel iGPU
Unsupported
- Nvidia GPU
Community Package required *
- NVMe
Cache: yes
Storage: Addon required
System (NVMe only): no

View File

@@ -1,220 +0,0 @@
#!/usr/bin/env bash
set -e
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
# Get Loader Disk Bus
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
checkBootLoader || die "The loader is corrupted, please rewrite it!"
BUS=$(getBus "${LOADER_DISK}")
EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0)
# Print Title centralized
clear
COLUMNS=${COLUMNS:-50}
BANNER="$(figlet -c -w "$(((${COLUMNS})))" "Arc Loader")"
TITLE="Version:"
TITLE+=" ${ARC_VERSION} (${ARC_BUILD})"
[ -n "${ARC_BRANCH}" ] && TITLE+=" | Branch: ${ARC_BRANCH}"
printf "\033[1;30m%*s\n" ${COLUMNS} ""
printf "\033[1;30m%*s\033[A\n" ${COLUMNS} ""
printf "\033[1;34m%*s\033[0m\n" ${COLUMNS} "${BANNER}"
printf "\033[1;34m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
TITLE="Boot:"
[ ${EFI} -eq 1 ] && TITLE+=" [UEFI]" || TITLE+=" [BIOS]"
TITLE+=" [${BUS}]"
printf "\033[1;34m%*s\033[0m\n" $(((${#TITLE} + ${COLUMNS}) / 2)) "${TITLE}"
# Check for Config File
if [ ! -f "${USER_CONFIG_FILE}" ]; then
touch "${USER_CONFIG_FILE}"
fi
initConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
initConfigKey "arc" "{}" "${USER_CONFIG_FILE}"
initConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.dynamic" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
initConfigKey "arc.version" "${ARC_VERSION}" "${USER_CONFIG_FILE}"
initConfigKey "boot" "{}" "${USER_CONFIG_FILE}"
initConfigKey "boot.dsminfo" "true" "${USER_CONFIG_FILE}"
initConfigKey "boot.systeminfo" "true" "${USER_CONFIG_FILE}"
initConfigKey "boot.dsmlogo" "true" "${USER_CONFIG_FILE}"
initConfigKey "bootipwait" "30" "${USER_CONFIG_FILE}"
initConfigKey "device" "{}" "${USER_CONFIG_FILE}"
initConfigKey "directboot" "false" "${USER_CONFIG_FILE}"
initConfigKey "emmcboot" "false" "${USER_CONFIG_FILE}"
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
initConfigKey "kernel" "official" "${USER_CONFIG_FILE}"
initConfigKey "kernelload" "power" "${USER_CONFIG_FILE}"
initConfigKey "kernelpanic" "5" "${USER_CONFIG_FILE}"
initConfigKey "odp" "false" "${USER_CONFIG_FILE}"
initConfigKey "pathash" "" "${USER_CONFIG_FILE}"
initConfigKey "paturl" "" "${USER_CONFIG_FILE}"
initConfigKey "sn" "" "${USER_CONFIG_FILE}"
initConfigKey "cmdline" "{}" "${USER_CONFIG_FILE}"
initConfigKey "keymap" "" "${USER_CONFIG_FILE}"
initConfigKey "layout" "" "${USER_CONFIG_FILE}"
initConfigKey "lkm" "prod" "${USER_CONFIG_FILE}"
initConfigKey "modblacklist" "evbug,cdc_ether" "${USER_CONFIG_FILE}"
initConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
initConfigKey "model" "" "${USER_CONFIG_FILE}"
initConfigKey "modelid" "" "${USER_CONFIG_FILE}"
initConfigKey "network" "{}" "${USER_CONFIG_FILE}"
initConfigKey "platform" "" "${USER_CONFIG_FILE}"
initConfigKey "productver" "" "${USER_CONFIG_FILE}"
initConfigKey "buildnum" "" "${USER_CONFIG_FILE}"
initConfigKey "smallnum" "" "${USER_CONFIG_FILE}"
initConfigKey "ramdisk-hash" "" "${USER_CONFIG_FILE}"
initConfigKey "rd-compressed" "false" "${USER_CONFIG_FILE}"
initConfigKey "satadom" "2" "${USER_CONFIG_FILE}"
initConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}"
initConfigKey "time" "{}" "${USER_CONFIG_FILE}"
initConfigKey "usbmount" "auto" "${USER_CONFIG_FILE}"
initConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
if grep -q "automated_arc" /proc/cmdline; then
writeConfigKey "arc.mode" "automated" "${USER_CONFIG_FILE}"
elif grep -q "update_arc" /proc/cmdline; then
writeConfigKey "arc.mode" "update" "${USER_CONFIG_FILE}"
elif grep -q "force_arc" /proc/cmdline; then
writeConfigKey "arc.mode" "config" "${USER_CONFIG_FILE}"
else
writeConfigKey "arc.mode" "dsm" "${USER_CONFIG_FILE}"
fi
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true
if [ -n "${ARC_BRANCH}" ]; then
writeConfigKey "arc.branch" "${ARC_BRANCH}" "${USER_CONFIG_FILE}"
fi
# Sort network interfaces
if arrayExistItem "sortnetif:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then
_sort_netif "$(readConfigKey "addons.sortnetif" "${USER_CONFIG_FILE}")"
fi
# Read/Write IP/Mac to config
ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
for N in ${ETHX}; do
MACR="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')"
IPR="$(readConfigKey "network.${MACR}" "${USER_CONFIG_FILE}")"
if [ -n "${IPR}" ] && [ "1" = "$(cat /sys/class/net/${N}/carrier 2>/dev/null)" ]; then
IFS='/' read -r -a IPRA <<<"${IPR}"
ip addr flush dev "${N}"
ip addr add "${IPRA[0]}/${IPRA[1]:-"255.255.255.0"}" dev "${N}"
if [ -n "${IPRA[2]}" ]; then
ip route add default via "${IPRA[2]}" dev "${N}"
fi
if [ -n "${IPRA[3]:-${IPRA[2]}}" ]; then
sed -i "/nameserver ${IPRA[3]:-${IPRA[2]}}/d" /etc/resolv.conf
echo "nameserver ${IPRA[3]:-${IPRA[2]}}" >>/etc/resolv.conf
fi
sleep 1
fi
[ "${N::3}" = "eth" ] && ethtool -s "${N}" wol g 2>/dev/null || true
# [ "${N::3}" = "eth" ] && ethtool -K ${N} rxhash off 2>/dev/null || true
initConfigKey "${N}" "${MACR}" "${USER_CONFIG_FILE}"
done
ETHN=$(echo ${ETHX} | wc -w)
writeConfigKey "device.nic" "${ETHN}" "${USER_CONFIG_FILE}"
# No network devices
echo
[ ${ETHN} -le 0 ] && die "No NIC found! - Loader does not work without Network connection."
# Get the VID/PID if we are in USB
VID="0x46f4"
PID="0x0001"
BUSLIST="usb sata sas scsi nvme mmc ide virtio vmbus xen"
if [ "${BUS}" = "usb" ]; then
VID="0x$(udevadm info --query property --name "${LOADER_DISK}" | grep ID_VENDOR_ID | cut -d= -f2)"
PID="0x$(udevadm info --query property --name "${LOADER_DISK}" | grep ID_MODEL_ID | cut -d= -f2)"
elif ! echo "${BUSLIST}" | grep -wq "${BUS}"; then
die "$(printf "The boot disk does not support the current %s, only %s are supported." "${BUS}" "${BUSLIST// /\/}")"
fi
# Inform user and check bus
echo -e "Loader Disk: \033[1;34m${LOADER_DISK}\033[0m"
echo -e "Loader Disk Type: \033[1;34m${BUS}\033[0m"
echo
# Save variables to user config file
writeConfigKey "vid" "${VID}" "${USER_CONFIG_FILE}"
writeConfigKey "pid" "${PID}" "${USER_CONFIG_FILE}"
# Decide if boot automatically
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
if [ "${ARCMODE}" = "config" ]; then
echo -e "\033[1;34mStarting Config Mode...\033[0m"
elif [ "${ARCMODE}" = "automated" ]; then
echo -e "\033[1;34mStarting automated Build Mode...\033[0m"
elif [ "${ARCMODE}" = "update" ]; then
echo -e "\033[1;34mStarting Update Mode...\033[0m"
elif [ "${BUILDDONE}" = "true" ] && [ "${ARCMODE}" = "dsm" ]; then
echo -e "\033[1;34mStarting DSM Mode...\033[0m"
exec boot.sh && exit 0
else
echo -e "\033[1;34mStarting Config Mode...\033[0m"
fi
echo
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=30
echo -e "\033[1;37mDetected ${ETHN} NIC:\033[0m"
IPCON=""
echo
[ ! -f /var/run/dhcpcd/pid ] && /etc/init.d/S41dhcpcd restart >/dev/null 2>&1 || true
sleep 3
for N in ${ETHX}; do
COUNT=0
DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
while true; do
if [ "0" = "$(cat /sys/class/net/${N}/carrier 2>/dev/null)" ]; then
echo -e "\r${DRIVER}: \033[1;37mNOT CONNECTED\033[0m"
break
fi
COUNT=$((COUNT + 1))
IP="$(getIP "${N}")"
if [ -n "${IP}" ]; then
SPEED=$(ethtool ${N} 2>/dev/null | grep "Speed:" | awk '{print $2}')
if [[ "${IP}" =~ ^169\.254\..* ]]; then
echo -e "\r${DRIVER} (${SPEED}): \033[1;37mLINK LOCAL (No DHCP server found.)\033[0m"
else
echo -e "\r${DRIVER} (${SPEED}): \033[1;37m${IP}\033[0m"
[ -z "${IPCON}" ] && IPCON="${IP}"
fi
break
fi
if [ -z "$(cat /sys/class/net/${N}}/carrier 2>/dev/null)" ]; then
echo -e "\r${DRIVER}: \033[1;37mDOWN\033[0m"
break
fi
if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then
echo -e "\r${DRIVER}: \033[1;37mTIMEOUT\033[0m"
break
fi
sleep 1
done
done
echo
mkdir -p "${ADDONS_PATH}"
mkdir -p "${CUSTOM_PATH}"
mkdir -p "${LKMS_PATH}"
mkdir -p "${MODEL_CONFIG_PATH}"
mkdir -p "${MODULES_PATH}"
mkdir -p "${PATCH_PATH}"
mkdir -p "${USER_UP_PATH}"
# Load Arc Overlay
echo -e "\033[1;34mLoading Arc Overlay...\033[0m"
echo
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}:${TTYDPORT}\033[0m to configure Loader."
# Check memory and load Arc
RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null)
if [ ${RAM} -le 3500 ]; then
echo -e "\033[1;31mYou have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of RAM.\033[0m\n\033[1;31mUse arc.sh to proceed. Not recommended!\033[0m"
else
exec arc.sh
fi

Binary file not shown.

View File

@@ -1,259 +0,0 @@
#!/usr/bin/env bash
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
. "${ARC_PATH}/include/addons.sh"
. "${ARC_PATH}/include/modules.sh"
set -o pipefail # Get exit code from process piped
# Sanity check
if [ ! -f "${ORI_RDGZ_FILE}" ]; then
echo "ERROR: ${ORI_RDGZ_FILE} not found!" >"${LOG_FILE}"
exit 1
fi
# Remove old rd.gz patched
rm -f "${MOD_RDGZ_FILE}"
# Unzipping ramdisk
rm -rf "${RAMDISK_PATH}"
mkdir -p "${RAMDISK_PATH}"
(
cd "${RAMDISK_PATH}"
xz -dc <"${ORI_RDGZ_FILE}" | cpio -idm
) >/dev/null 2>&1
# Read Model Data
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
MODELID="$(readConfigKey "modelid" "${USER_CONFIG_FILE}")"
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
LAYOUT="$(readConfigKey "layout" "${USER_CONFIG_FILE}")"
KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
RD_COMPRESSED="$(readConfigKey "rd-compressed" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
BUILDNUM="$(readConfigKey "buildnum" "${USER_CONFIG_FILE}")"
SMALLNUM="$(readConfigKey "smallnum" "${USER_CONFIG_FILE}")"
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
# Read new PAT Info from Config
PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
PAT_HASH="$(readConfigKey "pathash" "${USER_CONFIG_FILE}")"
[ "${PATURL:0:1}" = "#" ] && PATURL=""
[ "${PATSUM:0:1}" = "#" ] && PATSUM=""
# Check if DSM Version changed
. "${RAMDISK_PATH}/etc/VERSION"
if [[ -n "${PRODUCTVER}" && -n "${BUILDNUM}" && -n "${SMALLNUM}" ]] &&
([ "${PRODUCTVER}" != "${majorversion}.${minorversion}" ] || [ "${BUILDNUM}" != "${buildnumber}" ] || [ "${SMALLNUM}" != "${smallfixnumber}" ]); then
OLDVER="${PRODUCTVER}(${BUILDNUM}$([ ${SMALLNUM:-0} -ne 0 ] && echo "u${SMALLNUM}"))"
NEWVER="${majorversion}.${minorversion}(${buildnumber}$([ ${smallfixnumber:-0} -ne 0 ] && echo "u${smallfixnumber}"))"
PAT_URL=""
PAT_HASH=""
fi
PRODUCTVER=${majorversion}.${minorversion}
BUILDNUM=${buildnumber}
SMALLNUM=${smallfixnumber}
writeConfigKey "productver" "${PRODUCTVER}" "${USER_CONFIG_FILE}"
writeConfigKey "buildnum" "${BUILDNUM}" "${USER_CONFIG_FILE}"
writeConfigKey "smallnum" "${SMALLNUM}" "${USER_CONFIG_FILE}"
# Read model data
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
# Sanity check
if [ -z "${PLATFORM}" ] || [ -z "${KVER}" ]; then
echo "ERROR: Configuration for model ${MODEL} and productversion ${PRODUCTVER} not found." >"${LOG_FILE}"
exit 1
fi
declare -A SYNOINFO
declare -A ADDONS
declare -A MODULES
# Read synoinfo and addons from config
while IFS=': ' read -r KEY VALUE; do
[ -n "${KEY}" ] && SYNOINFO["${KEY}"]="${VALUE}"
done < <(readConfigMap "synoinfo" "${USER_CONFIG_FILE}")
while IFS=': ' read -r KEY VALUE; do
[ -n "${KEY}" ] && ADDONS["${KEY}"]="${VALUE}"
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
# Read modules from user config
while IFS=': ' read -r KEY VALUE; do
[ -n "${KEY}" ] && MODULES["${KEY}"]="${VALUE}"
done < <(readConfigMap "modules" "${USER_CONFIG_FILE}")
# Patches (diff -Naru OLDFILE NEWFILE > xxx.patch)
PATCHES=()
PATCHES+=("ramdisk-etc-rc-*.patch")
PATCHES+=("ramdisk-init-script-*.patch")
PATCHES+=("ramdisk-post-init-script-*.patch")
PATCHES+=("ramdisk-disable-root-pwd-*.patch")
PATCHES+=("ramdisk-disable-disabled-ports-*.patch")
for PE in ${PATCHES[@]}; do
RET=1
echo "Patching with ${PE}" >"${LOG_FILE}"
for PF in $(ls ${PATCH_PATH}/${PE} 2>/dev/null); do
echo "Patching with ${PF}" >>"${LOG_FILE}"
(
cd "${RAMDISK_PATH}"
patch -p1 -i "${PF}" >>"${LOG_FILE}" 2>&1
)
RET=$?
[ ${RET} -eq 0 ] && break
done
[ ${RET} -ne 0 ] && exit 1
done
# Add serial number to synoinfo.conf, to help to recovery a installed DSM
echo "Set synoinfo SN" >"${LOG_FILE}"
_set_conf_kv "SN" "${SN}" "${RAMDISK_PATH}/etc/synoinfo.conf" >>"${LOG_FILE}" 2>&1 || exit 1
_set_conf_kv "SN" "${SN}" "${RAMDISK_PATH}/etc.defaults/synoinfo.conf" >>"${LOG_FILE}" 2>&1 || exit 1
for KEY in ${!SYNOINFO[@]}; do
echo "Set synoinfo ${KEY}" >>"${LOG_FILE}"
_set_conf_kv "${KEY}" "${SYNOINFO[${KEY}]}" "${RAMDISK_PATH}/etc/synoinfo.conf" >>"${LOG_FILE}" 2>&1 || exit 1
_set_conf_kv "${KEY}" "${SYNOINFO[${KEY}]}" "${RAMDISK_PATH}/etc.defaults/synoinfo.conf" >>"${LOG_FILE}" 2>&1 || exit 1
done
# Patch /sbin/init.post
grep -v -e '^[\t ]*#' -e '^$' "${PATCH_PATH}/config-manipulators.sh" >"${TMP_PATH}/rp.txt"
sed -e "/@@@CONFIG-MANIPULATORS-TOOLS@@@/ {" -e "r ${TMP_PATH}/rp.txt" -e 'd' -e '}' -i "${RAMDISK_PATH}/sbin/init.post"
rm -f "${TMP_PATH}/rp.txt"
touch "${TMP_PATH}/rp.txt"
echo "_set_conf_kv 'SN' '${SN}' '/tmpRoot/etc/synoinfo.conf'" >>"${TMP_PATH}/rp.txt"
echo "_set_conf_kv 'SN' '${SN}' '/tmpRoot/etc.defaults/synoinfo.conf'" >>"${TMP_PATH}/rp.txt"
for KEY in ${!SYNOINFO[@]}; do
echo "_set_conf_kv '${KEY}' '${SYNOINFO[${KEY}]}' '/tmpRoot/etc/synoinfo.conf'" >>"${TMP_PATH}/rp.txt"
echo "_set_conf_kv '${KEY}' '${SYNOINFO[${KEY}]}' '/tmpRoot/etc.defaults/synoinfo.conf'" >>"${TMP_PATH}/rp.txt"
done
sed -e "/@@@CONFIG-GENERATED@@@/ {" -e "r ${TMP_PATH}/rp.txt" -e 'd' -e '}' -i "${RAMDISK_PATH}/sbin/init.post"
rm -f "${TMP_PATH}/rp.txt"
# Extract Modules to Ramdisk
installModules "${PLATFORM}" "${KVERP}" "${!MODULES[@]}" || exit 1
# Copying fake modprobe
[ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 5 ] && cp -f "${PATCH_PATH}/iosched-trampoline.sh" "${RAMDISK_PATH}/usr/sbin/modprobe"
# Copying LKM to /usr/lib/modules
gzip -dc "${LKMS_PATH}/rp-${PLATFORM}-${KVERP}-${LKM}.ko.gz" >"${RAMDISK_PATH}/usr/lib/modules/rp.ko" 2>"${LOG_FILE}" || exit 1
# Addons
echo "Create addons.sh" >"${LOG_FILE}"
mkdir -p "${RAMDISK_PATH}/addons"
echo "#!/bin/sh" >"${RAMDISK_PATH}/addons/addons.sh"
echo 'echo "addons.sh called with params ${@}"' >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export LOADERLABEL=\"ARC\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export LOADERVERSION=\"${ARC_VERSION}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export LOADERBUILD=\"${ARC_BUILD}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export LOADERBRANCH=\"${ARCBRANCH}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export PLATFORM=\"${PLATFORM}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export PRODUCTVER=\"${PRODUCTVER}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export MODEL=\"${MODEL}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export MODELID=\"${MODELID}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export MLINK=\"${PAT_URL}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export MCHECKSUM=\"${PAT_HASH}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export LAYOUT=\"${LAYOUT}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "export KEYMAP=\"${KEYMAP}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
chmod +x "${RAMDISK_PATH}/addons/addons.sh"
# System Addons
for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "wol" "mountloader"; do
PARAMS=""
if [ "${ADDON}" = "disks" ]; then
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
USBMOUNT="$(readConfigKey "usbmount" "${USER_CONFIG_FILE}")"
PARAMS="${HDDSORT} ${USBMOUNT}"
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
fi
installAddon "${ADDON}" "${PLATFORM}" || exit 1
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
done
# User Addons
for ADDON in ${!ADDONS[@]}; do
PARAMS=${ADDONS[${ADDON}]}
installAddon "${ADDON}" "${PLATFORM}" || echo "Addon ${ADDON} not found"
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
done
# Enable Telnet
echo "inetd" >>"${RAMDISK_PATH}/addons/addons.sh"
echo "Modify files" >"${LOG_FILE}"
# Remove function from scripts
[ "2" = "${PRODUCTVER:0:1}" ] && sed -i 's/function //g' $(find "${RAMDISK_PATH}/addons/" -type f -name "*.sh")
# Build modules dependencies
# ${ARC_PATH}/depmod -a -b ${RAMDISK_PATH} 2>/dev/null
# Copying modulelist
if [ -f "${USER_UP_PATH}/modulelist" ]; then
cp -f "${USER_UP_PATH}/modulelist" "${RAMDISK_PATH}/addons/modulelist"
else
cp -f "${ARC_PATH}/include/modulelist" "${RAMDISK_PATH}/addons/modulelist"
fi
# backup current loader configs
BACKUP_PATH="${RAMDISK_PATH}/usr/arc/backup"
rm -rf "${BACKUP_PATH}"
for F in "${USER_GRUB_CONFIG}" "${USER_CONFIG_FILE}" "${USER_UP_PATH}"; do
if [ -f "${F}" ]; then
FD="$(dirname "${F}")"
mkdir -p "${FD/\/mnt/${BACKUP_PATH}}"
cp -f "${F}" "${FD/\/mnt/${BACKUP_PATH}}"
elif [ -d "${F}" ]; then
SIZE="$(du -sm "${F}" 2>/dev/null | awk '{print $1}')"
if [ ${SIZE:-0} -gt 4 ]; then
echo "Backup of ${F} skipped, size is ${SIZE}MB" >>"${LOG_FILE}"
continue
fi
FD="$(dirname "${F}")"
mkdir -p "${FD/\/mnt/${BACKUP_PATH}}"
cp -rf "${F}" "${FD/\/mnt/${BACKUP_PATH}}"
fi
done
# Network card configuration file
for N in $(seq 0 7); do
echo -e "DEVICE=eth${N}\nBOOTPROTO=dhcp\nONBOOT=yes\nIPV6INIT=dhcp\nIPV6_ACCEPT_RA=1" >"${RAMDISK_PATH}/etc/sysconfig/network-scripts/ifcfg-eth${N}"
done
# SA6400 patches
if [ "${PLATFORM}" = "epyc7002" ]; then
echo -n " - Apply Epyc7002 Fixes"
sed -i 's#/dev/console#/var/log/lrc#g' ${RAMDISK_PATH}/usr/bin/busybox
sed -i '/^echo "START/a \\nmknod -m 0666 /dev/console c 1 3' ${RAMDISK_PATH}/linuxrc.syno
fi
# Broadwellntbap patches
if [ "${PLATFORM}" = "broadwellntbap" ]; then
echo -n " - Apply Broadwellntbap Fixes"
sed -i 's/IsUCOrXA="yes"/XIsUCOrXA="yes"/g; s/IsUCOrXA=yes/XIsUCOrXA=yes/g' ${RAMDISK_PATH}/usr/syno/share/environments.sh
fi
# Call user patch scripts
for F in $(ls -1 ${USER_UP_PATH}/*.sh 2>/dev/null); do
echo "Calling ${F}" >"${LOG_FILE}"
. "${F}" >>"${LOG_FILE}" 2>&1 || exit 1
done
# Reassembly ramdisk
if [ "${RD_COMPRESSED}" = "true" ]; then
(cd "${RAMDISK_PATH}" && find . 2>/dev/null | cpio -o -H newc -R root:root | xz -9 --format=lzma >"${MOD_RDGZ_FILE}") >"${LOG_FILE}" 2>&1 || exit 1
else
(cd "${RAMDISK_PATH}" && find . 2>/dev/null | cpio -o -H newc -R root:root >"${MOD_RDGZ_FILE}") >"${LOG_FILE}" 2>&1 || exit 1
fi
sync
# Clean
rm -rf "${RAMDISK_PATH}"

View File

@@ -1,72 +0,0 @@
#!/usr/bin/env bash
# Based on code and ideas from @jumkey
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Adapted from: scripts/Makefile.lib
# Usage: size_append FILE [FILE2] [FILEn]...
# Output: LE HEX with size of file in bytes (to STDOUT)
file_size_le() {
printf $(
local dec_size=0
for F in "$@"; do dec_size=$((dec_size + $(stat -c "%s" "${F}"))); done
printf "%08x\n" "${dec_size}" | sed 's/\(..\)/\1 /g' | {
read -r ch0 ch1 ch2 ch3
for ch in "${ch3}" "${ch2}" "${ch1}" "${ch0}"; do printf '%s%03o' '\' "$((0x${ch}))"; done
}
)
}
size_le() {
printf $(
printf "%08x\n" "${@}" | sed 's/\(..\)/\1 /g' | {
read -r ch0 ch1 ch2 ch3
for ch in "${ch3}" "${ch2}" "${ch1}" "${ch0}"; do printf '%s%03o' '\' "$((0x${ch}))"; done
}
)
}
VMLINUX_MOD=${1}
ZIMAGE_MOD=${2}
if [ "$(echo "${KVER:-4}" | cut -d'.' -f1)" -lt 5 ]; then
# Kernel version 4.x or 3.x (bromolow)
# zImage_head 16494
# payload(
# vmlinux.bin x
# padding 0xf00000-x
# vmlinux.bin size 4
# ) 0xf00004
# zImage_tail(
# unknown 72
# run_size 4
# unknown 30
# vmlinux.bin size 4
# unknown 114460
# ) 114570
# crc32 4
gzip -dc "${ARC_PATH}/bzImage-template-v4.gz" >"${ZIMAGE_MOD}" || exit 1
dd if="${VMLINUX_MOD}" of="${ZIMAGE_MOD}" bs=16494 seek=1 conv=notrunc || exit 1
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=15745134 seek=1 conv=notrunc || exit 1
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=15745244 seek=1 conv=notrunc || exit 1
RUN_SIZE=$(objdump -h "${VMLINUX_MOD}" | sh "${ARC_PATH}/calc_run_size.sh")
size_le "${RUN_SIZE}" | dd of="${ZIMAGE_MOD}" bs=15745210 seek=1 conv=notrunc || exit 1
size_le "$((16#$(crc32 "${ZIMAGE_MOD}" | awk '{print $1}') ^ 0xFFFFFFFF))" | dd of="${ZIMAGE_MOD}" conv=notrunc oflag=append || exit 1
else
# Kernel version 5.x
gzip -dc "${ARC_PATH}/bzImage-template-v5.gz" >"${ZIMAGE_MOD}" || exit 1
dd if="${VMLINUX_MOD}" of="${ZIMAGE_MOD}" bs=14561 seek=1 conv=notrunc || exit 1
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=34463421 seek=1 conv=notrunc || exit 1
file_size_le "${VMLINUX_MOD}" | dd of="${ZIMAGE_MOD}" bs=34479132 seek=1 conv=notrunc || exit 1
# RUN_SIZE=$(objdump -h "${VMLINUX_MOD}" | sh "${ARC_PATH}/calc_run_size.sh")
# size_le "${RUN_SIZE}" | dd of="${ZIMAGE_MOD}" bs=34626904 seek=1 conv=notrunc || exit 1
size_le "$((16#$(crc32 "${ZIMAGE_MOD}" | awk '{print $1}') ^ 0xFFFFFFFF))" | dd of="${ZIMAGE_MOD}" conv=notrunc oflag=append || exit 1
fi

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env bash
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
set -o pipefail # Get exit code from process piped
# Sanity check
[ -f "${ORI_ZIMAGE_FILE}" ] || (die "${ORI_ZIMAGE_FILE} not found!" | tee -a "${LOG_FILE}")
rm -f "${MOD_ZIMAGE_FILE}"
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
if [ "${KERNEL}" = "custom" ]; then
echo -n " - Using customized Kernel"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
# Extract bzImage
gzip -dc "${CUSTOM_PATH}/bzImage-${PLATFORM}-${KVERP}.gz" >"${MOD_ZIMAGE_FILE}"
else
# Extract vmlinux
"${ARC_PATH}/bzImage-to-vmlinux.sh" "${ORI_ZIMAGE_FILE}" "${TMP_PATH}/vmlinux" >"${LOG_FILE}" 2>&1 || dieLog
# Patch boot params and ramdisk check
"${ARC_PATH}/kpatch" "${TMP_PATH}/vmlinux" "${TMP_PATH}/vmlinux-mod" >"${LOG_FILE}" 2>&1 || dieLog
# rebuild zImage
"${ARC_PATH}/vmlinux-to-bzImage.sh" "${TMP_PATH}/vmlinux-mod" "${MOD_ZIMAGE_FILE}" >"${LOG_FILE}" 2>&1 || dieLog
fi
sync

View File

@@ -1 +0,0 @@
23.1.1

View File

@@ -1,19 +0,0 @@
serial --unit=1 --speed=115200
terminal serial
default 1
timeout 3
verbose
hiddenmenu
fallback 0
title SYNOLOGY_1
root (hd0,0)
kernel /zImage root=/dev/md0
initrd /rd.gz
title SYNOLOGY_2
root (hd0,1)
cksum /grub_cksum.syno
vender /vender show
kernel /zImage root=/dev/md0
initrd /rd.gz

View File

@@ -1,199 +0,0 @@
insmod search
insmod echo
insmod terminal
insmod test
insmod font
insmod loadenv
insmod serial
insmod usb_keyboard
insmod linux
insmod gzio
insmod fat
insmod ext2
insmod ata
insmod btrfs
insmod part_msdos
insmod part_gpt
set default="boot"
set timeout="5"
set timeout_style="menu"
set vesa_mode=1
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ]; then
set default="${next_entry}"
unset next_entry
save_env next_entry
fi
if [ "${vesa_mode}" ]; then
set vesa_mode=${vesa_mode}
fi
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
load_video
if loadfont unicode; then
insmod gfxterm
set gfxmode=auto
set gfxpayload=auto
terminal_output gfxterm
insmod gfxmenu
loadfont ${prefix}/theme/dejavu_bold_14.pf2
loadfont ${prefix}/theme/dejavu_mono_12.pf2
insmod png
set theme=${prefix}/theme/theme.txt
export theme
fi
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
terminal_output --append serial_com0
fi
function set_gfxpayload {
if [ ${vesa_mode} -eq 1 ]; then
set gfxpayload=keep
else
set gfxpayload=text
fi
}
set menu_color_normal=white/black
set menu_color_highlight=white/red
set color_normal=white/black
set ARC_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait nointremap net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=passive nox2apic nomodeset"
search --set=root --label "ARC3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
if [ "${default}" = "direct" ]; then
set timeout="1"
menuentry 'DSM Direct Mode' --id direct {
set_gfxpayload
echo "Loading DSM Kernel..."
linux /zImage-dsm ${dsm_cmdline}
echo "Loading DSM Initramfs..."
initrd /initrd-dsm
echo "Booting..."
echo "Access http://find.synology.com/ to connect the DSM via web."
}
fi
menuentry 'Arc DSM Mode' --id boot {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline}
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
fi
if [ -e /automated ]; then
menuentry 'Arc Automated Mode' --id automated {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} automated_arc
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
fi
menuentry 'Arc Config Mode' --id config {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} force_arc
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
menuentry 'Arc Update Mode' --id update {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} update_arc
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
menuentry 'DSM Recovery Mode' --id recovery {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} recovery
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
menuentry 'DSM Reinstall Mode' --id junior {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} force_junior
echo "Loading Arc Initramfs..."
if [ -e /initrd-user ]; then
initrd /initrd-arc /initrd-user
else
initrd /initrd-arc
fi
echo "Booting..."
}
fi
menuentry 'Enter BIOS Setup' --id bios {
fwsetup
}
menuentry 'Start Memtest86+' --id memtest {
echo "Loading memtest86+..."
linux ${prefix}/memtest
}
if [ ${vesa_mode} = 1 ]; then
menuentry 'Change Vesa to Text Output' --id videomode {
set vesa_mode=0
save_env vesa_mode
configfile ${prefix}/grub.cfg
}
else
menuentry 'Change Text to Vesa Output' --id videomode {
set vesa_mode=1
save_env vesa_mode
reboot
configfile ${prefix}/grub.cfg
}
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

View File

@@ -1,69 +0,0 @@
#!/usr/bin/env bash
set -e
# Clean cached Files
sudo git clean -fdx
. scripts/func.sh "${AUX_TOKEN}"
# Get extractor, LKM, addons and Modules
echo "Get Dependencies"
getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
getCustom "files/p3/custom"
getLKMs "files/p3/lkms"
getTheme "files/p1/boot/grub"
getOffline "files/p3/configs"
mkdir -p "brx"
[ ! -f "../brx/bzImage" ] && getBuildrootx "brx" || copyBuildroot "brx"
# Sbase
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
sudo rm -rf "/tmp/p1"
sudo rm -rf "/tmp/p3"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="13.37.dev"
ARC_BRANCH="next"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "Repack initrd"
if [ -f "brx/bzImage-arc" ] && [ -f "brx/initrd-arc" ]; then
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
else
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
exit 1
fi
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk

View File

@@ -1,68 +0,0 @@
#!/usr/bin/env bash
set -e
# Clean cached Files
sudo git clean -fdx
. scripts/func.sh "${AUX_TOKEN}"
# Get extractor, LKM, addons and Modules
echo "Get Dependencies"
getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
getCustom "files/p3/custom"
getLKMs "files/p3/lkms"
getTheme "files/p1/boot/grub"
getOffline "files/p3/configs"
[ -f "../brs/bzImage" ] && copyBuildroot "brs" || getBuildroots "brs"
# Sbase
IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
sudo rm -rf "/tmp/p1"
sudo rm -rf "/tmp/p3"
mkdir -p "/tmp/p1"
mkdir -p "/tmp/p3"
sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3"
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="13.37.dev"
ARC_BRANCH="stable"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "Repack initrd"
if [ -f "brs/bzImage-arc" ] && [ -f "brs/initrd-arc" ]; then
cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
else
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
exit 1
fi
echo "Copying files"
sudo cp -rf "files/p1/"* "/tmp/p1"
sudo cp -rf "files/p3/"* "/tmp/p3"
sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk

View File

@@ -1,12 +0,0 @@
CFLAGS = -Wall -pedantic
LDFLAGS =
LIBS = /lib/x86_64-linux-gnu/libelf.a /lib/x86_64-linux-gnu/libz.a
all: kpatch
kpatch: main.o
cc $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
rm -f kpatch *.o

Binary file not shown.

View File

@@ -1,492 +0,0 @@
/*
* Copyright (c) 2022 Fabio Belavenuto <belavenuto@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/**
* Converted from php code by Fabio Belavenuto <belavenuto@gmail.com>
*
* 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
*
* Added patch for CMOS_WRITE by Fabio Belavenuto
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <getopt.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdarg.h>
#include <gelf.h>
const int DIR_FWD = 1;
const int DIR_RWD = -1;
/* Variables */
int fd, verbose = 1, read_only = 0;
Elf *elfHandle;
GElf_Ehdr elfExecHeader;
uint64_t orPos[4], fileSize, rodataAddr, rodataOffs, initTextOffs;
unsigned char *fileData;
/*****************************************************************************/
void errorMsg(char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
fprintf(stderr, "\n");
exit(1);
}
/*****************************************************************************/
void errorNum()
{
char str[100] = {0};
perror(str);
exit(2);
}
/*****************************************************************************/
void elfErrno()
{
int err;
if ((err = elf_errno()) != 0)
{
fprintf(stderr, "%s\n", elf_errmsg(err));
exit(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.
uint64_t findPUSH_R12_R15_SEQ(uint64_t start)
{
uint64_t i;
for (i = start; i < fileSize; i++)
{
if (fileData[i] == 0x41 && (fileData[i + 1] >= 0x54 && fileData[i + 1] <= 0x57))
{
return i;
}
}
return -1;
}
/*****************************************************************************/
//[0xF0, 0x80, null, null, null, null, null, 0xXX],
uint64_t findORs(uint64_t start, uint32_t maxCheck)
{
uint64_t i;
int c = 0;
uint8_t lb = 0x01;
for (i = start; i < fileSize; i++)
{
if (fileData[i] == 0xF0 && fileData[i + 1] == 0x80 && fileData[i + 7] == lb)
{
orPos[c++] = i;
i += 7;
lb <<= 1;
}
if (c == 4)
{
break;
}
if (--maxCheck == 0)
{
break;
}
}
return c;
}
/*****************************************************************************/
void patchBootParams()
{
uint64_t addr, pos;
uint64_t newPtrOffset, ptrOffset;
int n;
printf("Patching boot params.\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
while (initTextOffs < fileSize)
{
addr = findPUSH_R12_R15_SEQ(initTextOffs);
if (addr == -1)
break; // no more "functions" left
printf("\rAnalyzing f() candidate @ %lX, PUSH @ %lX", initTextOffs, addr);
// we found something looking like PUSH R12-R15, now find the ORs
n = findORs(initTextOffs, 1024);
if (n != 4)
{
// 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
initTextOffs += 2;
if (n == 0)
{
initTextOffs += 1024;
}
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)
printf("\n[?] Found possible f() @ %lX\n", initTextOffs);
ptrOffset = 0;
int ec = 0;
for (n = 0; n < 4; n++)
{
// 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]
pos = orPos[n];
// how far it "jumps"
newPtrOffset = pos + (fileData[pos + 6] << 24 | fileData[pos + 5] << 16 | fileData[pos + 4] << 8 | fileData[pos + 3]);
if (ptrOffset == 0)
{
ptrOffset = newPtrOffset;
++ec;
}
else if (ptrOffset == newPtrOffset)
{
++ec;
}
printf("\t[+] Found LOCK-OR#%d sequence @ %lX => %02X %02X %02X %02X %02X %02X %02X %02X [RIP+%lX]\n",
n, pos, fileData[pos], fileData[pos + 1], fileData[pos + 2], fileData[pos + 3], fileData[pos + 4],
fileData[pos + 5], fileData[pos + 6], fileData[pos + 7], newPtrOffset);
}
if (ec != 4)
{
printf("\t[-] LOCK-OR PTR offset mismatch - %d/4 matched\n", ec);
// 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
initTextOffs = orPos[3];
continue;
}
printf("\t[+] All %d LOCK-OR PTR offsets equal - match found!\n", ec);
break;
}
if (addr == -1)
{
errorMsg("\nFailed to find matching sequences\n");
}
else
{
// Patch offsets
for (n = 0; n < 4; n++)
{
// The offset will point at LOCK(), we need to change the OR (0x80 0x0d) to AND (0x80 0x25) so the two bytes after
pos = orPos[n] + 2;
printf("Patching OR to AND @ %lX\n", pos);
fileData[pos] = 0x25;
}
}
}
/*****************************************************************************/
uint32_t changeEndian(uint32_t num)
{
return ((num >> 24) & 0xff) | // move byte 3 to byte 0
((num << 8) & 0xff0000) | // move byte 1 to byte 2
((num >> 8) & 0xff00) | // move byte 2 to byte 1
((num << 24) & 0xff000000); // move byte 0 to byte 3
}
/*****************************************************************************/
uint64_t findSeq(const char *seq, int len, uint32_t pos, int dir, uint64_t max)
{
uint64_t i = pos;
do
{
if (memcmp((const char *)fileData + i, seq, len) == 0)
{
return i;
}
i += dir;
--max;
} while (i > 0 && i < fileSize && max > 0);
return -1;
}
/*****************************************************************************/
void patchRamdiskCheck()
{
uint64_t pos, errPrintAddr;
uint64_t printkPos, testPos, jzPos;
const char str[] = "3ramdisk corrupt";
printf("Patching ramdisk check.\n");
for (pos = rodataOffs; pos < fileSize; pos++)
{
if (memcmp(str, (const char *)(fileData + pos), 16) == 0)
{
pos -= rodataOffs;
break;
}
}
errPrintAddr = rodataAddr + pos - 1;
printf("LE arg addr: %08lX\n", errPrintAddr);
printkPos = findSeq((const char *)&errPrintAddr, 4, 0, DIR_FWD, -1);
if (printkPos == -1)
{
errorMsg("printk pos not found!\n");
}
// double check if it's a MOV reg,VAL (where reg is EAX/ECX/EDX/EBX/ESP/EBP/ESI/EDI)
printkPos -= 3;
if (memcmp((const char *)fileData + printkPos, "\x48\xc7", 2) != 0)
{
errorMsg("Expected MOV=>reg before printk error, got %02X %02X\n", fileData[printkPos], fileData[printkPos + 1]);
}
if (fileData[printkPos + 2] < 0xC0 || fileData[printkPos + 2] > 0xC7)
{
errorMsg("Expected MOV w/reg operand [C0-C7], got %02X\n", fileData[printkPos + 2]);
}
printf("Found printk MOV @ %08lX\n", printkPos);
// now we should seek a reasonable amount (say, up to 32 bytes) for a sequence of CALL x => TEST EAX,EAX => JZ
testPos = findSeq("\x85\xc0", 2, printkPos, DIR_RWD, 32);
if (testPos == -1)
{
errorMsg("Failed to find TEST eax,eax\n");
}
printf("Found TEST eax,eax @ %08lX\n", testPos);
jzPos = testPos + 2;
if (fileData[jzPos] != 0x74)
{
errorMsg("Failed to find JZ\n");
}
printf("OK - patching %02X%02X (JZ) to %02X%02X (JMP) @ %08lX\n",
fileData[jzPos], fileData[jzPos + 1], 0xEB, fileData[jzPos + 1], jzPos);
fileData[jzPos] = 0xEB;
}
/*****************************************************************************/
void patchCmosWrite()
{
uint64_t pos, errPrintAddr;
uint64_t pr_errPos, testPos, callPos;
const char str[] = "3smpboot: %s: this boot have memory training";
printf("Patching call to rtc_cmos_write.\n");
for (pos = rodataOffs; pos < fileSize; pos++)
{
if (memcmp(str, (const char *)(fileData + pos), 16) == 0)
{
pos -= rodataOffs;
break;
}
}
errPrintAddr = rodataAddr + pos - 1;
printf("LE arg addr: %08lX\n", errPrintAddr);
pr_errPos = findSeq((const char *)&errPrintAddr, 4, 0, DIR_FWD, -1);
if (pr_errPos == -1)
{
printf("pr_err pos not found - ignoring.\n"); // Some kernels do not have the call, exit without error
return;
}
// double check if it's a MOV reg,VAL (where reg is EAX/ECX/EDX/EBX/ESP/EBP/ESI/EDI)
pr_errPos -= 3;
if (memcmp((const char *)fileData + pr_errPos, "\x48\xc7", 2) != 0)
{
errorMsg("Expected MOV=>reg before pr_err error, got %02X %02X\n", fileData[pr_errPos], fileData[pr_errPos + 1]);
}
if (fileData[pr_errPos + 2] < 0xC0 || fileData[pr_errPos + 2] > 0xC7)
{
errorMsg("Expected MOV w/reg operand [C0-C7], got %02X\n", fileData[pr_errPos + 2]);
}
printf("Found pr_err MOV @ %08lX\n", pr_errPos);
// now we should seek a reasonable amount (say, up to 64 bytes) for a sequence of
// MOV ESI, 0x48 => MOV EDI, 0xFF => MOV EBX, EAX
testPos = findSeq("\xBE\x48\x00\x00\x00\xBF\xFF\x00\x00\x00\x89\xC3", 12, pr_errPos, DIR_RWD, 64);
if (testPos == -1)
{
printf("Failed to find MOV ESI, 0x48 => MOV EDI, 0xFF => MOV EBX, EAX\n");
return;
}
printf("Found MOV ESI, 0x48 => MOV EDI, 0xFF => MOV EBX, EAX @ %08lX\n", testPos);
callPos = testPos + 12;
if (fileData[callPos] != 0xE8)
{
errorMsg("Failed to find CALL\n");
}
printf("OK - patching %02X (CALL) to 0x90.. (NOPs) @ %08lX\n",
fileData[callPos], callPos);
for (uint64_t i = 0; i < 5; i++)
fileData[callPos + i] = 0x90;
}
/*****************************************************************************/
int main(int argc, char *argv[])
{
struct stat fileInf;
Elf_Scn *section;
GElf_Shdr sectionHeader;
char *sectionName;
char *fileIn = NULL, *fileOut = NULL;
int onlyBoot = 0, onlyRD = 0, onlyCMOS = 0, c;
if (argc < 3)
{
errorMsg("Use: kpatch (option) <vmlinux> <output>\nOptions:\n -b Only bootparams\n -r Only ramdisk\n -c Only CMOS");
}
c = 1;
while (c < argc)
{
if (strcmp(argv[c], "-b") == 0)
{
onlyBoot = 1;
}
else if (strcmp(argv[c], "-r") == 0)
{
onlyRD = 1;
}
else if (strcmp(argv[c], "-c") == 0)
{
onlyCMOS = 1;
}
else if (fileIn == NULL)
{
fileIn = argv[c];
}
else
{
fileOut = argv[c];
break;
}
++c;
}
if (NULL == fileIn)
{
errorMsg("Please give a input filename");
}
if (NULL == fileOut)
{
errorMsg("Please give a output filename");
}
if (elf_version(EV_CURRENT) == EV_NONE)
elfErrno();
if ((fd = open(fileIn, O_RDONLY)) == -1)
errorNum();
if ((elfHandle = elf_begin(fd, ELF_C_READ, NULL)) == NULL)
elfErrno();
if (gelf_getehdr(elfHandle, &elfExecHeader) == NULL)
elfErrno();
switch (elf_kind(elfHandle))
{
case ELF_K_NUM:
case ELF_K_NONE:
errorMsg("file type unknown\n");
break;
case ELF_K_COFF:
errorMsg("COFF binaries not supported\n");
break;
case ELF_K_AR:
errorMsg("AR archives not supported\n");
break;
case ELF_K_ELF:
break;
}
section = NULL;
while ((section = elf_nextscn(elfHandle, section)) != NULL)
{
if (gelf_getshdr(section, &sectionHeader) != &sectionHeader)
elfErrno();
if ((sectionName = elf_strptr(elfHandle, elfExecHeader.e_shstrndx, sectionHeader.sh_name)) == NULL)
elfErrno();
if (strcmp(sectionName, ".init.text") == 0)
{
initTextOffs = sectionHeader.sh_offset;
}
else if (strcmp(sectionName, ".rodata") == 0)
{
rodataAddr = sectionHeader.sh_addr & 0xFFFFFFFF;
rodataOffs = sectionHeader.sh_offset;
}
}
elfErrno(); /* If there isn't elf_errno set, nothing will happend. */
elf_end(elfHandle);
if (fstat(fd, &fileInf) == -1)
errorNum();
fileSize = fileInf.st_size;
fileData = malloc(fileSize);
if (fileSize != read(fd, fileData, fileSize))
{
errorNum();
}
close(fd);
printf("Found .init.text offset @ %lX\n", initTextOffs);
printf("Found .rodata address @ %lX\n", rodataAddr);
printf("Found .rodata offset @ %lX\n", rodataOffs);
if (onlyBoot == 0 && onlyCMOS == 0 && onlyRD == 0)
{
patchBootParams();
patchRamdiskCheck();
patchCmosWrite();
}
else
{
if (onlyBoot == 1)
{
patchBootParams();
}
if (onlyRD == 1)
{
patchRamdiskCheck();
}
if (onlyCMOS == 1)
{
patchCmosWrite();
}
}
if ((fd = open(fileOut, O_WRONLY | O_CREAT, 0644)) == -1)
{
errorNum();
}
if (fileSize != write(fd, fileData, fileSize))
{
errorNum();
}
close(fd);
printf("Finish!\n");
return 0;
}

View File

@@ -1,423 +0,0 @@
#!/usr/bin/env bash
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
[ -n "${1}" ] && export TOKEN="${1}"
# Get latest LKMs
# $1 path
function getLKMs() {
echo "Getting LKMs begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/rp-lkms.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s "https://api.github.com/repos/AuxXxilium/arc-lkm/releases/latest" | grep -oP '"tag_name": "\K(.*)(?=")')"
export LKMTAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-lkm/releases/download/${TAG}/rp-lkms.zip" -o "${CACHE_FILE}"; then
# Unzip LKMs
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting LKMs end - ${TAG}"
else
echo "Failed to get LKMs"
exit 1
fi
}
# Get latest Addons
# $1 path
function getAddons() {
echo "Getting Addons begin"
local DEST_PATH="${1}"
local CACHE_DIR="/tmp/addons"
local CACHE_FILE="/tmp/addons.zip"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-addons/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export ADDONTAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-addons/releases/download/${TAG}/addons-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Addons
rm -rf "${CACHE_DIR}"
mkdir -p "${CACHE_DIR}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${CACHE_DIR}"
echo "Installing Addons to ${DEST_PATH}"
[ -f /tmp/addons/VERSION ] && cp -f /tmp/addons/VERSION ${DEST_PATH}/
for PKG in $(ls ${CACHE_DIR}/*.addon); do
ADDON=$(basename "${PKG}" .addon)
mkdir -p "${DEST_PATH}/${ADDON}"
echo "Extracting ${PKG} to ${DEST_PATH}/${ADDON}"
tar -xaf "${PKG}" -C "${DEST_PATH}/${ADDON}"
done
rm -f "${CACHE_FILE}"
echo "Getting Addons end - ${TAG}"
else
echo "Failed to get Addons"
exit 1
fi
}
# Get latest Modules
# $1 path
function getModules() {
echo "Getting Modules begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/modules.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-modules/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export MODULETAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-modules/releases/download/${TAG}/modules-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Modules
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
echo "Getting Modules end - ${TAG}"
else
echo "Failed to get Modules"
exit 1
fi
}
# Get latest Configs
# $1 path
function getConfigs() {
echo "Getting Configs begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/configs.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export CONFIGTAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Configs
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting Configs end - ${TAG}"
else
echo "Failed to get Configs"
exit 1
fi
}
# Get latest Patches
# $1 path
function getPatches() {
echo "Getting Patches begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/patches.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-patches/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export PATCHTAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-patches/releases/download/${TAG}/patches-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Patches
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting Patches end - ${TAG}"
else
echo "Failed to get Patches"
exit 1
fi
}
# Get latest Custom
# $1 path
function getCustom() {
echo "Getting Custom begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/custom.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-custom/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export CUSTOMTAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-custom/releases/download/${TAG}/custom-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Custom
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting Custom end - ${TAG}"
else
echo "Failed to get Custom"
exit 1
fi
}
# Get latest Theme
# $1 path
function getTheme() {
echo "Getting Theme begin"
local DEST_PATH="${1}"
local CACHE_FILE="/tmp/theme.zip"
rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-theme/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export THEMETAG="${TAG}"
if curl -skL "https://github.com/AuxXxilium/arc-theme/releases/download/${TAG}/arc-theme-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip Theme
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting Theme end - ${TAG}"
else
echo "Failed to get Theme"
exit 1
fi
}
# Get latest Buildroot-X
# $1 path
function getBuildrootx() {
echo "Getting Buildroot-X begin"
local DEST_PATH="${1}"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRXTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
rm -f "${DEST_PATH}/bzImage-arc"
rm -f "${DEST_PATH}/initrd-arc"
while read -r ID NAME; do
if [ "${NAME}" = "buildroot-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases/assets/${ID}" -o "${DEST_PATH}/brx.zip"
echo "Buildroot-X: ${TAG}"
unzip -o "${DEST_PATH}/brx.zip" -d "${DEST_PATH}"
mv -f "${DEST_PATH}/bzImage" "${DEST_PATH}/bzImage-arc"
mv -f "${DEST_PATH}/rootfs.cpio.zst" "${DEST_PATH}/initrd-arc"
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
fi
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Buildroot-S
# $1 path
function getBuildroots() {
echo "Getting Buildroot-S begin"
local DEST_PATH="${1}"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRSTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
rm -f "${DEST_PATH}/bzImage-arc"
rm -f "${DEST_PATH}/initrd-arc"
while read -r ID NAME; do
if [ "${NAME}" = "buildroot-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases/assets/${ID}" -o "${DEST_PATH}/brs.zip"
echo "Buildroot-S: ${TAG}"
unzip -o "${DEST_PATH}/brs.zip" -d "${DEST_PATH}"
mv -f "${DEST_PATH}/bzImage" "${DEST_PATH}/bzImage-arc"
mv -f "${DEST_PATH}/rootfs.cpio.zst" "${DEST_PATH}/initrd-arc"
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
fi
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Offline
# $1 path
function getOffline() {
echo "Getting Offline begin"
local DEST_PATH="${1}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
rm -f "${DEST_PATH}/data.yml"
if curl -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/refs/heads/main/data.yml" -o "${DEST_PATH}/data.yml"; then
echo "Getting Offline end"
else
echo "Failed to get Offline"
exit 1
fi
}
# repack initrd
# $1 initrd file
# $2 plugin path
# $3 output file
function repackInitrd() {
local INITRD_FILE="${1}"
local PLUGIN_PATH="${2}"
local OUTPUT_PATH="${3:-${INITRD_FILE}}"
[ -z "${INITRD_FILE}" ] || [ ! -f "${INITRD_FILE}" ] && exit 1
[ -z "${PLUGIN_PATH}" ] || [ ! -d "${PLUGIN_PATH}" ] && exit 1
INITRD_FILE="$(readlink -f "${INITRD_FILE}")"
PLUGIN_PATH="$(readlink -f "${PLUGIN_PATH}")"
OUTPUT_PATH="$(readlink -f "${OUTPUT_PATH}")"
local RDXZ_PATH="rdxz_tmp"
mkdir -p "${RDXZ_PATH}"
local INITRD_FORMAT=$(file -b --mime-type "${INITRD_FILE}")
case "${INITRD_FORMAT}" in
*'x-cpio'*) (cd "${RDXZ_PATH}" && sudo cpio -idm <"${INITRD_FILE}") >/dev/null 2>&1 ;;
*'x-xz'*) (cd "${RDXZ_PATH}" && xz -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*'x-lz4'*) (cd "${RDXZ_PATH}" && lz4 -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*'x-lzma'*) (cd "${RDXZ_PATH}" && lzma -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*'x-bzip2'*) (cd "${RDXZ_PATH}" && bzip2 -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*'gzip'*) (cd "${RDXZ_PATH}" && gzip -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*'zstd'*) (cd "${RDXZ_PATH}" && zstd -dc "${INITRD_FILE}" | sudo cpio -idm) >/dev/null 2>&1 ;;
*) ;;
esac
sudo cp -rf "${PLUGIN_PATH}/"* "${RDXZ_PATH}/"
[ -f "${OUTPUT_PATH}" ] && rm -rf "${OUTPUT_PATH}"
case "${INITRD_FORMAT}" in
*'x-cpio'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'x-xz'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | xz -9 -C crc32 -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'x-lz4'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | lz4 -9 -l -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'x-lzma'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | lzma -9 -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'x-bzip2'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | bzip2 -9 -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'gzip'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | gzip -9 -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*'zstd'*) (cd "${RDXZ_PATH}" && sudo find . 2>/dev/null | sudo cpio -o -H newc -R root:root | zstd -19 -T0 -f -c - >"${OUTPUT_PATH}") >/dev/null 2>&1 ;;
*) ;;
esac
sudo rm -rf "${RDXZ_PATH}"
}
# resizeimg
# $1 input file
# $2 changsize MB eg: +50M -50M
# $3 output file
function resizeImg() {
INPUT_FILE="${1}"
CHANGE_SIZE="${2}"
OUTPUT_FILE="${3:-${INPUT_FILE}}"
[[ -z "${INPUT_FILE}" || ! -f "${INPUT_FILE}" ]] && exit 1
[ -z "${CHANGE_SIZE}" ] && exit 1
INPUT_FILE="$(readlink -f "${INPUT_FILE}")"
OUTPUT_FILE="$(readlink -f "${OUTPUT_FILE}")"
SIZE=$(($(du -m "${INPUT_FILE}" | awk '{print $1}')$(echo "${CHANGE_SIZE}" | sed 's/M//g; s/b//g')))
[[ -z "${SIZE}" || "${SIZE}" -lt 0 ]] && exit 1
if [ ! "${INPUT_FILE}" = "${OUTPUT_FILE}" ]; then
sudo cp -f "${INPUT_FILE}" "${OUTPUT_FILE}"
fi
sudo truncate -s ${SIZE}M "${OUTPUT_FILE}"
echo -e "d\n\nn\n\n\n\n\nn\nw" | sudo fdisk "${OUTPUT_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P ${LOOPX} "${OUTPUT_FILE}"
sudo e2fsck -fp $(ls ${LOOPX}* | sort -n | tail -1)
sudo resize2fs $(ls ${LOOPX}* | sort -n | tail -1)
sudo losetup -d ${LOOPX}
}
# convertova
# $1 bootloader file
# $2 ova file
function convertova() {
BLIMAGE=${1}
OVAPATH=${2}
BLIMAGE="$(readlink -f "${BLIMAGE}")"
OVAPATH="$(readlink -f "${OVAPATH}")"
VMNAME="$(basename "${OVAPATH}" .ova)"
# Download and install ovftool if it doesn't exist
if [ ! -x ovftool/ovftool ]; then
rm -rf ovftool ovftool.zip
curl -skL https://github.com/rgl/ovftool-binaries/raw/main/archive/VMware-ovftool-4.6.0-21452615-lin.x86_64.zip -o ovftool.zip
if [ $? -ne 0 ]; then
echo "Failed to download ovftool"
exit 1
fi
unzip ovftool.zip -d . >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to extract ovftool"
exit 1
fi
chmod +x ovftool/ovftool
fi
if ! command -v qemu-img &>/dev/null; then
sudo apt install -y qemu-utils
fi
# Convert raw image to VMDK
rm -rf "OVA_${VMNAME}"
mkdir -p "OVA_${VMNAME}"
qemu-img convert -O vmdk -o 'adapter_type=lsilogic,subformat=streamOptimized,compat6' "${BLIMAGE}" "OVA_${VMNAME}/${VMNAME}-disk1.vmdk"
qemu-img create -f vmdk "OVA_${VMNAME}/${VMNAME}-disk2.vmdk" "32G"
# Create VM configuration
cat <<_EOF_ >"OVA_${VMNAME}/${VMNAME}.vmx"
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "21"
displayName = "${VMNAME}"
annotation = "https://github.com/AuxXxilium/arc"
guestOS = "ubuntu-64"
firmware = "efi"
mks.enable3d = "TRUE"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
hpet0.present = "TRUE"
nvram = "${VMNAME}.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
tools.syncTime = "FALSE"
sound.autoDetect = "TRUE"
sound.fileName = "-1"
sound.present = "TRUE"
numvcpus = "2"
cpuid.coresPerSocket = "1"
vcpu.hotadd = "TRUE"
memsize = "4096"
mem.hotadd = "TRUE"
usb.present = "TRUE"
ehci.present = "TRUE"
usb_xhci.present = "TRUE"
svga.graphicsMemoryKB = "8388608"
usb.vbluetooth.startConnected = "TRUE"
extendedConfigFile = "${VMNAME}.vmxf"
floppy0.present = "FALSE"
ethernet0.addressType = "generated"
ethernet0.virtualDev = "vmxnet3"
ethernet0.connectionType = "nat"
ethernet0.allowguestconnectioncontrol = "true"
ethernet0.present = "TRUE"
serial0.fileType = "file"
serial0.fileName = "serial0.log"
serial0.present = "TRUE"
sata0.present = "TRUE"
sata0:0.fileName = "${VMNAME}-disk1.vmdk"
sata0:0.present = "TRUE"
sata0:1.fileName = "${VMNAME}-disk2.vmdk"
sata0:1.present = "TRUE"
_EOF_
rm -f "${OVAPATH}"
ovftool/ovftool "OVA_${VMNAME}/${VMNAME}.vmx" "${OVAPATH}"
rm -rf "OVA_${VMNAME}"
}
# copy buildroot
function copyBuildroot() {
DEST_PATH="${1}"
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
cp -f "../${DEST_PATH}/bzImage" "${DEST_PATH}/bzImage-arc"
cp -f "../${DEST_PATH}/rootfs.cpio.zst" "${DEST_PATH}/initrd-arc"
}

622
scripts/functions.py Normal file → Executable file
View File

@@ -1,373 +1,251 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
import os, click
WORK_PATH = os.path.abspath(os.path.dirname(__file__))
@click.group()
def cli():
"""
The CLI is a commands to Arc.
"""
pass
def mutually_exclusive_options(ctx, param, value):
other_option = "file" if param.name == "data" else "data"
if value is not None and ctx.params.get(other_option) is not None:
raise click.UsageError(f"Illegal usage: `{param.name}` is mutually exclusive with `{other_option}`.")
return value
def validate_required_param(ctx, param, value):
if not value and "file" not in ctx.params and "data" not in ctx.params:
raise click.MissingParameter(param_decls=[param.name])
return value
def __fullversion(ver):
out = ver
arr = ver.split('-')
if len(arr) > 0:
a = arr[0].split('.')[0] if len(arr[0].split('.')) > 0 else '0'
b = arr[0].split('.')[1] if len(arr[0].split('.')) > 1 else '0'
c = arr[0].split('.')[2] if len(arr[0].split('.')) > 2 else '0'
d = arr[1] if len(arr) > 1 else '00000'
e = arr[2] if len(arr) > 2 else '0'
out = '{}.{}.{}-{}-{}'.format(a,b,c,d,e)
return out
@cli.command()
@click.option("-d", "--data", type=str, callback=mutually_exclusive_options, is_eager=True, help="The data of QRCode.")
@click.option("-f", "--file", type=str, callback=mutually_exclusive_options, is_eager=True, help="The file of QRCode.")
@click.option("--validate", is_flag=True, callback=validate_required_param, expose_value=False, is_eager=True)
@click.option("-l", "--location", type=click.IntRange(0, 7), required=True, help="The location of QRCode. (range 0<=x<=7)")
@click.option("-o", "--output", type=str, required=True, help="The output file of QRCode.")
def makeqr(data, file, location, output):
"""
Generate a QRCode.
"""
try:
import fcntl, struct
import qrcode
from PIL import Image
FBIOGET_VSCREENINFO = 0x4600
FBIOPUT_VSCREENINFO = 0x4601
FBIOGET_FSCREENINFO = 0x4602
FBDEV = "/dev/fb0"
if data is not None:
qr = qrcode.QRCode(version=1, box_size=10, error_correction=qrcode.constants.ERROR_CORRECT_H, border=4,)
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image(fill_color="grey", back_color="black")
img = img.convert("RGBA")
pixels = img.load()
for i in range(img.size[0]):
for j in range(img.size[1]):
if pixels[i, j] == (255, 255, 255, 255):
pixels[i, j] = (255, 255, 255, 0)
if os.path.exists(os.path.join(WORK_PATH, "logo.png")):
icon = Image.open(os.path.join(WORK_PATH, "logo.png"))
icon = icon.convert("RGBA")
img.paste(icon.resize((int(img.size[0] / 5), int(img.size[1] / 5))), (int((img.size[0] - int(img.size[0] / 5)) / 2), int((img.size[1] - int(img.size[1] / 5)) / 2),),)
if file is not None:
img = Image.open(file)
# img = img.convert("RGBA")
# pixels = img.load()
# for i in range(img.size[0]):
# for j in range(img.size[1]):
# if pixels[i, j] == (255, 255, 255, 255):
# pixels[i, j] = (255, 255, 255, 0)
(xres, yres) = (1920, 1080)
with open(FBDEV, "rb") as fb:
vi = fcntl.ioctl(fb, FBIOGET_VSCREENINFO, bytes(160))
res = struct.unpack("I" * 40, vi)
if res[0] != 0 and res[1] != 0:
(xres, yres) = (res[0], res[1])
xqr, yqr = (int(xres / 8), int(xres / 8))
img = img.resize((xqr, yqr))
alpha = Image.new("RGBA", (xres, yres), (0, 0, 0, 0))
if int(location) not in range(0, 8):
location = 0
loc = (img.size[0] * int(location), alpha.size[1] - img.size[1])
alpha.paste(img, loc)
alpha.save(output)
except:
pass
@cli.command()
@click.option("-p", "--platforms", type=str, help="The platforms of Syno.")
def getmodels(platforms=None):
"""
Get Syno Models.
"""
import json, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=0.5, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
if platforms is not None and platforms != "":
PS = platforms.lower().replace(",", " ").split()
else:
PS = []
models = []
try:
req = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
for I in data["channel"]["item"]:
if not I["title"].startswith("DSM"):
continue
for J in I["model"]:
arch = J["mUnique"].split("_")[1]
name = J["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if len(PS) > 0 and arch.lower() not in PS:
continue
if any(name == B["name"] for B in models):
continue
models.append({"name": name, "arch": arch})
models = sorted(models, key=lambda k: (k["arch"], k["name"]))
except:
pass
models.sort(key=lambda x: (x["arch"], x["name"]))
print(json.dumps(models, indent=4))
@cli.command()
@click.option("-p", "--platforms", type=str, help="The platforms of Syno.")
def getmodelsbykb(platforms=None):
"""
Get Syno Models.
"""
import json, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=0.5, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
if platforms is not None and platforms != "":
PS = platforms.lower().replace(",", " ").split()
else:
PS = []
models = []
try:
import re
from bs4 import BeautifulSoup
url="https://kb.synology.com/en-us/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have"
#url = "https://kb.synology.cn/zh-cn/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have"
req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
bs = BeautifulSoup(req.text, "html.parser")
p = re.compile(r"data: (.*?),$", re.MULTILINE | re.DOTALL)
data = json.loads(p.search(bs.find("script", string=p).prettify()).group(1))
model = "(.*?)" # (.*?): all, FS6400: one
p = re.compile(r"<td>{}<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td>".format(model), re.MULTILINE | re.DOTALL,)
it = p.finditer(data["preload"]["content"].replace("\n", "").replace("\t", ""))
for i in it:
d = i.groups()
if len(d) == 6:
d = model + d
if len(PS) > 0 and d[5].lower() not in PS:
continue
models.append({"name": d[0].split("<br")[0], "arch": d[5].lower()})
except:
pass
models.sort(key=lambda x: (x["arch"], x["name"]))
print(json.dumps(models, indent=4))
@cli.command()
@click.option("-m", "--model", type=str, required=True, help="The model of Syno.")
@click.option("-v", "--version", type=str, required=True, help="The version of Syno.")
def getpats4mv(model, version):
import json, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=0.5, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
pats = {}
try:
urlInfo = "https://www.synology.com/api/support/findDownloadInfo?lang=en-us"
urlSteps = "https://www.synology.com/api/support/findUpgradeSteps?"
#urlInfo = "https://www.synology.cn/api/support/findDownloadInfo?lang=zh-cn"
#urlSteps = "https://www.synology.cn/api/support/findUpgradeSteps?"
major = "&major={}".format(version.split('.')[0]) if len(version.split('.')) > 0 else ""
minor = "&minor={}".format(version.split('.')[1]) if len(version.split('.')) > 1 else ""
req = session.get("{}&product={}{}{}".format(urlInfo, model.replace("+", "%2B"), major, minor), timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
build_ver = data['info']['system']['detail'][0]['items'][0]['build_ver']
build_num = data['info']['system']['detail'][0]['items'][0]['build_num']
buildnano = data['info']['system']['detail'][0]['items'][0]['nano']
V=__fullversion("{}-{}-{}".format(build_ver, build_num, buildnano))
if not V in pats:
pats[V]={}
pats[V]['url'] = data['info']['system']['detail'][0]['items'][0]['files'][0]['url'].split('?')[0]
pats[V]['sum'] = data['info']['system']['detail'][0]['items'][0]['files'][0]['checksum']
from_ver=0
for I in data['info']['pubVers']:
if from_ver == 0 or I['build'] < from_ver: from_ver = I['build']
for I in data['info']['productVers']:
if not I['version'].startswith(version): continue
if major == "" or minor == "":
majorTmp = "&major={}".format(I['version'].split('.')[0]) if len(I['version'].split('.')) > 0 else ""
minorTmp = "&minor={}".format(I['version'].split('.')[1]) if len(I['version'].split('.')) > 1 else ""
reqTmp = session.get("{}&product={}{}{}".format(urlInfo, model.replace("+", "%2B"), majorTmp, minorTmp), timeout=10, verify=False)
reqTmp.encoding = "utf-8"
dataTmp = json.loads(reqTmp.text)
build_ver = dataTmp['info']['system']['detail'][0]['items'][0]['build_ver']
build_num = dataTmp['info']['system']['detail'][0]['items'][0]['build_num']
buildnano = dataTmp['info']['system']['detail'][0]['items'][0]['nano']
V=__fullversion("{}-{}-{}".format(build_ver, build_num, buildnano))
if not V in pats:
pats[V]={}
pats[V]['url'] = dataTmp['info']['system']['detail'][0]['items'][0]['files'][0]['url'].split('?')[0]
pats[V]['sum'] = dataTmp['info']['system']['detail'][0]['items'][0]['files'][0]['checksum']
for J in I['versions']:
to_ver=J['build']
reqSteps = session.get("{}&product={}&from_ver={}&to_ver={}".format(urlSteps, model.replace("+", "%2B"), from_ver, to_ver), timeout=10, verify=False)
if reqSteps.status_code != 200: continue
reqSteps.encoding = "utf-8"
dataSteps = json.loads(reqSteps.text)
for S in dataSteps['upgrade_steps']:
if not 'full_patch' in S or S['full_patch'] is False: continue
if not 'build_ver' in S or not S['build_ver'].startswith(version): continue
V=__fullversion("{}-{}-{}".format(S['build_ver'], S['build_num'], S['nano']))
if not V in pats:
pats[V] = {}
pats[V]['url'] = S['files'][0]['url'].split('?')[0]
pats[V]['sum'] = S['files'][0]['checksum']
except:
pass
pats = {k: pats[k] for k in sorted(pats.keys(), reverse=True)}
print(json.dumps(pats, indent=4))
@cli.command()
@click.option("-p", "--models", type=str, help="The models of Syno.")
def getpats(models=None):
import json, requests, urllib3, re
from bs4 import BeautifulSoup
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=0.5, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
if models is not None and models != "":
MS = models.lower().replace(",", " ").split()
else:
MS = []
pats = {}
try:
req = session.get('https://archive.synology.com/download/Os/DSM', timeout=10, verify=False)
req.encoding = 'utf-8'
bs=BeautifulSoup(req.text, 'html.parser')
p = re.compile(r"(.*?)-(.*?)", re.MULTILINE | re.DOTALL)
l = bs.find_all('a', string=p)
for i in l:
ver = i.attrs['href'].split('/')[-1]
if not ver.startswith('7'): continue
req = session.get('https://archive.synology.com{}'.format(i.attrs['href']), timeout=10, verify=False)
req.encoding = 'utf-8'
bs=BeautifulSoup(req.text, 'html.parser')
p = re.compile(r"^(.*?)_(.*?)_(.*?).pat$", re.MULTILINE | re.DOTALL)
data = bs.find_all('a', string=p)
for item in data:
p = re.compile(r"DSM_(.*?)_(.*?).pat", re.MULTILINE | re.DOTALL)
rels = p.search(item.attrs['href'])
if rels != None:
info = p.search(item.attrs['href']).groups()
model = info[0].replace('%2B', '+')
if len(MS) > 0 and model.lower() not in MS:
continue
if model not in pats.keys():
pats[model]={}
pats[model][__fullversion(ver)] = item.attrs['href']
except:
pass
print(json.dumps(pats, indent=4))
@cli.command()
@click.option("-p", "--platforms", type=str, help="The platforms of Syno.")
def getmodelsoffline(platforms=None):
"""
Get Syno Models.
"""
import re, json
import requests
import fcntl, struct
if platforms is not None and platforms != "":
PS = platforms.lower().replace(",", " ").split()
else:
PS = []
models = []
with open(os.path.join('/mnt/p3/configs', "offline.json")) as user_file:
data = json.load(user_file)
for I in data["channel"]["item"]:
if not I["title"].startswith("DSM"):
continue
for J in I["model"]:
arch = J["mUnique"].split("_")[1]
name = J["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if len(PS) > 0 and arch.lower() not in PS:
continue
if any(name == B["name"] for B in models):
continue
models.append({"name": name, "arch": arch})
models = sorted(models, key=lambda k: (k["arch"], k["name"]))
print(json.dumps(models, indent=4))
if __name__ == "__main__":
# -*- coding: utf-8 -*-
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
import os, re, sys, glob, json, yaml, click, shutil, tarfile, kmodule, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
from openpyxl import Workbook
@click.group()
def cli():
"""
The CLI is a commands to ARC.
"""
pass
@cli.command()
@click.option("-w", "--workpath", type=str, required=True, help="The workpath of ARC.")
@click.option("-j", "--jsonpath", type=str, required=True, help="The output path of jsonfile.")
def getmodels(workpath, jsonpath):
models = {}
platforms_yml = os.path.join(workpath, "mnt", "p3", "configs", "platforms.yml")
with open(platforms_yml, "r") as f:
P_data = yaml.safe_load(f)
P_platforms = P_data.get("platforms", [])
for P in P_platforms:
productvers = {}
for V in P_platforms[P]["productvers"]:
kpre = P_platforms[P]["productvers"][V].get("kpre", "")
kver = P_platforms[P]["productvers"][V].get("kver", "")
productvers[V] = f"{kpre}-{kver}" if kpre else kver
models[P] = {"productvers": productvers, "models": []}
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=1, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
try:
url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)
data = p.findall(req.text)
except Exception as e:
click.echo(f"Error: {e}")
return
for item in data:
if not "DSM" in item[1]:
continue
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in models:
continue
if name in (A for B in models for A in models[B]["models"]):
continue
models[arch]["models"].append(name)
if jsonpath:
with open(jsonpath, "w") as f:
json.dump(models, f, indent=4, ensure_ascii=False)
@cli.command()
@click.option("-w", "--workpath", type=str, required=True, help="The workpath of ARC.")
@click.option("-j", "--jsonpath", type=str, required=True, help="The output path of jsonfile.")
def getpats(workpath, jsonpath):
def __fullversion(ver):
arr = ver.split('-')
a, b, c = (arr[0].split('.') + ['0', '0', '0'])[:3]
d = arr[1] if len(arr) > 1 else '00000'
e = arr[2] if len(arr) > 2 else '0'
return f'{a}.{b}.{c}-{d}-{e}'
platforms_yml = os.path.join(workpath, "mnt", "p3", "configs", "platforms.yml")
with open(platforms_yml, "r") as f:
data = yaml.safe_load(f)
platforms = data.get("platforms", [])
adapter = HTTPAdapter(max_retries=Retry(total=3, backoff_factor=1, status_forcelist=[500, 502, 503, 504]))
session = requests.Session()
session.mount("http://", adapter)
session.mount("https://", adapter)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
try:
url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)
data = p.findall(req.text)
except Exception as e:
click.echo(f"Error: {e}")
return
models = []
for item in data:
if not "DSM" in item[1]:
continue
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in platforms:
continue
if name in models:
continue
models.append(name)
pats = {}
for M in models:
pats[M] = {}
version = '7'
urlInfo = "https://www.synology.com/api/support/findDownloadInfo?lang=en-us"
urlSteps = "https://www.synology.com/api/support/findUpgradeSteps?"
#urlInfo = "https://www.synology.cn/api/support/findDownloadInfo?lang=zh-cn"
#urlSteps = "https://www.synology.cn/api/support/findUpgradeSteps?"
major = f"&major={version.split('.')[0]}" if len(version.split('.')) > 0 else ""
minor = f"&minor={version.split('.')[1]}" if len(version.split('.')) > 1 else ""
try:
req = session.get(f"{urlInfo}&product={M.replace('+', '%2B')}{major}{minor}", timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
except Exception as e:
click.echo(f"Error: {e}")
continue
build_ver = data['info']['system']['detail'][0]['items'][0]['build_ver']
build_num = data['info']['system']['detail'][0]['items'][0]['build_num']
buildnano = data['info']['system']['detail'][0]['items'][0]['nano']
V = __fullversion(f"{build_ver}-{build_num}-{buildnano}")
if V not in pats[M]:
pats[M][V] = {
'url': data['info']['system']['detail'][0]['items'][0]['files'][0]['url'].split('?')[0],
'sum': data['info']['system']['detail'][0]['items'][0]['files'][0]['checksum']
}
from_ver = min(I['build'] for I in data['info']['pubVers'])
for I in data['info']['productVers']:
if not I['version'].startswith(version):
continue
if not major or not minor:
majorTmp = f"&major={I['version'].split('.')[0]}" if len(I['version'].split('.')) > 0 else ""
minorTmp = f"&minor={I['version'].split('.')[1]}" if len(I['version'].split('.')) > 1 else ""
try:
reqTmp = session.get(f"{urlInfo}&product={M.replace('+', '%2B')}{majorTmp}{minorTmp}", timeout=10, verify=False)
reqTmp.encoding = "utf-8"
dataTmp = json.loads(reqTmp.text)
except Exception as e:
click.echo(f"Error: {e}")
continue
build_ver = dataTmp['info']['system']['detail'][0]['items'][0]['build_ver']
build_num = dataTmp['info']['system']['detail'][0]['items'][0]['build_num']
buildnano = dataTmp['info']['system']['detail'][0]['items'][0]['nano']
V = __fullversion(f"{build_ver}-{build_num}-{buildnano}")
if V not in pats[M]:
pats[M][V] = {
'url': dataTmp['info']['system']['detail'][0]['items'][0]['files'][0]['url'].split('?')[0],
'sum': dataTmp['info']['system']['detail'][0]['items'][0]['files'][0]['checksum']
}
for J in I['versions']:
to_ver = J['build']
try:
reqSteps = session.get(f"{urlSteps}&product={M.replace('+', '%2B')}&from_ver={from_ver}&to_ver={to_ver}", timeout=10, verify=False)
if reqSteps.status_code != 200:
continue
reqSteps.encoding = "utf-8"
dataSteps = json.loads(reqSteps.text)
except Exception as e:
click.echo(f"Error: {e}")
continue
for S in dataSteps['upgrade_steps']:
if not S.get('full_patch') or not S['build_ver'].startswith(version):
continue
V = __fullversion(f"{S['build_ver']}-{S['build_num']}-{S['nano']}")
if V not in pats[M]:
pats[M][V] = {
'url': S['files'][0]['url'].split('?')[0],
'sum': S['files'][0]['checksum']
}
if jsonpath:
with open(jsonpath, "w") as f:
json.dump(pats, f, indent=4, ensure_ascii=False)
@cli.command()
@click.option("-w", "--workpath", type=str, required=True, help="The workpath of ARC.")
@click.option("-j", "--jsonpath", type=str, required=True, help="The output path of jsonfile.")
def getaddons(workpath, jsonpath):
AS = glob.glob(os.path.join(workpath, "mnt", "p3", "addons", "*", "manifest.yml"))
AS.sort()
addons = {}
for A in AS:
with open(A, "r") as file:
A_data = yaml.safe_load(file)
A_name = A_data.get("name", "")
A_system = A_data.get("system", False)
A_description = A_data.get("description", "")
addons[A_name] = {"system": A_system, "description": A_description}
if jsonpath:
with open(jsonpath, "w") as f:
json.dump(addons, f, indent=4, ensure_ascii=False)
@cli.command()
@click.option("-w", "--workpath", type=str, required=True, help="The workpath of ARC.")
@click.option("-j", "--jsonpath", type=str, required=True, help="The output path of jsonfile.")
def getmodules(workpath, jsonpath):
MS = glob.glob(os.path.join(workpath, "mnt", "p3", "modules", "*.tgz"))
MS.sort()
modules = {}
TMP_PATH = "/tmp/modules"
if os.path.exists(TMP_PATH):
shutil.rmtree(TMP_PATH)
for M in MS:
M_name = os.path.splitext(os.path.basename(M))[0]
M_modules = {}
os.makedirs(TMP_PATH)
with tarfile.open(M, "r") as tar:
tar.extractall(TMP_PATH)
KS = glob.glob(os.path.join(TMP_PATH, "*.ko"))
KS.sort()
for K in KS:
K_name = os.path.splitext(os.path.basename(K))[0]
K_info = kmodule.modinfo(K, basedir=os.path.dirname(K), kernel=None)[0]
K_description = K_info.get("description", "")
K_depends = K_info.get("depends", "")
M_modules[K_name] = {"description": K_description, "depends": K_depends}
modules[M_name] = M_modules
if os.path.exists(TMP_PATH):
shutil.rmtree(TMP_PATH)
if jsonpath:
with open(jsonpath, "w") as file:
json.dump(modules, file, indent=4, ensure_ascii=False)
if __name__ == "__main__":
cli()

View File

@@ -1,74 +0,0 @@
#!/usr/bin/env bash
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
GRUB=${1:-"grub-2.12"}
BIOS=${2:-"i386-pc i386-efi x86_64-efi"}
NAME=${3:-"ARC"}
curl -#kLO https://ftp.gnu.org/gnu/grub/${GRUB}.tar.gz
tar -zxvf ${GRUB}.tar.gz
pushd ${GRUB}
echo depends bli part_gpt > grub-core/extra_deps.lst
for B in ${BIOS}; do
b=${B}
b=(${b//-/ })
echo "Make ${b[@]} ..."
mkdir -p ${B}
pushd ${B}
../configure --prefix=$PWD/usr -sbindir=$PWD/sbin --sysconfdir=$PWD/etc --disable-werror --target=${b[0]} --with-platform=${b[1]}
make
make install
popd
done
popd
rm -f grub.img
dd if=/dev/zero of=grub.img bs=1M seek=1024 count=0
echo -e "n\np\n1\n\n+50M\nn\np\n2\n\n+50M\nn\np\n3\n\n\na\n1\nw\nq\n" | fdisk grub.img
fdisk -l grub.img
LOOPX=$(sudo losetup -f)
sudo losetup -P ${LOOPX} grub.img
sudo mkdosfs -F32 -n ${NAME}1 ${LOOPX}p1
sudo mkfs.ext2 -F -L ${NAME}2 ${LOOPX}p2
sudo mkfs.ext4 -F -L ${NAME}3 ${LOOPX}p3
rm -rf ${NAME}1
mkdir -p ${NAME}1
sudo mount ${LOOPX}p1 ${NAME}1
sudo mkdir -p ${NAME}1/EFI
sudo mkdir -p ${NAME}1/boot/grub
cat >device.map <<EOF
(hd0) ${LOOPX}
EOF
sudo mv device.map ${NAME}1/boot/grub/device.map
for B in ${BIOS}; do
args=""
args+=" ${LOOPX} --target=${B} --no-floppy --recheck --grub-mkdevicemap=${NAME}1/boot/grub/device.map --boot-directory=${NAME}1/boot"
if [[ "${B}" == *"efi" ]]; then
args+=" --efi-directory=${NAME}1 --removable --no-nvram"
else
args+=" --root-directory=${NAME}1"
fi
sudo ${GRUB}/${B}/grub-install ${args}
done
if [ -d ${NAME}1/boot/grub/fonts ] && [ -f /usr/share/grub/unicode.pf2 ]; then
sudo cp /usr/share/grub/unicode.pf2 ${NAME}1/boot/grub/fonts
fi
sudo sync
sudo umount ${LOOPX}p1
sudo losetup -d ${LOOPX}
sudo rm -rf ${NAME}1
gzip grub.img

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
function genRandomValue() {
for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F G H J K L M N P Q R S T V W X Y Z; do
echo ${i}
done | sort -R | tail -1
}

View File

@@ -1,211 +0,0 @@
filename=$(basename "${1}")
OVFNAME=${filename%.*}
BLDISKNAME="${OVFNAME}-disk1.vmdk"
SDDISKNAME="${OVFNAME}-disk2.vmdk"
# Convert raw image to VMDK
qemu-img convert -O vmdk -o 'adapter_type=lsilogic,subformat=streamOptimized,compat6' "${1}" "${BLDISKNAME}"
#qemu-img create -f vmdk "${SDDISKNAME}" "32G"
BLSIZE=$(du -b "${BLDISKNAME}" | cut -f 1)
SDSIZE=$(du -b "${SDDISKNAME}" | cut -f 1)
BLVIRTUALSIZE=$(qemu-img info "${BLDISKNAME}" --output json | jq -r '."virtual-size"')
SDVIRTUALSIZE=$(qemu-img info "${SDDISKNAME}" --output json | jq -r '."virtual-size"')
# Create VM configuration
cat << _EOF_ > "${OVFNAME}.ovf"
<?xml version="1.0" encoding="UTF-8"?>
<Envelope vmw:buildId="build-22220919" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="${BLDISKNAME}" ovf:id="file1" ovf:size="${BLSIZE}"/>
<File ovf:href="${SDDISKNAME}" ovf:id="file2" ovf:size="${SDSIZE}"/>
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="${BLVIRTUALSIZE}" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="${BLSIZE}"/>
<Disk ovf:capacity="${SDVIRTUALSIZE}" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk2" ovf:fileRef="file2" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="${SDSIZE}"/>
</DiskSection>
<NetworkSection>
<Info>The list of logical networks</Info>
<Network ovf:name="bridged">
<Description>The bridged network</Description>
</Network>
</NetworkSection>
<VirtualSystem ovf:id="vm">
<Info>A virtual machine</Info>
<Name>${OVFNAME}</Name>
<OperatingSystemSection ovf:id="94" vmw:osType="ubuntu64Guest">
<Info>The kind of installed guest operating system</Info>
</OperatingSystemSection>
<VirtualHardwareSection>
<Info>Virtual hardware requirements</Info>
<System>
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
<vssd:InstanceID>0</vssd:InstanceID>
<vssd:VirtualSystemIdentifier>${OVFNAME}</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemType>vmx-21</vssd:VirtualSystemType>
</System>
<Item>
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
<rasd:Description>Number of Virtual CPUs</rasd:Description>
<rasd:ElementName>2 virtual CPU(s)</rasd:ElementName>
<rasd:InstanceID>1</rasd:InstanceID>
<rasd:ResourceType>3</rasd:ResourceType>
<rasd:VirtualQuantity>2</rasd:VirtualQuantity>
<vmw:CoresPerSocket ovf:required="false">2</vmw:CoresPerSocket>
</Item>
<Item>
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
<rasd:Description>Memory Size</rasd:Description>
<rasd:ElementName>4096MB of memory</rasd:ElementName>
<rasd:InstanceID>2</rasd:InstanceID>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item>
<rasd:Address>0</rasd:Address>
<rasd:Description>SATA Controller</rasd:Description>
<rasd:ElementName>sataController0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>vmware.sata.ahci</rasd:ResourceSubType>
<rasd:ResourceType>20</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:Address>0</rasd:Address>
<rasd:Description>USB Controller (XHCI)</rasd:Description>
<rasd:ElementName>usb3</rasd:ElementName>
<rasd:InstanceID>4</rasd:InstanceID>
<rasd:ResourceSubType>vmware.usb.xhci</rasd:ResourceSubType>
<rasd:ResourceType>23</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:Address>0</rasd:Address>
<rasd:Description>USB Controller (EHCI)</rasd:Description>
<rasd:ElementName>usb</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:ResourceSubType>vmware.usb.ehci</rasd:ResourceSubType>
<rasd:ResourceType>23</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="ehciEnabled" vmw:value="true"/>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
<rasd:ElementName>serial0</rasd:ElementName>
<rasd:InstanceID>6</rasd:InstanceID>
<rasd:ResourceType>21</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="yieldOnPoll" vmw:value="false"/>
<vmw:Config ovf:required="false" vmw:key="connectable.allowGuestControl" vmw:value="false"/>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item>
<rasd:AddressOnParent>1</rasd:AddressOnParent>
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
<rasd:Connection>bridged</rasd:Connection>
<rasd:Description>VmxNet3 ethernet adapter on &quot;bridged&quot;</rasd:Description>
<rasd:ElementName>ethernet0</rasd:ElementName>
<rasd:InstanceID>7</rasd:InstanceID>
<rasd:ResourceSubType>VmxNet3</rasd:ResourceSubType>
<rasd:ResourceType>10</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="connectable.allowGuestControl" vmw:value="false"/>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:ElementName>sound</rasd:ElementName>
<rasd:InstanceID>8</rasd:InstanceID>
<rasd:ResourceSubType>vmware.soundcard.ensoniq1371</rasd:ResourceSubType>
<rasd:ResourceType>1</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:ElementName>video</rasd:ElementName>
<rasd:InstanceID>9</rasd:InstanceID>
<rasd:ResourceType>24</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="enable3DSupport" vmw:value="true"/>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item ovf:required="false">
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:ElementName>vmci</rasd:ElementName>
<rasd:InstanceID>10</rasd:InstanceID>
<rasd:ResourceSubType>vmware.vmci</rasd:ResourceSubType>
<rasd:ResourceType>1</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:ElementName>disk0</rasd:ElementName>
<rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
<rasd:InstanceID>11</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<Item>
<rasd:AddressOnParent>1</rasd:AddressOnParent>
<rasd:ElementName>disk1</rasd:ElementName>
<rasd:HostResource>ovf:/disk/vmdisk2</rasd:HostResource>
<rasd:InstanceID>12</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
<vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
</Item>
<vmw:Config ovf:required="false" vmw:key="cpuHotAddEnabled" vmw:value="true"/>
<vmw:Config ovf:required="false" vmw:key="memoryHotAddEnabled" vmw:value="true"/>
<vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi"/>
<vmw:Config ovf:required="false" vmw:key="simultaneousThreads" vmw:value="1"/>
<vmw:Config ovf:required="false" vmw:key="virtualNuma.coresPerNumaNode" vmw:value="0"/>
<vmw:Config ovf:required="false" vmw:key="tools.syncTimeWithHost" vmw:value="false"/>
<vmw:Config ovf:required="false" vmw:key="powerOpInfo.powerOffType" vmw:value="soft"/>
<vmw:Config ovf:required="false" vmw:key="powerOpInfo.resetType" vmw:value="soft"/>
<vmw:Config ovf:required="false" vmw:key="powerOpInfo.suspendType" vmw:value="soft"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="cpuid.coresPerSocket" vmw:value="2"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="hpet0.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="nvram" vmw:value="${OVFNAME}.nvram"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge0.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge4.functions" vmw:value="8"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge4.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge4.virtualDev" vmw:value="pcieRootPort"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge5.functions" vmw:value="8"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge5.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge5.virtualDev" vmw:value="pcieRootPort"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge6.functions" vmw:value="8"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge6.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge6.virtualDev" vmw:value="pcieRootPort"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.functions" vmw:value="8"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.present" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="pciBridge7.virtualDev" vmw:value="pcieRootPort"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="usb.vbluetooth.startConnected" vmw:value="TRUE"/>
<vmw:ExtraConfig ovf:required="false" vmw:key="virtualHW.productCompatibility" vmw:value="hosted"/>
</VirtualHardwareSection>
<AnnotationSection ovf:required="false">
<Info>A human-readable annotation</Info>
<Annotation>Arc Loader</Annotation>
</AnnotationSection>
</VirtualSystem>
</Envelope>
_EOF_
# Create manifest file for automatic integrity check
cat << _EOF_ > "${OVFNAME}.mf"
SHA256(${OVFNAME}.ovf)= $(sha256sum "${OVFNAME}.ovf" | mawk '{print $1}')
SHA256(${BLDISKNAME})= $(sha256sum "${BLDISKNAME}" | mawk '{print $1}')
SHA256(${SDDISKNAME})= $(sha256sum "${SDDISKNAME}" | mawk '{print $1}')
_EOF_
# Pack everything as OVA appliance for ESXi import
rm -f "${OVFNAME}.ova"
tar -cf "${OVFNAME}.ova" ${OVFNAME}.ovf ${BLDISKNAME} ${SDDISKNAME} ${OVFNAME}.mf
rm -f ${OVFNAME}.ovf ${BLDISKNAME} ${SDDISKNAME} ${OVFNAME}.mf
#gzip "${OVFNAME}.ova"