Jump to content

Recommended Posts

Posted

Hello,

I've been trying MangoPi MQ Pro images for a couple weeks now, it always fails booting with same behaviour, with the same error message.

To me, the most important lines are those:

ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...

 

With my limited knowledge, my understanding is that the memory where the devicetree file is loaded gets overwritten by something else, or is loaded in memory address higher than the 512MB available on this device.

I understand that MangoPi MQ Pro images are based on the Nezha D1 board witch is comes with 1GB of memory.

 

So I decided to mess a little bit with u-boot variables to confirm my assumptions. (Again I am not a developer and I'm a bit clueless on how to deal with these numbers correctly.)

Booting this image Armbian_23.8.0-trunk.52_Mangopi-mq_lunar_edge_6.1.0-rc3.img with the default settings, I get the same invalid devicetree error.

 

But with the following parameters I manage to boot the kernel, well not really but the kernel at least try to start.

etenv fdt_high 0xffffffffffffffff
setenv initrd_high 0xffffffffffffffff
setenv scriptaddr 0x88100000
setenv script_offset_f 0x1fff000
setenv script_size_f 0x1000
setenv kernel_addr_r 0x84000000
setenv kernel_comp_addr_r 0x90000000
setenv kernel_comp_size 0x10000000
setenv fdt_addr_r 0x88000000
setenv ramdisk_addr_r 0x88300000
setenv distro_bootpart 1
run mmc_boot

 

Result:

 

=> run mmc_boot
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1:      Armbian
Retrieving file: /boot/uInitrd
Retrieving file: /boot/Image
append: root=UUID=6aabfef8-4a9a-4cc5-8504-710ab6b18516 console=ttyS0,115200n8 console=tty0 earlycon=sbi cma=96M rootflags=data=writeback stmmaceth=chain_mode:1 rw rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnams
Retrieving file: /boot/dtb/allwinner/sun20i-d1-nezha.dtb
## Loading init Ramdisk from Legacy Image at 88300000 ...
   Image Name:   uInitrd
   Image Type:   RISC-V Linux RAMDisk Image (gzip compressed)
   Data Size:    20125415 Bytes = 19.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
sun4i_usb_phy phy@4100400: PHY: Failed to power off phy@4100400: -38.
device_remove: Device 'usb@4200400' failed to remove, but children are gone
   Using Device Tree in place at 0000000088000000, end 0000000088009963

Starting kernel ...

[    0.000000] Linux version 6.1.0-rc3-d1 (armbian@next) (riscv64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 Thu Nov  3 04:50:15 UTC 2022
[    0.000000] Machine model: Allwinner D1 Nezha
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] INITRD: 0x88300000+0x01332000 is not a memory region - disabling initrd
[    0.000000] Unable to handle kernel paging request at virtual address ffffffd80186cae8
[    0.000000] Oops [#1]
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.1.0-rc3-d1 #1
[    0.000000] Hardware name: Allwinner D1 Nezha (DT)
[    0.000000] epc : vmalloc_fault.constprop.0+0x64/0x168
[    0.000000]  ra : do_page_fault+0x60/0x39e
[    0.000000] epc : ffffffff80008d1e ra : ffffffff80008e82 sp : ffffffff81603d10
[    0.000000]  gp : ffffffff8185da58 tp : ffffffff8160aac0 t0 : ffffffff80008e22
[    0.000000]  t1 : ffffffff80e002b0 t2 : ffffffff80e00330 s0 : ffffffff81603d30
[    0.000000]  s1 : ffffffd77c000001 a0 : ffffffff8185d2a8 a1 : ffffffff811c0970
[    0.000000]  a2 : ffffffff8186cae8 a3 : 0000000000000000 a4 : 0000000000000ae8
[    0.000000]  a5 : ffffffd80186cae8 a6 : 0000000000000000 a7 : 0000000000000018
[    0.000000]  s2 : ffffffff81603db0 s3 : 000000000000000d s4 : 0000000000000000
[    0.000000]  s5 : ffffffff8160aac0 s6 : 0000000000000000 s7 : 0000000000000000
[    0.000000]  s8 : 000000007ff1d180 s9 : 000000007ffb69c0 s10: 0000000000000001
[    0.000000]  s11: 0000000000000002 t3 : 7000000000000000 t4 : ffffffff80c117a0
[    0.000000]  t5 : ffffffff80c117a0 t6 : ffffffff80c117d0
[    0.000000] status: 0000000200000100 badaddr: ffffffd80186cae8 cause: 000000000000000f
[    0.000000] [<ffffffff80008e82>] do_page_fault+0x60/0x39e
[    0.000000] [<ffffffff800037c8>] ret_from_exception+0x0/0xc
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---

 

I hope this can help someone more knowledgeable than me to figure out better numbers that could lead to a fully booting MangoPI MQ Pro.

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