sycuricon / riscv-spike-sdk

Run Linux on RISC-V Spike Simulator
MIT License
45 stars 18 forks source link

Adding files to rootfs #35

Open janhoogerbrugge-nxp opened 1 month ago

janhoogerbrugge-nxp commented 1 month ago

Hi,

The README tells me this:

"The main compile process will run vmlinux on spike directly, to add your test program, you should add your elfs in ./work/buildroot_initramfs_sysroot and make again."

The first problem is that there is no directory called work.

I tried to put my files in ./rootfs/buildroot_initramfs/target and ./rootfs/buildroot_initramfs_sysroot but they do not appear in the rootfs of the simulated system. How to make this work?

What I actually need is to copy a test program with its data in the rootfs and then start spike booting Linux and then the Linux should start the test program ASAP and shutdown Linux and stop the simulation. I was thinking about putting this code in /etc/init.d/rcS but perhaps there is a better solution for this.

Thanks in advance!

Jan.

janhoogerbrugge-nxp commented 1 month ago

What is written here https://github.com/sycuricon/riscv-spike-sdk/issues/28 helped me.