changes
This commit is contained in:
1 parent
bbfea01334
commit
a1f926aa8d
9 files changed
+8
-106
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Enabling Wifi
|
||||||
|
uci set wireless.@wifi-device[0].disabled='0'
|
||||||
|
uci set wireless.@wifi-iface[0].disabled='0'
|
||||||
|
|
||||||
# create modem interface
|
# create modem interface
|
||||||
uci set network.modem=interface
|
uci set network.modem=interface
|
||||||
uci set network.modem.proto='modemmanager'
|
uci set network.modem.proto='modemmanager'
|
||||||
@@ -11,6 +15,8 @@ uci set network.modem.preferredmode='4g'
|
|||||||
uci set network.modem.ifname='wwan0'
|
uci set network.modem.ifname='wwan0'
|
||||||
uci del_list firewall.@zone[1].network='modem'
|
uci del_list firewall.@zone[1].network='modem'
|
||||||
uci add_list firewall.@zone[1].network='modem'
|
uci add_list firewall.@zone[1].network='modem'
|
||||||
|
|
||||||
|
# We commit all the changes and restart network
|
||||||
uci commit
|
uci commit
|
||||||
/etc/init.d/network restart
|
/etc/init.d/network restart
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
## WRT for uz801
|
## WRT for uz801
|
||||||
These are my attempts at building the os... my end goal is to build a working modern openwrt, but first I will start from immortalwrt from lkiuyu and the from official immortalwrt.
|
These are my attempts at building the os... my end goal is to build a working modern openwrt, but first I will start from immortalwrt from lkiuyu and the from official immortalwrt.
|
||||||
|
|
||||||
### working
|
### Working
|
||||||
|
_**(On all Systems, lkiuyu, immoirtalwrt, openwrt)**_
|
||||||
- Modem Working
|
- Modem Working
|
||||||
- No Rx/Tx displayed in luci interface (?)
|
- No Rx/Tx displayed in luci interface (?)
|
||||||
- Wifi Working
|
- Wifi Working
|
||||||
@@ -12,38 +13,6 @@ These are my attempts at building the os... my end goal is to build a working mo
|
|||||||
- Use built dtb from openstick-builder?
|
- Use built dtb from openstick-builder?
|
||||||
- use linux's dts?
|
- use linux's dts?
|
||||||
- modemmanager not showing rxtx
|
- modemmanager not showing rxtx
|
||||||
- Use mcopy and debugfs compiled by openwrt:
|
|
||||||
```makefile
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=foo
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
PKG_BUILD_DEPENDS:=mtools/host
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/foo
|
|
||||||
SECTION:=utils
|
|
||||||
CATEGORY:=Utilities
|
|
||||||
TITLE:=Foo example using mcopy
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Ejemplo: crear/usar una imagen FAT en tiempo de build
|
|
||||||
define Build/Compile
|
|
||||||
# crea directorio dentro de la imagen
|
|
||||||
$(STAGING_DIR_HOST)/bin/mmd -i $(PKG_BUILD_DIR)/fs.img ::/etc
|
|
||||||
# copia un archivo a la imagen sin usar mcopy del sistema
|
|
||||||
$(STAGING_DIR_HOST)/bin/mcopy -i $(PKG_BUILD_DIR)/fs.img $(PKG_BUILD_DIR)/my.conf ::/etc/my.conf
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/foo/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/share/foo
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/fs.img $(1)/usr/share/foo/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,foo))
|
|
||||||
```
|
|
||||||
- openwrt: enable wifi by default!
|
|
||||||
---
|
---
|
||||||
### Stuff
|
### Stuff
|
||||||
- The `msm8916-yiming-uz801v3.dtb` file is a prebuilt dtb extracted from one of the many OpenStick-Builder project living in Github.
|
- The `msm8916-yiming-uz801v3.dtb` file is a prebuilt dtb extracted from one of the many OpenStick-Builder project living in Github.
|
||||||
-73
@@ -1,73 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
# This file is based on postmarketOS initfs code.
|
|
||||||
# See: https://gitlab.com/postmarketOS/pmaports/-/blob/master/main/postmarketos-mkinitfs/
|
|
||||||
|
|
||||||
START=20
|
|
||||||
|
|
||||||
deviceinfo_manufacturer="Generic"
|
|
||||||
deviceinfo_usb_serialnumber="123456"
|
|
||||||
|
|
||||||
setup_usb_network_configfs() {
|
|
||||||
# See: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt
|
|
||||||
CONFIGFS=/sys/kernel/config/usb_gadget
|
|
||||||
|
|
||||||
if ! [ -e "$CONFIGFS" ]; then
|
|
||||||
echo " /config/usb_gadget does not exist, skipping configfs usb gadget"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Default values for USB-related deviceinfo variables
|
|
||||||
usb_idVendor="${deviceinfo_usb_idVendor:-0x18D1}" # default: Google Inc.
|
|
||||||
usb_idProduct="${deviceinfo_usb_idProduct:-0xD001}" # default: Nexus 4 (fastboot)
|
|
||||||
usb_serialnumber="${deviceinfo_usb_serialnumber:-OpenWRT}"
|
|
||||||
usb_rndis_function="${deviceinfo_usb_rndis_function:-rndis.usb0}"
|
|
||||||
|
|
||||||
echo " Setting up an USB gadget through configfs"
|
|
||||||
# Create an usb gadet configuration
|
|
||||||
mkdir $CONFIGFS/g1 || echo " Couldn't create $CONFIGFS/g1"
|
|
||||||
echo "$usb_idVendor" > "$CONFIGFS/g1/idVendor"
|
|
||||||
echo "$usb_idProduct" > "$CONFIGFS/g1/idProduct"
|
|
||||||
|
|
||||||
# Create english (0x409) strings
|
|
||||||
mkdir $CONFIGFS/g1/strings/0x409 || echo " Couldn't create $CONFIGFS/g1/strings/0x409"
|
|
||||||
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
echo "$deviceinfo_manufacturer" > "$CONFIGFS/g1/strings/0x409/manufacturer"
|
|
||||||
echo "$usb_serialnumber" > "$CONFIGFS/g1/strings/0x409/serialnumber"
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
echo "$deviceinfo_name" > "$CONFIGFS/g1/strings/0x409/product"
|
|
||||||
|
|
||||||
# Create rndis function. The function can be named differently in downstream kernels.
|
|
||||||
mkdir $CONFIGFS/g1/functions/"$usb_rndis_function" \
|
|
||||||
|| echo " Couldn't create $CONFIGFS/g1/functions/$usb_rndis_function"
|
|
||||||
|
|
||||||
# Create configuration instance for the gadget
|
|
||||||
mkdir $CONFIGFS/g1/configs/c.1 \
|
|
||||||
|| echo " Couldn't create $CONFIGFS/g1/configs/c.1"
|
|
||||||
mkdir $CONFIGFS/g1/configs/c.1/strings/0x409 \
|
|
||||||
|| echo " Couldn't create $CONFIGFS/g1/configs/c.1/strings/0x409"
|
|
||||||
echo "rndis" > $CONFIGFS/g1/configs/c.1/strings/0x409/configuration \
|
|
||||||
|| echo " Couldn't write configration name"
|
|
||||||
|
|
||||||
# Link the rndis instance to the configuration
|
|
||||||
ln -s $CONFIGFS/g1/functions/"$usb_rndis_function" $CONFIGFS/g1/configs/c.1 \
|
|
||||||
|| echo " Couldn't symlink $usb_rndis_function"
|
|
||||||
|
|
||||||
# Check if there's an USB Device Controller
|
|
||||||
if [ -z "$(ls /sys/class/udc)" ]; then
|
|
||||||
echo " No USB Device Controller available"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Link the gadget instance to an USB Device Controller. This activates the gadget.
|
|
||||||
# See also: https://github.com/postmarketOS/pmbootstrap/issues/338
|
|
||||||
# shellcheck disable=SC2005
|
|
||||||
echo "$(ls /sys/class/udc)" > $CONFIGFS/g1/UDC || echo " Couldn't write UDC"
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
mount -t configfs none /sys/kernel/config
|
|
||||||
setup_usb_network_configfs
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user