I am getting error while trying to boot linux on spike

spike +disk=root.bin bbl vmlinux

this is the error I am getting
–disk/+disk unsupported (use a ramdisk)

Like the error message says, this isn’t supported. spike is very limited in what it can do. You need to configure an initramfs into your kernel instead. If you want to use a separate kernel and rootfs, then you need to use qemu instead.

Hi jim,
I configured the kernel for initramfs ,but now it is still showing
initrd not found or empty - disabling initrd
here is the full ouput

bbl loader
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvvvv rr
rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr
rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr
rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr
rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr
rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr
rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr

   INSTRUCTION SETS WANT TO BE FREE

[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.41 (riscv@riscv-shvd) (gcc version 8.3.0 (GCC)) #1 SMP Wed May 8 17:05:49 IST 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000ffffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
[ 0.000000] software IO TLB: mapped [mem 0xfa3fe000-0xfe3fe000] (64MB)
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 16 pages/cpu s25496 r8192 d31848 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516615
[ 0.000000] Kernel command line:
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Sorting __ex_table…
[ 0.000000] Memory: 1992004K/2095104K available (3238K kernel code, 216K rwdata, 938K rodata, 152K init, 764K bss, 103100K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] bootconsole [early0] disabled

please tell me where i am doing wrong

thanks suhas

You might have the wrong serial console enabled. Spike is very limited in what it can do, and it only works with a particular serial console. You have to have

CONFIG_HVC_RISCV_SBI=y

in your kernel config file. The legacy v1_0 branch of github.com/sifive/freedom-u-sdk can build a kernel that boots on spike, but you can’t really do anything with it as it doesn’t support any devices.

Hi Jim,
I checked and CONFIG_HVC_RISCV_SBI =y was present, but still my terminal hangs @
bootconsole [early0] disabled

any idea why this is happening.

As I mentioned before, spike is very limited in what it can do. If you don’t have a linux kernel configured exactly the right way, it isn’t going to work on spike. The best solution is to stop trying to boot linux on spike. Seriously. Use qemu instead. But if you insist on using spike, then I would suggest looking at the v1_0 branch of sifive/freedom-u-sdk which supports booting on spike. Get that working first, following the README.md instructions, and then try to change it to use your kernel sources and kernel config. This may require doing some bisection to figure out what exactly in your tree won’t work on spike.

I’ve found Spike to be very useful to play with instruction sets, address tracing, etc. My interest is the whole stack. I was sorry to see that the modern freedom-u-sdk doesn’t support linux+spike.