Skip to content

Commit ddfb534

Browse files
committed
boot: update and fix
Signed-off-by: AuxXxilium <[email protected]>
1 parent e5c3efe commit ddfb534

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

files/initrd/opt/arc/boot.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ done
157157
CMDLINE['netif_num']="${NIC}"
158158

159159
# Boot Cmdline
160-
if grep -q "force_junior" /proc/cmdline; then
160+
if [ "${ARC_MODE}" = "reinstall" ]; then
161161
CMDLINE["force_junior"]=""
162-
fi
163-
if grep -q "recovery" /proc/cmdline; then
162+
elif [ "${ARC_MODE}" = "recovery" ]; then
164163
CMDLINE["recovery"]=""
164+
CMDLINE["force_junior"]=""
165165
fi
166166

167167
if [ "${EFI}" = "1" ]; then
@@ -224,6 +224,13 @@ if [ "${USBMOUNT}" = "true" ]; then
224224
fi
225225
if [ -n "${GOVERNOR}" ]; then
226226
CMDLINE['governor']="${GOVERNOR}"
227+
if [ "${GOVERNOR}" != "performance" ]; then
228+
if grep -qi "intel" /proc/cpuinfo; then
229+
CMDLINE['intel_pstate']="disable"
230+
elif grep -qi "amd" /proc/cpuinfo; then
231+
CMDLINE['amd_pstate']="disable"
232+
fi
233+
fi
227234
fi
228235

229236
if is_in_array "${PLATFORM}" "${XAPICRL[@]}"; then

files/initrd/opt/arc/include/functions.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function arc_mode() {
3232
ARC_MODE="update"
3333
elif grep -q 'force_arc' /proc/cmdline; then
3434
ARC_MODE="config"
35+
elif grep -q "force_junior" /proc/cmdline; then
36+
ARC_MODE="reinstall"
37+
elif grep -q "recovery" /proc/cmdline; then
38+
ARC_MODE="recovery"
3539
else
3640
ARC_MODE="dsm"
3741
fi

0 commit comments

Comments
 (0)