mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	Update OpenWRT
This commit is contained in:
		
							parent
							
								
									55c3e7cde4
								
							
						
					
					
						commit
						948aebf05a
					
				
					 1080 changed files with 8134 additions and 328613 deletions
				
			
		|  | @ -1,56 +0,0 @@ | |||
| #!/bin/sh | ||||
| 
 | ||||
| [ "$ACTION" = add ] || exit | ||||
| 
 | ||||
| get_device_irq() { | ||||
| 	local device="$1" | ||||
| 	local line | ||||
| 	local seconds | ||||
| 
 | ||||
| 	# wait up to 10 seconds for the irq/device to appear | ||||
| 	for seconds in $(seq 0 9); do | ||||
| 		line=$(grep -m 1 "${device}\$" /proc/interrupts) && break | ||||
| 		sleep 1 | ||||
| 	done | ||||
| 	echo ${line} | sed 's/:.*//' | ||||
| } | ||||
| 
 | ||||
| set_interface_core() { | ||||
| 	local core_mask="$1" | ||||
| 	local interface="$2" | ||||
| 	local device="$3" | ||||
| 
 | ||||
| 	[ -z "${device}" ] && device="$interface" | ||||
| 
 | ||||
| 	local irq=$(get_device_irq "$device") | ||||
| 
 | ||||
| 	echo "${core_mask}" > /proc/irq/${irq}/smp_affinity | ||||
| } | ||||
| 
 | ||||
| case "$(board_name)" in | ||||
| fastrhino,r66s|\ | ||||
| friendlyarm,nanopi-r5c|\ | ||||
| firefly,rk3568-roc-pc) | ||||
| 	set_interface_core 2 "eth0" | ||||
| 	set_interface_core 4 "eth1" | ||||
| 	;; | ||||
| friendlyarm,nanopi-r2c|\ | ||||
| friendlyarm,nanopi-r2s|\ | ||||
| xunlong,orangepi-r1-plus|\ | ||||
| xunlong,orangepi-r1-plus-lts) | ||||
| 	set_interface_core 2 "eth0" | ||||
| 	set_interface_core 4 "eth1" "xhci-hcd:usb3" | ||||
| 	;; | ||||
| friendlyarm,nanopi-r4s|\ | ||||
| friendlyarm,nanopi-r4se|\ | ||||
| sharevdi,guangmiao-g4c) | ||||
| 	set_interface_core 10 "eth0" | ||||
| 	set_interface_core 20 "eth1" | ||||
| 	;; | ||||
| friendlyarm,nanopi-r5s) | ||||
| 	set_interface_core 0 "eth0" | ||||
| 	set_interface_core 2 "eth1" | ||||
| 	set_interface_core 4 "eth2" | ||||
| 	;; | ||||
| esac | ||||
| 
 | ||||
|  | @ -1,6 +0,0 @@ | |||
| #!/bin/sh | ||||
| 
 | ||||
| if [ "${ACTION}" = "add" ]; then | ||||
|   usbmode -s && sleep 5 | ||||
|   [ -n "$(cat /proc/net/wireless | grep wlan)" ] && wifi config && wifi | ||||
| fi | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue