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

Common Questions 常见问题 #12

Open
fanghuaqi opened this issue Jul 14, 2023 · 0 comments
Open

Common Questions 常见问题 #12

fanghuaqi opened this issue Jul 14, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@fanghuaqi
Copy link
Member

fanghuaqi commented Jul 14, 2023

Repo Branch Usage

How to use this repo

About toolchain

Common issues or bugs met

You can also check the open or closed issues here https://github.com/Nuclei-Software/nuclei-linux-sdk/issues?q=is%3Aissue+

@fanghuaqi fanghuaqi added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Jul 14, 2023
@fanghuaqi fanghuaqi self-assigned this Jul 14, 2023
@fanghuaqi fanghuaqi pinned this issue Jul 14, 2023
fanghuaqi added a commit that referenced this issue Jul 26, 2023
Not boot ok on qemu riscv64 using 5.10 kernel

see as below

$ qemu-system-riscv64 -M nuclei_evalsoc,download=flashxip -smp 8 -m 2G -cpu nuclei-ux900fd,,mmu=off -bios /Local/hqfang/workspace/software/nuclei-linux-sdk/work/evalsoc/freeloader/freeloader.elf -nographic -S -s
GDB Server listening on: 'tcp::1234'...
[    0.000000] Linux version 5.10.181+ ([email protected]) (riscv64-linux-gcc.br_real (Buildroot 2023.05-7-gd918568a15) 12.3.0, GNU ld (GNU Binutils) 2.38) #12 SMP Fri Jul 21 13:48:08 CST 2023
[    0.000000] Machine model: nuclei,evalsoc
[    0.000000] earlycon: nuclei0 at MMIO 0x0000000010013000 (options '')
[    0.000000] printk: bootconsole [nuclei0] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000fdffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000fdffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000fdffffff]
[    0.000000] riscv: ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: max_distance=0x78000 too large for vmalloc space 0x0
[    0.000000] percpu: Embedded 15 pages/cpu s22880 r8192 d30368 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 509040
[    0.000000] Kernel command line: earlycon console=ttyNUC0 earlyprintk
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 2028604K/2064384K available (1990K kernel code, 609K rwdata, 545K rodata, 110K init, 213K bss, 35780K reserved, 0K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: interrupt-controller@1c000000: mapped 53 interrupts with 8 handlers for 16 contexts.
[    0.000000] clint: clint@18031000: timer running at 32768 Hz
[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1ef4687b1, max_idle_ns: 112843571739654 ns
[    0.000274] sched_clock: 64 bits at 32kHz, resolution 30517ns, wraps every 70368744171142ns
[    0.007904] Calibrating delay loop (skipped), value calculated using timer frequency.. 0.06 BogoMIPS (lpj=327)
[    0.008483] pid_max: default: 32768 minimum: 301
[    0.010467] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.010894] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.049865] rcu: Hierarchical SRCU implementation.
[    0.054443] smp: Bringing up secondary CPUs ...
[    0.073974] smp: Brought up 1 node, 8 CPUs
[    0.092407] devtmpfs: initialized
[    0.104156] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104797] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.157104] clocksource: Switched to clocksource clint_clocksource
[    0.272247] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    0.278167] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    0.278839] io scheduler mq-deadline registered
[    0.279205] io scheduler kyber registered
[    0.497528] 10013000.serial: ttyNUC0 at MMIO 0x10013000 (irq = 1, base_baud = 3125000) is a Nuclei UART/USART
[    0.499237] printk: console [ttyNUC0] enabled
[    0.499237] printk: console [ttyNUC0] enabled
[    0.499908] printk: bootconsole [nuclei0] disabled
[    0.499908] printk: bootconsole [nuclei0] disabled
[    0.561676] brd: module loaded
[    0.598907] loop: module loaded
[    0.603454] nuclei_spi 10014000.spi: mapped; irq=2, cs=1
[    0.617462] spi-nor spi0.0: is25wp256 (32768 Kbytes)
[    0.755584] ftl_cs: FTL header not found.
[    0.762237] nuclei_spi 10034000.spi: mapped; irq=4, cs=1
[    0.807952] mmc_spi spi1.0: SD/MMC host mmc0, no DMA, no WP, no poweroff, cd polling
[    0.842803] Freeing unused kernel memory: 108K
[    0.843017] This architecture does not have kernel memory protection.
[    0.843505] Run /init as init process
[    0.863311] init[1]: unhandled signal 4 code 0x1 at 0x0000000080c9d530
[    0.863800] CPU: 3 PID: 1 Comm: init Not tainted 5.10.181+ #12
[    0.864105] Hardware name: nuclei,evalsoc (DT)
[    0.864440] epc: 0000000080c9d530 ra : 0000000080c1dc30 sp : 0000000080ca1e60
[    0.864776]  gp : 0000000080c896a0 tp : 0000000000000000 t0 : 0000000000000000
[    0.865112]  t1 : 0000000000000000 t2 : 0000000000000000 s0 : 0000000080ca1f98
[    0.865478]  s1 : 0000000080ca1ff8 a0 : 0000000080ca1e60 a1 : 0000000000000000
[    0.865814]  a2 : 0000000080ca1f50 a3 : 0000000080ca1f50 a4 : 0000000080c9d530
[    0.866149]  a5 : 0000000080c9d530 a6 : 0000000000000030 a7 : 0000000000000000
[    0.866516]  s2 : 0000000000000002 s3 : 0000000080c275b8 s4 : 0000000080c9cf90
[    0.867370]  s5 : 0000000080ca1e60 s6 : 000000000000000e s7 : 0000000000000000
[    0.867950]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[    0.868286]  s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000000
[    0.868652]  t5 : 0000000000000000 t6 : 0000000000000000
[    0.868927] status: 0000000a00004080 badaddr: 0000000000000000 cause: 0000000000000002
[    0.872100] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[    0.872558] CPU: 3 PID: 1 Comm: init Not tainted 5.10.181+ #12
[    0.872833] Hardware name: nuclei,evalsoc (DT)
[    0.873077] Call Trace:
[    0.873504] [<000000008001ecb6>] 0x000000008001ecb6
[    0.873809] [<0000000080207afc>] 0x0000000080207afc
[    0.874023] [<000000008020990a>] 0x000000008020990a
[    0.874267] [<0000000080207c9e>] 0x0000000080207c9e
[    0.874481] [<0000000080025604>] 0x0000000080025604
[    0.874725] [<00000000800264bc>] 0x00000000800264bc
[    0.874969] [<000000008002e1f0>] 0x000000008002e1f0
[    0.875152] [<000000008001e540>] 0x000000008001e540
[    0.875396] [<000000008001da98>] 0x000000008001da98
[    0.875793] SMP: stopping secondary CPUs
[    0.876739] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 ]---
QEMU: Terminated

Also verified with buildroot nommu virt machine similar issue

$ qemu-system-riscv64 -M virt -bios none -kernel Image -append "rootwait root=/dev/vda ro" -drive file=rootfs.ext2,format=raw,id=hd0 -device virtio-blk-devic
e,drive=hd0 -nographic -cpu rv64,mmu=off -smp 8 -m 2048M
[    0.000000] Linux version 5.10.83 ([email protected]) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2023.02-rc3-738-g1c512cc5bd) 11.4.0, GNU ld (GNU Binutils) 2.38) #1 SMP Fri Jul 21 14:29:17 CST 2023
[    0.000000] earlycon: uart8250 at MMIO 0x0000000010000000 (options '115200n8')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000] riscv: ISA extensions acdfimsu
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: max_distance=0x60000 too large for vmalloc space 0x0
[    0.000000] percpu: Embedded 12 pages/cpu s18720 r0 d30432 u49152
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 2062908K/2097152K available (1260K kernel code, 356K rwdata, 202K rodata, 94K init, 133K bss, 34244K reserved, 0K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: plic@c000000: mapped 53 interrupts with 8 handlers for 16 contexts.
[    0.000000] random: get_random_bytes called from 0x00000000800019f4 with crng_init=0
[    0.000000] clint: clint@2000000: timer running at 10000000 Hz
[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[    0.000235] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns
[    0.009284] Console: colour dummy device 80x25
[    0.012307] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[    0.013160] pid_max: default: 8192 minimum: 301
[    0.015083] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.015504] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.048770] rcu: Hierarchical SRCU implementation.
[    0.052196] smp: Bringing up secondary CPUs ...
[    0.064302] smp: Brought up 1 node, 8 CPUs
[    0.082093] devtmpfs: initialized
[    0.095983] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.096549] futex hash table entries: 16 (order: -2, 1024 bytes, linear)
[    0.132339] clocksource: Switched to clocksource clint_clocksource
[    0.173402] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    0.181825] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.193489] printk: console [ttyS0] disabled
[    0.195100] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 2, base_baud = 230400) is a 16550A
[    0.198432] printk: console [ttyS0] enabled
[    0.198432] printk: console [ttyS0] enabled
[    0.199685] printk: bootconsole [uart8250] disabled
[    0.199685] printk: bootconsole [uart8250] disabled
[    0.224931] virtio_blk virtio0: [vda] 122880 512-byte logical blocks (62.9 MB/60.0 MiB)
[    0.225502] vda: detected capacity change from 0 to 62914560
[    0.234792] syscon-poweroff soc:poweroff: pm_power_off already claimed (____ptrval____)
[    0.235315] syscon-poweroff: probe of soc:poweroff failed with error -16
[    0.264270] VFS: Mounted root (ext2 filesystem) on device 254:0.
[    0.269164] devtmpfs: mounted
[    0.284541] Freeing unused kernel memory: 92K
[    0.284773] This architecture does not have kernel memory protection.
[    0.285331] Run /sbin/init as init process
[    0.309272] init[1]: unhandled signal 11 code 0x2 at 0x0000000080d1d91c
[    0.309860] CPU: 2 PID: 1 Comm: init Not tainted 5.10.83 #1
[    0.310280] epc: 0000000080d1d91c ra : 0000000080d00048 sp : 0000000080da0e60
[    0.310652]  gp : 0000000080d882a0 tp : 0000000000000000 t0 : 0000000000000000
[    0.311026]  t1 : 0000000000000000 t2 : 0000000000000000 s0 : 0000000000000000
[    0.311401]  s1 : 0000000000000000 a0 : 0000000080d26f2c a1 : 0000000000000001
[    0.311747]  a2 : 0000000080da0f98 a3 : 0000000000000000 a4 : 00000000000994d0
[    0.312502]  a5 : 0000000000000000 a6 : 0000000080da0f90 a7 : 0000000000000000
[    0.313140]  s2 : 0000000000000000 s3 : 0000000000000000 s4 : 0000000000000000
[    0.313503]  s5 : 0000000000000000 s6 : 0000000000000000 s7 : 0000000000000000
[    0.313876]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[    0.314192]  s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000000
[    0.314571]  t5 : 0000000000000000 t6 : 0000000000000000
[    0.314871] status: 0000000000004080 badaddr: 00000000000994d0 cause: 0000000000000007
[    0.317509] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.317987] CPU: 2 PID: 1 Comm: init Not tainted 5.10.83 #1
[    0.318267] Call Trace:
[    0.318556] [<000000008001aaac>] 0x000000008001aaac
[    0.318835] [<000000008014e274>] 0x000000008014e274
[    0.319065] [<0000000080150552>] 0x0000000080150552
[    0.319296] [<000000008014e370>] 0x000000008014e370
[    0.319527] [<0000000080020556>] 0x0000000080020556
[    0.319773] [<0000000080020a3e>] 0x0000000080020a3e
[    0.320514] [<0000000080027fdc>] 0x0000000080027fdc
[    0.321053] [<000000008001a316>] 0x000000008001a316
[    0.321453] [<00000000800198a0>] 0x00000000800198a0
[    0.321915] SMP: stopping secondary CPUs
[    0.322868] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
QEMU: Terminated

Signed-off-by: Huaqi Fang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant