Skip to content

Commit

Permalink
Merge pull request #2210 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium committed Jun 30, 2024
2 parents 64f4bc1 + 4e31dda commit 82466fa
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 22 deletions.
4 changes: 2 additions & 2 deletions files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function addonSelection() {
function modulesMenu() {
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" == "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
Expand Down Expand Up @@ -1071,7 +1071,7 @@ function sysinfo() {
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
ADDONSINFO="$(readConfigEntriesArray "addons" "${USER_CONFIG_FILE}")"
REMAP="$(readConfigKey "arc.remap" "${USER_CONFIG_FILE}")"
Expand Down
14 changes: 8 additions & 6 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function arcVersion() {
fi
done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
# Reset Modules
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" == "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
Expand Down Expand Up @@ -522,7 +522,7 @@ function arcSummary() {
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
ADDONSINFO="$(readConfigEntriesArray "addons" "${USER_CONFIG_FILE}")"
REMAP="$(readConfigKey "arc.remap" "${USER_CONFIG_FILE}")"
Expand Down Expand Up @@ -887,15 +887,17 @@ else
fi
if [ "${ARCOPTS}" == "true" ]; then
echo "= \"\Z4======== Arc DSM ========\Zn \" " >>"${TMP_PATH}/menu"
echo "e \"Version \" " >>"${TMP_PATH}/menu"
echo "b \"Addons \" " >>"${TMP_PATH}/menu"
echo "d \"Modules \" " >>"${TMP_PATH}/menu"
echo "g \"Frequency Scaling \" " >>"${TMP_PATH}/menu"
echo "e \"Version \" " >>"${TMP_PATH}/menu"
if [ "${CPUFREQ}" == "true" ]; then
echo "g \"Frequency Scaling \" " >>"${TMP_PATH}/menu"
fi
if [ "${DT}" == "false" ] && [ ${SATACONTROLLER} -gt 0 ]; then
echo "S \"Sata PortMap \" " >>"${TMP_PATH}/menu"
fi
if [ "${DT}" == "true" ]; then
echo "o \"DTS Map \" " >>"${TMP_PATH}/menu"
echo "o \"DTS Map Options\" " >>"${TMP_PATH}/menu"
fi
echo "P \"StoragePanel Options\" " >>"${TMP_PATH}/menu"
echo "Q \"SequentialIO Options\" " >>"${TMP_PATH}/menu"
Expand Down Expand Up @@ -1046,7 +1048,7 @@ else
fi
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
if [ -n "${PLATFORM}" ] && [ -n "${KVER}" ]; then
if [ "${PLATFORM}" == "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
Expand Down
16 changes: 15 additions & 1 deletion files/initrd/opt/arc/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function bootDSM () {
SN="$(readConfigKey "arc.sn" "${USER_CONFIG_FILE}")"
KERNELPANIC="$(readConfigKey "arc.kernelpanic" "${USER_CONFIG_FILE}")"
DT="$(readConfigKey "platforms.${PLATFORM}.dt" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"

declare -A CMDLINE

Expand Down Expand Up @@ -135,12 +135,26 @@ function bootDSM () {
[ "${CMDLINE['modprobe.blacklist']}" != "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="mpt3sas"
fi
if true; then
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
CMDLINE['modprobe.blacklist']+="evbug"
fi
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
# Disable x2apic
if echo "apollolake geminilake purley" | grep -wq "${PLATFORM}"; then
if grep -q "^flags.*x2apic.*" /proc/cpuinfo; then
eval $(grep -o "ARC_CMDLINE=.*$" "${USER_GRUB_CONFIG}")
[ -z "${ARC_CMDLINE}" ] && ARC_CMDLINE="bzImage-arc"
echo "${ARC_CMDLINE}" | grep -q 'nox2apic' || sed -i "s|${ARC_CMDLINE}|${ARC_CMDLINE} nox2apic|" "${USER_GRUB_CONFIG}"
fi
else
grep -q ' nox2apic' "${USER_GRUB_CONFIG}" && sed -i "s| nox2apic||" "${USER_GRUB_CONFIG}"
fi

# Cmdline NIC Settings
ETHN=0
Expand Down
4 changes: 3 additions & 1 deletion files/initrd/opt/arc/include/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,14 @@ function _sort_netif() {
# 1 - device path
function getBus() {
BUS=""
# xen
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | grep -q "xen" && echo "xen")
# usb/ata(sata/ide)/scsi
[ -z "${BUS}" ] && BUS=$(udevadm info --query property --name "${1}" 2>/dev/null | grep ID_BUS | cut -d= -f2 | sed 's/ata/sata/')
# usb/sata(sata/ide)/nvme
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,TRAN 2>/dev/null | grep "${1} " | awk '{print $2}') #Spaces are intentional
# usb/scsi(sata/ide)/virtio(scsi/virtio)/mmc/nvme
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | awk -F':' '{print $(NF-1)}' | sed 's/_host//') #Spaces are intentional
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | awk '{print $2}' | awk -F':' '{print $(NF-1)}' | sed 's/_host//') # Spaces are intentional
echo "${BUS}"
return 0
}
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/arc/include/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function updateModules() {
local PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
if [ -n "${PRODUCTVER}" ]; then
local PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
local KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
local KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" = "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
Expand Down
4 changes: 2 additions & 2 deletions files/initrd/opt/arc/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ echo
VID="0x46f4"
PID="0x0001"

BUSLIST="usb sata scsi nvme mmc"
BUSLIST="usb sata scsi nvme mmc 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)"
elif ! echo "${BUSLIST}" | grep -wq "${BUS}"; then
die "Loader disk is not USB or SATA/SCSI/NVME/eMMC DoM"
die "Loader disk is not USB or SATA/SCSI/NVME/eMMC/XEN"
fi

# Save variables to user config file
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/arc/ramdisk-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ "${PRODUCTVERDSM}" != "${PRODUCTVER}" ]; then
fi

# Read model data
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"

# Modify KVER for Epyc7002
if [ "${PLATFORM}" == "epyc7002" ]; then
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/arc/vmlinux-to-bzImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"

# Adapted from: scripts/Makefile.lib
# Usage: size_append FILE [FILE2] [FILEn]...
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/arc/zimage-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ "${KERNEL}" == "custom" ]; then
echo -n " - Using customized Kernel"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.\"${PRODUCTVER}\".kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" == "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
Expand Down
12 changes: 6 additions & 6 deletions files/p1/boot/grub/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ set menu_color_highlight=white/red
set color_normal=white/black

set ARC_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0"
set ARC_CONFIG_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0 ipv6.disable=1"
# set ARC_CONFIG_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0 ipv6.disable=1"

search --set=root --label "ARC3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
Expand Down Expand Up @@ -109,7 +109,7 @@ if [ -s /automated ]; then
menuentry 'Arc Automated Build Mode' --id automated {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} automated_arc
linux /bzImage-arc ${ARC_CMDLINE} automated_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
Expand All @@ -119,7 +119,7 @@ fi
menuentry 'Arc Config Mode' --id config {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} force_arc
linux /bzImage-arc ${ARC_CMDLINE} force_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
Expand All @@ -128,7 +128,7 @@ menuentry 'Arc Config Mode' --id config {
menuentry 'Arc Update Mode' --id update {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} update_arc
linux /bzImage-arc ${ARC_CMDLINE} update_arc
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
Expand All @@ -138,15 +138,15 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
menuentry 'DSM Recovery Mode' --id recovery {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} recovery
linux /bzImage-arc ${ARC_CMDLINE} recovery
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
}
menuentry 'DSM Reinstall Mode' --id junior {
set_gfxpayload
echo "Loading Arc Kernel..."
linux /bzImage-arc ${ARC_CONFIG_CMDLINE} force_junior
linux /bzImage-arc ${ARC_CMDLINE} force_junior
echo "Loading Arc Initramfs..."
initrd /initrd-arc
echo "Booting..."
Expand Down
Binary file modified files/p3/custom/bzImage-epyc7002-7.2-5.10.55.gz
Binary file not shown.
Binary file modified files/p3/custom/firmware.tgz
Binary file not shown.
Binary file modified files/p3/custom/modules-epyc7002-7.2-5.10.55.tgz
Binary file not shown.
2 changes: 2 additions & 0 deletions scripts/func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ extendedConfigFile = "${VMNAME}.vmxf"
floppy0.present = "FALSE"
ethernet0.addressType = "generated"
ethernet0.virtualDev = "vmxnet3"
ethernet0.connectionType = "nat"
ethernet0.allowguestconnectioncontrol = "true"
ethernet0.present = "TRUE"
sata0.present = "TRUE"
sata0:0.fileName = "${VMNAME}-disk1.vmdk"
Expand Down

0 comments on commit 82466fa

Please sign in to comment.