LinkIt Smart 7688 - Issues about using Web interface upload firmware

Hello everyone,

The followings are my situations:
1.After issuing the upload command, the console printed the following information,

image

2.The web using updating,

image

My hardware platform is MT7688
OpenWRT version is following:
image

Can anyone help me solve this? Urgently.

Thanks.

Can you describe the issue you're having, please?

There are no errors in the screenshots you provided.

Hi lleachii,

Situation1. After updating and then reboot, why wait for a long time until I can login to the shell, the followings is the logs.

[    3.218901] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    3.297221] hub 2-0:1.0: USB hub found
[    3.305152] hub 2-0:1.0: 1 port detected
[    3.316870] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.341729] init: - preinit -
[    4.734347] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3[    4.921394] random: procd: uninitialized urandom read (4 bytes read)
] or [4] key and hit [enter] to select the debug level
[    7.730703] rt3050-esw 10110000.esw: link changed 0x01
[    8.115571] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[    8.130032] jffs2_build_filesystem(): unlocking the mtd device... 
[    8.130038] done.

Thanks.

[    3.297220] hub 2-0:1.0: USB hub found
[    3.305150] hub 2-0:1.0: 1 port detected
[    3.316871] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.341729] init: - preinit -
[    4.734860] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3[    4.922467] random: procd: uninitialized urandom read (4 bytes read)
] or [4] key and hit [enter] to select the debug level
[    7.731217] rt3050-esw 10110000.esw: link changed 0x01
[    8.119992] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[    8.134456] jffs2_build_filesystem(): unlocking the mtd device... 
[    8.134462] done.


**[    8.150503] jffs2_build_filesystem(): erasing all blocks after the end marker... **
**[  130.152304] random: crng init done**


[  150.406976] done.
[  150.410833] jffs2: notice: (400) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  150.443118] mount_root: overlay filesystem has not been fully initialized yet
[  150.464333] mount_root: switching to jffs2 overlay
[  150.501135] overlayfs: upper fs does not support tmpfile.
- config restore -
[  150.894297] urandom-seed: Seed file not found (/etc/urandom.seed)
[  150.942026] procd: - early -
[  150.948681] procd: - watchdog -
[  151.706207] procd: - watchdog -
[  151.712799] procd: - ubus -
[  151.936523] procd: - init -
Please press Enter to activate this console.


BusyBox v1.29.2 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r7743-d3ddf66
 -----------------------------------------------------

There are no errors in this log, either. You also didn't state your issue.

  • Are you concerned that it takes a long time to boot after flashing???

The first boot may take some time for: SSH keys, generating default conig files, etc.

  • How long????

Hi lleachii,

The followings derive from the logs, the time difference is about 142 second
**[ 8.150503] jffs2_build_filesystem(): erasing all blocks after the end marker... **
......
[ 151.936523] procd: - init -

1 Like

Can you try to flash over this?

Yeah, I can flash in our product demo board.

There are sixty devices to be sold out and if we can't use the ethernet to upload the FW, it will deadly brick for upcoming update.


When the device print the following log and I power off the device imediately, what will happen?

killall: telnetd: no process killed
killall: dropbear: no process killed
Sending TERM to remaining processes ... ntpd sh ubus ubusd logd rpcd dnsmasq netifd odhcpd 
Sending KILL to remaining processes ... 
Switching to ramdisk...
Performing system upgrade...
Unlocking firmware ...

Writing from <stdin> to firmware ...     
Upgrade completed
Rebooting system...
umount: can't unmount /dev: Resource busy
umoun[  383.405455] reboot: Restarting system
t: can't unmount /tmp: Resource busy

WHOA...you do not power off the rotuer!!!

YOU ALLOW THE ROUTER TO REBOOT ITSELF.

How long it'll take to reboot?

The question I firstly asked is following,

After updating using the web interface, the device console print the logs

- watchdog -
killall: telnetd: no process killed
killall: dropbear: no process killed
Sending TERM to remaining processes ... sh mount_root sh ubus ubusd logd rpcd dnsmasq netifd odhcpd 
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root 
Failed to kill a[  143.743057] reboot: Restarting system
ll processes.
sysupgrade aborted with return code: 256

That is normal. You should allow it to complete a full reboot without interruption. I cannot tell you how long, as I do not own that device.

- watchdog -
killall: telnetd: no process killed
killall: dropbear: no process killed
Sending TERM to remaining processes ... sh mount_root sh ubus ubusd logd rpcd dnsmasq netifd odhcpd 
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root 
Failed to kill a[   23.963302] jffs2_build_filesystem(): erasing all blocks after the end marker... 
ll processes.
s[   82.571486] reboot: Restarting system
ysupgrade aborted with return code: 256

How about this error, sysupgrade failure.

  • Can you copy the whole output, beginning with the sysupgrade command itself, please?
  • Have you tried the web GUI?

The following information is printed when I use web GUI to update the FW.

root@OpenWrt:/# [   23.715704] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   23.796762] jffs2_build_filesystem(): unlocking the mtd device... 
[   23.796777] done.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
killall: dropbear: no process killed
Sending TERM to remaining processes ... sh mount_root sh ubus ubusd logd rpcd dnsmasq netifd odhcpd 
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root 
Failed to kill a[   23.812897] jffs2_build_filesystem(): erasing all blocks after the end marker... 
ll processes.
s[   75.832305] reboot: Restarting system
ysupgrade aborted with return code: 256

Normal. Slow flash memory. Waiting to complete the initialisation of the r/w overlay partition. Wait time depends on the router. In my old router it is about 70 seconds:

[    6.848101] usbcore: registered new interface driver usb-storage
[   13.805699] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   13.814395] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   14.086823] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[   14.094089] jffs2_build_filesystem(): unlocking the mtd device...
[   14.100077] done.
[   14.102064] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   69.757543] done.
[   69.759540] jffs2: notice: (444) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 uncheck

That error 256 looks more strange.
Google search reveals that others have run into it, too, as you probably have already found out by now???
Does the proposed fix (of shutting down wifi before sysupgrade work ok for you ?)

https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg42257.html
https://lists.openwrt.org/pipermail/openwrt-devel/2018-May/012563.html

Based on the final answer there https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg42296.html , the issue might already be fixed in master, but I am not sure if that has been backported to 18.06.

But my situation is that can't kill "mount_root" process.
So for this, what should I do?

Finally, instead of updating the FW of the device, I use the SCP client to update the specified program.
But the problem using web interface to update FW still exists.

- watchdog -
killall: telnetd: no process killed
killall: dropbear: no process killed
Sending TERM to remaining processes ... sh mount_root sh ubus ubusd logd rpcd dnsmasq netifd odhcpd 
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root 
Failed to kill a[   23.812897] jffs2_build_filesystem(): erasing all blocks after the end marker... 
ll processes.
s[   75.832305] reboot: Restarting system
ysupgrade aborted with return code: 256

Can anyone give me some advice for this?
Thanks.

You can try from the command line.

It appears you never showed me a copy of the entire command...did you ever login to the router via SSH and perform sysupgrade on command line???

The following is the logs from SSH client

root@OpenWrt:~# ls
mt7688.bin  tcpserver
root@OpenWrt:~# 
root@OpenWrt:~# sysupgrade -v -F mt7688.bin 
Image not in /tmp, copying...
Saving config files...
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/luci
etc/config/network
etc/config/rpcd
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/config/wireless
etc/dropbear/dropbear_rsa_host_key
etc/fw_env.config
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/1035ac73cc4e59e3
etc/opkg/keys/228b56027a1d0e3f
etc/opkg/keys/5151f69420c3f508
etc/opkg/keys/72a57f2191b211e0
etc/opkg/keys/792d9d9b39f180dc
etc/opkg/keys/9ef4694208102c43
etc/opkg/keys/b26f36ae0f4106d
etc/opkg/keys/b5043e70f9a75cde
etc/opkg/keys/c10b9afab19ee428
etc/opkg/keys/dace9d4df16896bf
etc/opkg/keys/dd6de0d06bbd3d85
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/sysctl.conf
Commencing upgrade. Closing all shell sessions.

The following is the logs from uart when upgrading using command from SSH

root@OpenWrt:/# Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... sh mount_root ubusd logd rpcd dnsmasq netifd odhcpd tcpserver uhttpd sh 
Sending KILL to remaining processes ... mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root mount_root 
Failed to kill a[  100.543870] reboot: Restarting system
ll processes.
sysupgrade aborted with return code: 256