mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 02:19:54 +07:00
ramdisk: fix SA6400
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
6180f1a933
commit
a12d7726bb
@ -93,9 +93,7 @@ function modulesMenu() {
|
||||
4 "Deselect all Modules" \
|
||||
5 "Choose Modules" \
|
||||
6 "Add external module" \
|
||||
7 "Edit Modules copied to DSM" \
|
||||
8 "Force-copy loaded Modules to DSM" \
|
||||
9 "Blacklist Modules to prevent loading in DSM" \
|
||||
7 "Blacklist Modules to prevent loading in DSM" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
case "$(cat ${TMP_PATH}/resp)" in
|
||||
@ -209,49 +207,6 @@ function modulesMenu() {
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
7)
|
||||
if [ -f "${USER_UP_PATH}/modulelist" ]; then
|
||||
cp -f "${USER_UP_PATH}/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
else
|
||||
cp -f "${ARC_PATH}/include/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
fi
|
||||
while true; do
|
||||
dialog --backtitle "$(backtitle)" --title "Edit Modules copied to DSM" \
|
||||
--editbox "${TMP_PATH}/modulelist.tmp" 0 0 2>"${TMP_PATH}/modulelist.user"
|
||||
[ $? -ne 0 ] && return
|
||||
[ ! -d "${USER_UP_PATH}" ] && mkdir -p "${USER_UP_PATH}"
|
||||
mv -f "${TMP_PATH}/modulelist.user" "${USER_UP_PATH}/modulelist"
|
||||
dos2unix "${USER_UP_PATH}/modulelist"
|
||||
break
|
||||
done
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
8)
|
||||
if [ -f "${USER_UP_PATH}/modulelist" ]; then
|
||||
cp -f "${USER_UP_PATH}/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
else
|
||||
cp -f "${ARC_PATH}/include/modulelist" "${TMP_PATH}/modulelist.tmp"
|
||||
fi
|
||||
echo -e "\n\n# Arc Modules" >>"${TMP_PATH}/modulelist.tmp"
|
||||
KOLIST=""
|
||||
for I in $(lsmod | awk -F' ' '{print $1}' | grep -v 'Module'); do
|
||||
KOLIST+="$(getdepends "${PLATFORM}" "${KVERP}" "${I}") ${I} "
|
||||
done
|
||||
KOLIST=($(echo ${KOLIST} | tr ' ' '\n' | sort -u))
|
||||
while read -r ID DESC; do
|
||||
for MOD in ${KOLIST[@]}; do
|
||||
[ "${MOD}" == "${ID}" ] && echo "F ${ID}.ko" >>"${TMP_PATH}/modulelist.tmp"
|
||||
done
|
||||
done < <(getAllModules "${PLATFORM}" "${KVERP}")
|
||||
[ ! -d "${USER_UP_PATH}" ] && mkdir -p "${USER_UP_PATH}"
|
||||
mv -f "${TMP_PATH}/modulelist.tmp" "${USER_UP_PATH}/modulelist"
|
||||
dos2unix "${USER_UP_PATH}/modulelist"
|
||||
dialog --backtitle "$(backtitle)" --title "Loaded Modules Copy" \
|
||||
--msgbox "All loaded Modules will be copied to DSM!" 5 50
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
9)
|
||||
MSG=""
|
||||
MSG+="The blacklist is used to prevent the kernel from loading specific modules.\n"
|
||||
MSG+="The blacklist is a list of module names separated by ','.\n"
|
||||
|
@ -153,7 +153,7 @@ echo 'echo "addons.sh called with params ${@}"' >>"${RAMDISK_PATH}/addons/addons
|
||||
echo "export LOADERLABEL=\"ARC\"" >>"${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export LOADERVERSION=\"${ARC_VERSION}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export PLATFORM=\"${PLATFORM}\"" >>"${RAMDISK_PATH}/addons/addons.sh"
|
||||
echo "export PRODUCTVERL=\"${PRODUCTVER}\"" >>"${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"
|
||||
@ -166,10 +166,10 @@ chmod +x "${RAMDISK_PATH}/addons/addons.sh"
|
||||
for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "updatenotify" "wol" "mountloader" "powersched" "cpufreqscaling"; do
|
||||
PARAMS=""
|
||||
if [ "${ADDON}" == "disks" ]; then
|
||||
PARAMS=${HDDSORT:-"false"}
|
||||
PARAMS=${HDDSORT}
|
||||
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
|
||||
elif [ "${ADDON}" == "cpufreqscaling" ]; then
|
||||
PARAMS=${CPUGOVERNOR:-"performance"}
|
||||
PARAMS=${CPUGOVERNOR}
|
||||
fi
|
||||
installAddon "${ADDON}" "${PLATFORM}" || exit 1
|
||||
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
|
||||
@ -187,18 +187,11 @@ echo "inetd" >>"${RAMDISK_PATH}/addons/addons.sh"
|
||||
|
||||
echo "Modify files" >"${LOG_FILE}"
|
||||
# Remove function from scripts
|
||||
[ "2" == "${BUILDNUM:0:1}" ] && sed -i 's/function //g' $(find "${RAMDISK_PATH}/addons/" -type f -name "*.sh")
|
||||
[ "2" == "${PRODUCTVER:0:1}" ] && sed -i 's/function //g' $(find "${RAMDISK_PATH}/addons/" -type f -name "*.sh")
|
||||
|
||||
# Build modules dependencies
|
||||
# ${ARC_PATH}/depmod -a -b ${RAMDISK_PATH} 2>/dev/null
|
||||
|
||||
# Copying modulelist
|
||||
if [ -f "${USER_UP_PATH}/modulelist" ]; then
|
||||
cp -f "${USER_UP_PATH}/modulelist" "${RAMDISK_PATH}/addons/modulelist"
|
||||
else
|
||||
cp -f "${ARC_PATH}/include/modulelist" "${RAMDISK_PATH}/addons/modulelist"
|
||||
fi
|
||||
|
||||
# backup current loader configs
|
||||
BACKUP_PATH="${RAMDISK_PATH}/usr/arc/backup"
|
||||
rm -rf "${BACKUP_PATH}"
|
||||
|
Loading…
Reference in New Issue
Block a user