mirror of
https://github.com/RROrg/rr.git
synced 2025-08-25 14:07:14 +08:00
Compare commits
No commits in common. "2b592cf227b4d73f048b4e272d888511ebd489aa" and "002c6417e3cb0c5481a9d88a736f758c04f8d820" have entirely different histories.
2b592cf227
...
002c6417e3
18
.github/workflows/issues.yml
vendored
18
.github/workflows/issues.yml
vendored
@ -149,10 +149,6 @@ jobs:
|
|||||||
# 累了, 毁灭吧!
|
# 累了, 毁灭吧!
|
||||||
|
|
||||||
# yq need sudo !!!
|
# yq need sudo !!!
|
||||||
function deleteConfigKey() {
|
|
||||||
sudo yq eval "del(.${1})" --inplace "${2}" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
function writeConfigKey() {
|
function writeConfigKey() {
|
||||||
local value="${2}"
|
local value="${2}"
|
||||||
[ "${value}" = "{}" ] && sudo yq eval ".${1} = {}" --inplace "${3}" 2>/dev/null || sudo yq eval ".${1} = \"${value}\"" --inplace "${3}" 2>/dev/null
|
[ "${value}" = "{}" ] && sudo yq eval ".${1} = {}" --inplace "${3}" 2>/dev/null || sudo yq eval ".${1} = \"${value}\"" --inplace "${3}" 2>/dev/null
|
||||||
@ -163,15 +159,10 @@ jobs:
|
|||||||
[ "${result}" = "null" ] && echo "" || echo "${result}"
|
[ "${result}" = "null" ] && echo "" || echo "${result}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function mergeConfigModules() {
|
function mergeConfigStr() {
|
||||||
# Error: bad file '-': cannot index array with '8139cp' (strconv.ParseInt: parsing "8139cp": invalid syntax)
|
|
||||||
# When the first key is a pure number, yq will not process it as a string by default. The current solution is to insert a placeholder key.
|
|
||||||
local MS="RRORG\n${1// /\\n}"
|
|
||||||
local L="$(echo -en "${MS}" | awk '{print "modules."$1":"}')"
|
|
||||||
local xmlfile=$(mktemp)
|
local xmlfile=$(mktemp)
|
||||||
echo -en "${L}" | sudo yq -p p -o y >"${xmlfile}"
|
echo "${2}" | sudo yq -p "${1}" -o y >"${xmlfile}"
|
||||||
deleteConfigKey "modules.\"RRORG\"" "${xmlfile}"
|
sudo yq eval-all --inplace '. as $item ireduce ({}; . * $item)' --inplace "${3}" "${xmlfile}" 2>/dev/null
|
||||||
sudo yq eval-all --inplace '. as $item ireduce ({}; . * $item)' --inplace "${2}" "${xmlfile}" 2>/dev/null
|
|
||||||
rm -f "${xmlfile}"
|
rm -f "${xmlfile}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +233,8 @@ jobs:
|
|||||||
echo "set modules: ${{ env.modules }}"
|
echo "set modules: ${{ env.modules }}"
|
||||||
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
|
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(echo "${{ env.modules }}" | sed 's/,/\n/g')" "${USER_CONFIG_FILE}"
|
L="$(for I in $(echo "${{ env.modules }}" | sed 's/,/ /g'); do echo "modules.${I}:"; done)"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
# for M in $(echo "${{ env.modules }}" | sed 's/,/ /g'); do
|
# for M in $(echo "${{ env.modules }}" | sed 's/,/ /g'); do
|
||||||
# writeConfigKey "modules.\"${M}\"" "" "${USER_CONFIG_FILE}"
|
# writeConfigKey "modules.\"${M}\"" "" "${USER_CONFIG_FILE}"
|
||||||
# done
|
# done
|
||||||
|
BIN
docs/addons.xlsx
BIN
docs/addons.xlsx
Binary file not shown.
BIN
docs/models.xlsx
BIN
docs/models.xlsx
Binary file not shown.
Binary file not shown.
1307
docs/pats.json
1307
docs/pats.json
File diff suppressed because it is too large
Load Diff
BIN
docs/pats.xlsx
BIN
docs/pats.xlsx
Binary file not shown.
@ -174,7 +174,7 @@ CMDLINE['log_buf_len']="32M"
|
|||||||
CMDLINE['rootwait']=""
|
CMDLINE['rootwait']=""
|
||||||
CMDLINE['panic']="${KERNELPANIC:-0}"
|
CMDLINE['panic']="${KERNELPANIC:-0}"
|
||||||
# CMDLINE['nointremap']="" # no need
|
# CMDLINE['nointremap']="" # no need
|
||||||
# CMDLINE['split_lock_detect']="off" # check KVER
|
# CMDLINE['split_lock_detect']="off" # no need
|
||||||
CMDLINE['pcie_aspm']="off"
|
CMDLINE['pcie_aspm']="off"
|
||||||
# CMDLINE['intel_pstate']="disable"
|
# CMDLINE['intel_pstate']="disable"
|
||||||
# CMDLINE['nox2apic']="" # check platform
|
# CMDLINE['nox2apic']="" # check platform
|
||||||
|
@ -28,17 +28,13 @@ function readConfigKey() {
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Write to yaml config file
|
# Write to yaml config file
|
||||||
# 1 - Modules
|
# 1 - format
|
||||||
# 2 - Path of yaml config file
|
# 2 - string
|
||||||
function mergeConfigModules() {
|
# 3 - Path of yaml config file
|
||||||
# Error: bad file '-': cannot index array with '8139cp' (strconv.ParseInt: parsing "8139cp": invalid syntax)
|
function mergeConfigStr() {
|
||||||
# When the first key is a pure number, yq will not process it as a string by default. The current solution is to insert a placeholder key.
|
|
||||||
local MS="RRORG\n${1// /\\n}"
|
|
||||||
local L="$(echo -en "${MS}" | awk '{print "modules."$1":"}')"
|
|
||||||
local xmlfile=$(mktemp)
|
local xmlfile=$(mktemp)
|
||||||
echo -en "${L}" | yq -p p -o y >"${xmlfile}"
|
echo "${2}" | yq -p "${1}" -o y >"${xmlfile}"
|
||||||
deleteConfigKey "modules.\"RRORG\"" "${xmlfile}"
|
yq eval-all --inplace '. as $item ireduce ({}; . * $item)' --inplace "${3}" "${xmlfile}" 2>/dev/null
|
||||||
yq eval-all --inplace '. as $item ireduce ({}; . * $item)' --inplace "${2}" "${xmlfile}" 2>/dev/null
|
|
||||||
rm -f "${xmlfile}"
|
rm -f "${xmlfile}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
RR_VERSION="24.12.1"
|
RR_VERSION="24.12.0"
|
||||||
RR_RELEASE=""
|
RR_RELEASE=""
|
||||||
RR_TITLE="RR v${RR_VERSION}"
|
RR_TITLE="RR v${RR_VERSION}"
|
||||||
|
|
||||||
|
@ -329,7 +329,8 @@ function productversMenu() {
|
|||||||
done <<<$(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
done <<<$(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
||||||
# Rewrite modules
|
# Rewrite modules
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
# Remove old files
|
# Remove old files
|
||||||
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null 2>&1 || true
|
rm -f "${ORI_ZIMAGE_FILE}" "${ORI_RDGZ_FILE}" "${MOD_ZIMAGE_FILE}" "${MOD_RDGZ_FILE}" >/dev/null 2>&1 || true
|
||||||
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" "${PART2_PATH}/"* >/dev/null 2>&1 || true
|
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" "${PART2_PATH}/"* >/dev/null 2>&1 || true
|
||||||
@ -408,7 +409,8 @@ function setConfigFromDSM() {
|
|||||||
done <<<$(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
done <<<$(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
||||||
# Rebuild modules
|
# Rebuild modules
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
touch ${PART1_PATH}/.build
|
touch ${PART1_PATH}/.build
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -690,14 +692,16 @@ function moduleMenu() {
|
|||||||
0)
|
0)
|
||||||
# ok-button
|
# ok-button
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(cat "${TMP_PATH}/resp" 2>/dev/null)" "${USER_CONFIG_FILE}"
|
L="$(for I in $(cat ${TMP_PATH}/resp 2>/dev/null); do echo "modules.${I}:"; done)"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
touch ${PART1_PATH}/.build
|
touch ${PART1_PATH}/.build
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
# extra-button
|
# extra-button
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(echo "${ALLMODULES}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "${ALLMODULES}" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
touch ${PART1_PATH}/.build
|
touch ${PART1_PATH}/.build
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
@ -3446,7 +3450,8 @@ function updateRR() {
|
|||||||
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
||||||
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -3583,7 +3588,8 @@ function updateModules() {
|
|||||||
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
||||||
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rm -rf "${TMP_PATH}/update"
|
rm -rf "${TMP_PATH}/update"
|
||||||
@ -3705,7 +3711,8 @@ function updateCKs() {
|
|||||||
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kpre" "${WORK_PATH}/platforms.yml")"
|
||||||
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rm -rf "${TMP_PATH}/update"
|
rm -rf "${TMP_PATH}/update"
|
||||||
@ -3998,7 +4005,8 @@ else
|
|||||||
fi
|
fi
|
||||||
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
||||||
mergeConfigModules "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
|
L="$(echo "$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" | awk '{print "modules."$1":"}')"
|
||||||
|
mergeConfigStr p "${L}" "${USER_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
touch ${PART1_PATH}/.build
|
touch ${PART1_PATH}/.build
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
24.12.1
|
24.12.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user