openwrt-xiaomi / xmir-patcher

Firmware patcher for Xiaomi routers
494 stars 73 forks source link

Error detecting and installing on Xiaomi RC01 #7

Closed atolismesh closed 12 months ago

atolismesh commented 12 months ago

Latest version gives error when I try to do anything with Xiaomi RC01:

Read full device info gives

Base info:
  Linux version: None
  DISTRIB_TARGET = ipq95xx/generic
  CPU arch: None
  CPU name: ipq95xx

ERROR: Can't detect CPU arch! Try to reboot device.

Content of /etc/openwrt_release

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='18.06-SNAPSHOT'
DISTRIB_REVISION='unknown'
DISTRIB_TARGET='ipq95xx/generic'
DISTRIB_ARCH='aarch64_cortex-a73_neon-vfpv4'
DISTRIB_DESCRIPTION='OpenWrt 18.06-SNAPSHOT unknown'
DISTRIB_TAINTS='no-all busybox override'

Content of /etc/os-release:

NAME="OpenWrt"
VERSION="18.06-SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 18.06-SNAPSHOT"
VERSION_ID="18.06-snapshot"
HOME_URL="http://openwrt.org/"
BUG_URL="http://bugs.openwrt.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="unknown"
LEDE_BOARD="ipq95xx/generic"
LEDE_ARCH="aarch64_cortex-a73_neon-vfpv4"
LEDE_TAINTS="no-all busybox override"
LEDE_DEVICE_MANUFACTURER="OpenWrt"
LEDE_DEVICE_MANUFACTURER_URL="http://openwrt.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="OpenWrt 18.06-SNAPSHOT unknown"

Personally, adding code

diff --git a/read_info.py b/read_info.py
index fe42cc2..e701cfa 100644
--- a/read_info.py
+++ b/read_info.py
@@ -326,6 +326,8 @@ class DevInfo():
       cpu_arch = 'arm64'
     if cpu_name.startswith('ipq60'):
       cpu_arch = 'arm64'
+    if cpu_name.startswith('ipq95'):
+      cpu_arch = 'arm64'
     ret.cpu_arch = cpu_arch if cpu_arch else None
     ret.cpu_name = cpu_name if cpu_name else None
     if verbose:

fixes problem for me

remittor commented 12 months ago

Fixed https://github.com/openwrt-xiaomi/xmir-patcher/commit/1031b3ac04a9259c8eda3bdd7c32aa322fa50efd