vowstar / k210-linux-nommu

K210 run linux nommu (From Damien Le Moal's patch)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working on Maix Bit Board

Entropy-xcy opened this issue · comments

Hi,

Thank you for building this fantastic project!

However, I followed your installation guide but failed to run the Linux on my Maix Bit Board (with -B bit_mic added when flashing the image).

The Maix Bit board uses almost exactly the same hardware as the DAN board. So, I suppose it should work with no or little change to the current code (One thing I noticed is that these two boards seems to have different UART configurations.).

So, is there anyone who has successfully ran Linux on the Maix Bit board? If not, please consider this post as a feature request.

Thank you!

Sorry for late reply, what happend when you a using Maix Bit? Could you paste the procedure and logs?

Hi! I encountered similar problems on a Maix Dock. Below is the boot log:

[    0.000000] Linux version 5.6.0-rc1vowstar (root@4e313bef2ea6) (gcc version 9.2.0 (Buildroot 2020.02-git-g6e11e3ec2)) #1 SMP Sun Sep 19 05:24:19 UTC 2021
[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '')
[    0.000000] printk: bootconsole [sifive0] enabled
[    0.000000] initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
[    0.000000] elf_hwcap is 0x112d
[    0.000000] percpu: max_distance=0x18000 too large for vmalloc space 0x0
[    0.000000] percpu: Embedded 12 pages/cpu s18272 r0 d30880 u49152
[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
[    0.000000] Kernel command line: earlycon console=ttySIF0
[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 4944K/8192K available (918K kernel code, 106K rwdata, 166K rodata, 1713K init, 91K bss, 3248K 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: 0, nr_irqs: 0, preallocated irqs: 0
[    0.000000] plic: mapped 65 interrupts with 2 handlers for 4 contexts.
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
[    0.000014] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
[    0.008238] Console: colour dummy device 80x25
[    0.012473] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
[    0.022677] pid_max: default: 4096 minimum: 301
[    0.027293] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.034414] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.044822] rcu: Hierarchical SRCU implementation.
[    0.049619] smp: Bringing up secondary CPUs ...
[    0.054755] smp: Brought up 1 node, 2 CPUs
[    0.059137] devtmpfs: initialized
[    0.065728] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.074746] futex hash table entries: 16 (order: -2, 1024 bytes, linear)
[    0.082758] Kendryte K210 SoC sysctl
[    0.096485] clocksource: Switched to clocksource riscv_clocksource
[    0.203893] workingset: timestamp_bits=62 max_order=11 bucket_order=0
[    0.211175] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 0) is a SiFive UART v0
[    0.219656] printk: console [ttySIF0] enabled
[    0.219656] printk: console [ttySIF0] enabled
[    0.228309] printk: bootconsole [sifive0] disabled
[    0.228309] printk: bootconsole [sifive0] disabled
[    0.240691] random: get_random_bytes called from 0x00000000801b1128 with crng_init=0
[    0.241381] Warning: unable to open an initial console.
[    0.254558] devtmpfs: mounted
[    0.261181] Freeing unused kernel memory: 1712K
[    0.264973] This architecture does not have kernel memory protection.
[    0.271385] Run /sbin/init as init process
[    0.275576] Run /etc/init as init process
[    0.279565] Run /bin/init as init process
[    0.302093] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[    0.308990] CPU: 1 PID: 1 Comm: sh Not tainted 5.6.0-rc1vowstar #1
[    0.315140] Call Trace:
[    0.317576] [<00000000801ae2f2>] 0x00000000801ae2f2
[    0.322436] [<00000000801ae436>] 0x00000000801ae436
[    0.327299] [<000000008027f86e>] 0x000000008027f86e
[    0.332160] [<00000000801b14d8>] 0x00000000801b14d8
[    0.337022] [<00000000801b34aa>] 0x00000000801b34aa
[    0.341884] [<00000000801b3936>] 0x00000000801b3936
[    0.346747] [<00000000801ad2f6>] 0x00000000801ad2f6
[    0.351610] SMP: stopping secondary CPUs
[    0.355533] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---

Any help is greatly appreciated!!

I ran successfully on a Maix Bit board (with mic), with the exception of stdio.h being missing in the main.c example at the end as reported already.

Perhaps my board is a different revision (I don't see a revision number on it). The box shows date 2020/09/02.

Also, the flash command required the board and baud settings as follows:
kflash -S -B bit_mic -b 1500000 -p /dev/ttyUSB0 arch/riscv/boot/loader.bin