Compare commits

...

3 Commits

Author SHA1 Message Date
Ing
d04e08ecd9 更新 customDTS 函数以使用统一的 model.dts 文件 2025-04-26 01:55:54 +08:00
Ing
c3b789dff1 添加 v1000nk 平台的调试 2025-04-25 22:17:04 +08:00
Ing
8eb61ad518 添加 DS925+ SN 2025-04-25 13:29:00 +08:00
4 changed files with 43 additions and 8 deletions

View File

@ -179,6 +179,8 @@ if [ "$(echo "${KVER:-4}" | cut -d'.' -f1)" -lt 5 ]; then
CMDLINE["elevator"]="elevator" CMDLINE["elevator"]="elevator"
else else
CMDLINE["split_lock_detect"]="off" CMDLINE["split_lock_detect"]="off"
# CMDLINE['module.sig_enforce']="0"
# CMDLINE['loadpin.enforce']="0"
fi fi
if [ "${DT}" = "true" ]; then if [ "${DT}" = "true" ]; then
@ -247,6 +249,27 @@ if [ "${DT}" = "true" ] && ! echo "v1000nk epyc7002 purley broadwellnkv2" | grep
# CMDLINE['scsi_mod.scan']="sync" # TODO: redpill panic of vmware scsi? (add to cmdline) # CMDLINE['scsi_mod.scan']="sync" # TODO: redpill panic of vmware scsi? (add to cmdline)
fi fi
########### V1000NK DEBUG ###########
if echo "v1000nk" | grep -wq "${PLATFORM}"; then
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "virtio"; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="virtio,virtio_blk,virtio_console,virtio_input,virtio_mmio,virtio_net,virtio_pci,virtio_ring,virtio_scsi"
fi
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "e1000"; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="e1000,e1000e"
fi
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "mpt3sas"; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="mpt3sas"
fi
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "megaraid_sas"; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="megaraid_sas"
fi
fi
########### V1000NK DEBUG ###########
# CMDLINE['kvm.ignore_msrs']="1" # CMDLINE['kvm.ignore_msrs']="1"
# CMDLINE['kvm.report_ignored_msrs']="0" # CMDLINE['kvm.report_ignored_msrs']="0"
@ -437,7 +460,10 @@ else
done done
# Disconnect wireless # Disconnect wireless
lsmod | grep -q iwlwifi && for F in /sys/class/net/wlan*; do [ ! -e "${F}" ] && continue; connectwlanif "$(basename "${F}")" 0 2>/dev/null; done lsmod | grep -q iwlwifi && for F in /sys/class/net/wlan*; do
[ ! -e "${F}" ] && continue
connectwlanif "$(basename "${F}")" 0 2>/dev/null
done
# Unload all network drivers # Unload all network drivers
# for F in $(realpath /sys/class/net/*/device/driver); do [ ! -e "${F}" ] && continue; rmmod -f "$(basename ${F})" 2>/dev/null || true; done # for F in $(realpath /sys/class/net/*/device/driver); do [ ! -e "${F}" ] && continue; rmmod -f "$(basename ${F})" 2>/dev/null || true; done

View File

@ -1522,7 +1522,8 @@ function boot() {
function customDTS() { function customDTS() {
# Loop menu # Loop menu
while true; do while true; do
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && CUSTOMDTS="Yes" || CUSTOMDTS="No" [ -f "${USER_UP_PATH}/${MODEL}.dts" ] && mv -f "${USER_UP_PATH}/${MODEL}.dts" "${USER_UP_PATH}/model.dts"
[ -f "${USER_UP_PATH}/model.dts" ] && CUSTOMDTS="Yes" || CUSTOMDTS="No"
rm -f "${TMP_PATH}/menu" rm -f "${TMP_PATH}/menu"
{ {
echo "u \"$(TEXT "Upload dts file")\"" echo "u \"$(TEXT "Upload dts file")\""
@ -1539,7 +1540,7 @@ function customDTS() {
if ! tty 2>/dev/null | grep -q "/dev/pts"; then #if ! tty 2>/dev/null | grep -q "/dev/pts" || [ -z "${SSH_TTY}" ]; then if ! tty 2>/dev/null | grep -q "/dev/pts"; then #if ! tty 2>/dev/null | grep -q "/dev/pts" || [ -z "${SSH_TTY}" ]; then
MSG="" MSG=""
MSG+="$(TEXT "This feature is only available when accessed via ssh (Requires a terminal that supports ZModem protocol).\n")" MSG+="$(TEXT "This feature is only available when accessed via ssh (Requires a terminal that supports ZModem protocol).\n")"
MSG+="$(printf "$(TEXT "Or upload the dts file to %s via DUFS, Will be automatically imported when building.\n")" "${USER_UP_PATH}/${MODEL}.dts")" MSG+="$(printf "$(TEXT "Or upload the dts file to %s via DUFS, Will be automatically imported when building.\n")" "${USER_UP_PATH}/model.dts")"
DIALOG --title "$(TEXT "Custom DTS")" \ DIALOG --title "$(TEXT "Custom DTS")" \
--msgbox "${MSG}" 0 0 --msgbox "${MSG}" 0 0
return return
@ -1560,7 +1561,7 @@ function customDTS() {
--msgbox "${MSG}" 0 0 --msgbox "${MSG}" 0 0
else else
[ -d "{USER_UP_PATH}" ] || mkdir -p "${USER_UP_PATH}" [ -d "{USER_UP_PATH}" ] || mkdir -p "${USER_UP_PATH}"
cp -f "${USER_FILE}" "${USER_UP_PATH}/${MODEL}.dts" cp -f "${USER_FILE}" "${USER_UP_PATH}/model.dts"
DIALOG --title "$(TEXT "Custom DTS")" \ DIALOG --title "$(TEXT "Custom DTS")" \
--msgbox "$(TEXT "A valid dts file, Automatically import at compile time.")" 0 0 --msgbox "$(TEXT "A valid dts file, Automatically import at compile time.")" 0 0
fi fi
@ -1569,13 +1570,13 @@ function customDTS() {
touch "${PART1_PATH}/.build" touch "${PART1_PATH}/.build"
;; ;;
d) d)
rm -f "${USER_UP_PATH}/${MODEL}.dts" rm -f "${USER_UP_PATH}/model.dts"
touch "${PART1_PATH}/.build" touch "${PART1_PATH}/.build"
;; ;;
i) i)
rm -rf "${TMP_PATH}/model.dts" rm -rf "${TMP_PATH}/model.dts"
if [ -f "${USER_UP_PATH}/${MODEL}.dts" ]; then if [ -f "${USER_UP_PATH}/model.dts" ]; then
cp -f "${USER_UP_PATH}/${MODEL}.dts" "${TMP_PATH}/model.dts" cp -f "${USER_UP_PATH}/model.dts" "${TMP_PATH}/model.dts"
else else
ODTB="$(find "${PART2_PATH}" -type f -name "*.dtb" | head -1)" ODTB="$(find "${PART2_PATH}" -type f -name "*.dtb" | head -1)"
if [ -f "${ODTB}" ]; then if [ -f "${ODTB}" ]; then
@ -1598,7 +1599,7 @@ function customDTS() {
--msgbox "${MSG}" 0 0 --msgbox "${MSG}" 0 0
else else
mkdir -p "${USER_UP_PATH}" mkdir -p "${USER_UP_PATH}"
cp -f "${TMP_PATH}/modelEdit.dts" "${USER_UP_PATH}/${MODEL}.dts" cp -f "${TMP_PATH}/modelEdit.dts" "${USER_UP_PATH}/model.dts"
rm -r "${TMP_PATH}/model.dts" "${TMP_PATH}/modelEdit.dts" rm -r "${TMP_PATH}/model.dts" "${TMP_PATH}/modelEdit.dts"
touch "${PART1_PATH}/.build" touch "${PART1_PATH}/.build"
break break

View File

@ -186,6 +186,7 @@ for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "wol"
PARAMS="" PARAMS=""
if [ "${ADDON}" = "disks" ]; then if [ "${ADDON}" = "disks" ]; then
PARAMS=${HDDSORT} PARAMS=${HDDSORT}
[ -f "${USER_UP_PATH}/model.dts" ] && cp -f "${USER_UP_PATH}/model.dts" "${RAMDISK_PATH}/addons/model.dts"
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts" [ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
fi fi
installAddon "${ADDON}" "${PLATFORM}" "${KPRE:+${KPRE}-}${KVER}" || exit 1 installAddon "${ADDON}" "${PLATFORM}" "${KPRE:+${KPRE}-}${KVER}" || exit 1

View File

@ -45,6 +45,13 @@
- "TQR" - "TQR"
suffix: "alpha" suffix: "alpha"
macpre: 9009d0 macpre: 9009d0
"DS925+":
prefix:
- "2520"
middle:
- "YHR"
suffix: "alpha"
macpre: 9009d0
"DS1019+": "DS1019+":
prefix: prefix:
- "1850" - "1850"