Skip to content

Commit

Permalink
disable PCI_STUB&PCI_ENDPOINT and fix set macs
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Aug 21, 2023
1 parent 4bc9119 commit b771afd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions files/board/arpl/kernel_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_PCI_STUB=m
# CONFIG_PCI_STUB=m
CONFIG_PCI_IOV=y
CONFIG_PCI_ENDPOINT=y
# CONFIG_PCI_ENDPOINT=y
CONFIG_PCI_SW_SWITCHTEC=y

CONFIG_DEVTMPFS=y
Expand Down
14 changes: 7 additions & 7 deletions files/board/arpl/overlayfs/etc/init.d/S41dhcpcd
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ PIDFILE=/var/run/dhcpcd/pid

[ -f "${CONFIG}" ] || exit 0

case "$1" in
case "${1}" in
start)
echo "Starting dhcpcd..."
start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -- -f "$CONFIG"
start-stop-daemon -S -x "${DAEMON}" -p "${PIDFILE}" -- -f "${CONFIG}"
;;
stop)
echo "Stopping dhcpcd..."
start-stop-daemon -K -x "$DAEMON" -p "$PIDFILE" -o
start-stop-daemon -K -x "${DAEMON}" -p "${PIDFILE}" -o
;;
reload | force-reload)
echo "Reloading dhcpcd configuration..."
"$DAEMON" -s reload
"${DAEMON}" -s reload
;;
restart)
"$0" stop
"${0}" stop
sleep 1 # Prevent race condition: ensure dhcpcd stops before start.
"$0" start
"${0}" start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
echo "Usage: ${0} {start|stop|restart|reload|force-reload}"
exit 1
;;
esac
4 changes: 2 additions & 2 deletions files/board/arpl/overlayfs/opt/arpl/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ function cmdlineMenu() {
MAC="$(<"${TMP_PATH}/resp")"
[ -z "${MAC}" ] && MAC="$(readConfigKey "original-mac${i}" "${USER_CONFIG_FILE}")"
[ -z "${MAC}" ] && MAC="${MACFS[$(expr ${i} - 1)]}"
MACF="$(echo "${MAC}" | sed 's/://g')"
MACF="$(echo "${MAC}" | sed "s/:\|-\| //g")"
[ ${#MACF} -eq 12 ] && break
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \
--msgbox "$(TEXT "Invalid MAC")" 0 0
Expand All @@ -641,7 +641,7 @@ function cmdlineMenu() {
writeConfigKey "cmdline.mac${N}" "${MACF}" "${USER_CONFIG_FILE}"
writeConfigKey "cmdline.netif_num" "${N}" "${USER_CONFIG_FILE}"
MAC="${MACF:0:2}:${MACF:2:2}:${MACF:4:2}:${MACF:6:2}:${MACF:8:2}:${MACF:10:2}"
ip link set dev ${ETHX[$(expr ${N} - 1)]} address ${MAC} 2>&1 |
ip link set dev ${ETHX[$(expr ${N} - 1)]} address "${MAC}" 2>&1 |
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \
--progressbox "$(TEXT "Changing MAC")" 20 70
/etc/init.d/S41dhcpcd restart 2>&1 |
Expand Down

0 comments on commit b771afd

Please sign in to comment.