Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device bricked "itself". No option to take action via uart. #16

Closed
broda1125 opened this issue Apr 2, 2021 · 3 comments
Closed

Device bricked "itself". No option to take action via uart. #16

broda1125 opened this issue Apr 2, 2021 · 3 comments

Comments

@broda1125
Copy link

Hi there,

My aqara hub turned into openlumi mqtt router stopped working itself - came back from work and it was dead.
I can connect via uart and run basic commands but I have no idea how to bring it back to life... after booting can't enter any command, no permissions to run recovery_mode (failsafe). Below dump from console, could you help somehow? Cheers!

`U-Boot 2016.03 (Nov 07 2017 - 20:11:55 +0800)

CPU: Freescale i.MX6ULL rev1.1 528 MHz (running at 396 MHz)
CPU: Commercial temperature grade (0C to 95C) at 30C
Reset cause: POR
Board: Lumi international Gateway
I2C: ready
DRAM: 256 MiB
NAND: 256 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: TFT43AB (480x272)
Video: LCDIF@0x21c8000 is fused, disable it
In: serial
Out: serial
Err: serial
Net: Ethernet@0x20b4000 is fused, disable it
Board Net Initialization Failed
No ethernet found.

Enter main_loop() Now##

Normal Boot
Hit any key to stop autoboot: 0
=> boot

NAND read: device 0 offset 0x300000, size 0x700000
7340032 bytes read: OK

NAND read: device 0 offset 0xa00000, size 0x100000
1048576 bytes read: OK
Kernel image @ 0x80800000 [ 0x000000 - 0x2abd58 ]

Flattened Device Tree blob at 83000000

Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300973c
Modify /soc/aips-bus@02000000/tsc@02040000:status disabled
Modify /soc/aips-bus@02100000/lcdif@021c8000:status disabled
Modify /soc/aips-bus@02000000/ethernet@020b4000:status disabled
Modify /soc/aips-bus@02100000/usb@02184200:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/sai@0202c000:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/sai@02030000:status disabled
Modify /soc/aips-bus@02100000/serial@021f4000:status disabled
Modify /soc/aips-bus@02100000/serial@021fc000:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/serial@02018000:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/serial@02024000:status disabled
Modify /soc/aips-bus@02000000/pwm@020f0000:status disabled
Modify /soc/aips-bus@02000000/pwm@020f4000:status disabled
Modify /soc/aips-bus@02000000/pwm@020f8000:status disabled
Modify /soc/aips-bus@02000000/pwm@020fc000:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/ecspi@02010000:status disabled
Modify /soc/aips-bus@02000000/spba-bus@02000000/ecspi@02014000:status disabled
Modify /soc/aips-bus@02100000/i2c@021a8000:status disabled
Modify /soc/aips-bus@02100000/i2c@021f8000:status disabled
Modify /soc/aips-bus@02000000/gpt@020e8000:status disabled
Modify /soc/aips-bus@02000000/epit@020d4000:status disabled
ft_system_setup for mx6
No PMIC found!

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.215 (bis@betelgeuze) (gcc version 7.5.0 (OpenW rt GCC 7.5.0 r11232+24-2a3dbded93)) #0 SMP Tue Jan 19 13:10:02 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio n cache
[ 0.000000] OF: fdt: Machine model: Xiaomi Gateway Lumi
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] random: get_random_bytes called from start_kernel+0x88/0x3d8 with crng_init=0
[ 0.000000] percpu: Embedded 14 pages/cpu s26764 r8192 d22388 u57344
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttymxc0,115200 ubi.mtd=3 ubi.block=0 ,rootfs root=/dev/ubiblock0_0 rootfstype=squashfs cma=64M mtdparts=gpmi-nand:3m( boot),7m(kernel),1m(dtb),-(ubi)
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 250048K/262144K available (6252K kernel code, 219K rwdata , 1576K rodata, 1024K init, 222K bss, 12096K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0x90800000 - 0xff800000 (1776 MB)
[ 0.000000] lowmem : 0x80000000 - 0x90000000 ( 256 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x8071b2f8 (7245 kB)
[ 0.000000] .init : 0x80900000 - 0x80a00000 (1024 kB)
[ 0.000000] .data : 0x80a00000 - 0x80a36d80 ( 220 kB)
[ 0.000000] .bss : 0x80a36d80 - 0x80a6e6c0 ( 223 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] Switching to timer-based delay loop, resolution 41ns
[ 0.000017] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478 484971ns
[ 0.000056] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.002155] Calibrating delay loop (skipped), value calculated using timer fr equency.. 48.00 BogoMIPS (lpj=240000)
[ 0.002200] pid_max: default: 32768 minimum: 301
[ 0.002478] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.002513] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.003571] CPU: Testing write buffer coherency: ok
[ 0.004149] /cpus/cpu@0 missing clock-frequency property
[ 0.004196] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.004988] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.005297] Hierarchical SRCU implementation.
[ 0.006474] smp: Bringing up secondary CPUs ...
[ 0.006508] smp: Brought up 1 node, 1 CPU
[ 0.006532] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.006548] CPU: All CPU(s) started in SVC mode.
[ 0.019145] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.019634] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma x_idle_ns: 19112604462750000 ns
[ 0.019688] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.019858] pinctrl core: initialized pinctrl subsystem
[ 0.023997] NET: Registered protocol family 16
[ 0.024739] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.040284] vdd3p0: supplied by regulator-dummy
[ 0.041696] cpu: supplied by regulator-dummy
[ 0.042887] vddsoc: supplied by regulator-dummy
[ 0.060248] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[ 0.134428] mxs-dma 1804000.dma-apbh: initialized
[ 0.136972] SCSI subsystem initialized
[ 0.147907] usbcore: registered new interface driver usbfs
[ 0.148055] usbcore: registered new interface driver hub
[ 0.148206] usbcore: registered new device driver usb
[ 0.150020] i2c i2c-0: IMX I2C adapter registered
[ 0.150071] i2c i2c-0: can't use DMA, using PIO instead.
[ 0.151123] i2c i2c-1: IMX I2C adapter registered
[ 0.151171] i2c i2c-1: can't use DMA, using PIO instead.
[ 0.151689] pps_core: LinuxPPS API ver. 1 registered
[ 0.151716] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome tti giometti@linux.it
[ 0.151783] PTP clock support registered
[ 0.152516] Advanced Linux Sound Architecture Driver Initialized.
[ 0.154096] Bluetooth: Core ver 2.22
[ 0.154233] NET: Registered protocol family 31
[ 0.154255] Bluetooth: HCI device and connection manager initialized
[ 0.154289] Bluetooth: HCI socket layer initialized
[ 0.154314] Bluetooth: L2CAP socket layer initialized
[ 0.154385] Bluetooth: SCO socket layer initialized
[ 0.162240] clocksource: Switched to clocksource mxc_timer1
[ 0.164690] NET: Registered protocol family 2
[ 0.165820] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.165900] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.165990] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.166177] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.166239] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.166602] NET: Registered protocol family 1
[ 0.177949] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[ 0.197638] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.214975] io scheduler noop registered
[ 0.215013] io scheduler deadline registered (default)
[ 0.229702] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.232257] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
[ 0.241651] imx-sdma 20ec000.sdma: loaded firmware 3.5
[ 0.795083] console [ttymxc0] enabled
[ 0.800786] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 53, base_baud = 5000000) is a IMX
[ 0.811070] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 54, base_baud = 5000000) is a IMX
[ 0.833928] loop: module loaded
[ 0.850399] random: fast init done
[ 0.857145] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda
[ 0.863654] nand: Macronix MX30LF2G18AC
[ 0.867519] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB siz e: 64
[ 0.876576] gpmi-nand 1806000.gpmi-nand: mode:5 ,failed in set feature.
[ 0.884143] Bad block table found at page 131008, version 0x01
[ 0.890632] Bad block table found at page 130944, version 0x01
[ 0.897339] nand_read_bbt: bad block at 0x000001d20000
[ 0.902654] nand_read_bbt: bad block at 0x00000fec0000
[ 0.907894] 4 cmdlinepart partitions found on MTD device gpmi-nand
[ 0.914142] Creating 4 MTD partitions on "gpmi-nand":
[ 0.919226] 0x000000000000-0x000000300000 : "boot"
[ 0.925800] 0x000000300000-0x000000a00000 : "kernel"
[ 0.932580] 0x000000a00000-0x000000b00000 : "dtb"
[ 0.938812] 0x000000b00000-0x000010000000 : "ubi"
[ 0.950952] gpmi-nand 1806000.gpmi-nand: driver registered.
[ 0.959324] libphy: Fixed MDIO Bus: probed
[ 0.966623] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.972592] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.978701] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.988753] imx_usb 2184000.usb: 2184000.usb supply vbus not found, using dum my regulator
[ 1.014793] i2c /dev entries driver
[ 1.020568] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[ 1.026955] Bluetooth: HCI UART driver ver 2.3
[ 1.031426] Bluetooth: HCI UART protocol H4 registered
[ 1.036668] Bluetooth: HCI UART protocol BCSP registered
[ 1.042043] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 1.049503] sdhci: Secure Digital Host Controller Interface driver
[ 1.055800] sdhci: Copyright(c) Pierre Ossman
[ 1.060176] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.132057] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADM A
[ 1.150712] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.160197] vf610-adc 2198000.adc: 2198000.adc supply vref not found, using d ummy regulator
[ 1.182399] NET: Registered protocol family 10
[ 1.194985] Segment Routing with IPv6
[ 1.198845] NET: Registered protocol family 17
[ 1.204927] 8021q: 802.1Q VLAN Support v1.8
[ 1.211358] Registering SWP/SWPB emulation handler
[ 1.224360] Key type encrypted registered
[ 1.245589] asoc-simple-card sound-tfa9882: tfa9882-hifi <-> 2028000.sai mapp ing ok
[ 1.259829] mmc0: new high speed SDIO card at address 0001
[ 1.270024] ubi0: attaching mtd3
[ 3.104415] random: crng init done
[ 3.535655] ubi0: scanning is finished
[ 3.559762] ubi0: attached mtd3 (name "ubi", size 245 MiB)
[ 3.565412] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 3.572346] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 3.579149] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 3.586158] ubi0: good PEBs: 1954, bad PEBs: 6, corrupted PEBs: 0
[ 3.592302] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 12 8
[ 3.599539] ubi0: max/mean erase counter: 179/25, WL threshold: 4096, image s equence number: 849571857
[ 3.608892] ubi0: available PEBs: 0, total reserved PEBs: 1954, PEBs reserved for bad PEB handling: 34
[ 3.619556] mtd: device 4 (rootfs) set to be root filesystem
[ 3.627585] block ubiblock0_0: created from ubi0:0(rootfs)
[ 3.634038] ubi0: background thread "ubi_bgt0d" started, PID 712
[ 3.641775] UBI error: block: can't add 'rootfs' volume, err=-17
[ 3.648993] input: gpio-keys as /devices/soc0/gpio-keys/input/input0
[ 3.655859] hctosys: unable to open rtc device (rtc0)
[ 3.662377] ALSA device list:
[ 3.665367] #0: tfa9882-audio
[ 3.676590] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 3.686293] Freeing unused kernel memory: 1024K
[ 4.220749] init: Console is alive
[ 4.224769] init: - watchdog -
[ 5.607713] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 5.647944] Button Hotplug driver version 0.4.1
[ 5.654818] Error: Driver 'gpio-keys' is already registered, aborting...
[ 5.669826] usbcore: registered new interface driver usb-storage
[ 5.679727] Error: Driver 'gpio-keys' is already registered, aborting...
[ 5.687622] kmodloader: 1 module could not be probed
[ 5.693123] kmodloader: - gpio-button-hotplug - 0
[ 5.708487] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 10.268063] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 797
[ 10.348520] UBIFS (ubi0:1): recovery needed
[ 10.533798] UBIFS (ubi0:1): recovery completed
[ 10.538411] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "root fs_data"
[ 10.546331] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O u nit sizes: 2048 bytes/2048 bytes
[ 10.556303] UBIFS (ubi0:1): FS size: 230969344 bytes (220 MiB, 1819 LEBs), jo urnal size 11554816 bytes (11 MiB, 91 LEBs)
[ 10.567221] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[ 10.573885] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID B480E 49D-B0FF-4AFF-8AB2-D7EA24210D5F, small LPT model
[ 10.601297] mount_root: switching to ubifs overlay
/etc/preinit: line 358: cat: Permission denied
[ 10.677452] urandom-seed: Seeding with /etc/urandom.seed
/etc/preinit: line 12: cat: Permission denied
/etc/preinit: line 20: uci: Permission denied
/etc/preinit: line 120: grep: Permission denied
`

@devbis
Copy link
Member

devbis commented Apr 3, 2021

You can try the following to reset the overlay:

1.Enter failsafe mode

After prompt appears :

Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level

Press [f] and then press enter.

2. Print the following lines in the failsafe prompt:

ubirmvol /dev/ubi0 -Nrootfs_data
ubimkvol /dev/ubi0 -Nrootfs_data -m

3. Reboot and configure the gateway

@broda1125
Copy link
Author

Thanks a lot! It worked!
Is it possible to use gateway as router and yet be able to control its lights, button click etc?
And what exactly happened here with my gw that I couldn't run it?

@devbis
Copy link
Member

devbis commented Apr 6, 2021

Is it possible to use gateway as router and yet be able to control its lights, button click etc?

Yes, you can write router firmware in the zigbee chip and use other software on the gateway for your own purposes.

And what exactly happened here with my gw that I couldn't run it?

I have no idea, some files were corrupted.

@devbis devbis closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants