1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
This commit is contained in:
suyuan 2024-06-20 10:12:23 +08:00 committed by GitHub
commit 38e923195c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 372 additions and 8 deletions

64
bcm27xx-utils/Makefile Normal file
View file

@ -0,0 +1,64 @@
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-utils
PKG_VERSION:=2024-04-24
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
PKG_SOURCE_VERSION:=451b9881b72cb994c102724b5a7d9b93f97dc315
PKG_MIRROR_HASH:=b453976171187e0ffe7cacfdcab36cec6b5d02db8b6d978cb9afbbcafcfcff9d
PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-lto
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/bcm27xx-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_bcm27xx +libfdt
TITLE:=BCM27xx scripts and simple applications
PROVIDES:=bcm27xx-userland
endef
define Package/bcm27xx-utils/description
BCM27xx scripts and simple applications.
Replaces bcm27xx-userland scripts and applications.
endef
define Package/bcm27xx-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepdump $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepflash.sh $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepmake $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/otpset $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck $(1)/usr/bin
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck_exclusions.txt $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovmerge $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pinctrl $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspinfo $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vclog $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
endef
$(eval $(call BuildPackage,bcm27xx-utils))

View file

@ -0,0 +1,255 @@
From 0db3fb3119eda8c2360454c2a01f84602a879c38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Tue, 16 Jan 2024 15:32:12 +0100
Subject: [PATCH] raspinfo: adapt to OpenWrt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
raspinfo/raspinfo | 186 ++++------------------------------------------
1 file changed, 13 insertions(+), 173 deletions(-)
--- a/raspinfo/raspinfo
+++ b/raspinfo/raspinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Some of the regex's used in sed
# Catch basic IP6 address "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"
@@ -6,147 +6,6 @@
# IP4 d.d.d.d decimal "s/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g"
# mac address "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
-
-display_info_drm() {
- # If running X then can use xrandr, otherwise
- # dump the /sys/class entries for the displays
- if command -v xrandr > /dev/null &&
- DISPLAY=${DISPLAY:-:0} xrandr --listmonitors &>/dev/null;
- then
- echo "Running (F)KMS and X"
- echo
-
- DISPLAY=${DISPLAY:-:0} xrandr --verbose
- else
- echo "Running (F)KMS, console"
- echo
-
- for card in /sys/class/drm/card[0-9]-*;
- do
- echo $card
-
- # if kmsprint isn't installed print basic mode info
- if ! command -v kmsprint > /dev/null; then
- if [ -f $card/modes ];
- then
- cat $card/modes
- else
- echo "No modes found"
- fi
- fi
-
- if [ -f $card/edid ];
- then
- base64 $card/edid
- else
- echo "No EDID found"
- fi
- echo
- done
- fi
-
- # kmsprint is more useful, but not always installed
- echo
- if command -v kmsprint > /dev/null; then
- kmsprint
- echo
- kmsprint -m
- else
- echo "kmsprint is not installed. Install with: sudo apt install kms++-utils"
- fi
-
- echo
-
- # dump the /sys/class entries for the displays
- cardfound=0
- for card in `seq 0 9`;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/state";
- then
- for hdmi in 0 1;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/hdmi${hdmi}_regs";
- then
- echo "HDMI${hdmi}: $(sudo cat /sys/kernel/debug/dri/$card/hdmi${hdmi}_regs | grep HOTPLUG)"
- fi
- done
- echo
- echo "/sys/kernel/debug/dri/$card/state:"
- sudo cat "/sys/kernel/debug/dri/$card/state"
- echo
- cardfound=1
- fi
- done
- if [ "$cardfound" == "0" ];
- then
- echo "kms state not found"
- fi
- echo
-
-}
-
-display_info_legacy() {
- # Legacy mode
- echo "Running Legacy framebuffer"
- echo
-
- for card in `seq 0 9`;
- do
- F="/dev/fb${card}"
- if test -e $F;
- then
- echo Framebuffer: $F
- fbset -s -fb $F
- fi
- done
-
- disps=`tvservice -l | awk '/Display Number/{print substr($3,1,1)}'`
-
- tmp=$(mktemp)
-
- for display in $disps
- do
- echo
- echo "Display: " $display
-
- tvservice -v $display -s
- tvservice -v $display -n
- tvservice -v $display -m CEA
- tvservice -v $display -m DMT
-
- echo
- tvservice -v $display -d $tmp > /dev/null
- base64 $tmp
- done
-
- rm $tmp
-}
-
-display_info() {
- # Check if we are running a KMS/DRM system
-
- if [ -d "/dev/dri" ];
- then
- display_info_drm
- else
- display_info_legacy
- fi
-}
-
-audio_info() {
- aplay -l
- echo
- aplay -L
- echo
- systemctl --user status pipewire.socket pipewire.service pulseaudio.service pulseaudio.socket
- echo
- if command -v pactl > /dev/null; then
- pactl info
- else
- echo pactl not installed
- fi
-}
-
OUT=raspinfo.txt
rm -f $OUT
@@ -163,8 +22,6 @@ echo
cat /etc/os-release | head -4
echo
-cat /etc/rpi-issue
-echo
uname -a
cat /proc/cpuinfo | tail -3
@@ -190,17 +47,6 @@ echo
cat /proc/swaps
echo
-echo "Package version information"
-echo "---------------------------"
-
-apt-cache policy raspberrypi-ui-mods | head -2
-apt-cache policy raspberrypi-sys-mods | head -2
-apt-cache policy openbox | head -2
-apt-cache policy lxpanel | head -2
-apt-cache policy pcmanfm | head -2
-apt-cache policy rpd-plym-splash | head -2
-
-echo
echo "Networking Information"
echo "----------------------"
echo
@@ -212,21 +58,11 @@ echo "USB Information"
echo "---------------"
echo
-lsusb -t
-
-echo
-echo "Display Information"
-echo "-------------------"
-echo
-
-display_info
-
-echo
-echo "Audio Information"
-echo "-------------------"
-echo
-
-audio_info
+if command -v lsusb > /dev/null; then
+ lsusb -t
+else
+ echo usbutils not installed
+fi
echo
echo "config.txt"
@@ -250,7 +86,7 @@ echo "-----------------"
echo
if command -v pinctrl > /dev/null; then
- sudo pinctrl 2>&1
+ pinctrl 2>&1
elif command -v raspi-gpio > /dev/null; then
raspi-gpio get 2>&1
else
@@ -263,9 +99,9 @@ echo "------------------"
echo
if command -v vcdbg > /dev/null; then
- sudo vcdbg log msg 2>&1
+ vcdbg log msg 2>&1
elif command -v vclog > /dev/null; then
- sudo vclog --msg 2>&1
+ vclog --msg 2>&1
else
echo "vcdbg not found"
fi
@@ -284,5 +120,9 @@ echo
echo "EEPROM"
echo "------"
echo
-sudo rpi-eeprom-update
+if command -v rpi-eeprom-update > /dev/null; then
+ rpi-eeprom-update
+else
+ echo bcm27xx-eeprom not installed
+fi
fi

View file

@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libmbim
PKG_SOURCE_VERSION:=1.31.3-dev
#PKG_SOURCE_VERSION:=1.30.0
#PKG_SOURCE_VERSION:=1.31.4-dev
PKG_SOURCE_VERSION:=651107e95859103d8b4966acfcf82498a869301d
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libqmi
#PKG_SOURCE_VERSION:=1.34.0
PKG_SOURCE_VERSION:=1.35.4-dev
PKG_SOURCE_VERSION:=1.35.5-dev
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View file

@ -245,6 +245,25 @@ function has_peerdns(proto) {
return false;
}
function has_sourcefilter(proto) {
switch (proto) {
case '3g':
case 'dhcpv6':
case 'directip':
case 'mbim':
case 'modemmanager':
case 'ncm':
case 'ppp':
case 'pppoa':
case 'pppoe':
case 'pptp':
case 'qmi':
return true;
}
return false;
}
var cbiRichListValue = form.ListValue.extend({
renderWidget: function(section_id, option_index, cfgvalue) {
var choices = this.transformChoices();
@ -537,6 +556,11 @@ return view.extend({
tdEl.lastChild.childNodes[3].disabled = true;
}
if (dynamic) {
//disable the 'Edit' button on dynamic interfaces
tdEl.lastChild.childNodes[2].disabled = true;
}
return tdEl;
};
@ -588,6 +612,10 @@ return view.extend({
o.nobridges = false;
o.optional = false;
o.network = ifc.getName();
o.exclude = '@' + ifc.getName();
o = s.taboption('general', form.Flag, 'disabled', _('Disable this interface'));
o.modalonly = true;
o = s.taboption('general', form.Flag, 'auto', _('Bring up on boot'));
o.modalonly = true;
@ -1043,7 +1071,7 @@ return view.extend({
for (var i = 0; i < rtTables.length; i++)
o.value(rtTables[i][1], '%s (%d)'.format(rtTables[i][1], rtTables[i][0]));
if (protoval == 'dhcpv6') {
if (has_sourcefilter(protoval)) {
o = nettools.replaceOption(s, 'advanced', form.Flag, 'sourcefilter', _('IPv6 source routing'), _('Automatically handle multiple uplink interfaces using source-based policy routing.'));
o.default = o.enabled;
}
@ -1550,9 +1578,24 @@ return view.extend({
o = s.option(form.Value, 'ula_prefix', _('IPv6 ULA-Prefix'), _('Unique Local Address - in the range <code>fc00::/7</code>. Typically only within the &#8216;local&#8217; half <code>fd00::/8</code>. ULA for IPv6 is analogous to IPv4 private network addressing. This prefix is randomly generated at first install.'));
o.datatype = 'cidr6';
o = s.option(form.Flag, 'packet_steering', _('Packet Steering'), _('Enable packet steering across all CPUs. May help or hinder network speed.'));
o = s.option(form.ListValue, 'packet_steering', _('Packet Steering'), _('Enable packet steering across CPUs. May help or hinder network speed.'));
o.value('', _('Disabled'));
o.value('1',_('Enabled'));
o.value('2',_('Enabled (all CPUs)'));
o.optional = true;
var steer_flow = uci.get('network', 'globals', 'steering_flows');
o = s.option(form.Value, 'steering_flows', _('Steering flows (<abbr title="Receive Packet Steering">RPS</abbr>)'),
_('Directs packet flows to specific CPUs where the local socket owner listens (the local service).') + ' ' +
_('Note: this setting is for local services on the device only (not for forwarding).'));
o.value('', _('Standard: none'));
o.value('128', _('Suggested: 128'));
o.value('256', _('256'));
o.depends('packet_steering', '1');
o.depends('packet_steering', '2');
o.datatype = 'uinteger';
o.default = steer_flow;
if (dslModemType != null) {
s = m.section(form.TypedSection, 'dsl', _('DSL'));

View file

@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager
#PKG_SOURCE_VERSION:=1.23.7-dev
PKG_SOURCE_VERSION:=df8287bf6c2febd068d06f0f45194bc622118bd4
PKG_SOURCE_VERSION:=1.23.8-dev
#PKG_SOURCE_VERSION:=df8287bf6c2febd068d06f0f45194bc622118bd4
PKG_RELEASE:=20
PKG_SOURCE_PROTO:=git

View file

@ -208,6 +208,7 @@ modemmanager_connected_method_dhcp_ipv6() {
json_add_string proto "dhcpv6"
proto_add_dynamic_defaults
json_add_string extendprefix 1 # RFC 7278: Extend an IPv6 /64 Prefix to LAN
[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
[ -n "$metric" ] && json_add_int metric "${metric}"
json_close_object
ubus call network add_dynamic "$(json_dump)"
@ -270,6 +271,7 @@ proto_modemmanager_init_config() {
proto_config_add_string preferredmode
proto_config_add_string pincode
proto_config_add_string iptype
proto_config_add_boolean sourcefilter
proto_config_add_string plmn
proto_config_add_int signalrate
proto_config_add_boolean lowpower
@ -429,7 +431,7 @@ proto_modemmanager_setup() {
local address prefix gateway mtu dns1 dns2
json_get_vars device apn allowedauth username password
json_get_vars pincode iptype plmn metric signalrate allow_roaming
json_get_vars pincode iptype sourcefilter plmn metric signalrate allow_roaming
json_get_vars allowedmode preferredmode
json_get_vars init_epsbearer