Compare commits

...

189 Commits
1.1.7 ... 1.4.3

Author SHA1 Message Date
AuxXxilium
710e1d949e Merge pull request #5638 from AuxXxilium/dev
arc-functions: fix logic
2025-01-08 21:39:41 +01:00
AuxXxilium
48b1443974 arc-functions: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-08 21:39:32 +01:00
AuxXxilium
5c4a706f5e Merge pull request #5563 from AuxXxilium/dev
Dev
2025-01-05 15:00:36 +01:00
AuxXxilium
a405764fe9 tree: fix more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-05 14:59:55 +01:00
AuxXxilium
e552595b99 tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-03 18:04:27 +01:00
AuxXxilium
868443164e arc: remove compatboot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-03 16:56:34 +01:00
AuxXxilium
9e688e76ce build: modify arc
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-03 16:54:21 +01:00
AuxXxilium
60d71dca4f build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 20:48:27 +01:00
AuxXxilium
1b0ff6be81 Merge pull request #5489 from AuxXxilium/dev
build: cleanup files
2025-01-01 20:44:40 +01:00
AuxXxilium
090c29d589 build: cleanup files
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 20:44:11 +01:00
AuxXxilium
7c65ca476a Merge pull request #5486 from AuxXxilium/dev
arc-functions: remove empty line in sysinfo
2025-01-01 19:44:24 +01:00
AuxXxilium
7f4d124f9c arc-functions: remove empty line in sysinfo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 19:24:49 +01:00
AuxXxilium
6ba66a0647 Merge pull request #5485 from AuxXxilium/dev
Dev
2025-01-01 19:02:28 +01:00
AuxXxilium
1d0adb6b61 build: update local
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 18:40:32 +01:00
AuxXxilium
99e9f13ae9 arc: update modelselection
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 18:08:49 +01:00
AuxXxilium
5db6c8499d build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 17:56:15 +01:00
AuxXxilium
46bed3f449 arc-functions: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 17:56:08 +01:00
AuxXxilium
3ff54fa893 grub: update 2025-01-01 17:47:49 2025-01-01 17:47:49 +01:00
AuxXxilium
b181a360e4 Merge pull request #5483 from AuxXxilium/dev
grub: update
2025-01-01 17:39:43 +01:00
AuxXxilium
dba6e0c373 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 17:39:27 +01:00
AuxXxilium
40dc71a8ef Merge pull request #5482 from AuxXxilium/dev
Dev
2025-01-01 17:03:35 +01:00
AuxXxilium
c4221d93d8 build: expand image to 2G
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 17:01:17 +01:00
AuxXxilium
78cb49b655 boot/functions: add more checks
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 16:51:02 +01:00
AuxXxilium
10933e8cae boot: rework to match latest changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 16:42:11 +01:00
AuxXxilium
122dc5a874 grub: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 16:41:13 +01:00
AuxXxilium
45e99341eb grub: update for amd
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 16:01:22 +01:00
AuxXxilium
b50dc273cc tree: rename stable -> minimal / next -> extended
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2025-01-01 16:01:10 +01:00
AuxXxilium
acd61976fc Merge pull request #5458 from AuxXxilium/dev
Dev
2024-12-31 04:54:23 +01:00
AuxXxilium
b2a31744a9 arc: rework some changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 04:22:39 +01:00
AuxXxilium
731ffd710c boot: add empty line
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 04:20:01 +01:00
AuxXxilium
276b21d130 arc: modelselection cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 04:18:38 +01:00
AuxXxilium
d202bf3565 Revert "tree: rework more"
This reverts commit 6bcf451e77.
2024-12-31 04:14:04 +01:00
AuxXxilium
b107c77d29 arc-functions: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 04:07:28 +01:00
AuxXxilium
e608b32e3b arc/boot: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 03:24:42 +01:00
AuxXxilium
20caa713eb arc: update menu name
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-31 02:47:01 +01:00
AuxXxilium
6bcf451e77 tree: rework more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 21:15:49 +01:00
AuxXxilium
dd2c1f2341 Merge pull request #5449 from AuxXxilium/dev
Dev
2024-12-30 18:44:57 +01:00
AuxXxilium
cd16e7f011 grub: sync with latest changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 18:23:56 +01:00
AuxXxilium
990a6cb03a init: sync with latest changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 18:23:44 +01:00
AuxXxilium
e21c1ac334 Merge pull request #5447 from AuxXxilium/dev
Dev
2024-12-30 17:50:14 +01:00
AuxXxilium
971331188b arc: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 17:43:20 +01:00
AuxXxilium
8407ed1482 arc: only add i915 if system support it
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 17:10:04 +01:00
AuxXxilium
9c15548d34 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 16:50:35 +01:00
AuxXxilium
5568b4f0b4 tree: multiple rewrite
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-30 16:44:06 +01:00
AuxXxilium
fc1577bb43 Merge pull request #5424 from AuxXxilium/dev
build: update more
2024-12-29 16:24:19 +01:00
AuxXxilium
03a48fbd14 build: update more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-29 15:42:55 +01:00
AuxXxilium
80cd767a75 Merge pull request #5423 from AuxXxilium/dev
build: fix
2024-12-29 15:04:50 +01:00
AuxXxilium
0d5107e8cd build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-29 14:16:28 +01:00
AuxXxilium
700183ff64 Merge pull request #5409 from AuxXxilium/dev
func: fix dual build
2024-12-28 19:21:13 +01:00
AuxXxilium
e9daed7143 func: fix dual build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 19:20:55 +01:00
AuxXxilium
adba4d3421 Merge pull request #5406 from AuxXxilium/dev
build: fix
2024-12-28 17:06:54 +01:00
AuxXxilium
8a1a314eb5 build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 17:06:39 +01:00
AuxXxilium
1026800376 Merge pull request #5405 from AuxXxilium/dev
bootscreen: fix config
2024-12-28 16:48:53 +01:00
AuxXxilium
a800767f0b bootscreen: fix config
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 16:48:11 +01:00
AuxXxilium
6d07ffcaad Merge pull request #5404 from AuxXxilium/dev
arc: fix logic
2024-12-28 16:09:53 +01:00
AuxXxilium
e8efec928a arc: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 14:43:31 +01:00
AuxXxilium
af62a307e5 Merge pull request #5403 from AuxXxilium/dev
Dev
2024-12-28 13:43:54 +01:00
AuxXxilium
21630d6e33 arc: force reinit system after changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 13:41:33 +01:00
AuxXxilium
738a16514d tree: add more checks
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 13:33:25 +01:00
AuxXxilium
6debfe73b8 grub: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-28 01:19:50 +01:00
AuxXxilium
ce7ea49481 Merge pull request #5395 from AuxXxilium/dev
Dev
2024-12-27 23:47:59 +01:00
AuxXxilium
7a6197f04d build: update local
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 23:28:07 +01:00
AuxXxilium
491c15ec63 tree: rework more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 23:24:44 +01:00
AuxXxilium
3b94661c90 func: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 23:20:52 +01:00
AuxXxilium
e9463d990e tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 23:15:58 +01:00
AuxXxilium
90cc4520d8 func: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 23:01:24 +01:00
AuxXxilium
4cf4efffbe func: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 22:59:38 +01:00
AuxXxilium
071ae09e1b func: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 22:54:46 +01:00
AuxXxilium
21b0f768f1 tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 22:34:58 +01:00
AuxXxilium
fe774756c0 tree: revert some changes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 22:27:52 +01:00
AuxXxilium
6ab4bf3a5a grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 22:01:07 +01:00
AuxXxilium
0a7db3b4bb arc: rewrite logic and cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 15:33:48 +01:00
AuxXxilium
9849dc2ecc arc: fix register hwid
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 15:05:20 +01:00
AuxXxilium
b82c840e04 init: fix shortpath
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 15:03:00 +01:00
AuxXxilium
d762884775 arc: fix message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 15:01:49 +01:00
AuxXxilium
33e0149dbf grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-27 00:58:35 +01:00
AuxXxilium
f742fc599a Merge pull request #5373 from AuxXxilium/dev
func: update
2024-12-27 00:30:52 +01:00
AuxXxilium
3a98b86d33 func: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-26 00:27:19 +01:00
AuxXxilium
09ee2325b3 Merge pull request #5354 from AuxXxilium/dev
boot: fix styling
2024-12-26 00:18:18 +01:00
AuxXxilium
8354251917 boot: fix styling
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-25 15:26:19 +01:00
AuxXxilium
08111df903 Merge pull request #5342 from AuxXxilium/dev
build: update more
2024-12-24 21:10:32 +01:00
AuxXxilium
d9cd6ded90 build: update more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 17:21:40 +01:00
AuxXxilium
8935cb0ac5 Merge pull request #5340 from AuxXxilium/dev
build: fix
2024-12-24 17:06:31 +01:00
AuxXxilium
9eb611b388 build: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 17:05:51 +01:00
AuxXxilium
6a198d8930 Merge pull request #5339 from AuxXxilium/dev
Dev
2024-12-24 17:02:52 +01:00
AuxXxilium
712b5a5cb9 build: update logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 17:02:15 +01:00
AuxXxilium
8e10997fd5 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 17:00:04 +01:00
AuxXxilium
ee35d426b3 grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:57:36 +01:00
AuxXxilium
8676e9e349 func: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:46:57 +01:00
AuxXxilium
efbd445a79 func: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:46:10 +01:00
AuxXxilium
f23935e6c9 task: fix local build
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:41:01 +01:00
AuxXxilium
edc87953a5 func: rewrite for api
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:39:53 +01:00
AuxXxilium
3cfc706a74 arc: fix command shown
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:39:42 +01:00
AuxXxilium
231eebd18b taskfile: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:12:28 +01:00
AuxXxilium
73d75f1769 tree: fix latest
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:07:42 +01:00
AuxXxilium
7bec0cc7f4 build: update grub
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:02:39 +01:00
AuxXxilium
1de80457ad build: update local
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 16:00:31 +01:00
AuxXxilium
d53d7ac473 arc: more rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 14:33:18 +01:00
AuxXxilium
60b1579628 arc: fix init
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 14:04:17 +01:00
AuxXxilium
5d344ed6a9 tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 13:49:54 +01:00
AuxXxilium
8ae235c6bd Merge pull request #5332 from AuxXxilium/dev
Dev
2024-12-24 02:50:42 +01:00
AuxXxilium
a6be08228b tree: more optimization
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 02:49:17 +01:00
AuxXxilium
d08e73e999 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 01:50:07 +01:00
AuxXxilium
33dab8b349 Merge pull request #5331 from AuxXxilium/dev
arc: fix more
2024-12-24 01:47:17 +01:00
AuxXxilium
9ba63a0c17 arc: fix more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 01:47:01 +01:00
AuxXxilium
b0a626303b Merge pull request #5330 from AuxXxilium/dev
Dev
2024-12-24 01:38:16 +01:00
AuxXxilium
96afe6dd29 tree: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-24 01:37:47 +01:00
AuxXxilium
1c71b690c4 arc: add failsafe for arc config mode
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 21:13:27 +01:00
AuxXxilium
dc51577bbb arc-functions: add unmount to mount dsm pool feature
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 17:56:55 +01:00
AuxXxilium
34b3b1d14c Merge pull request #5321 from AuxXxilium/dev
boot: extend message
2024-12-23 17:24:04 +01:00
AuxXxilium
d092bf87c8 boot: extend message
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 17:23:43 +01:00
AuxXxilium
8c322ba04b Merge pull request #5320 from AuxXxilium/dev
Dev
2024-12-23 17:01:39 +01:00
AuxXxilium
c1dd12c611 init: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 17:00:41 +01:00
AuxXxilium
6b2d4e720a boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 16:52:32 +01:00
AuxXxilium
2f9031e3fb tree: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-23 16:27:12 +01:00
AuxXxilium
df325c5f5e tree: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-21 16:22:32 +01:00
AuxXxilium
a1055d68be boot: add hwid output to bootscreen options
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-20 16:32:45 +01:00
AuxXxilium
6b2fc8b0a5 Merge pull request #5282 from AuxXxilium/dev
Dev
2024-12-20 16:16:24 +01:00
AuxXxilium
10b0d1c64f tree: fix more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-20 16:13:57 +01:00
AuxXxilium
2fdb4a5e69 tree: logic fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-20 15:35:02 +01:00
AuxXxilium
8f4cb31962 Merge pull request #5255 from AuxXxilium/dev
Dev
2024-12-18 21:25:18 +01:00
AuxXxilium
3b62345e5a grub: update 2024-12-17 23:21:27 2024-12-18 20:50:57 +01:00
AuxXxilium
f564167e9d tree: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-18 20:50:37 +01:00
AuxXxilium
67e3d5c0f8 tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-16 17:56:28 +01:00
AuxXxilium
80d3118e7d Merge pull request #5231 from AuxXxilium/dev
Dev
2024-12-11 22:21:20 +01:00
AuxXxilium
39e00baf57 tree: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-11 18:17:54 +01:00
AuxXxilium
3378fb5a93 grub: update 2024-12-11 18:10:51 2024-12-11 18:10:51 +01:00
AuxXxilium
7e481182b1 tree: more fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-11 17:55:26 +01:00
AuxXxilium
6b0d2dad68 build: local update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-09 17:03:05 +01:00
AuxXxilium
8b8a7bcc99 storage: silence output
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-08 13:49:34 +01:00
AuxXxilium
a4a3c1998b Merge pull request #5133 from AuxXxilium/dev
functions: rewrite text
2024-12-07 18:51:59 +01:00
AuxXxilium
1ecf4db983 functions: rewrite text
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-07 18:51:40 +01:00
AuxXxilium
8adb3026f7 Merge pull request #5128 from AuxXxilium/dev
arc: fix port change
2024-12-07 15:25:13 +01:00
AuxXxilium
c9c320c2ca arc: fix port change
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-07 15:24:52 +01:00
AuxXxilium
4902d10167 Merge pull request #5124 from AuxXxilium/dev
Dev
2024-12-07 13:45:34 +01:00
AuxXxilium
04890fecd5 arc: fix SN if automated update and user set his own
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-07 13:45:03 +01:00
AuxXxilium
28c68c9043 network: fix window
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-07 00:31:17 +01:00
AuxXxilium
6f6778f3a3 tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-06 18:28:19 +01:00
AuxXxilium
bedf2d0a6b boot: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-06 16:23:54 +01:00
AuxXxilium
fe3430df09 Merge pull request #5093 from AuxXxilium/dev
Dev
2024-12-05 19:38:57 +01:00
AuxXxilium
8af23fb3fe boot: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 19:37:53 +01:00
AuxXxilium
f124199acc tree: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 19:23:10 +01:00
AuxXxilium
831d4c6384 arc-functions: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 19:20:37 +01:00
AuxXxilium
48780950bd boot: init: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 19:10:45 +01:00
AuxXxilium
e5ad10ab09 grub/boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 18:57:16 +01:00
AuxXxilium
09f52a444e grub: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-05 18:53:21 +01:00
AuxXxilium
a40b66063a Merge pull request #5066 from AuxXxilium/dev
Dev
2024-12-03 22:17:06 +01:00
AuxXxilium
8997d71e0c grub: set gfx back to old
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-03 22:16:36 +01:00
AuxXxilium
04da524e3d Merge pull request #5065 from AuxXxilium/dev
Dev
2024-12-03 22:05:58 +01:00
AuxXxilium
7f434f374a grub: update 2024-12-03 21:05:25 2024-12-03 21:05:25 +01:00
AuxXxilium
82c9fc028a arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-03 20:48:31 +01:00
AuxXxilium
135505bf22 Merge pull request #5046 from AuxXxilium/dev
tree: fix more logic
2024-12-02 23:53:57 +01:00
AuxXxilium
d55ca84ccd tree: fix more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-02 23:46:49 +01:00
AuxXxilium
85e636d0e6 Merge pull request #5045 from AuxXxilium/dev
func: fix typo
2024-12-02 23:30:28 +01:00
AuxXxilium
29a028ad89 func: fix typo
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-02 23:29:57 +01:00
AuxXxilium
a886046e64 Merge pull request #5044 from AuxXxilium/dev
Dev
2024-12-02 23:12:32 +01:00
AuxXxilium
915f60710d build: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-02 23:11:35 +01:00
AuxXxilium
567aaf9733 arc: fix keymap
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-02 20:44:06 +01:00
AuxXxilium
8d2b2acb62 Merge pull request #5029 from AuxXxilium/dev
arc: update model table
2024-12-01 20:46:09 +01:00
AuxXxilium
49d8a0425c arc: update model table
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 20:40:48 +01:00
AuxXxilium
0acb2020c8 Merge pull request #5028 from AuxXxilium/dev
tree: rewrite more
2024-12-01 19:19:29 +01:00
AuxXxilium
5338b8ecc7 tree: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 19:09:57 +01:00
AuxXxilium
fb44e027b3 Merge pull request #5027 from AuxXxilium/dev
Dev
2024-12-01 18:12:30 +01:00
AuxXxilium
ad987595bb tree: rework more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 18:09:26 +01:00
AuxXxilium
3049a8cf5d tree: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 17:53:50 +01:00
AuxXxilium
f6f9ed1810 arc: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 17:42:45 +01:00
AuxXxilium
b33d1e0013 grub: test
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 17:09:48 +01:00
AuxXxilium
a3f6d44b52 Merge pull request #5024 from AuxXxilium/dev
Dev
2024-12-01 16:44:44 +01:00
AuxXxilium
931e5c7942 grub: set fixed resolution
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 16:37:23 +01:00
AuxXxilium
2c90cfd41b init: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 11:23:32 +01:00
AuxXxilium
bf33567af2 arc-functions: fix clone loader
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-12-01 11:12:19 +01:00
AuxXxilium
4418bfa3f9 Merge pull request #5005 from AuxXxilium/dev
tree: fix automated
2024-11-30 23:27:14 +01:00
AuxXxilium
a239db84ff tree: fix automated
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-30 23:26:20 +01:00
AuxXxilium
9a50bf50ea Merge pull request #5003 from AuxXxilium/dev
Dev
2024-11-30 22:16:48 +01:00
AuxXxilium
ea0c82fd95 tree: fix more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-30 22:12:52 +01:00
AuxXxilium
c8663b8994 boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-30 21:29:31 +01:00
AuxXxilium
0cf78e4fbf Merge pull request #5000 from AuxXxilium/dev
Dev
2024-11-30 20:18:33 +01:00
AuxXxilium
65210543b7 tree: fix more logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-30 20:17:44 +01:00
AuxXxilium
13fa3fc771 tree: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-30 02:49:53 +01:00
AuxXxilium
f6f86334ed grub: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-29 22:45:11 +01:00
AuxXxilium
74093f29b1 init/boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-29 21:31:13 +01:00
AuxXxilium
466424229d tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-28 23:22:57 +01:00
AuxXxilium
6c31c321e6 arc: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-28 20:53:38 +01:00
AuxXxilium
1f46c8860f tree: fix logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-28 18:03:45 +01:00
AuxXxilium
21ffcf4cd5 busybox: cleanup
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-26 22:07:20 +01:00
AuxXxilium
4a94b7237f boot: fix mac
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-25 00:16:43 +01:00
AuxXxilium
8c0e316993 tree: update more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-25 00:12:14 +01:00
AuxXxilium
582292c5d1 init: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-25 00:00:09 +01:00
AuxXxilium
d87c63b870 arc: fix menu bug
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-11-24 23:52:35 +01:00
38 changed files with 1722 additions and 1318 deletions

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,5 +1,5 @@
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
@@ -32,13 +32,13 @@ on:
description: "pre release"
default: false
type: boolean
next:
description: "next"
minimal:
description: "minimal"
default: true
type: boolean
stable:
description: "stable"
default: true
extended:
description: "extended"
default: false
type: boolean
clean:
description: "clean"
@@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@main
- name: Delete releases and workflows runs
if: ${{ inputs.clean == true }}
if: ${{ inputs.clean }}
uses: ophub/delete-releases-workflows@main
with:
delete_releases: true
@@ -71,7 +71,7 @@ jobs:
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 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
@@ -112,15 +112,15 @@ jobs:
echo "OK"
# Build incremental
- name: Build Next Image
if: ${{ inputs.next == true }}
- name: Build extended Image
if: ${{ inputs.extended }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}"
ARC_BRANCH="next"
ARC_BRANCH="extended"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
@@ -129,8 +129,8 @@ jobs:
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}"
IMAGE_FILE="arc_create.img"
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
@@ -161,42 +161,51 @@ jobs:
sudo losetup --detach ${LOOPX}
# Resize Image
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"
echo "Image Converter"
IMAGE_FILE="arc.img"
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 vhd"
createvmc "arc.vmc"
qemu-img convert -p -f raw -O vpc ${IMAGE_FILE} arc.vhd
echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc.ova"
# Zip image and generate checksum
- name: Pack Next Image
if: ${{ inputs.next == true }}
- name: Pack extended Image
if: ${{ inputs.extended }}
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 }}.vhd.zip" arc.vhd arc.vmc
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)
sha256sum update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip >"update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.hash"
fi
# Cleanup
- name: Cleanup
run: |
rm -rf "arc.img" "arc.ova" "arc.vmdk" "arc-dyn.vmdk" "arc.vhdx" "arc-flat.vmdk"
rm -rf "arc.img" "arc.vmdk" "arc-dyn.vmdk" "arc-flat.vmdk" "arc.vhd" "arc.ova" "arc.vmc" 2>/dev/null
# Build incremental
- name: Build Stable Image
if: ${{ inputs.stable == true }}
- name: Build minimal Image
if: ${{ inputs.minimal }}
run: |
. scripts/func.sh
# Modify Source File
ARC_BUILD="`date +'%y%m%d'`"
ARC_VERSION="${{ inputs.version }}"
ARC_BRANCH="stable"
ARC_BRANCH="minimal"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
@@ -205,8 +214,8 @@ jobs:
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}"
IMAGE_FILE="arc_create.img"
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
@@ -222,7 +231,6 @@ jobs:
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"
@@ -238,25 +246,34 @@ jobs:
sudo losetup --detach ${LOOPX}
# Resize Image
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"
echo "Image Converter"
IMAGE_FILE="arc.img"
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 vhd"
createvmc "arc.vmc"
qemu-img convert -p -f raw -O vpc ${IMAGE_FILE} arc.vhd
echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc.ova"
# Zip image and generate checksum
- name: Pack Stable Image
if: ${{ inputs.stable == true }}
- name: Pack minimal Image
if: ${{ inputs.minimal }}
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 }}.vhd.zip" arc.vhd arc.vmc
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)
sha256sum update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip >"update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.hash"
fi
# Publish a release if is a tag
@@ -273,12 +290,12 @@ jobs:
- ${{ inputs.notice }}
### Information:
- Full Changelog is available in my Discord
- 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)
${{ inputs.minimal && '- minimal: Full Image, all dependencies are included (reduced size, faster boot)' || '' }}
${{ inputs.extended && '- extended: Full Image, all dependencies are included (new features to test)' || '' }}
### Dependencies:
- Addons: ${{ env.ADDONTAG }}
@@ -287,11 +304,12 @@ jobs:
- Patches: ${{ env.PATCHTAG }}
- Custom: ${{ env.CUSTOMTAG }}
- LKMs: ${{ env.LKMTAG }}
- Buildroot Stable: ${{ env.BRSTAG }}
- Buildroot Next: ${{ env.BRXTAG }}
${{ inputs.minimal && format('- Buildroot minimal: {0}', env.BRSTAG) || '' }}
${{ inputs.extended && format('- Buildroot extended: {0}', env.BRXTAG) || '' }}
### Release
- ${{ env.BUILD_TIME }}
artifacts: |
arc-*.zip
update-*.zip
update-*.hash

View File

@@ -43,7 +43,7 @@ jobs:
TAG=""
if [ "${PRERELEASE}" = "true" ]; then
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
else
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
TAG="${LATESTURL##*/}"

View File

@@ -33,15 +33,13 @@ jobs:
- name: Make Grub
run: |
. scripts/grub.sh "grub-2.12" "i386-pc i386-efi x86_64-efi"
rm -f grub.img.gz
. scripts/grub.sh "grub-2.12" "i386-pc i386-efi x86_64-efi" "ARC"
- 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}')

View File

@@ -3,15 +3,17 @@
version: "3"
tasks:
build-img-n:
build-ext:
cmds:
- git reset --hard
- git pull
- ./img-gen-n.sh
- ./img-ext.sh
build-img-s:
build-min:
cmds:
- git reset --hard
- git pull
- ./img-gen-s.sh
- ./img-min.sh
compile-kpatch:
dir: kpatch

File diff suppressed because it is too large Load Diff

View File

@@ -5,19 +5,17 @@
[[ -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}/arc-functions.sh"
. "${ARC_PATH}/include/addons.sh"
. "${ARC_PATH}/include/modules.sh"
. "${ARC_PATH}/include/update.sh"
. "${ARC_PATH}/include/storage.sh"
. "${ARC_PATH}/include/network.sh"
. "${ARC_PATH}/include/compat.sh"
. "${ARC_PATH}/arc-functions.sh"
# Get Keymap and Timezone Config
# Get Keymap and Timezone and check System
onlineCheck
KEYMAP="$(readConfigKey "keymap" "${USER_CONFIG_FILE}")"
ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
# Check for System
systemCheck
ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
@@ -60,7 +58,7 @@ BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
###############################################################################
# Mounts backtitle dynamically
function backtitle() {
BACKTITLE="${ARC_TITLE}$([ -n "${NEWTAG}" ] && [ ${ARC_VERSION//[!0-9]/} -lt ${NEWTAG//[!0-9]/} ] && echo " > ${NEWTAG}") | "
BACKTITLE="${ARC_TITLE}$([ -n "${NEWTAG}" ] && [ -n "${ARC_VERSION}" ] && [ ${ARC_VERSION//[!0-9]/} -lt ${NEWTAG//[!0-9]/} ] && echo " > ${NEWTAG}") | "
BACKTITLE+="${MODEL:-(Model)} | "
BACKTITLE+="${PRODUCTVER:-(Version)} | "
BACKTITLE+="${IPCON:-(IP)} | "
@@ -89,11 +87,7 @@ function backtitlep() {
# Model Selection
function arcModel() {
STEP="model"
if [ ! -f "${S_FILE}" ] || [ ! -f "${P_FILE}" ]; then
updateConfigs
else
checkHardwareID
fi
[ "${ARCOFFLINE}" != "true" ] && checkHardwareID || true
dialog --backtitle "$(backtitlep)" --title "Model" \
--infobox "Reading Models..." 3 25
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
@@ -119,15 +113,23 @@ function arcModel() {
BETA=""
[ -n "${ARCCONFM}" ] && ARC="x" || ARC=""
[ "${DT}" = "true" ] && DTS="x" || DTS=""
IGPU=""
IGPUS=""
[[ "${A}" = "apollolake" || "${A}" = "geminilake" ]] && IGPUS="up to 9th"
[ "${A}" = "epyc7002" ] && IGPUS="up to 14th"
IGPUID="$(lspci -nd ::300 2>/dev/null | grep "8086" | cut -d' ' -f3 | sed 's/://g')"
if [ -n "${IGPUID}" ]; then grep -iq "${IGPUID}" ${ARC_PATH}/include/i915ids && IGPU="all" || IGPU="epyc7002"; else IGPU=""; fi
if [[ "${A}" = "apollolake" || "${A}" = "geminilake" ]] && [ "${IGPU}" = "all" ]; then
IGPUS="+"
elif [ "${A}" = "epyc7002" ] && [[ "${IGPU}" = "epyc7002" || "${IGPU}" = "all" ]]; then
IGPUS="x"
else
IGPUS=""
fi
[ "${DT}" = "true" ] && HBAS="" || HBAS="x"
[ "${M}" = "SA6400" ] && HBAS="x"
[ "${DT}" = "false" ] && USBS="int/ext" || USBS="ext"
[[ "${M}" = "DS918+" || "${M}" = "DS1019+" || "${M}" = "DS1621xs+" || "${M}" = "RS1619xs+" ]] && M_2_CACHE="+" || M_2_CACHE="x"
[[ "${M}" = "DS718+" || "${M}" = "DS918+" || "${M}" = "DS1019+" || "${M}" = "DS1621xs+" || "${M}" = "RS1619xs+" ]] && M_2_CACHE="+" || M_2_CACHE="x"
[[ "${M}" = "DS220+" || "${M}" = "DS224+" ]] && M_2_CACHE=""
[[ "${M}" = "DS220+" || "${M}" = "DS224+" || "${M}" = "DS918+" || "${M}" = "DS1019+" || "${M}" = "DS1621xs+" || "${M}" = "RS1619xs+" ]] && M_2_STORAGE="" || M_2_STORAGE="+"
[[ "${M}" = "DS220+" || "${M}" = "DS224+" || "${M}" = "DS718+" || "${M}" = "DS918+" || "${M}" = "DS1019+" || "${M}" = "DS1621xs+" || "${M}" = "RS1619xs+" ]] && M_2_STORAGE="" || M_2_STORAGE="+"
# Check id model is compatible with CPU
if [ ${RESTRICT} -eq 1 ]; then
for F in "${FLAGS}"; do
@@ -155,13 +157,13 @@ function arcModel() {
[ -n "$(grep -w "${M}" "${S_FILE}")" ] && BETA="Arc" || BETA="Syno"
[ -z "$(grep -w "${A}" "${P_FILE}")" ] && COMPATIBLE=0
if [ -n "${ARCCONF}" ]; then
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${ARC}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${ARC}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
else
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
[ ${COMPATIBLE} -eq 1 ] && echo -e "${M} \"\t$(printf "\Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "${A}" "${DTS}" "${IGPUS}" "${HBAS}" "${M_2_CACHE}" "${M_2_STORAGE}" "${USBS}" "${BETA}")\" ">>"${TMP_PATH}/menu"
fi
done < <(cat "${TMP_PATH}/modellist")
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
[ -n "${ARCCONF}" ] && MSG="Supported Models for your Hardware (x = supported / + = need Addons)\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Arc" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")" || MSG="Supported Models for your Hardware (x = supported / + = need Addons) | Syno Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-12s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Intel iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")"
[ -n "${ARCCONF}" ] && MSG="Supported Models for your Hardware (x = supported / + = need Addons)\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "Arc" "iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")" || MSG="Supported Models for your Hardware (x = supported / + = need Addons) | Syno Models can have faulty Values.\n$(printf "\Zb%-16s\Zn \Zb%-15s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-5s\Zn \Zb%-10s\Zn \Zb%-12s\Zn \Zb%-10s\Zn \Zb%-10s\Zn" "Model" "Platform" "DT" "iGPU" "HBA" "M.2 Cache" "M.2 Volume" "USB Mount" "Source")"
[ -n "${ARCCONF}" ] && TITLEMSG="Arc Model" || TITLEMSG="Model"
dialog --backtitle "$(backtitlep)" --title "${TITLEMSG}" --colors \
--cancel-label "Show all" --help-button --help-label "Exit" \
@@ -170,26 +172,22 @@ function arcModel() {
--file "${TMP_PATH}/menu" 2>"${TMP_PATH}/resp"
RET=$?
case ${RET} in
0) # ok-button
0)
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
[ -z "${resp}" ] && return
break
;;
1) # cancel-button -> Show all Models
1)
[ ${RESTRICT} -eq 1 ] && RESTRICT=0 || RESTRICT=1
;;
2) # help-button -> Exit
return 1
break
;;
3) # extra-button -> Platform Info
3)
resp=$(cat ${TMP_PATH}/resp)
PLATFORM="$(grep -w "${resp}" "${TMP_PATH}/modellist" | awk '{print $2}' | head -n 1)"
dialog --backtitle "$(backtitlep)" --colors \
--title "Platform Info" --textbox "./informations/${PLATFORM}.yml" 70 80
;;
255) # ESC -> Exit
return 1
*)
return
break
;;
esac
@@ -248,12 +246,12 @@ function arcVersion() {
if [ "${ARCMODE}" = "config" ] && [ "${ARCRESTORE}" != "true" ]; then
# Select Build for DSM
ITEMS="$(readConfigEntriesArray "platforms.${PLATFORM}.productvers" "${P_FILE}" | sort -r)"
dialog --clear --no-items --nocancel --title "Version" --backtitle "$(backtitlep)" \
--no-items --menu "Choose DSM Version" 7 30 0 ${ITEMS} \
dialog --clear --no-items --nocancel --title "DSM Version" --backtitle "$(backtitlep)" \
--no-items --menu "Select DSM Version" 7 30 0 ${ITEMS} \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && return 0
[ $? -ne 0 ] && return
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
[ -z "${resp}" ] && return
if [ "${PRODUCTVER}" != "${resp}" ]; then
PRODUCTVER="${resp}"
writeConfigKey "productver" "${PRODUCTVER}" "${USER_CONFIG_FILE}"
@@ -264,10 +262,6 @@ function arcVersion() {
writeConfigKey "ramdisk-hash" "" "${USER_CONFIG_FILE}"
writeConfigKey "smallnum" "" "${USER_CONFIG_FILE}"
writeConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
fi
dialog --backtitle "$(backtitlep)" --title "Version" \
--infobox "Reading DSM Build..." 3 25
@@ -286,8 +280,8 @@ function arcVersion() {
PREV="${V}"
done < <(echo "${PVS}")
DSMPVS="$(cat ${TMP_PATH}/versions)"
dialog --backtitle "$(backtitlep)" --colors --title "Version" \
--no-items --menu "Choose a DSM Build" 0 0 0 ${DSMPVS} \
dialog --backtitle "$(backtitlep)" --colors --title "DSM Build" \
--no-items --menu "Select DSM Build" 0 0 0 ${DSMPVS} \
2>${TMP_PATH}/resp
RET=$?
[ ${RET} -ne 0 ] && return
@@ -320,10 +314,18 @@ function arcVersion() {
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" >/dev/null 2>&1 || true
rm -f "${USER_UP_PATH}/"*.tar >/dev/null 2>&1 || true
fi
MSG="Do you want to try Automated Mode?\nIf yes, Loader will configure, build and boot DSM."
dialog --backtitle "$(backtitlep)" --colors --title "Automated Mode" \
--yesno "${MSG}" 6 55
[ $? -eq 0 ] && ARCMODE="automated" || ARCMODE="config"
if [ "${ONLYVERSION}" != "true" ]; then
MSG="Do you want to try Automated Mode?\nIf yes, Loader will configure, build and boot DSM."
dialog --backtitle "$(backtitlep)" --colors --title "Automated Mode" \
--yesno "${MSG}" 6 55
if [ $? -eq 0 ]; then
writeConfigKey "arc.mode" "automated" "${USER_CONFIG_FILE}"
ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
else
writeConfigKey "arc.mode" "config" "${USER_CONFIG_FILE}"
ARCMODE="$(readConfigKey "arc.mode" "${USER_CONFIG_FILE}")"
fi
fi
elif [ "${ARCMODE}" = "automated" ] || [ "${ARCRESTORE}" = "true" ]; then
VALID="true"
fi
@@ -336,6 +338,13 @@ function arcVersion() {
while IFS=': ' read -r KEY VALUE; do
writeConfigKey "synoinfo.\"${KEY}\"" "${VALUE}" "${USER_CONFIG_FILE}"
done < <(readConfigMap "platforms.${PLATFORM}.synoinfo" "${P_FILE}")
# Reset Modules
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
if [ -n "${PLATFORM}" ] && [ -n "${KVERP}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
mergeConfigModules "$(getAllModules "${PLATFORM}" "${KVERP}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
fi
# Check Addons for Platform
ADDONS="$(readConfigKey "addons" "${USER_CONFIG_FILE}")"
DEVICENIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
@@ -361,7 +370,8 @@ function arcVersion() {
initConfigKey "addons.sensors" "" "${USER_CONFIG_FILE}"
fi
if [ "${PLATFORM}" = "apollolake" ] || [ "${PLATFORM}" = "geminilake" ]; then
initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}"
if [ -n "${IGPUID}" ]; then grep -iq "${IGPUID}" ${ARC_PATH}/include/i915ids && IGPU="all" || IGPU="epyc7002"; else IGPU=""; fi
[ "${IGPU}"="all" ] && initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}" || true
fi
if echo "${PAT_URL}" 2>/dev/null | grep -q "7.2.2"; then
initConfigKey "addons.allowdowngrade" "" "${USER_CONFIG_FILE}"
@@ -369,7 +379,7 @@ function arcVersion() {
if [ -n "${ARCCONF}" ]; then
initConfigKey "addons.arcdns" "" "${USER_CONFIG_FILE}"
fi
if [ ${SASDRIVES} -gt 0 ]; then
if [ ${SASDRIVES} -gt 0 ] && [ "${DT}" = "false" ]; then
initConfigKey "addons.smartctl" "" "${USER_CONFIG_FILE}"
fi
fi
@@ -379,20 +389,12 @@ function arcVersion() {
deleteConfigKey "addons.\"${ADDON}\"" "${USER_CONFIG_FILE}"
fi
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
if [ -n "${PLATFORM}" ] && [ -n "${KVERP}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read -r ID DESC; do
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVERP}")
fi
# Check for Only Version
if [ "${ONLYVERSION}" = "true" ]; then
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
ONLYVERSION="false"
return 0
return
else
arcPatch
fi
@@ -402,7 +404,7 @@ function arcVersion() {
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
sleep 5
return 1
return
fi
}
@@ -413,39 +415,37 @@ function arcPatch() {
# Read Model Values
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
# Check for Custom Build
if [ "${ARCMODE}" = "automated" ]; then
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
[ -n "${ARCCONF}" ] && SN="$(generateSerial "${MODEL}" "true")" || SN="$(generateSerial "${MODEL}" "false")"
[ -n "${ARCCONF}" ] && writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" || writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
if [ "${ARCMODE}" = "automated" ] && [ "${ARCPATCH}" != "user" ]; then
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
[ -n "${ARCCONF}" ] && SN="$(generateSerial "${MODEL}" "true")" || SN="$(generateSerial "${MODEL}" "false")"
[ -n "${ARCCONF}" ] && writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" || writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
elif [ "${ARCMODE}" = "config" ]; then
dialog --clear --backtitle "$(backtitlep)" \
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
if [ -n "${ARCCONF}" ]; then
dialog --clear --backtitle "$(backtitlep)" \
--nocancel --title "SN/Mac Options"\
--menu "Choose an Option" 7 60 0 \
1 "Use Arc Patch (AME, QC, Push Notify and more)" \
2 "Use random SN/Mac (Reduced DSM Features)" \
3 "Use my own SN/Mac (Be sure your Data is valid)" \
2>"${TMP_PATH}/resp"
2>"${TMP_PATH}/resp"
else
dialog --clear --backtitle "$(backtitlep)" \
--nocancel --title "SN/Mac Options"\
--menu "Choose an Option" 7 60 0 \
2 "Use random SN/Mac (Reduced DSM Features)" \
3 "Use my own SN/Mac (Be sure your Data is valid)" \
2>"${TMP_PATH}/resp"
fi
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
if [ ${resp} -eq 1 ]; then
ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
if [ -n "${ARCCONF}" ]; then
dialog --backtitle "$(backtitlep)" --colors --title "Arc Patch" \
--infobox "Arc Patch successful!" 3 30
sleep 2
SN="$(generateSerial "${MODEL}" "true")"
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
else
dialog --backtitle "$(backtitlep)" --colors --title "Arc Patch" \
--infobox "Arc Patch failed!" 3 30
sleep 2
SN="$(generateSerial "${MODEL}" "false")"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
fi
SN="$(generateSerial "${MODEL}" "true")"
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 2 ]; then
# Generate random Serial
SN="$(generateSerial "${MODEL}" "false")"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
elif [ ${resp} -eq 3 ]; then
@@ -463,8 +463,8 @@ function arcPatch() {
done
writeConfigKey "arc.patch" "user" "${USER_CONFIG_FILE}"
fi
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
fi
writeConfigKey "sn" "${SN}" "${USER_CONFIG_FILE}"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
arcSettings
}
@@ -480,12 +480,14 @@ function arcSettings() {
PAT_HASH="$(readConfigKey "pathash" "${USER_CONFIG_FILE}")"
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
# Get Network Config for Loader
STEP="network"
dialog --backtitle "$(backtitlep)" --colors --title "Network Config" \
--infobox "Generating Network Config..." 3 40
sleep 2
getnet
[ $? -ne 0 ] && return 1
if [ "${ARCMODE}" = "config" ] || [ "${ARCPATCH}" = "true" ] || [ "${ARCPATCH}" = "false" ]; then
STEP="network"
dialog --backtitle "$(backtitlep)" --colors --title "Network Config" \
--infobox "Generating Network Config..." 3 40
sleep 2
getnet
[ $? -ne 0 ] && return
fi
if [ "${ONLYPATCH}" = "true" ]; then
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
@@ -493,13 +495,13 @@ function arcSettings() {
return 0
fi
# Select Portmap for Loader
if [ "${DT}" = "false" ] && [ $(lspci -d ::106 | wc -l) -gt 0 ]; then
if [ "${DT}" = "false" ] && [ ${SATADRIVES} -gt 0 ]; then
STEP="storagemap"
dialog --backtitle "$(backtitlep)" --colors --title "Storage Map" \
--infobox "Generating Storage Map..." 3 40
sleep 2
getmapSelection
[ $? -ne 0 ] && return 1
[ $? -ne 0 ] && return
fi
# Check for Custom Build
if [ "${ARCMODE}" = "config" ]; then
@@ -508,16 +510,16 @@ function arcSettings() {
dialog --backtitle "$(backtitlep)" --colors --title "Addons" \
--infobox "Loading Addons Table..." 3 40
addonSelection
[ $? -ne 0 ] && return 1
[ $? -ne 0 ] && return
fi
# Check for CPU Frequency Scaling & Governor
if [ "${ARCMODE}" = "config" ] && [ "${MACHINE}" = "Native" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
dialog --backtitle "$(backtitlep)" --colors --title "CPU Frequency Scaling" \
--infobox "Generating Governor Table..." 3 40
governorSelection
[ $? -ne 0 ] && return 1
[ $? -ne 0 ] && return
elif [ "${ARCMODE}" = "automated" ] && [ "${MACHINE}" = "Native" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
[ "${PLATFORM}" = "epyc7002" ] && writeConfigKey "addons.cpufreqscaling" "schedutil" "${USER_CONFIG_FILE}" || writeConfigKey "addons.cpufreqscaling" "conservative" "${USER_CONFIG_FILE}"
[ "${PLATFORM}" = "epyc7002" ] && writeConfigKey "governor" "schedutil" "${USER_CONFIG_FILE}" || writeConfigKey "governor" "conservative" "${USER_CONFIG_FILE}"
fi
if [ "${ARCMODE}" = "config" ]; then
# Check for DT and HBA/Raid Controller
@@ -534,7 +536,7 @@ function arcSettings() {
fi
if [ ${DEVICENIC} -gt ${MODELNIC} ] && [ "${ARCPATCH}" = "true" ]; then
dialog --backtitle "$(backtitlep)" --title "Arc Warning" \
--msgbox "WARN: You have more NIC (${DEVICENIC}) than supported by Model (${MODELNIC}).\nOnly ${MODELNIC} are used by Arc Patch." 6 80
--msgbox "WARN: You have more NIC (${DEVICENIC}) than supported by Model (${MODELNIC}).\nOnly the first ${MODELNIC} are used by Arc Patch." 6 80
fi
# Check for AES
if [ "${AESSYS}" = "false" ]; then
@@ -569,12 +571,12 @@ function arcSettings() {
2 "No - I want to make changes" \
2>"${TMP_PATH}/resp"
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
[ -z "${resp}" ] && return
if [ ${resp} -eq 1 ]; then
arcSummary
elif [ ${resp} -eq 2 ]; then
dialog --clear --no-items --backtitle "$(backtitle)"
return 1
return
fi
else
# Build Loader
@@ -665,13 +667,13 @@ function arcSummary() {
--extra-button --extra-label "Cancel" --msgbox "${SUMMARY}" 0 0
RET=$?
case ${RET} in
0) # ok-button
0)
make
;;
3) # extra-button
3)
return 0
;;
255) # ESC
255)
return 0
;;
esac
@@ -708,14 +710,14 @@ function make() {
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 2
return 1
return
fi
if [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ] && [ "${CONFDONE}" = "true" ] && [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
(
livepatch
sleep 3
) 2>&1 | dialog --backtitle "$(backtitlep)" --colors --title "Build Loader" \
--progressbox "Magical things happening..." 20 70
--progressbox "Patching DSM Files..." 20 70
else
dialog --backtitle "$(backtitle)" --title "Build Loader" --aspect 18 \
--infobox "Configuration issue found.\nCould not build Loader!\nExit." 5 40
@@ -723,11 +725,10 @@ function make() {
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 2
return 1
return
fi
STEP="boot"
if [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ] && [ -f "${MOD_ZIMAGE_FILE}" ] && [ -f "${MOD_RDGZ_FILE}" ]; then
MODELID=$(echo ${MODEL} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/')
MODELID="$(echo ${MODEL} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/')"
writeConfigKey "modelid" "${MODELID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.version" "${ARC_VERSION}" "${USER_CONFIG_FILE}"
arcFinish
@@ -738,13 +739,14 @@ function make() {
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 2
return 1
return
fi
}
###############################################################################
# Finish Building Loader
function arcFinish() {
STEP="boot"
rm -f "${LOG_FILE}" >/dev/null 2>&1 || true
MODELID="$(readConfigKey "modelid" "${USER_CONFIG_FILE}")"
if [ -n "${MODELID}" ]; then
@@ -760,11 +762,11 @@ function arcFinish() {
2 "No - I want to make changes" \
2>"${TMP_PATH}/resp"
resp=$(cat ${TMP_PATH}/resp)
[ -z "${resp}" ] && return 1
[ -z "${resp}" ] && return
if [ ${resp} -eq 1 ]; then
boot
elif [ ${resp} -eq 2 ]; then
return 0
return
fi
fi
fi
@@ -806,8 +808,7 @@ function boot() {
dialog --backtitle "$(backtitle)" --title "Arc Boot" \
--infobox "Booting DSM...\nPlease stay patient!" 4 25
sleep 2
clear
exec boot.sh
exec reboot
fi
}
@@ -822,7 +823,7 @@ if [ "${ARCMODE}" = "update" ]; then
dialog --backtitle "$(backtitle)" --title "Arc Update" \
--infobox "Update is not possible in Offline Mode!" 5 40
sleep 3
reboot
exec reboot
fi
elif [ "${ARCMODE}" = "automated" ]; then
# Check for Custom Build
@@ -831,16 +832,18 @@ elif [ "${ARCMODE}" = "automated" ]; then
else
make
fi
else
elif [ "${ARCMODE}" = "config" ]; then
[ "${CONFDONE}" = "true" ] && NEXT="2" || NEXT="1"
[ "${BUILDDONE}" = "true" ] && NEXT="3" || NEXT="1"
while true; do
echo "= \"\Z4===== Main =====\Zn \" " >"${TMP_PATH}/menu"
if [ -z "${USERID}" ] && [ "${ARCOFFLINE}" != "true" ]; then
if [ -z "${USERID}" ] && [ "${ARCOFFLINE}" = "false" ]; then
echo "0 \"HardwareID for Arc Patch\" " >>"${TMP_PATH}/menu"
fi
echo "1 \"Choose Model \" " >>"${TMP_PATH}/menu"
if [ "${CONFDONE}" = "true" ] && [ -n "${IPCON}" ]; then
if [ "${CONFDONE}" = "true" ] && [ -f "${MOD_ZIMAGE_FILE}" ] && [ -f "${MOD_RDGZ_FILE}" ]; then
echo "2 \"Rebuild Loader \" " >>"${TMP_PATH}/menu"
elif [ "${CONFDONE}" = "true" ]; then
echo "2 \"Build Loader \" " >>"${TMP_PATH}/menu"
fi
if [ "${BUILDDONE}" = "true" ]; then
@@ -883,7 +886,7 @@ else
if [ "${DT}" = "true" ]; then
echo "H \"Hotplug/SortDrives: \Z4${HDDSORT}\Zn \" " >>"${TMP_PATH}/menu"
else
echo "h \"USB Mount: \Z4${USBMOUNT}\Zn \" " >>"${TMP_PATH}/menu"
echo "h \"USB Mount as Internal: \Z4${USBMOUNT}\Zn \" " >>"${TMP_PATH}/menu"
fi
fi
if [ "${BOOTOPTS}" = "true" ]; then
@@ -913,7 +916,9 @@ else
echo "t \"Change User Password \" " >>"${TMP_PATH}/menu"
echo "J \"Reset Network Config \" " >>"${TMP_PATH}/menu"
echo "T \"Disable all scheduled Tasks \" " >>"${TMP_PATH}/menu"
echo "M \"Mount DSM Storage Pool (not SHR) \" " >>"${TMP_PATH}/menu"
if [ "${PLATFORM}" = "epyc7002" ]; then
echo "M \"Mount DSM Storage Pool \" " >>"${TMP_PATH}/menu"
fi
echo "l \"Edit User Config \" " >>"${TMP_PATH}/menu"
echo "s \"Allow Downgrade Version \" " >>"${TMP_PATH}/menu"
echo "O \"Official Driver Priority: \Z4${ODP}\Zn \" " >>"${TMP_PATH}/menu"
@@ -945,7 +950,7 @@ else
fi
echo "= \"\Z4===== Misc =====\Zn \" " >>"${TMP_PATH}/menu"
echo "x \"Backup/Restore/Recovery \" " >>"${TMP_PATH}/menu"
[ "${ARCOFFLINE}" != "true" ] && echo "z \"Update Menu \" " >>"${TMP_PATH}/menu"
[ "${ARCOFFLINE}" = "false" ] && echo "z \"Update Menu \" " >>"${TMP_PATH}/menu"
echo "I \"Power/Service Menu \" " >>"${TMP_PATH}/menu"
echo "V \"Credits \" " >>"${TMP_PATH}/menu"
@@ -1035,12 +1040,10 @@ else
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
[ "${PLATFORM}" = "epyc7002" ] && KVERP="${PRODUCTVER}-${KVER}" || KVERP="${KVER}"
if [ -n "${PLATFORM}" ] && [ -n "${KVERP}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read -r ID DESC; do
writeConfigKey "modules.\"${ID}\"" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVERP}")
mergeConfigModules "$(getAllModules "${PLATFORM}" "${KVERP}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
fi
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
@@ -1052,13 +1055,7 @@ else
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
NEXT="H"
;;
h) if [ "${USBMOUNT}" = "auto" ]; then
USBMOUNT='internal'
elif [ "${USBMOUNT}" = "internal" ]; then
USBMOUNT='external'
elif [ "${USBMOUNT}" = "external" ]; then
USBMOUNT='auto'
fi
h) [ "${USBMOUNT}" = "true" ] && USBMOUNT='false' || USBMOUNT='true'
writeConfigKey "usbmount" "${USBMOUNT}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
@@ -1112,16 +1109,18 @@ else
esac
done
clear
else
exec reboot
fi
# Inform user
echo -e "Call \033[1;34marc.sh\033[0m to configure Loader"
echo
echo -e "Web Terminal: \033[1;34mhttp://${IPCON}:${TTYDPORT:-7681}\033[0m"
echo -e "Web Filemanager: \033[1;34mhttp://${IPCON}:${DUFSPORT:-7304}\033[0m"
echo
echo -e "SSH Access:"
echo -e "IP: \033[1;34m${IPCON}\033[0m"
echo -e "User: \033[1;34mroot\033[0m"
echo -e "Password: \033[1;34marc\033[0m"
echo
echo -e "Web Terminal: \033[1;34mhttp://${IPCON}:${TTYDPORT}\033[0m"
echo -e "Web Filemanager: \033[1;34mhttp://${IPCON}:${DUFSPORT}\033[0m"
echo

View File

@@ -55,9 +55,10 @@ 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}")"
DSMINFO="$(readConfigKey "bootscreen.dsminfo" "${USER_CONFIG_FILE}")"
SYSTEMINFO="$(readConfigKey "bootscreen.systeminfo" "${USER_CONFIG_FILE}")"
DISKINFO="$(readConfigKey "bootscreen.diskinfo" "${USER_CONFIG_FILE}")"
HWIDINFO="$(readConfigKey "bootscreen.hwidinfo" "${USER_CONFIG_FILE}")"
if [ "${DSMINFO}" = "true" ]; then
echo -e "\033[1;37mDSM:\033[0m"
@@ -78,6 +79,11 @@ 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 [ "${HWIDINFO}" = "true" ]; then
echo -e "\033[1;37mHardwareID:\033[0m"
echo -e "HWID: \033[1;37m$(genHWID)\033[0m"
echo
fi
if ! readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q nvmesystem; then
HASATA=0
@@ -88,7 +94,12 @@ if ! readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q nvmesystem; then
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"
[ ${HASATA} -eq 0 ] && echo -e "\033[1;31m*** Note: Please insert at least one Sata/SAS/SCSI Disk for System installation, except the Bootloader Disk. ***\033[0m"
fi
if checkBIOS_VT_d && [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 5 ]; then
echo -e "\033[1;31m*** Notice: Disable Intel(VT-d)/AMD(AMD-V) in BIOS/UEFI settings if you encounter a boot failure. ***\033[0m"
echo
fi
# Read necessary variables
@@ -98,30 +109,46 @@ 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}")"
GOVERNOR="$(readConfigKey "governor" "${USER_CONFIG_FILE}")"
USBMOUNT="$(readConfigKey "usbmount" "${USER_CONFIG_FILE}")"
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
MODBLACKLIST="$(readConfigKey "modblacklist" "${USER_CONFIG_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
# HardwareID Check
if [ "${ARCPATCH}" = "true" ]; then
HARDWAREID="$(readConfigKey "arc.hardwareid" "${USER_CONFIG_FILE}")"
HWID="$(genHWID)"
if [ "${HARDWAREID}" != "${HWID}" ]; then
echo "\033[1;31m*** HardwareID does not match! - Loader can't boot to DSM! You need to reconfigure your Loader - Rebooting to Config Mode! ***\033[0m"
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
writeConfigKey "arc.hardwareid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
sleep 5
rebootTo "config"
fi
fi
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}"
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']=""
CMDLINE["force_junior"]=""
fi
if grep -q "recovery" /proc/cmdline; then
CMDLINE['force_junior']=""
CMDLINE['recovery']=""
CMDLINE["force_junior"]=""
CMDLINE["recovery"]=""
fi
if [ ${EFI} -eq 1 ]; then
CMDLINE['withefi']=""
CMDLINE["withefi"]=""
else
CMDLINE['noefi']=""
CMDLINE["noefi"]=""
fi
# DSM Cmdline
@@ -132,10 +159,10 @@ if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 5 ]; then
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}"
CMDLINE["synoboot_satadom"]="${SATADOM:-2}"
CMDLINE["dom_szmax"]="${SIZE}"
fi
CMDLINE["elevator"]="elevator"
CMDLINE['elevator']="elevator"
else
CMDLINE["split_lock_detect"]="off"
fi
@@ -147,65 +174,82 @@ else
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["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["root"]="/dev/md0"
CMDLINE["loglevel"]="15"
CMDLINE["log_buf_len"]="32M"
CMDLINE["rootwait"]=""
CMDLINE['panic']="${KERNELPANIC:-0}"
# DSM Specific Cmdline
# CMDLINE['intremap']="off" # no need
# CMDLINE['amd_iommu_intr']="legacy" # no need
# CMDLINE['split_lock_detect']="off" # check KVER
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['intel_pstate']="disable"
# CMDLINE['amd_pstate']="disable"
# CMDLINE['nox2apic']="" # check platform
# CMDLINE['nomodeset']=""
CMDLINE["modprobe.blacklist"]="${MODBLACKLIST}"
if [ "${USBMOUNT}" = "true" ]; then
CMDLINE['usbinternal']=""
fi
if [ "${GOVERNOR}" = "ondemand" ] || [ "${GOVERNOR}" = "conservative" ] || [ "${GOVERNOR}" = "schedutil" ]; then
CMDLINE["governor"]="${GOVERNOR}"
fi
if [ $(cat /proc/cpuinfo | grep Intel | wc -l) -gt 0 ]; then
CMDLINE["intel_pstate"]="disable"
fi
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"
# Disabled for now
# 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"
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE["modprobe.blacklist"]+=","
CMDLINE["modprobe.blacklist"]+="mpt3sas"
fi
#else
# CMDLINE['scsi_mod.scan']="sync" # TODO: kernel panic caused by vmware scsi? (add to cmdline)
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=$(ip -o link show | awk -F': ' '{print $2}' | grep eth)
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}
[ -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 '[:lower:]' '[:upper:]')" || NIC=$((${NIC} + 1))
[ -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}"
CMDLINE["netif_num"]="${NIC}"
# Read user network settings
while IFS=': ' read -r KEY VALUE; do
@@ -219,7 +263,7 @@ done < <(readConfigMap "cmdline" "${USER_CONFIG_FILE}")
# Prepare command line
CMDLINE_LINE=""
for KEY in ${!CMDLINE[@]}; do
for KEY in "${!CMDLINE[@]}"; do
VALUE="${CMDLINE[${KEY}]}"
CMDLINE_LINE+=" ${KEY}"
[ -n "${VALUE}" ] && CMDLINE_LINE+="=${VALUE}"
@@ -233,7 +277,6 @@ 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
@@ -255,37 +298,38 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
for N in ${ETHX}; do
COUNT=0
DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
MAC="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')"
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"
echo -e "\r${DRIVER}: \033[1;37mNOT CONNECTED @ Mac: ${MAC}\033[0m"
break
fi
COUNT=$((${COUNT} + 1))
IP="$(getIP ${N})"
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"
echo -e "\r${DRIVER} (${SPEED} | ${MAC}): \033[1;37mLINK LOCAL (No DHCP server found.)\033[0m"
else
echo -e "\r${DRIVER} (${SPEED}): \033[1;37m${IP}\033[0m"
echo -e "\r${DRIVER} (${SPEED} | ${MAC}): \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"
echo -e "\r${DRIVER} (${MAC}): \033[1;37mDOWN\033[0m"
break
fi
if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then
echo -e "\r${DRIVER}: \033[1;37mTIMEOUT\033[0m"
echo -e "\r${DRIVER} (${MAC}): \033[1;37mTIMEOUT\033[0m"
break
fi
sleep 1
done
done
_bootwait || true
echo
DSMLOGO="$(readConfigKey "boot.dsmlogo" "${USER_CONFIG_FILE}")"
DSMLOGO="$(readConfigKey "bootscreen.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/"
@@ -295,12 +339,13 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
for T in $(busybox 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
[ -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 - Network will be unreachable until DSM boot.\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 - Network will be unreachable until DSM boot.\nNo IP found - DSM will not work properly!\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
# for D in $(realpath /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
@@ -309,7 +354,6 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
# 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"
@@ -318,7 +362,6 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
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
exit 0
fi
fi

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

@@ -8,6 +8,7 @@ function availableAddons() {
fi
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
local ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")"
local PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_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})

View File

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

View File

@@ -26,6 +26,20 @@ function readConfigKey() {
[ "${RESULT}" = "null" ] && echo "" || echo "${RESULT}"
}
###############################################################################
# Write to yaml config file
# 1 - Modules
# 2 - Path of yaml config file
function mergeConfigModules() {
local MS="ARCMOD\n${1// /\\n}"
local L="$(echo -en "${MS}" | awk '{print "modules."$1":"}')"
local xmlfile=$(mktemp)
echo -en "${L}" | yq -p p -o=yaml >"${xmlfile}"
deleteConfigKey "modules.\"ARCMOD\"" "${xmlfile}"
yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' "${2}" "${xmlfile}" 2>/dev/null
rm -f "${xmlfile}"
}
###############################################################################
# Write to yaml config file if key not exists
# 1 - Path of Key

View File

@@ -43,7 +43,7 @@ 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
[ -z "${HTTPPORT}" ] && HTTPPORT=8080 || 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)

View File

@@ -68,6 +68,12 @@ function randomhex() {
printf "&02X" "$((${RANDOM} % 255 + 1))"
}
###############################################################################
# Generate a random digit (0-9A-Z)
function genRandomDigit() {
echo {0..9} | tr ' ' '\n' | sort -R | head -1
}
###############################################################################
# Generate a random letter
function genRandomLetter() {
@@ -136,7 +142,7 @@ function generateMacAddress() {
[ ${I} -lt ${NUM} ] && MACS+=" "
done
MACS="$(echo "${MACS}" | tr '[:lower:]' '[:upper:]')"
MACS="$(echo "${MACS}" | tr '[:upper:]' '[:lower:]')"
echo "${MACS}"
return 0
}
@@ -229,7 +235,7 @@ function _set_conf_kv() {
# sort netif busid
function _sort_netif() {
local ETHLIST=""
local ETHX=$(ip -o link show | awk -F': ' '{print $2}' | grep eth)
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)"
@@ -277,7 +283,7 @@ function getBus() {
# 1 - ethN
function getIP() {
local IP=""
MACR="$(cat /sys/class/net/${1}/address 2>/dev/null | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
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}"
@@ -375,13 +381,39 @@ function delCmdline() {
setCmdline "${1}" "${CMDLINE}"
}
###############################################################################
# check CPU Intel(VT-d)/AMD(AMD-Vi)
function checkCPU_VT_d() {
lsmod | grep -q msr || modprobe msr 2>/dev/null
if grep -q "GenuineIntel" /proc/cpuinfo 2>/dev/null; then
local VT_D_ENABLED=$(rdmsr 0x3a 2>/dev/null)
[ "$((${VT_D_ENABLED:-0x0} & 0x5))" -eq $((0x5)) ] && return 0
elif grep -q "AuthenticAMD" /proc/cpuinfo 2>/dev/null; then
local IOMMU_ENABLED=$(rdmsr 0xC0010114 2>/dev/null)
[ "$((${IOMMU_ENABLED:-0x0} & 0x1))" -eq $((0x1)) ] && return 0
else
return 1
fi
}
###############################################################################
# check BIOS Intel(VT-d)/AMD(AMD-Vi)
function checkBIOS_VT_d() {
if grep -q "GenuineIntel" /proc/cpuinfo 2>/dev/null; then
dmesg 2>/dev/null | grep -iq "DMAR-IR.*DRHD base" && return 0
elif grep -q "AuthenticAMD" /proc/cpuinfo 2>/dev/null; then
dmesg 2>/dev/null | grep -iq "AMD-Vi.*enabled" && return 0
else
return 1
fi
}
###############################################################################
# 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
if ! echo "${MODES}" | grep -wq "${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..."
@@ -511,11 +543,15 @@ function onlineCheck() {
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}
if loadkeys "${KEYMAP:-us}" 2>/dev/null; then
writeConfigKey "keymap" "${KEYMAP}" "${USER_CONFIG_FILE}"
else
KEYMAP="us"
loadkeys "${KEYMAP}" 2>/dev/null
writeConfigKey "keymap" "${KEYMAP}" "${USER_CONFIG_FILE}"
fi
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)"
NEWTAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
if [ -n "${NEWTAG}" ]; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
updateOffline
@@ -553,7 +589,7 @@ function systemCheck () {
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
if [ ${CPUFREQUENCIES} -gt 1 ]; then
CPUFREQ="true"
else
CPUFREQ="false"
@@ -561,6 +597,8 @@ function systemCheck () {
# Check for Arc Patch
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
[ -z "${ARCCONF}" ] && writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
# Check for Disks
getmap
}
###############################################################################
@@ -585,33 +623,49 @@ function check_port() {
}
###############################################################################
# Unmount new boot loader disk
# 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
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
[ -z "${BOOTWAIT}" ] && BOOTWAIT=10
busybox 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"
while [ ${BOOTWAIT} -gt 0 ]; do
sleep 1
BOOTWAIT=$((BOOTWAIT - 1))
MSG="\033[1;33mAccess to SSH/Web will interrupt boot...\033[0m"
echo -en "\r${MSG}"
busybox 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"
echo -en "\r\033[1;33mAccess to SSH/Web detected and boot is interrupted.\033[0m\n"
rm -f WB WC
exit 0
return 1
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
}

View File

@@ -0,0 +1,390 @@
# INTEL_I810_IDS
80867121
80867123
80867125
# INTEL_I815_IDS
80861132
# INTEL_I830_IDS
80863577
# INTEL_I845G_IDS
80862562
# INTEL_I85X_IDS
80863582
8086358e
# INTEL_I865G_IDS
80862572
# INTEL_I915G_IDS
80862582
8086258a
# INTEL_I915GM_IDS
80862592
# INTEL_I945G_IDS
80862772
# INTEL_I945GM_IDS
808627a2
808627ae
# INTEL_I965G_IDS
80862972
80862982
80862992
808629a2
# INTEL_G33_IDS
808629b2
808629c2
808629d2
# INTEL_I965GM_IDS
80862a02
80862a12
# INTEL_GM45_IDS
80862a42
# INTEL_G45_IDS
80862e02
80862e12
80862e22
80862e32
80862e42
80862e92
# INTEL_PINEVIEW_G_IDS
8086a001
# INTEL_PINEVIEW_M_IDS
8086a011
# INTEL_IRONLAKE_D_IDS
80860042
# INTEL_IRONLAKE_M_IDS
80860046
# INTEL_SNB_D_GT1_IDS
80860102
8086010A
# INTEL_SNB_D_GT2_IDS
80860112
80860122
# INTEL_SNB_M_GT1_IDS
80860106
# INTEL_SNB_M_GT2_IDS
80860116
80860126
# INTEL_IVB_M_GT1_IDS
80860156
# INTEL_IVB_M_GT2_IDS
80860166
# INTEL_IVB_D_GT1_IDS
80860152
8086015a
# INTEL_IVB_D_GT2_IDS
80860162
8086016a
# INTEL_HSW_ULT_GT1_IDS
80860A02
80860A06
80860A0A
80860A0B
# INTEL_HSW_ULX_GT1_IDS
80860A0E
# INTEL_HSW_GT1_IDS
80860402
80860406
8086040A
8086040B
8086040E
80860C02
80860C06
80860C0A
80860C0B
80860C0E
80860D02
80860D06
80860D0A
80860D0B
80860D0E
# INTEL_HSW_ULT_GT2_IDS
80860A12
80860A16
80860A1A
80860A1B
# INTEL_HSW_ULX_GT2_IDS
80860A1E
# INTEL_HSW_GT2_IDS
80860412
80860416
8086041A
8086041B
8086041E
80860C12
80860C16
80860C1A
80860C1B
80860C1E
80860D12
80860D16
80860D1A
80860D1B
80860D1E
# INTEL_HSW_ULT_GT3_IDS
80860A22
80860A26
80860A2A
80860A2B
80860A2E
# INTEL_HSW_GT3_IDS
80860422
80860426
8086042A
8086042B
8086042E
80860C22
80860C26
80860C2A
80860C2B
80860C2E
80860D22
80860D26
80860D2A
80860D2B
80860D2E
# INTEL_VLV_IDS
80860f30
80860f31
80860f32
80860f33
# INTEL_BDW_ULT_GT1_IDS
80861606
8086160B
# INTEL_BDW_ULX_GT1_IDS
8086160E
# INTEL_BDW_GT1_IDS
80861602
8086160A
8086160D
# INTEL_BDW_ULT_GT2_IDS
80861616
8086161B
# INTEL_BDW_ULX_GT2_IDS
8086161E
# INTEL_BDW_GT2_IDS
80861612
8086161A
8086161D
# INTEL_BDW_ULT_GT3_IDS
80861626
8086162B
# INTEL_BDW_ULX_GT3_IDS
8086162E
# INTEL_BDW_GT3_IDS
80861622
8086162A
8086162D
# INTEL_BDW_ULT_RSVD_IDS
80861636
8086163B
# INTEL_BDW_ULX_RSVD_IDS
8086163E
# INTEL_BDW_RSVD_IDS
80861632
8086163A
8086163D
# INTEL_CHV_IDS
808622b0
808622b1
808622b2
808622b3
# INTEL_SKL_ULT_GT1_IDS
80861906
80861913~
# INTEL_SKL_ULX_GT1_IDS
8086190E
80861915~
# INTEL_SKL_GT1_IDS
80861902
8086190A
8086190B
80861917~
# INTEL_SKL_ULT_GT2_IDS
80861916
80861921
# INTEL_SKL_ULX_GT2_IDS
8086191E
# INTEL_SKL_GT2_IDS
80861912
8086191A
8086191B
8086191D
# INTEL_SKL_ULT_GT3_IDS
80861923
80861926
80861927
# INTEL_SKL_GT3_IDS
8086192A
8086192B
8086192D
# INTEL_SKL_GT4_IDS
80861932
8086193A
8086193B
8086193D
# INTEL_BXT_IDS
80860A84
80861A84
80861A85
80865A84
80865A85
# INTEL_GLK_IDS
80863184
80863185
# INTEL_KBL_ULT_GT1_IDS
80865906
80865913
# INTEL_KBL_ULX_GT1_IDS
8086590E
80865915
# INTEL_KBL_GT1_IDS
80865902
80865908
8086590A
8086590B
# INTEL_KBL_ULT_GT2_IDS
80865916
80865921
# INTEL_KBL_ULX_GT2_IDS
8086591E
# INTEL_KBL_GT2_IDS
80865912
80865917
8086591A
8086591B
8086591D
# INTEL_KBL_ULT_GT3_IDS
80865926
# INTEL_KBL_GT3_IDS
80865923
80865927
# INTEL_KBL_GT4_IDS
8086593B
# INTEL_AML_KBL_GT2_IDS
8086591C
808687C0
# INTEL_AML_CFL_GT2_IDS
808687CA
# INTEL_CML_GT1_IDS
80869BA2
80869BA4
80869BA5
80869BA8
# INTEL_CML_U_GT1_IDS
80869B21
80869BAA
80869BAC
# INTEL_CML_GT2_IDS
80869BC2
80869BC4
80869BC5
80869BC6
80869BC8
80869BE6
80869BF6
# INTEL_CML_U_GT2_IDS
80869B41
80869BCA
80869BCC
# INTEL_CFL_S_GT1_IDS
80863E90
80863E93
80863E99
# INTEL_CFL_S_GT2_IDS
80863E91
80863E92
80863E96
80863E98
80863E9A
# INTEL_CFL_H_GT1_IDS
80863E9C
# INTEL_CFL_H_GT2_IDS
80863E94
80863E9B
# INTEL_CFL_U_GT2_IDS
80863EA9
# INTEL_CFL_U_GT3_IDS
80863EA5
80863EA6
80863EA7
80863EA8
# INTEL_WHL_U_GT1_IDS
80863EA1
80863EA4
# INTEL_WHL_U_GT2_IDS
80863EA0
80863EA3
# INTEL_WHL_U_GT3_IDS
80863EA2
# INTEL_CNL_PORT_F_IDS
80865A44
80865A4C
80865A54
80865A5C
# INTEL_CNL_IDS
80865A40
80865A41
80865A42
80865A49
80865A4A
80865A50
80865A51
80865A52
80865A59
80865A5A
# INTEL_ICL_PORT_F_IDS
80868A50
80868A52
80868A53
80868A54
80868A56
80868A57
80868A58
80868A59
80868A5A
80868A5B
80868A5C
80868A70
80868A71
# INTEL_ICL_11_IDS
80868A51
80868A5D
# INTEL_EHL_IDS
80864500~
80864541
80864551
80864555
80864557
80864570~
80864571
# INTEL_JSL_IDS
80864E51
80864E55
80864E57
80864E61
80864E71
# INTEL_TGL_12_GT1_IDS
80869A60
80869A68
80869A70
# INTEL_TGL_12_GT2_IDS
80869A40
80869A49
80869A59
80869A78
80869AC0
80869AC9
80869AD9
80869AF8
# INTEL_RKL_IDS
80864C80
80864C8A
80864C8B
80864C8C
80864C90
80864C9A
# INTEL_DG1_IDS
80864905
80864906~
80864907~
80864908~
80864909~

View File

@@ -1,3 +1,37 @@
###############################################################################
# Unpack modules from a tgz file
# 1 - Platform
# 2 - Kernel Version
function unpackModules() {
local PLATFORM=${1}
local KVER=${2}
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
rm -rf "${TMP_PATH}/modules"
mkdir -p "${TMP_PATH}/modules"
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
}
###############################################################################
# Packag modules to a tgz file
# 1 - Platform
# 2 - Kernel Version
function packModules() {
local PLATFORM=${1}
local KVER=${2}
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
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
}
###############################################################################
# Return list of all modules available
# 1 - Platform
@@ -10,15 +44,9 @@ function getAllModules() {
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
unpackModules "${PLATFORM}" "${KVER}"
# Get list of all modules
for F in $(ls ${TMP_PATH}/modules/*.ko 2>/dev/null); do
local X=$(basename ${F})
@@ -45,34 +73,24 @@ function installModules() {
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
unpackModules "${PLATFORM}" "${KVER}"
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}"
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
else
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}" 2>"${LOG_FILE}"
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}"
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}"
tar -zxf "${CUSTOM_PATH}/firmware.tgz" -C "${RAMDISK_PATH}/usr/lib/firmware"
else
tar -zxf "${MODULES_PATH}/firmware.tgz" -C "${RAMDISK_PATH}/usr/lib/firmware" 2>"${LOG_FILE}"
tar -zxf "${MODULES_PATH}/firmware.tgz" -C "${RAMDISK_PATH}/usr/lib/firmware"
fi
if [ $? -ne 0 ]; then
return 1
@@ -97,21 +115,12 @@ function addToModules() {
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
unpackModules "${PLATFORM}" "${KVER}"
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
packModules "${PLATFORM}" "${KVER}"
}
###############################################################################
@@ -128,21 +137,12 @@ function delToModules() {
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
unpackModules "${PLATFORM}" "${KVER}"
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
packModules "${PLATFORM}" "${KVER}"
}
###############################################################################
@@ -170,15 +170,9 @@ function getdepends() {
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
unpackModules "${PLATFORM}" "${KVER}"
local DPS=($(_getdepends ${KONAME} | tr ' ' '\n' | sort -u))
echo ${DPS[@]}
rm -rf "${TMP_PATH}/modules"

View File

@@ -1,6 +1,6 @@
# Get Network Config for Loader
function getnet() {
ETHX=$(ip -o link show | awk -F': ' '{print $2}' | grep eth)
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)"
@@ -21,16 +21,16 @@ function getnet() {
# User Mac
for N in ${ETHX}; do
while true; do
MAC="$(cat /sys/class/net/${N}/address | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
dialog --backtitle "$(backtitle)" --title "Mac Setting" \
--inputbox "Type a custom MAC for ${ETH} (Eq. 001132abc123)." 7 50 "${MAC}"\
--inputbox "Type a custom Mac for ${N} (Eq. 001132a1b2c3).\nA custom Mac will not be applied to NIC!" 8 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 '[:lower:]' '[:upper:]')"
MAC="$(echo "${MAC}" | tr '[:lower:]' '[:upper:]')"
[ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g')"
MAC="$(echo "${MAC}" | tr '[:upper:]' '[:lower:]')"
if [ ${#MAC} -eq 12 ]; then
dialog --backtitle "$(backtitle)" --title "Mac Setting" --msgbox "Set Mac for ${N} to ${MAC}!" 5 50
writeConfigKey "${N}" "${MAC}" "${USER_CONFIG_FILE}"
break
else
@@ -42,9 +42,9 @@ function getnet() {
}
# Get Amount of NIC
ETHX="$(ls /sys/class/net 2>/dev/null | grep eth)"
ETHX=$(ls /sys/class/net/ 2>/dev/null | grep eth) || true
# Get actual IP
for ETH in ${ETHX}; do
IPCON=$(getIP ${ETH})
for N in ${ETHX}; do
IPCON="$(getIP "${N}")"
[ -n "${IPCON}" ] && break
done

View File

@@ -2,53 +2,51 @@
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
if [ $(lspci -d ::106 2>/dev/null | wc -l) -gt 0 ]; then
# 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 2>/dev/null | 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
fi
# SAS Disks
SASDRIVES=0
if [ $(lspci -d ::107 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::107 | awk '{print $1}'); do
if [ $(lspci -d ::107 2>/dev/null | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::107 2>/dev/null | 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)
@@ -57,8 +55,8 @@ function getmap() {
fi
# SCSI Disks
SCSIDRIVES=0
if [ $(lspci -d ::100 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::100 | awk '{print $1}'); do
if [ $(lspci -d ::100 2>/dev/null | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::100 2>/dev/null | 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)
@@ -67,8 +65,8 @@ function getmap() {
fi
# Raid Disks
RAIDDRIVES=0
if [ $(lspci -d ::104 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::104 | awk '{print $1}'); do
if [ $(lspci -d ::104 2>/dev/null | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::104 2>/dev/null | 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)
@@ -77,8 +75,8 @@ function getmap() {
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
if [ $(ls -l /sys/class/scsi_host 2>/dev/null | grep usb | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::c03 2>/dev/null | 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)
@@ -88,9 +86,9 @@ function getmap() {
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
if [ $(ls -l /sys/block/mmc* 2>/dev/null | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::805 | awk '{print $1}'); do
NAME=$(lspci -s "${PCI}" | sed "s/\ .*://")
NAME=$(lspci -s "${PCI}" 2>/dev/null | sed "s/\ .*://")
PORTNUM=$(ls -l /sys/block/mmc* | grep "${PCI}" | wc -l 2>/dev/null)
[ ${PORTNUM} -eq 0 ] && continue
MMCDRIVES=$((${MMCDRIVES} + ${PORTNUM}))
@@ -98,8 +96,8 @@ function getmap() {
fi
# NVMe Disks
NVMEDRIVES=0
if [ $(lspci -d ::108 | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::108 | awk '{print $1}'); do
if [ $(lspci -d ::108 2>/dev/null | wc -l) -gt 0 ]; then
for PCI in $(lspci -d ::108 2>/dev/null | 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)
@@ -119,7 +117,7 @@ function getmap() {
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
if [ $(lspci -d ::106 2>/dev/null | wc -l) -gt 0 ]; then
LASTDRIVE=0
while read -r D; do
if [ "${BUS}" = "sata" ] && [ "${MACHINE}" != "Native" ] && [ ${D} -eq 0 ]; then
@@ -230,25 +228,23 @@ function getmapSelection() {
}
# Check for Controller // 104=RAID // 106=SATA // 107=SAS // 100=SCSI // c03=USB
SATACONTROLLER=$(lspci -d ::106 | wc -l)
SATACONTROLLER=$(lspci -d ::106 2>/dev/null | 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)
SASCONTROLLER=$(lspci -d ::107 2>/dev/null | 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)
SCSICONTROLLER=$(lspci -d ::100 2>/dev/null | 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)
RAIDCONTROLLER=$(lspci -d ::104 2>/dev/null | 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
fi

View File

@@ -43,9 +43,25 @@ function updateLoader() {
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
HASHURL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update-${TAG}-${ARC_BRANCH}.hash"
HASH="$(curl -skL "${HASHURL}" | awk '{print $1}')"
if [ "${HASH}" != "$(sha256sum "${TMP_PATH}/update.zip" | awk '{print $1}')" ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
--infobox "Update failed - Hash mismatch!\nTry again later." 0 0
sleep 3
exec reboot
else
rm -rf "/mnt/update"
mkdir -p "${TMP_PATH}/update"
dialog --backtitle "$(backtitle)" --title "Update Loader" \
--infobox "Updating Loader..." 3 50
if unzip -oq "${TMP_PATH}/update.zip" -d "${TMP_PATH}/update"; then
cp -rf "${TMP_PATH}/update"/* "/mnt"
rm -rf "${TMP_PATH}/update"
rm -f "${TMP_PATH}/update.zip"
fi
fi
if [ "$(cat "${PART1_PATH}/ARC-VERSION")" = "${TAG}" ]; then
dialog --backtitle "$(backtitle)" --title "Update Loader" \
--infobox "Update Loader successful!" 3 50
sleep 2
@@ -76,13 +92,13 @@ function updateLoader() {
--infobox "Update Loader successful! -> Reboot to automated Build Mode..." 3 60
sleep 3
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
rebootTo "automated"
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"
rebootTo config
fi
}

View File

@@ -8,6 +8,10 @@ set -e
# Get Loader Disk Bus
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
checkBootLoader || die "The loader is corrupted, please rewrite it!"
[ -f "${HOME}/.initialized" ] && exec arc.sh || true
[ -f "${USER_CONFIG_FILE}" ] && sed -i "s/'/\"/g" "${USER_CONFIG_FILE}" >/dev/null 2>&1 || true
BUS=$(getBus "${LOADER_DISK}")
EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0)
@@ -38,15 +42,20 @@ 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.hardwareid" "" "${USER_CONFIG_FILE}"
initConfigKey "arc.userid" "" "${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 "bootscreen" "{}" "${USER_CONFIG_FILE}"
initConfigKey "bootscreen.dsminfo" "true" "${USER_CONFIG_FILE}"
initConfigKey "bootscreen.systeminfo" "true" "${USER_CONFIG_FILE}"
initConfigKey "bootscreen.diskinfo" "false" "${USER_CONFIG_FILE}"
initConfigKey "bootscreen.hwidinfo" "false" "${USER_CONFIG_FILE}"
initConfigKey "bootscreen.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 "governor" "performance" "${USER_CONFIG_FILE}"
initConfigKey "hddsort" "false" "${USER_CONFIG_FILE}"
initConfigKey "kernel" "official" "${USER_CONFIG_FILE}"
initConfigKey "kernelload" "power" "${USER_CONFIG_FILE}"
@@ -73,7 +82,7 @@ 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 "usbmount" "false" "${USER_CONFIG_FILE}"
initConfigKey "zimage-hash" "" "${USER_CONFIG_FILE}"
if grep -q "automated_arc" /proc/cmdline; then
writeConfigKey "arc.mode" "automated" "${USER_CONFIG_FILE}"
@@ -93,27 +102,27 @@ if arrayExistItem "sortnetif:" $(readConfigMap "addons" "${USER_CONFIG_FILE}");
_sort_netif "$(readConfigKey "addons.sortnetif" "${USER_CONFIG_FILE}")"
fi
# Read/Write IP/Mac to config
ETHX=$(ip -o link show | awk -F': ' '{print $2}' | grep eth)
for N in ${ETHX}; do
MACR="$(cat /sys/class/net/${N}/address 2>/dev/null | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
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}
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
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
[ "${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
@@ -126,8 +135,8 @@ 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)"
VID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | grep "ID_VENDOR_ID" | cut -d= -f2)"
PID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | 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
@@ -152,11 +161,7 @@ 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"
if [ -f "${ARC_PATH}/boot.sh" ]; then
exec boot.sh && exit 0
else
echo -e "\033[1;31mError: Can't find Arc System Files...\033[0m"
fi
exec boot.sh && exit 0
else
echo -e "\033[1;34mStarting Config Mode...\033[0m"
fi
@@ -177,8 +182,8 @@ for N in ${ETHX}; do
echo -e "\r${DRIVER}: \033[1;37mNOT CONNECTED\033[0m"
break
fi
COUNT=$((${COUNT} + 1))
IP="$(getIP ${N})"
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
@@ -210,17 +215,19 @@ mkdir -p "${MODULES_PATH}"
mkdir -p "${PATCH_PATH}"
mkdir -p "${USER_UP_PATH}"
# Tell webterminal that the loader is ready
touch "${HOME}/.initialized"
# 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."
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}:${TTYDPORT:-7681}\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
arc.sh
exec arc.sh
fi
exit 0

Binary file not shown.

View File

@@ -93,21 +93,21 @@ while IFS=': ' read -r KEY VALUE; do
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
PATCHS=(
"ramdisk-etc-rc-*.patch"
"ramdisk-init-script-*.patch"
"ramdisk-post-init-script-*.patch"
"ramdisk-disable-root-pwd-*.patch"
"ramdisk-disable-disabled-ports-*.patch"
)
for PE in "${PATCHS[@]}"; do
RET=1
echo "Patching with ${PE}" >"${LOG_FILE}"
# ${PE} contains *, so double quotes cannot be added
for PF in $(ls ${PATCH_PATH}/${PE} 2>/dev/null); do
echo "Patching with ${PF}" >>"${LOG_FILE}"
(
cd "${RAMDISK_PATH}"
busybox patch -p1 -i "${PF}" >>"${LOG_FILE}" 2>&1 # busybox patch and gun patch have different processing methods and parameters.
)
# busybox patch and gun patch have different processing methods and parameters.
(cd "${RAMDISK_PATH}" && busybox patch -p1 -i "${PF}") >>"${LOG_FILE}" 2>&1
RET=$?
[ ${RET} -eq 0 ] && break
done
@@ -128,13 +128,17 @@ done
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
# Generate synoinfo configurations
{
echo "_set_conf_kv 'SN' '${SN}' '/tmpRoot/etc/synoinfo.conf'"
echo "_set_conf_kv 'SN' '${SN}' '/tmpRoot/etc.defaults/synoinfo.conf'"
for KEY in "${!SYNOINFO[@]}"; do
echo "_set_conf_kv '${KEY}' '${SYNOINFO[${KEY}]}' '/tmpRoot/etc/synoinfo.conf'"
echo "_set_conf_kv '${KEY}' '${SYNOINFO[${KEY}]}' '/tmpRoot/etc.defaults/synoinfo.conf'"
done
} >"${TMP_PATH}/rp.txt"
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"
@@ -149,20 +153,22 @@ gzip -dc "${LKMS_PATH}/rp-${PLATFORM}-${KVERP}-${LKM}.ko.gz" >"${RAMDISK_PATH}/u
# 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"
{
echo "#!/bin/sh"
echo 'echo "addons.sh called with params ${@}"'
echo "export LOADERLABEL=\"ARC\""
echo "export LOADERVERSION=\"${ARC_VERSION}\""
echo "export LOADERBUILD=\"${ARC_BUILD}\""
echo "export LOADERBRANCH=\"${ARCBRANCH}\""
echo "export PLATFORM=\"${PLATFORM}\""
echo "export MODEL=\"${MODEL}\""
echo "export MODELID=\"${MODELID}\""
echo "export PRODUCTVER=\"${PRODUCTVER}\""
echo "export MLINK=\"${PAT_URL}\""
echo "export MCHECKSUM=\"${PAT_HASH}\""
echo "export LAYOUT=\"${LAYOUT:-qwerty}\""
echo "export KEYMAP=\"${KEYMAP:-en}\""
} >"${RAMDISK_PATH}/addons/addons.sh"
chmod +x "${RAMDISK_PATH}/addons/addons.sh"
# System Addons
@@ -170,8 +176,7 @@ for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "wol"
PARAMS=""
if [ "${ADDON}" = "disks" ]; then
HDDSORT="$(readConfigKey "hddsort" "${USER_CONFIG_FILE}")"
USBMOUNT="$(readConfigKey "usbmount" "${USER_CONFIG_FILE}")"
PARAMS="${HDDSORT} ${USBMOUNT}"
PARAMS="${HDDSORT}"
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
fi
installAddon "${ADDON}" "${PLATFORM}" || exit 1

View File

@@ -3,11 +3,36 @@
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
. "${ARC_PATH}/include/functions.sh"
calculate_run_size() {
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')
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
if [ -z "${OUT}" ]; then
echo "Never found .bss or .brk file offset" >&2
return 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
return 1
fi
fi
printf "%d\n" ${runSize}
return 0
}
# Adapted from: scripts/Makefile.lib
# Usage: size_append FILE [FILE2] [FILEn]...
@@ -34,6 +59,8 @@ size_le() {
VMLINUX_MOD=${1}
ZIMAGE_MOD=${2}
KVER=$(strings "${VMLINUX_MOD}" | grep -Eo "Linux version [0-9]+\.[0-9]+\.[0-9]+" | head -1 | awk '{print $3}')
if [ "$(echo "${KVER:-4}" | cut -d'.' -f1)" -lt 5 ]; then
# Kernel version 4.x or 3.x (bromolow)
# zImage_head 16494
@@ -56,7 +83,7 @@ if [ "$(echo "${KVER:-4}" | cut -d'.' -f1)" -lt 5 ]; then
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")
RUN_SIZE=$(objdump -h "${VMLINUX_MOD}" | calc_run_size)
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
@@ -66,7 +93,7 @@ else
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")
# RUN_SIZE=$(objdump -h "${VMLINUX_MOD}" | calc_run_size)
# 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,27 +1,13 @@
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
set menu_color_normal=white/black
set menu_color_highlight=white/red
set color_normal=white/black
if [ -s $prefix/grubenv ]; then
load_env
if [ -s ${prefix}/grubenv ]; then
load_env --skip-sig
fi
if [ "${next_entry}" ]; then
set default="${next_entry}"
@@ -32,25 +18,26 @@ 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
}
terminal_input console
terminal_output console
if [ "${feature_all_video_module}" = "y" ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
load_video
if loadfont unicode; then
insmod gfxterm
set gfxmode=1024x768
set gfxpayload=auto
if [ "${grub_platform}" = "efi" ]; then
set gfxmode=auto
else
set gfxmode=1024x768
fi
terminal_output gfxterm
insmod gfxmenu
loadfont ${prefix}/theme/dejavu_bold_14.pf2
@@ -60,9 +47,9 @@ if loadfont unicode; then
export theme
fi
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
terminal_output --append serial_com0
if serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1; then
terminal_input --append serial
terminal_output --append serial
fi
function set_gfxpayload {
@@ -73,11 +60,7 @@ function set_gfxpayload {
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"
set ARC_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off amd_iommu_intr=legacy net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable amd_pstate=disable nox2apic nomodeset"
search --set=root --label "ARC3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
@@ -183,6 +166,11 @@ menuentry 'Start Memtest86+' --id memtest {
linux ${prefix}/memtest
}
menuentry 'Poweroff' --id poweroff {
echo "System is powering off..."
halt
}
if [ ${vesa_mode} = 1 ]; then
menuentry 'Change Vesa to Text Output' --id videomode {
set vesa_mode=0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,10 @@
#!/usr/bin/env bash
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
set -e
@@ -7,6 +13,10 @@ sudo git clean -fdx
. scripts/func.sh "${AUX_TOKEN}"
# Unmount Image File
sudo umount "/tmp/p1" 2>/dev/null || true
sudo umount "/tmp/p3" 2>/dev/null || true
# Get extractor, LKM, addons and Modules
echo "Get Dependencies"
getAddons "files/p3/addons"
@@ -21,8 +31,8 @@ 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}"
IMAGE_FILE="arc_create.img"
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
@@ -37,8 +47,8 @@ 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"
ARC_VERSION="13.3.7"
ARC_BRANCH="extended"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
@@ -48,8 +58,6 @@ 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
@@ -61,9 +69,14 @@ sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo rm -rf "/tmp/p1"
sudo rm -rf "/tmp/p3"
sudo losetup --detach ${LOOPX}
# Resize Image
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"
IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk

View File

@@ -1,4 +1,10 @@
#!/usr/bin/env bash
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
set -e
@@ -7,6 +13,10 @@ sudo git clean -fdx
. scripts/func.sh "${AUX_TOKEN}"
# Unmount Image File
sudo umount "/tmp/p1" 2>/dev/null || true
sudo umount "/tmp/p3" 2>/dev/null || true
# Get extractor, LKM, addons and Modules
echo "Get Dependencies"
getAddons "files/p3/addons"
@@ -20,8 +30,8 @@ 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}"
IMAGE_FILE="arc_create.img"
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
@@ -36,8 +46,8 @@ 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"
ARC_VERSION="13.3.7"
ARC_BRANCH="minimal"
echo "${ARC_BUILD}" >files/p1/ARC-BUILD
echo "${ARC_VERSION}" >files/p1/ARC-VERSION
echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
@@ -47,8 +57,6 @@ 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
@@ -60,9 +68,14 @@ sync
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo rm -rf "/tmp/p1"
sudo rm -rf "/tmp/p3"
sudo losetup --detach ${LOOPX}
# Resize Image
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"
IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk

Binary file not shown.

View File

@@ -489,4 +489,4 @@ int main(int argc, char *argv[])
close(fd);
printf("Finish!\n");
return 0;
}
}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
@@ -15,19 +15,21 @@ function getLKMs() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-lkm/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "rp-lkms.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-lkm/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip LKMs
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting LKMs end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-lkm/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Addons
@@ -37,28 +39,31 @@ function getAddons() {
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(.*)(?=")')"
rm -f "${CACHE_FILE}"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-addons/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "addons-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-addons/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Addons
rm -rf "${CACHE_DIR}"
mkdir -p "${CACHE_DIR}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${CACHE_DIR}"; then
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}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-addons/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Modules
@@ -68,18 +73,21 @@ function getModules() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-modules/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "modules-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-modules/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Modules
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting Modules end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-modules/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Configs
@@ -89,19 +97,21 @@ function getConfigs() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-configs/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "configs-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-configs/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Configs
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting Configs end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-configs/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Patches
@@ -111,19 +121,21 @@ function getPatches() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-patches/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "patches-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-patches/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Patches
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting Patches end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-patches/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Custom
@@ -133,19 +145,21 @@ function getCustom() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-custom/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "custom-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-custom/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Custom
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting Custom end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-custom/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Theme
@@ -155,18 +169,20 @@ function getTheme() {
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(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-theme/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
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
while read -r ID NAME; do
if [ "${NAME}" = "arc-theme-${TAG}.zip" ]; then
curl -kL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/AuxXxilium/arc-theme/releases/assets/${ID}" -o "${CACHE_FILE}"
# Unzip Theme
mkdir -p "${DEST_PATH}"
if unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"; then
rm -f "${CACHE_FILE}"
echo "Getting Theme end - ${TAG}"
break
fi
fi
done < <(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-theme/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Buildroot-X
@@ -189,7 +205,7 @@ function getBuildrootx() {
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)"')
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
@@ -212,7 +228,7 @@ function getBuildroots() {
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)"')
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
@@ -243,9 +259,9 @@ function repackInitrd() {
[ -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}")"
INITRD_FILE="$(realpath "${INITRD_FILE}")"
PLUGIN_PATH="$(realpath "${PLUGIN_PATH}")"
OUTPUT_PATH="$(realpath "${OUTPUT_PATH}")"
local RDXZ_PATH="rdxz_tmp"
mkdir -p "${RDXZ_PATH}"
@@ -290,8 +306,8 @@ function resizeImg() {
[[ -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}")"
INPUT_FILE="$(realpath "${INPUT_FILE}")"
OUTPUT_FILE="$(realpath "${OUTPUT_FILE}")"
SIZE=$(($(du -m "${INPUT_FILE}" | awk '{print $1}')$(echo "${CHANGE_SIZE}" | sed 's/M//g; s/b//g')))
@@ -310,47 +326,28 @@ function resizeImg() {
sudo losetup -d ${LOOPX}
}
# convertova
# createvmx
# $1 bootloader file
# $2 ova file
function convertova() {
# $2 vmx name
function createvmx() {
BLIMAGE=${1}
OVAPATH=${2}
VMNAME=${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"
rm -rf "VMX_${VMNAME}"
mkdir -p "VMX_${VMNAME}"
qemu-img convert -O vmdk -o 'adapter_type=lsilogic,subformat=streamOptimized,compat6' "${BLIMAGE}" "VMX_${VMNAME}/${VMNAME}-disk1.vmdk"
qemu-img create -f vmdk "VMX_${VMNAME}/${VMNAME}-disk2.vmdk" "32G"
# Create VM configuration
cat <<_EOF_ >"OVA_${VMNAME}/${VMNAME}.vmx"
cat <<_EOF_ >"VMX_${VMNAME}/${VMNAME}.vmx"
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "21"
virtualHW.version = "17"
displayName = "${VMNAME}"
annotation = "https://github.com/AuxXxilium/arc"
guestOS = "ubuntu-64"
@@ -407,10 +404,92 @@ sata0:0.present = "TRUE"
sata0:1.fileName = "${VMNAME}-disk2.vmdk"
sata0:1.present = "TRUE"
_EOF_
}
# convertvmx
# $1 bootloader file
# $2 vmx file
function convertvmx() {
local BLIMAGE=${1}
local VMXPATH=${2}
BLIMAGE="$(realpath "${BLIMAGE}")"
VMXPATH="$(realpath "${VMXPATH}")"
local VMNAME="$(basename "${VMXPATH}" .vmx)"
createvmx "${BLIMAGE}" "${VMNAME}"
rm -rf "${VMXPATH}"
mv -f "VMX_${VMNAME}" "${VMXPATH}"
}
# convertova
# $1 bootloader file
# $2 ova file
function convertova() {
local BLIMAGE=${1}
local OVAPATH=${2}
BLIMAGE="$(realpath "${BLIMAGE}")"
OVAPATH="$(realpath "${OVAPATH}")"
local VMNAME="$(basename "${OVAPATH}" .ova)"
createvmx "${BLIMAGE}" "${VMNAME}"
# 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
rm -f "${OVAPATH}"
ovftool/ovftool "OVA_${VMNAME}/${VMNAME}.vmx" "${OVAPATH}"
rm -rf "OVA_${VMNAME}"
ovftool/ovftool "VMX_${VMNAME}/${VMNAME}.vmx" "${OVAPATH}"
rm -rf "VMX_${VMNAME}"
}
# createvmc
# $1 vhd file
# $2 vmc file
function createvmc() {
local BLIMAGE=${1:-arc.vhd}
local VMCPATH=${2:-arc.vmc}
BLIMAGE="$(basename "${BLIMAGE}")"
VMCPATH="$(realpath "${VMCPATH}")"
cat <<_EOF_ >"${VMCPATH}"
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
<version type="string">2.0</version>
<hardware>
<memory>
<ram_size type="integer">4096</ram_size>
</memory>
<pci_bus>
<ide_adapter>
<ide_controller id="0">
<location id="0">
<drive_type type="integer">1</drive_type>
<pathname>
<relative type="string">${BLIMAGE}</relative>
</pathname>
</location>
</ide_controller>
</ide_adapter>
</pci_bus>
</hardware>
</preferences>
_EOF_
}
# copy buildroot