[Fail] Using a Debian 10 (buster) host to flash a Yocto image onto a Neutis N5


#1

The host system is AMD-based amd64 architecture running Debian 10 (buster/testing).

This is not a fresh install. The host is a desktop system with Xorg and a window manager and several additional packages installed.

The flash tool was downloaded as a deb package from here:
https://docs.neutis.io/flasher/gui/#deb-package

The Yocto image was built on a Debian 9 (stretch) host system. See this forum topic:

Files present:
neutis-manufacturing-flash-tool_1.2.1_all.deb
neutis-image-neutis-n5-20181223203900.rootfs.sunxi-sdimg

Install the flash tool:
sudo dpkg -i neutis-manufacturing-flash-tool_1.2.1_all.deb

dpkg: error processing package neutis-manufacturing-flash-tool
desktop-file-install: not found

Install ‘desktop-file-utils’:
sudo apt-get update
sudo apt-get install desktop-file-utils

Try the flash tool installation again:
sudo dpkg -i neutis-manufacturing-flash-tool_1.2.1_all.deb

Run the flash tool:
neutis-manufacturing-flash-tool

The GUI opens. Select flash mode; select the image file “neutis-image-neutis-n5-20181223203900.rootfs.sunxi-sdimg”; click ‘START’.

Pending
Device Initializing … PORT 1
Flashing

The GUI says “Flashing” and is stuck there. In the console, a lot of text was passing by, and then an error appeared:

17:40:16: default: debug: “core::FlashingResult{ type: 4; portNumber: 1; serial: ; errorMessage: Can’t find storage device; usbDeviceLocation: UsbDeviceLocation {busNumber: 9; devAddress: 4; portPath: 9-4; }; codeText: }”
17:40:16: FlashControllerClient: info: " [Channel: localhost:40047; State: Finished] " | “Flashing finished. The service terminated.”
17:40:16: servicemanager: info: “Service Flasher 1 successfully finished.”
17:40:16: FlashingManager: info: Device on port 1 unplugged. Session closed.

In the syslog of the host, the error appeared at the same time as a new USB device was recognized ‘/dev/sdb’ with two partitions ‘sdb1’ and ‘sdb2’.

This is the output of the Neutis serial console:

U-Boot SPL 2017.01-rc1-g24b1e55-dirty (Mar 10 2018 - 18:10:34)
DRAM: 512 MiB
Failed to set core voltage! Can’t set CPU frequency
Trying to boot from FEL

U-Boot 2018.01-gbbbabc1 (Aug 16 2018 - 17:40:47 +0000) Allwinner Technology

CPU: Allwinner H5 (SUN50I)
Model: Emlid Neutis N5
DRAM: 512 MiB
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB…
No controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
Found U-Boot script /boot.scr
reading /boot.scr
1502 bytes read in 18 ms (81.1 KiB/s)

Executing script at 4fc00000

U-boot loaded from eMMC
reading Env.txt
403 bytes read in 14 ms (27.3 KiB/s)
reading allwinner/sun50i-h5-emlid-neutis-n5-devboard.dtb
27247 bytes read in 32 ms (831.1 KiB/s)
reading allwinner/overlay/sun50i-h5-spi0-status-okay.dtbo
266 bytes read in 31 ms (7.8 KiB/s)
Applying DT overlay sun50i-h5-spi0-status-okay.dtbo
reading allwinner/overlay/sun50i-h5-uart1.dtbo
577 bytes read in 34 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-uart1.dtbo
reading allwinner/overlay/sun50i-h5-uart2.dtbo
577 bytes read in 34 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-uart2.dtbo
reading allwinner/overlay/sun50i-h5-uart3.dtbo
577 bytes read in 33 ms (16.6 KiB/s)
Applying DT overlay sun50i-h5-uart3.dtbo
reading allwinner/overlay/sun50i-h5-r-uart.dtbo
510 bytes read in 30 ms (16.6 KiB/s)
Applying DT overlay sun50i-h5-r-uart.dtbo
reading allwinner/overlay/sun50i-h5-i2c0.dtbo
374 bytes read in 30 ms (11.7 KiB/s)
Applying DT overlay sun50i-h5-i2c0.dtbo
reading allwinner/overlay/sun50i-h5-i2c1.dtbo
374 bytes read in 30 ms (11.7 KiB/s)
Applying DT overlay sun50i-h5-i2c1.dtbo
reading allwinner/overlay/sun50i-h5-i2c2.dtbo
374 bytes read in 30 ms (11.7 KiB/s)
Applying DT overlay sun50i-h5-i2c2.dtbo
reading allwinner/overlay/sun50i-h5-r-i2c.dtbo
375 bytes read in 30 ms (11.7 KiB/s)
Applying DT overlay sun50i-h5-r-i2c.dtbo
reading allwinner/overlay/sun50i-h5-usbhost0.dtbo
504 bytes read in 30 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-usbhost0.dtbo
reading allwinner/overlay/sun50i-h5-usbhost1.dtbo
504 bytes read in 30 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-usbhost1.dtbo
reading allwinner/overlay/sun50i-h5-usbhost2.dtbo
504 bytes read in 30 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-usbhost2.dtbo
reading allwinner/overlay/sun50i-h5-usbhost3.dtbo
504 bytes read in 30 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-usbhost3.dtbo
reading allwinner/overlay/sun50i-h5-ethernet-100.dtbo
532 bytes read in 34 ms (14.6 KiB/s)
Applying DT overlay sun50i-h5-ethernet-100.dtbo
reading allwinner/overlay/sun50i-h5-analog-codec.dtbo
363 bytes read in 30 ms (11.7 KiB/s)
Applying DT overlay sun50i-h5-analog-codec.dtbo
reading allwinner/overlay/sun50i-h5-camera-status-okay.dtbo
501 bytes read in 31 ms (15.6 KiB/s)
Applying DT overlay sun50i-h5-camera-status-okay.dtbo
reading allwinner/overlay/sun50i-h5-hdmi.dtbo
1132 bytes read in 34 ms (32.2 KiB/s)
Applying DT overlay sun50i-h5-hdmi.dtbo
reading Image
14528520 bytes read in 731 ms (19 MiB/s)
reading uInitrd
4509466 bytes read in 246 ms (17.5 MiB/s)

Loading init Ramdisk from Legacy Image at 41080000 …

Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 4509402 Bytes = 4.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK

Flattened Device Tree blob at 4fa00000

Booting using the fdt blob at 0x4fa00000
Loading Ramdisk to 49bb3000, end 49fffeda … OK
reserving fdt memory region: addr=4fa00000 size=6c000
Loading Device Tree to 0000000049b44000, end 0000000049bb2fff … OK

Starting kernel …
U-Boot SPL 2017.01-rc1-g24b1e55-dirty (Mar 10 2018 - 18:10:34)
DRAM: 512 MiB
Failed to set core voltage! Can’t set CPU frequency
Trying to boot from FELNOTICE: BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000)
NOTICE: Configuring SPC Controller
NOTICE: BL3-1: v1.0(debug):aa75c8d
NOTICE: BL3-1: Built : 20:15:29, Sep 17 2017
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9

U-Boot 2018.01-00001-ga5d6c7b (Mar 10 2018 - 18:28:42 +0300) Allwinner Technology

CPU: Allwinner H5 (SUN50I)
Model: Emlid Neutis N5
DRAM: 512 MiB
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB…
No controllers found
Hit any key to stop autoboot: 0
(FEL boot)

Executing script at 43100000

Loading init Ramdisk from Legacy Image at 53000000 …

Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 3366534 Bytes = 3.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK

Flattened Device Tree blob at 52000000

Booting using the fdt blob at 0x52000000
Loading Ramdisk to 49cca000, end 49fffe86 … OK
Loading Device Tree to 0000000049cc1000, end 0000000049cc93b4 … OK

Starting kernel …

Loading, please wait…
error getting socket: Function not implemented
error initializing udev control socket
could not listen on fds: Invalid argument
Begin: Loading essential drivers … done.
Begin: Running /scripts/init-premount …
Starting mass_storage script
Exporting MMC 2 (eMMC) (/dev/mmcblk2)
Done

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

Neutis was rebooted and it was confirmed that the new image had not been flashed. :frowning:

If you have succeded or have any suggestions, please respond.


#2

I also booted on Ubuntu 18.04 LTS and experienced the same thing where the flash tool would initialize, but not flash. I tried different USB cables different USB ports, and both my custom Yocto image and the stock Ubuntu Xenial image. I didn’t try a different computer or a different Neutis.

Later, I booted Windows 10 (on a different computer) and installed the Windows flash tool and was able to do a successful flash the first time using the custom Yocto image mentioned at the top of the post.

It would still be nice to be able to use the Linux flash tool though.