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

Nanopi-neo fails to boot with isar-image-base-debian-bookworm-nanopi-neo.wic #100

Closed
baprusty opened this issue Nov 25, 2023 · 4 comments
Closed

Comments

@baprusty
Copy link
Contributor

baprusty commented Nov 25, 2023

Steps:

  • Clone the master branch and created isar-base-image for nano pi neo
  • Flashed the created image to SD-card
  • Attached the sd card to nanopi (Note: nanopi-neo used here doesn't support internal emmc) and powered on
  • Powered the nanopi

Booting stops at:

Begin: Running /scripts/local-block ... mdadm: No arrays found in config file or automatically
done.
Begin: Running /scripts/local-block ... mdadm: No arrays found in config file or automatically
done.
Begin: Running /scripts/local-block ... mdadm: No arrays found in config file or automatically
done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mmcblk2p1 does not exist.  Dropping to a shell!
(initramfs)

complete-boot-log-serial-neo.txt

@baprusty
Copy link
Contributor Author

baprusty commented Nov 25, 2023

Root cause seems like: fee0c41

  • I tried building the image by reverting commit
  • Tried building and booting: It is able to boot the image and login prompt appears

Checked info from official page: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO3#Running_the_build

  • Looks like mmcblk0 is for external SD card and mmcblk2 for internal emmc

cc: @fmoessbauer @WiseLord @chombourger

@fmoessbauer
Copy link
Contributor

Hi @baprusty , thanks for reporting! It either might be, that the inconsistency of the device names in the firmware provided device tree has been fixed, or the names are simply not stable (despite what the documentation states).

As proposed in the commit message, we probably should just rely on partition UUIDs. This also makes it possible to copy the image to the eMMC without any further changes.

Could you please try to replace --ondisk mmcblk2 with --use-uuid in the WKS file and try again?

@baprusty
Copy link
Contributor Author

Hi @fmoessbauer, Thanks, With the --use-uuid change:

meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in
@@ -5,6 +5,6 @@

 part u-boot --source rawcopy --sourceparams "file=/usr/lib/u-boot/nanopi_neo/u-boot-sunxi-with-spl.bin" --no-table --align 8

-part / --source rootfs-u-boot --ondisk mmcblk2 --fstype ext4 --mkfs-extraopts "-T default" --sourceparams "builtin_dt=yes" --label platform --align 1024 --active
+part / --source rootfs-u-boot --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --sourceparams "builtin_dt=yes" --label platform --align 1024 --active

Able to boot the nanopi:

Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so skipping root file system
[    6.967817] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[    7.230101] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
[    7.721635] systemd[1]: System time before build time, advancing clock.
[    7.789409] systemd[1]: Inserted module 'autofs4'
[    7.888205] systemd[1]: systemd 252.17-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    7.921029] systemd[1]: Detected architecture arm.
[    7.927031] systemd[1]: Detected first boot.

Welcome to Debian GNU/Linux 12 (bookworm)!

complete-boot-log-serial-neo-fix.txt

@baprusty
Copy link
Contributor Author

Fixes merged in next: f0ba858

Closing the issue.

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