Booting stucks in endless loop on nanopi neo

After having serious trouble updating kernel headers to version 4.10.0-sun8i (5.26) - postinstall script never finished compiling something -
I decided to set up a completly new installation from the recent DietPi_v140_NanoPiNEO-armv7-(Jessie).img image. After login I run

apt update
apt upgrade

which installed following packages:

Get:1 http://security.debian.org/ jessie/updates/main login armhf 1:4.2-3+deb8u3 [719 kB]
Get:2 http://ftp.debian.org/debian/ jessie/main base-files armhf 8+deb8u7 [69.7 kB]
Get:3 http://apt.armbian.com/ jessie/main armbian-firmware armhf 5.25 [1,617 kB]      
Get:4 http://ftp.debian.org/debian/ jessie/main bash armhf 4.3-11+deb8u1 [1,098 kB]                       
Get:5 http://security.debian.org/ jessie/updates/main libssl1.0.0 armhf 1.0.1t-1+deb8u6 [868 kB]    
Get:6 http://ftp.debian.org/debian/ jessie/main libc-bin armhf 2.19-18+deb8u7 [1,159 kB]                                                                    
Get:7 http://security.debian.org/ jessie/updates/main libisc-export95 armhf 1:9.9.5.dfsg-9+deb8u10 [128 kB]                                                 
Get:8 http://apt.armbian.com/ jessie/main armbian-tools-jessie armhf 5.25 [15.4 kB]                                                                         
Get:9 http://apt.armbian.com/ jessie/main linux-dtb-dev-sun8i armhf 5.26 [66.5 kB]                                                                          
Get:10 http://security.debian.org/ jessie/updates/main libdns-export100 armhf 1:9.9.5.dfsg-9+deb8u10 [415 kB]                                               
Get:11 http://apt.armbian.com/ jessie/main linux-image-dev-sun8i armhf 5.26 [14.8 MB]                                                                       
Get:12 http://ftp.debian.org/debian/ jessie/main libc6 armhf 2.19-18+deb8u7 [3,963 kB]                                                                      
Get:13 http://security.debian.org/ jessie/updates/main libisccfg-export90 armhf 1:9.9.5.dfsg-9+deb8u10 [38.0 kB]                                            
Get:14 http://security.debian.org/ jessie/updates/main libirs-export91 armhf 1:9.9.5.dfsg-9+deb8u10 [36.5 kB]                                               
Get:15 http://security.debian.org/ jessie/updates/main ntfs-3g armhf 1:2014.2.15AR.2-1+deb8u3 [481 kB]                                                      
Get:16 http://security.debian.org/ jessie/updates/main passwd armhf 1:4.2-3+deb8u3 [934 kB]                                                                 
Get:17 http://security.debian.org/ jessie/updates/main openssl armhf 1.0.1t-1+deb8u6 [659 kB]                                                               
Get:18 http://ftp.debian.org/debian/ jessie/main e2fslibs armhf 1.42.12-2+b1 [175 kB]                                                                       
Get:19 http://ftp.debian.org/debian/ jessie/main e2fsprogs armhf 1.42.12-2+b1 [735 kB]                                                                      
Get:20 http://ftp.debian.org/debian/ jessie/main sed armhf 4.2.2-4+deb8u1 [237 kB]                                                                          
Get:21 http://ftp.debian.org/debian/ jessie/main libudev1 armhf 215-17+deb8u6 [52.8 kB]                                                                     
Get:22 http://ftp.debian.org/debian/ jessie/main udev armhf 215-17+deb8u6 [856 kB]                                                                          
Get:23 http://ftp.debian.org/debian/ jessie/main libsystemd0 armhf 215-17+deb8u6 [82.6 kB]                                                                  
Get:24 http://ftp.debian.org/debian/ jessie/main systemd armhf 215-17+deb8u6 [2,315 kB]                                                                     
Get:25 http://ftp.debian.org/debian/ jessie/main systemd-sysv armhf 215-17+deb8u6 [36.3 kB]                                                                 
Get:26 http://ftp.debian.org/debian/ jessie/main libpam-systemd armhf 215-17+deb8u6 [114 kB]                                                                
Get:27 http://ftp.debian.org/debian/ jessie/main libpam0g armhf 1.1.8-3.1+deb8u2 [121 kB]                                                                   
Get:28 http://ftp.debian.org/debian/ jessie/main libpam-modules-bin armhf 1.1.8-3.1+deb8u2 [101 kB]                                                         
Get:29 http://ftp.debian.org/debian/ jessie/main libpam-modules armhf 1.1.8-3.1+deb8u2 [290 kB]                                                             
Get:30 http://ftp.debian.org/debian/ jessie/main libpam-runtime all 1.1.8-3.1+deb8u2 [212 kB]                                                               
Get:31 http://ftp.debian.org/debian/ jessie/main libdbus-1-3 armhf 1.8.22-0+deb8u1 [150 kB]                                                                 
Get:32 http://ftp.debian.org/debian/ jessie/main dbus armhf 1.8.22-0+deb8u1 [253 kB]                                                                        
Get:33 http://apt.armbian.com/ jessie/main linux-jessie-root-dev-nanopineo armhf 5.25 [363 kB]                                                              
Get:34 http://ftp.debian.org/debian/ jessie/main libcomerr2 armhf 1.42.12-2+b1 [59.9 kB]                                                                    
Get:35 http://apt.armbian.com/ jessie/utils sunxi-tools armhf 1.4.2-1~armbian5.25+1 [35.8 kB]                                                               
Get:36 http://ftp.debian.org/debian/ jessie/main libss2 armhf 1.42.12-2+b1 [63.3 kB]                                                                        
Get:37 http://ftp.debian.org/debian/ jessie/main libgnutls-openssl27 armhf 3.3.8-6+deb8u4 [140 kB]                                                          
Get:38 http://ftp.debian.org/debian/ jessie/main libgnutls-deb0-28 armhf 3.3.8-6+deb8u4 [633 kB]                                                            
Get:39 http://ftp.debian.org/debian/ jessie/main libhogweed2 armhf 2.7.1-5+deb8u2 [117 kB]                                                                  
Get:40 http://ftp.debian.org/debian/ jessie/main libnettle4 armhf 2.7.1-5+deb8u2 [183 kB]                                                                   
Get:41 http://ftp.debian.org/debian/ jessie/main libpcsclite1 armhf 1.8.13-1+deb8u1 [53.8 kB]                                                               
Get:42 http://ftp.debian.org/debian/ jessie/main multiarch-support armhf 2.19-18+deb8u7 [180 kB]                                                            
Get:43 http://ftp.debian.org/debian/ jessie/main locales all 2.19-18+deb8u7 [3,946 kB]                                                                      
Get:44 http://ftp.debian.org/debian/ jessie/main ca-certificates all 20141019+deb8u2 [207 kB]                                                               
Get:45 http://ftp.debian.org/debian/ jessie/main wireless-regdb all 2016.06.10-1~deb8u1 [8,504 B]

After rebooting the system hangs in an endless boot loop:

U-Boot SPL 2016.11-armbian (Dec 26 2016 - 14:00:15)
DRAM: 512 MiB
Trying to boot from MMC1


U-Boot 2016.11-armbian (Dec 26 2016 - 14:00:15 +0000) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi One
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   phy interface0
eth0: ethernet@1c30000
Hit any key to stop autoboot:  0 
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading boot.bmp
6944 bytes read in 30 ms (225.6 KiB/s)
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
2092 bytes read in 29 ms (70.3 KiB/s)
## Executing script at 43100000
Booting from SD
reading /boot/armbianEnv.txt
** Unable to read file /boot/armbianEnv.txt **
reading armbianEnv.txt
20505433 bytes read in 2086 ms (9.4 MiB/s)
ERROR: Environment import failed: errno = 22

at cmd/nvedit.c:1084/do_env_import()
reading /boot/uInitrd
** Unable to read file /boot/uInitrd **
reading uInitrd
3276245 bytes read in 273 ms (11.4 MiB/s)
reading /boot/zImage
** Unable to read file /boot/zImage **
reading zImage
5704984 bytes read in 456 ms (11.9 MiB/s)
reading /boot/.next
** Unable to read file /boot/.next **
reading .next
0 bytes read in 10 ms (0 Bytes/s)
reading /boot/dtb/sun8i-h3-orangepi-one.dtb
** Unable to read file /boot/dtb/sun8i-h3-orangepi-one.dtb **
reading /dtb/sun8i-h3-orangepi-one.dtb
31302 bytes read in 43 ms (710 KiB/s)
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3276181 Bytes = 3.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 49ce0000, end 49fffd95 ... OK
   Loading Device Tree to 49cd5000, end 49cdfa45 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Loading, please wait...
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.25.2
done.
mount: Invalid argument
done.
Target filesystem doesn't have requested /sbin/init.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: No such file or directory
done.
Could not copy file: No such file or directory
No init found. Try passing init= bootarg.
Rebooting automatically due to panic= boot argument
[   16.415904] reboot: Restarting system

Hi,

I’ve just updated the NanoPi Neo image to v145, can you re-download, write and retest with this image please?
http://dietpi.com/downloads/images/DietPi_NanoPiNEO-armv7-(Jessie).7z

Retested with the new image:

  • Image boots with kernel 4.10.0-sun8i
  • Test for internet connection in software installer is successful now
  • apt update && apt upgrade does not install updates because everything is already up to date
  • After installing build essentials i can install linux-headers-dev-sun8i (took a couple of minutes) and build my own kernel module

Looks good so far!

The only thing not working at the moment is the onboard sound. sun8i_codec_analog is loaded but no soundcard is found.

aplay -l
aplay: device_list:268: no soundcards found...

I´m still investigating.

Thanks for the quick help and keep up the good work!

Another issue: USB devices are not detected. lsusb always shows

root@DietPi:~# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and in dmesg appear no entries when plugging in devices.

Hi,

Looks like a possible issue with 4.10 kernel, thanks for letting us know. I’ll run some tests here and try to replicate.

Confirmed, looks like a bug with 4.10 kernel update from ARMbian. No USB devices are detected when attached.

Let me regenerate our previous 3.x image and i’ll upload, should be more stable. Will let you know when its ready for testing.

Hi,

Done, Please try the following NanoPi Neo 3.x image:
http://dietpi.com/downloads/images/no_release/(NR_3.x)_DietPi_NanoPiNEO-armv7-(Jessie).7z

Tested with USB device fine:

[  197.630115] usb 8-1: new low-speed USB device number 2 using sunxi-ohci
[  197.868436] generic-usb 0003:2252:0120.0001: input,hidraw0: USB HID v1.10 Keyboard [HBGIC Technology Co., Ltd. USB Keyboard Mouse] on usb-sunxi-ohci-1/input0
[  197.921383] generic-usb 0003:2252:0120.0002: input,hidraw1: USB HID v1.10 Mouse [HBGIC Technology Co., Ltd. USB Keyboard Mouse] on usb-sunxi-ohci-1/input1

First impression of new image:

  • USB is working again
  • Own kernel module builds
  • Analog audio is working :slight_smile:
  • audio mixer seems to support mono volume control only :-/

Will continue testing.

So just for the protocol… The H3 cpu seems not to support left/right balance on the analogue output. Found this workaround for /etc/asound.conf:

pcm.!default {
    type hw
    card 0
    device 0
}
ctl.!default {
    type hw
    card 0
}
pcm.scstereo {
    type            softvol
    slave.pcm       "default"
    control.name    "scmaster"
    control.card    0
}
pcm.scmono {
  type route
  slave.pcm scstereo
  slave.channels 2
  ttable.0.0 0.5
  ttable.0.1 0.5
  ttable.1.0 0.5
  ttable.1.1 0.5 
}

This creates two virtual devices “scstereo” and “scmono”. Left/right balance can be controlled over “scmaster” in alsamixer after the devices have been used for the first time (aplay -D scmono …) . The device scmono is necessary because the soft mixer seems not to work on mono streams. (Attenuation on one side always affects both sides.) Dependend on how many channels you want to play you have to choose scmono or scstereo as soundcard.


Other things with this image: The cpu temperature is around 5-10 degrees higher compared to kernel 4.9.4. Cannot verify if the power consumptions higher, too. So might be just a calculation thing. The resolution in /sys/class/thermal/thermal_zone0/temp of 3.4.113-sun8i seems to be 1 degree, in 4.9.4 it has been 1/1000 degree (?).

Hello, a problem with my orange pi pc, after doing the update procedure, reboot, “GO >> Install”, it did not recognize the partition on which it was installed, I looked for a bit and decided at the first boot to change the / etc / Fstab to mount the partitions by UUID, I used as the source the ink below, I recommend using ‘blkid’ to find out which UUIDs of each partition.
On the first boot, I canceled the update (it is done later, when I run “GO >> Install” again), I ran the ‘sudo blkid’ command, the mounted units appeared and, among other information, the UUID of each one , Replace in ‘/ etc / fstab’ and restart, when access via ssh, I went to the optional installation screen of the programs, I went directly to “GO >> Install”, finished the installation, rebooted but continued with the problem. I decided to run the ‘fsck’ command on a computer, after seeing what it would look like on the orange screen, mounted the sd card on a computer, ran the command only on the larger partition, can not run that command on the boot partition, 'For all questions asked by fsck about the corrections to be made and then returned the card to the orange pi, and miraculously worked.

And ALWAYS that run the command ‘dietpi-update’, redo the procedure of running the command 'fsck’

i used google translator, sorry errors, but you can understand what I did, i think.


https://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/

Hi,

Thanks for report, we’ll try to replicate:
https://github.com/Fourdee/DietPi/issues/1082

Which PSU and SD card used?

Hi,

We were unable to replicate reported issues:
https://github.com/Fourdee/DietPi/issues/1082#issuecomment-315735459

Please can you confirm PSU/SD card used, and, try others if available?