Jump to content

NanoPi NEO hangs on boot Bookworm 23.5.1


Go to solution Solved by Gunjan Gupta,

Recommended Posts

Posted

The problem seems to be kernel version 6.1.30; Just writing image file 'Armbian_23.5.1_Nanopineo_bookworm_current_6.1.30_minimal.img' to SD-card gives the following output via serial console:

 

U-Boot SPL 2022.04-armbian (May 27 2023 - 19:27:28 +0000)
DRAM: 512 MiB
Trying to boot from MMC1


U-Boot 2022.04-armbian (May 27 2023 - 19:27:28 +0000) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: FriendlyARM NanoPi NEO
DRAM:  512 MiB
Core:  33 devices, 12 uclasses, devicetree: separate
WDT:   Not starting watchdog@1c20ca0
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Unable to use mmc 0:1...
In:    serial
Out:   serial
Err:   serial
Net:   phy interface0

Error: ethernet@1c30000 address not set.
No ethernet found.

starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1d000: USB EHCI 1.00
Bus usb@1c1d400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1d000 for devices... 1 USB Device(s) found
scanning bus usb@1c1d400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
4121 bytes read in 3 ms (1.3 MiB/s)
## Executing script at 43100000
U-boot loaded from SD
Boot script loaded from mmc
182 bytes read in 2 ms (88.9 KiB/s)
10963883 bytes read in 456 ms (22.9 MiB/s)
8477464 bytes read in 354 ms (22.8 MiB/s)
Found mainline kernel configuration
35417 bytes read in 7 ms (4.8 MiB/s)
504 bytes read in 5 ms (97.7 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost1.dtbo
504 bytes read in 6 ms (82 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo
4185 bytes read in 5 ms (817.4 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
## Executing script at 45000000
Kernel image @ 0x42000000 [ 0x000000 - 0x815b18 ]
## Loading init Ramdisk from Legacy Image at 43400000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    10963819 Bytes = 10.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
   Loading Ramdisk to 4958b000, end 49fffb6b ... OK
   Loading Device Tree to 4951a000, end 4958afff ... OK

Starting kernel ...

From here on it hangs.

 

The board runs fine with kernel 5.15.93 and Bookworm userspace from its usual SD-card that I manually upgraded to Bookworm (edit sources lists and added armbian.gpg key). That dist-upgrade did not upgrade the kernel, still kept at 5.15.93. Also I saw no change in U-boot.

As a trial, switched to nightly in armbian-config, that installed kernel 6.1.30, but also same hang as the official image. So I rolled-back that trial, and now the question is, why does this kernel 6.1.30 hang?

Posted
6 minutes ago, eselarm said:

That dist-upgrade did not upgrade the kernel, still kept at 5.15.93. Also I saw no change in U-boot.

This is expected since apt repo is still behind.

 

Try increasing the verbosity to 7 in /boot/armbianEnv.txt to get more output on boot. Maybe this gives some clues.

Posted (edited)

Also with verbosity=7 no extra output. Also 'Armbian_23.5.1_Nanopineo_jammy_current_6.1.30.img' same behavior; makes me think that the generated kernel file is maybe wrong/corrupt (I haven't checked if it is the same for Jammy and Bookworm). Or the U-boot firmware doesn't work together with the 6.1.30 binary.

 

A 6.x kernel itself should not be a problem I think. Earlier this year I booted from an openSUSE Tumbleweed image, that went OK. AFAIR it was also 6.x kernel but very different U-boot at least; It had Btrfs build-in and resized to small GPT based layout in order to allow the Allwinner H3 to load from the hardcoded sector offset. I don't know how to continue, maybe wait for updates of the repo to final Bookworm after Debian release on the 10th of june.

Edited by eselarm
Posted

Another try: 'Armbian_23.5.0-trunk.275_Nanopineo_bookworm_edge_6.2.16_minimal.img' works!

So filesystem resize, account creation, reboot, power cycle. U-Boot reports: 2022.04-armbian (May 25 2023 - 19:26:34 +0000) Allwinner Technology
 

Posted

I have also noticed this issue on nanopi duo2. I tried to find out the cause of it and I think its caused by this upstream commit. I added a revert patch in userpatches/kernel/archive/sunxi-6.1 and compiled an image. Image was able to boot successfully. I am going to investigate a bit more about why its impacting 32bit allwinner boards, and will raise a merge request with the fix once I have it ready

Posted
10 minutes ago, Gunjan Gupta said:

and will raise a merge request with the fix once I have it ready


Thank you!

Posted

The upstream 6.1.30 kernel with sunxi_defconfig seems to boot fine. So I think either one of the armbian patches is not working with the upstream change that I mentioned before or there might be some config missing. Trying to find out whats causing the conflict

  • Solution
Posted (edited)

I was able to narrow down the problem further. This seems to have caused because of net-phy-Support-yt8531c.patch. I am not sure why this patch is causing the issue but removing the stmmac part or changing config for stmmac from y to m solves it. 

Edited by Gunjan Gupta
Posted
Zitat

I was able to narrow down the problem further. This seems to have caused because of net-phy-Support-yt8531c.patch. I am not sure why this patch is causing the issue but removing the stmmac part or changing config for stmmac from y to m solves it. 

 

Hello Gunjan Gupta !

I'm new in this forum and can confirm that this patch makes this issue. :)

Thanks for working it out. :thumbup:

Posted

'Armbian_23.5.2_Nanopineo_bookworm_current_6.1.30_minimal.img' now works as expected.

However, going to nightly again on my existing installation still the same hang with a kernel file named '6.1.30-sunxi' as well.

So I did a brute-force overwrite of the relevant kernel files from the Armbian_23.5.2_Nanopineo_bookworm_current_6.1.30_minimal.img on the existing installation, then the boot succeeds with:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.30-sunxi (armbian@next) (arm-linux-gnueabihf-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP Wed May 24 16:32:53 UTC 2023

and I have Bookworm with 6.1.x kernel on NanoPiNEO. That was the goal as I can use some new Btrfs features now and prepare for upgrade of a few other NanoPiNEOs. I will keep this one as is as an intermediate step. Once Debian Bookworm is released and some kernel >= 6.1.30 appears, I will go back to stable I think. The other NanoPiNEOs should not run beta at least.

 

Although the build-date is before my report, I assume it lacks or fixes the issue with net-phy-Support-yt8531c.patch.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines