From a1f926aa8da769b2d4e515d9013db216c3c20a84 Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Mon, 15 Sep 2025 23:31:15 +0200 Subject: [PATCH] changes --- .../immortal_diffconfig | 0 .../immortal_fullconfig | 0 .../lkiuyu_diffconfig | 0 .../lkiuyu_fullconfig | 0 .../openwrt_diffconfig | 0 .../openwrt_fullconfig | 0 packages/uz801-tweaks/files/uci-defaults | 6 ++ readme.md | 35 +-------- usb_network | 73 ------------------- 9 files changed, 8 insertions(+), 106 deletions(-) rename immortal_diffconfig => configs/immortal_diffconfig (100%) rename immortal_fullconfig => configs/immortal_fullconfig (100%) rename lkiuyu_diffconfig => configs/lkiuyu_diffconfig (100%) rename lkiuyu_fullconfig => configs/lkiuyu_fullconfig (100%) rename openwrt_diffconfig => configs/openwrt_diffconfig (100%) rename openwrt_fullconfig => configs/openwrt_fullconfig (100%) delete mode 100755 usb_network diff --git a/immortal_diffconfig b/configs/immortal_diffconfig similarity index 100% rename from immortal_diffconfig rename to configs/immortal_diffconfig diff --git a/immortal_fullconfig b/configs/immortal_fullconfig similarity index 100% rename from immortal_fullconfig rename to configs/immortal_fullconfig diff --git a/lkiuyu_diffconfig b/configs/lkiuyu_diffconfig similarity index 100% rename from lkiuyu_diffconfig rename to configs/lkiuyu_diffconfig diff --git a/lkiuyu_fullconfig b/configs/lkiuyu_fullconfig similarity index 100% rename from lkiuyu_fullconfig rename to configs/lkiuyu_fullconfig diff --git a/openwrt_diffconfig b/configs/openwrt_diffconfig similarity index 100% rename from openwrt_diffconfig rename to configs/openwrt_diffconfig diff --git a/openwrt_fullconfig b/configs/openwrt_fullconfig similarity index 100% rename from openwrt_fullconfig rename to configs/openwrt_fullconfig diff --git a/packages/uz801-tweaks/files/uci-defaults b/packages/uz801-tweaks/files/uci-defaults index 9de6b76..8f823ae 100644 --- a/packages/uz801-tweaks/files/uci-defaults +++ b/packages/uz801-tweaks/files/uci-defaults @@ -1,5 +1,9 @@ #!/bin/sh +# Enabling Wifi +uci set wireless.@wifi-device[0].disabled='0' +uci set wireless.@wifi-iface[0].disabled='0' + # create modem interface uci set network.modem=interface uci set network.modem.proto='modemmanager' @@ -11,6 +15,8 @@ uci set network.modem.preferredmode='4g' uci set network.modem.ifname='wwan0' uci del_list firewall.@zone[1].network='modem' uci add_list firewall.@zone[1].network='modem' + +# We commit all the changes and restart network uci commit /etc/init.d/network restart diff --git a/readme.md b/readme.md index 44c1b92..386ff33 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,8 @@ ## 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. -### working +### Working +_**(On all Systems, lkiuyu, immoirtalwrt, openwrt)**_ - Modem Working - No Rx/Tx displayed in luci interface (?) - 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 linux's dts? - 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 - The `msm8916-yiming-uz801v3.dtb` file is a prebuilt dtb extracted from one of the many OpenStick-Builder project living in Github. \ No newline at end of file diff --git a/usb_network b/usb_network deleted file mode 100755 index 8b4ef47..0000000 --- a/usb_network +++ /dev/null @@ -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 -}