Skip to content

Commit cd5f1d7

Browse files
committed
conf/evalsoc: copy prebuilt kvm tool and kernel image when build boot images
so when you login riscv linux, you will be able to test kvm linux eg. log record using nuclei qemu 2025.10 Run on qemu for simulation qemu-system-riscv64 --version QEMU emulator version 9.0.4 (v9.0.4-143-g1857be8c7d) Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers qemu-system-riscv64 -M nuclei_evalsoc,download=flashxip -smp 8 -m 2G -cpu nuclei-ux900fd,ext=v_svpbmt_zicbom_sstc_sscofpmf_zba_zbb_zbc_zbs_zicond,h=true -bios /Local/hqfang/workspace/software/nuclei-linux-sdk/work/evalsoc/freeloader/freeloader.elf -nographic -drive file=/Local/hqfang/workspace/software/nuclei-linux-sdk/work/evalsoc/disk.img,if=sd,format=raw OpenSBI v1.3 Build time: 2025-11-20 18:30:29 +0800 Build compiler: gcc version 14.2.1 20240816 (g553a166de) ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|___/_____| | | |_| Platform Name : nuclei,evalsoc Platform Features : medeleg Platform HART Count : 8 Platform IPI Device : aclint-mswi Platform Timer Device : aclint-mtimer @ 32768Hz Platform Console Device : nuclei_uart Platform HSM Device : --- Platform PMU Device : --- Platform Reboot Device : nuclei_reset Platform Shutdown Device : nuclei_reset Platform Suspend Device : --- Platform CPPC Device : --- Firmware Base : 0x80000000 Firmware Size : 392 KB Firmware RW Offset : 0x40000 Firmware RW Size : 136 KB Firmware Heap Offset : 0x56000 Firmware Heap Size : 48 KB (total), 3 KB (reserved), 9 KB (used), 35 KB (free) Firmware Scratch Size : 4096 B (total), 760 B (used), 3336 B (free) Runtime SBI Version : 1.0 Domain0 Name : root Domain0 Boot HART : 5 Domain0 HARTs : 0*,1*,2*,3*,4*,5*,6*,7* Domain0 Region00 : 0x0000000018031000-0x0000000018031fff M: (I,R,W) S/U: () Domain0 Region01 : 0x000000001803c000-0x000000001803cfff M: (I,R,W) S/U: () Domain0 Region02 : 0x0000000018032000-0x0000000018033fff M: (I,R,W) S/U: () Domain0 Region03 : 0x0000000018034000-0x0000000018037fff M: (I,R,W) S/U: () Domain0 Region04 : 0x0000000018038000-0x000000001803bfff M: (I,R,W) S/U: () Domain0 Region05 : 0x0000000080000000-0x000000008003ffff M: (R,X) S/U: () Domain0 Region06 : 0x0000000080040000-0x000000008007ffff M: (R,W) S/U: () Domain0 Region07 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X) Domain0 Next Address : 0x0000000080200000 Domain0 Next Arg1 : 0x0000000088000000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Domain0 SysSuspend : yes Boot HART ID : 5 Boot HART Domain : root Boot HART Priv Version : v1.12 Boot HART Base ISA : rv64imafdcvh Boot HART ISA Extensions : sscofpmf,time,sstc Boot HART PMP Count : 16 Boot HART PMP Granularity : 4 Boot HART PMP Address Bits: 54 Boot HART MHPM Count : 29 Boot HART MIDELEG : 0x0000000000003666 Boot HART MEDELEG : 0x0000000000f0b509 U-Boot 2024.01-00008-gd1308a36c57 (Nov 20 2025 - 18:30:28 +0800) CPU: rv64imafdcvh_zicbom_svpbmt_sstc_sscofpmf Model: nuclei,evalsoc DRAM: 2 GiB Board: Initialized Core: 25 devices, 13 uclasses, devicetree: board MMC: Nuclei SPI version 0x10208 spi@10034000:mmc@0: 0 Loading Environment from nowhere... OK In: serial@10013000 Out: serial@10013000 Err: serial@10013000 Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 725 bytes read in 25 ms (28.3 KiB/s) Boot images located in . Loading kernel: ./uImage.lz4 4289272 bytes read in 11176 ms (374 KiB/s) Loading ramdisk: ./uInitrd.lz4 23084742 bytes read in 60503 ms (372.1 KiB/s) Loading dtb: ./kernel.dtb 7800 bytes read in 40 ms (190.4 KiB/s) Starts booting from SD Image Name: Linux Image Type: RISC-V Linux Kernel Image (lz4 compressed) Data Size: 4289208 Bytes = 4.1 MiB Load Address: 80400000 Entry Point: 80400000 Verifying Checksum ... OK Image Name: Initrd Image Type: RISC-V Linux RAMDisk Image (lz4 compressed) Data Size: 23084678 Bytes = 22 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Booting using the fdt blob at 0x88000000 Working FDT set to 88000000 Uncompressing Kernel Image Using Device Tree in place at 0000000088000000, end 0000000088004e77 Working FDT set to 88000000 Starting kernel ... [ 0.000000] Linux version 6.6.90+ (hqfang@whml1.corp.nucleisys.com) (riscv64-unknown-linux-gnu-gcc (g553a166de) 14.2.1 20240816, GNU ld (GNU Binutils) 2.44) #5 SMP Thu Nov 20 18:30:29 CST 2025 [ 0.000000] Machine model: nuclei,evalsoc [ 0.000000] SBI specification v1.0 detected [ 0.000000] SBI implementation ID=0x1 Version=0x10003 [ 0.000000] SBI TIME extension detected [ 0.000000] SBI IPI extension detected [ 0.000000] SBI RFENCE extension detected [ 0.000000] SBI SRST extension detected [ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '') [ 0.000000] printk: bootconsole [sbi0] enabled [ 0.000000] efi: UEFI not found. [ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008003ffff (256 KiB) nomap non-reusable mmode_resv0@80000000 [ 0.000000] OF: reserved mem: 0x0000000080040000..0x000000008007ffff (256 KiB) nomap non-reusable mmode_resv1@80040000 [ 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-0x000000008007ffff] [ 0.000000] node 0: [mem 0x0000000080080000-0x00000000fdffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000fdffffff] [ 0.000000] SBI HSM extension detected [ 0.000000] Falling back to deprecated "riscv,isa" [ 0.000000] riscv: base ISA extensions acdfhimv [ 0.000000] riscv: ELF capabilities acdfimv [ 0.000000] percpu: Embedded 16 pages/cpu s25512 r8192 d31832 u65536 [ 0.000000] Kernel command line: earlycon=sbi console=ttyNUC0 [ 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] Built 1 zonelists, mobility grouping on. Total pages: 509040 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 1993052K/2064384K available (4981K kernel code, 4734K rwdata, 2048K rodata, 2134K init, 310K bss, 71332K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8 [ 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] riscv: providing IPIs using SBI IPI extension [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1ef4687b1, max_idle_ns: 112843571739654 ns [ 0.000122] sched_clock: 64 bits at 33kHz, resolution 30517ns, wraps every 70368744171142ns [ 0.000885] riscv-timer: Timer interrupt in S-mode is available via sstc extension [ 0.007293] Calibrating delay loop (skipped), value calculated using timer frequency.. 0.06 BogoMIPS (lpj=327) [ 0.008178] pid_max: default: 32768 minimum: 301 [ 0.012664] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.017608] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.068756] riscv: ELF compat mode supported [ 0.069152] ASID allocator using 16 bits (65536 entries) [ 0.071075] rcu: Hierarchical SRCU implementation. [ 0.071502] rcu: Max phase no-delay instances is 1000. [ 0.075500] EFI services will not be available. [ 0.080718] smp: Bringing up secondary CPUs ... [ 0.149230] cpu1: rdtime lacks granularity needed to measure unaligned access speed [ 0.232086] cpu2: rdtime lacks granularity needed to measure unaligned access speed [ 0.293182] cpu3: rdtime lacks granularity needed to measure unaligned access speed [ 0.354156] cpu4: rdtime lacks granularity needed to measure unaligned access speed [ 0.415435] cpu5: rdtime lacks granularity needed to measure unaligned access speed [ 0.477233] cpu6: rdtime lacks granularity needed to measure unaligned access speed [ 0.538116] cpu7: rdtime lacks granularity needed to measure unaligned access speed [ 0.539642] smp: Brought up 1 node, 8 CPUs [ 0.581878] devtmpfs: initialized [ 0.598693] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.600708] futex hash table entries: 2048 (order: 5, 131072 bytes, linear) [ 0.602813] pinctrl core: initialized pinctrl subsystem [ 0.615722] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.623779] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations [ 0.625366] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.690673] cpu0: rdtime lacks granularity needed to measure unaligned access speed [ 0.724975] pps_core: LinuxPPS API ver. 1 registered [ 0.725402] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.726226] PTP clock support registered [ 0.750701] clocksource: Switched to clocksource riscv_clocksource [ 0.773345] NET: Registered PF_INET protocol family [ 0.777404] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.786193] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear) [ 0.786926] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.787597] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.788696] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear) [ 0.790649] TCP: Hash tables configured (established 16384 bind 16384) [ 0.794097] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.795074] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.798278] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.800933] kvm [1]: hypervisor extension available [ 0.801422] kvm [1]: using Sv57x4 G-stage page table format [ 0.802307] kvm [1]: VMID 14 bits available [ 0.814208] Trying to unpack rootfs image as initramfs... [ 0.817138] workingset: timestamp_bits=62 max_order=19 bucket_order=0 [ 0.822082] 9p: Installing v9fs 9p2000 file system support [ 0.845489] jitterentropy: Initialization failed with host not compliant with requirements: 9 [ 0.846252] NET: Registered PF_ALG protocol family [ 0.847290] io scheduler mq-deadline registered [ 0.847808] io scheduler kyber registered [ 0.848266] io scheduler bfq registered [ 1.116119] 10013000.serial: ttyNUC0 at MMIO 0x10013000 (irq = 12, base_baud = 3125000) is a Nuclei UART v0 [ 1.118896] printk: console [ttyNUC0] enabled [ 1.118896] printk: console [ttyNUC0] enabled [ 1.120361] printk: bootconsole [sbi0] disabled [ 1.120361] printk: bootconsole [sbi0] disabled [ 1.173278] brd: module loaded [ 1.191131] loop: module loaded [ 1.196533] nuclei_spi 10014000.spi: mapped; irq=13, cs=1 [ 1.217254] spi-nor spi0.0: w25q512jvq (65536 Kbytes) [ 1.354553] ftl_cs: FTL header not found. [ 1.361419] nuclei_spi 10034000.spi: mapped; irq=14, cs=1 [ 1.411102] mmc_spi spi1.0: SD/MMC host mmc0, no WP, no poweroff, cd polling [ 1.422332] NET: Registered PF_INET6 protocol family [ 1.439392] Segment Routing with IPv6 [ 1.439849] In-situ OAM (IOAM) with IPv6 [ 1.440979] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.446075] NET: Registered PF_PACKET protocol family [ 1.450012] 9pnet: Installing 9P2000 support [ 1.469757] clk: Disabling unused clocks [ 1.487274] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.488281] mmc0: new SD card on SPI [ 1.494171] mmcblk0: mmc0:0000 QEMU! 1.00 GiB [ 1.516845] mmcblk0: p1 [ 1.722076] Freeing initrd memory: 22536K [ 1.863281] Freeing unused kernel image (initmem) memory: 2132K [ 1.864776] Run /init as init process Saving 256 bits of non-creditable seed for next boot Starting syslogd: OK Starting klogd: OK Running sysctl: OK eth0 device not present, will not configure it! Starting mdev... OK modprobe: can't change directory to '/lib/modules': No such file or directory Starting haveged: haveged: command socket is listening at fd 3 OK Starting crond: OK [ 4.784973] random: crng init done ssh-keygen: generating new host keys: RSA ECDSA ED25519 Starting sshd: OK Welcome to Nuclei System Technology nucleisys login: root Password: Execute KVM Testing Now + mkdir -p /tmp/myshared/ + mount /dev/mmcblk0p1 /tmp/myshared/ + chmod +x lkvm-static + lkvm-static run --9p /tmp/myshared,myshare_tag -m 1536 -c2 -k Image Info: # lkvm run -k Image -m 1536 -c 2 --name guest-155 Warning: KVM_SET_ONE_REG failed (sbi_ext 9) Warning: KVM_SET_ONE_REG failed (sbi_ext 11) Warning: KVM_SET_ONE_REG failed (sbi_ext 9) Warning: KVM_SET_ONE_REG failed (sbi_ext 11) [ 0.000000] Linux version 6.6.90-ged547e1b4c49-dirty (dongyongtao@whss7) (riscv64-unknown-linux-gnu-gcc (g553a166de) 14.2.1 20240816, GNU ld (GNU Binutils) 2.44) #3 SMP Thu Nov 13 19:04:31 CST 2025 [ 0.000000] Machine model: linux,dummy-virt [ 0.000000] SBI specification v1.0 detected [ 0.000000] SBI implementation ID=0x3 Version=0x6065a [ 0.000000] SBI TIME extension detected [ 0.000000] SBI IPI extension detected [ 0.000000] SBI RFENCE extension detected [ 0.000000] SBI SRST extension detected [ 0.000000] efi: UEFI not found. [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000dfffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000dfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000dfffffff] [ 0.000000] SBI HSM extension detected [ 0.000000] Falling back to deprecated "riscv,isa" [ 0.000000] riscv: base ISA extensions acdfimv [ 0.000000] riscv: ELF capabilities acdfimv [ 0.000000] percpu: Embedded 20 pages/cpu s41080 r8192 d32648 u81920 [ 0.000000] Kernel command line: console=ttyS0 rw rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p init=/virt/init ip=dhcp [ 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] Built 1 zonelists, mobility grouping on. Total pages: 387072 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Virtual kernel memory layout: [ 0.000000] fixmap : 0xff1bfffffea00000 - 0xff1bffffff000000 (6144 kB) [ 0.000000] pci io : 0xff1bffffff000000 - 0xff1c000000000000 ( 16 MB) [ 0.000000] vmemmap : 0xff1c000000000000 - 0xff20000000000000 (1024 TB) [ 0.000000] vmalloc : 0xff20000000000000 - 0xff60000000000000 (16384 TB) [ 0.000000] modules : 0xffffffff0157d000 - 0xffffffff80000000 (2026 MB) [ 0.000000] lowmem : 0xff60000000000000 - 0xff60000060000000 (1536 MB) [ 0.000000] kernel : 0xffffffff80000000 - 0xffffffffffffffff (2047 MB) [ 0.000000] Memory: 1506028K/1572864K available (9361K kernel code, 4979K rwdata, 4096K rodata, 2200K init, 482K bss, 66836K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2. [ 0.000000] rcu: RCU debug extended QS entry/exit. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] riscv-intc: 64 local interrupts mapped [ 0.000000] plic: interrupt-controller@08000000: mapped 1023 interrupts with 2 handlers for 4 contexts. [ 0.000000] riscv: providing IPIs using SBI IPI extension [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1ef4687b1, max_idle_ns: 112843571739654 ns [ 0.000122] sched_clock: 64 bits at 33kHz, resolution 30517ns, wraps every 70368744171142ns [ 0.000579] riscv-timer: Timer interrupt in S-mode is available via sstc extension [ 0.022338] Console: colour dummy device 80x25 [ 0.027221] Calibrating delay loop (skipped), value calculated using timer frequency.. 0.06 BogoMIPS (lpj=131) [ 0.027496] pid_max: default: 32768 minimum: 301 [ 0.032653] LSM: initializing lsm=capability,integrity [ 0.041473] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.042694] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.161956] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=2. [ 0.164001] riscv: ELF compat mode supported [ 0.165679] ASID allocator using 16 bits (65536 entries) [ 0.170074] rcu: Hierarchical SRCU implementation. [ 0.170166] rcu: Max phase no-delay instances is 1000. [ 0.182159] EFI services will not be available. [ 0.189819] smp: Bringing up secondary CPUs ... [ 0.268646] cpu1: rdtime lacks granularity needed to measure unaligned access speed [ 0.284362] smp: Brought up 1 node, 2 CPUs [ 0.350311] devtmpfs: initialized [ 0.381225] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.381530] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.389556] pinctrl core: initialized pinctrl subsystem [ 0.432189] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.455505] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations [ 0.467285] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.467895] audit: initializing netlink subsys (disabled) [ 0.479766] audit: type=2000 audit(0.380:1): state=initialized audit_enabled=0 res=1 [ 0.486419] thermal_sys: Registered thermal governor 'step_wise' [ 0.487854] cpuidle: using governor menu [ 0.518646] cpu0: rdtime lacks granularity needed to measure unaligned access speed [ 0.565979] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages [ 0.566070] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page [ 0.585662] ACPI: Interpreter disabled. [ 0.587585] iommu: Default domain type: Translated [ 0.587677] iommu: DMA domain TLB invalidation policy: strict mode [ 0.600585] SCSI subsystem initialized [ 0.613983] usbcore: registered new interface driver usbfs [ 0.615325] usbcore: registered new interface driver hub [ 0.616424] usbcore: registered new device driver usb [ 0.661590] vgaarb: loaded [ 0.673583] clocksource: Switched to clocksource riscv_clocksource [ 0.694641] pnp: PnP ACPI: disabled [ 0.921051] NET: Registered PF_INET protocol family [ 0.940338] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.962707] tcp_listen_portaddr_hash hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.964477] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.965148] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.973358] TCP bind hash table entries: 16384 (order: 8, 1048576 bytes, linear) [ 1.034454] TCP: Hash tables configured (established 16384 bind 16384) [ 1.045471] UDP hash table entries: 1024 (order: 4, 98304 bytes, linear) [ 1.051239] UDP-Lite hash table entries: 1024 (order: 4, 98304 bytes, linear) [ 1.062683] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 1.091766] RPC: Registered named UNIX socket transport module. [ 1.092346] RPC: Registered udp transport module. [ 1.092437] RPC: Registered tcp transport module. [ 1.092437] RPC: Registered tcp-with-tls transport module. [ 1.092468] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.092803] PCI: CLS 0 bytes, default 64 [ 1.114654] workingset: timestamp_bits=46 max_order=19 bucket_order=0 [ 1.139190] NFS: Registering the id_resolver key type [ 1.142669] Key type id_resolver registered [ 1.142822] Key type id_legacy registered [ 1.144775] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.145324] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 1.152496] 9p: Installing v9fs 9p2000 file system support [ 1.157806] NET: Registered PF_ALG protocol family [ 1.160430] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 1.160888] io scheduler mq-deadline registered [ 1.161071] io scheduler kyber registered [ 1.161560] io scheduler bfq registered [ 1.178405] pci-host-generic 30000000.pci: host bridge /smb/pci ranges: [ 1.180603] pci-host-generic 30000000.pci: IO 0x0000000000..0x000000ffff -> 0x0000000000 [ 1.181823] pci-host-generic 30000000.pci: MEM 0x0040000000..0x007fffffff -> 0x0040000000 [ 1.184448] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-01] [ 1.187774] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00 [ 1.189147] pci_bus 0000:00: root bus resource [bus 00-01] [ 1.189331] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 1.189422] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff] [ 1.197448] pci 0000:00:00.0: [1af4:1049] type 00 class 0xff0000 [ 1.203979] pci 0000:00:00.0: reg 0x10: [io 0x6200-0x62ff] [ 1.206115] pci 0000:00:00.0: reg 0x14: [mem 0x40000000-0x400000ff] [ 1.207489] pci 0000:00:00.0: reg 0x18: [mem 0x40000400-0x400007ff] [ 1.241119] pci 0000:00:01.0: [1af4:1049] type 00 class 0xff0000 [ 1.243621] pci 0000:00:01.0: reg 0x10: [io 0x6300-0x63ff] [ 1.245544] pci 0000:00:01.0: reg 0x14: [mem 0x40000800-0x400008ff] [ 1.246917] pci 0000:00:01.0: reg 0x18: [mem 0x40000c00-0x40000fff] [ 1.270416] pci 0000:00:02.0: [1af4:1049] type 00 class 0xff0000 [ 1.273529] pci 0000:00:02.0: reg 0x10: [io 0x6400-0x64ff] [ 1.274902] pci 0000:00:02.0: reg 0x14: [mem 0x40001000-0x400010ff] [ 1.276763] pci 0000:00:02.0: reg 0x18: [mem 0x40001400-0x400017ff] [ 1.300659] pci 0000:00:03.0: [1af4:1041] type 00 class 0x020000 [ 1.303161] pci 0000:00:03.0: reg 0x10: [io 0x6500-0x65ff] [ 1.304992] pci 0000:00:03.0: reg 0x14: [mem 0x40001800-0x400018ff] [ 1.306365] pci 0000:00:03.0: reg 0x18: [mem 0x40001c00-0x40001fff] [ 1.337280] pci 0000:00:00.0: BAR 2: assigned [mem 0x40000000-0x400003ff] [ 1.338653] pci 0000:00:01.0: BAR 2: assigned [mem 0x40000400-0x400007ff] [ 1.339263] pci 0000:00:02.0: BAR 2: assigned [mem 0x40000800-0x40000bff] [ 1.339813] pci 0000:00:03.0: BAR 2: assigned [mem 0x40000c00-0x40000fff] [ 1.340911] pci 0000:00:00.0: BAR 0: assigned [io 0x0100-0x01ff] [ 1.341522] pci 0000:00:00.0: BAR 1: assigned [mem 0x40001000-0x400010ff] [ 1.342071] pci 0000:00:01.0: BAR 0: assigned [io 0x0200-0x02ff] [ 1.342590] pci 0000:00:01.0: BAR 1: assigned [mem 0x40001100-0x400011ff] [ 1.343109] pci 0000:00:02.0: BAR 0: assigned [io 0x0300-0x03ff] [ 1.343658] pci 0000:00:02.0: BAR 1: assigned [mem 0x40001200-0x400012ff] [ 1.344696] pci 0000:00:03.0: BAR 0: assigned [io 0x0400-0x04ff] [ 1.345245] pci 0000:00:03.0: BAR 1: assigned [mem 0x40001300-0x400013ff] [ 2.435485] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 2.482818] printk: console [ttyS0] disabled [ 2.493621] 10000000.U6_16550A: ttyS0 at MMIO 0x10000000 (irq = 16, base_baud = 115200) is a 16550A [ 2.500915] printk: console [ttyS0] enabled [ 9.763580] 10001000.U6_16550A: ttyS1 at MMIO 0x10001000 (irq = 17, base_baud = 115200) is a 16550A [ 9.838470] 10002000.U6_16550A: ttyS2 at MMIO 0x10002000 (irq = 18, base_baud = 115200) is a 16550A [ 9.916259] 10003000.U6_16550A: ttyS3 at MMIO 0x10003000 (irq = 19, base_baud = 115200) is a 16550A [ 9.986999] SuperH (H)SCI(F) driver initialized [ 10.132476] loop: module loaded [ 10.251556] e1000e: Intel(R) PRO/1000 Network Driver [ 10.289154] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 10.349273] usbcore: registered new interface driver uas [ 10.391326] usbcore: registered new interface driver usb-storage [ 10.438354] mousedev: PS/2 mouse device common for all mice [ 10.491821] sdhci: Secure Digital Host Controller Interface driver [ 10.539001] sdhci: Copyright(c) Pierre Ossman [ 10.572845] sdhci-pltfm: SDHCI platform and OF driver helper [ 10.620574] usbcore: registered new interface driver usbhid [ 10.662628] usbhid: USB HID core driver [ 10.700042] NET: Registered PF_INET6 protocol family [ 10.780212] Segment Routing with IPv6 [ 10.807067] In-situ OAM (IOAM) with IPv6 [ 10.836273] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 10.890655] NET: Registered PF_PACKET protocol family [ 10.930999] 9pnet: Installing 9P2000 support [ 11.001251] Key type dns_resolver registered [ 11.237457] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers [ 11.332855] Legacy PMU implementation is available [ 11.440765] Sending DHCP requests ., OK [ 11.500885] IP-Config: Got DHCP answer from 192.168.33.1, my address is 192.168.33.15 [ 11.556213] IP-Config: Complete: [ 11.579040] device=eth0, hwaddr=02:15:15:15:15:15, ipaddr=192.168.33.15, mask=255.255.255.0, gw=192.168.33.1 [ 11.649444] host=192.168.33.15, domain=, nis-domain=(none) [ 11.690429] bootserver=192.168.33.1, rootserver=0.0.0.0, rootpath= [ 11.690551] nameserver0=192.168.33.1 [ 11.771148] clk: Disabling unused clocks [ 11.832672] 9pnet_virtio: no channels available for device [ 11.891174] VFS: Mounted root (9p filesystem) on device 0:18. [ 11.942047] devtmpfs: mounted [ 12.287292] Freeing unused kernel image (initmem) memory: 2200K [ 12.322052] Run /virt/init as init process Mounting... Will find /host/root/kvm_guest_run_case.sh and execute it if any... sh-5.2# cat /proc/cpuinfo processor : 0 hart : 0 isa : rv64imafdcv_zicbom_zicntr_zicsr_zifencei_zihpm_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 1 hart : 1 isa : rv64imafdcv_zicbom_zicntr_zicsr_zifencei_zihpm_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 sh-5.2# mkdir -p /fromhost sh-5.2# mount -t 9p -o trans=virtio myshare_tag /fromhost sh-5.2# cd /fromhost/ sh-5.2# ls boot.scr kernel.dtb uImage.lz4 uInitrd.lz4 sh-5.2# ls -l total 26748 -rwxr-xr-x 1 root 0 725 Nov 20 2025 boot.scr -rwxr-xr-x 1 root 0 7800 Nov 20 2025 kernel.dtb -rwxr-xr-x 1 root 0 4289272 Nov 20 2025 uImage.lz4 -rwxr-xr-x 1 root 0 23084742 Nov 20 2025 uInitrd.lz4 sh-5.2# ifconfig eth0 Link encap:Ethernet HWaddr 02:15:15:15:15:15 inet addr:192.168.33.15 Bcast:192.168.33.255 Mask:255.255.255.0 inet6 addr: fe80::15:15ff:fe15:1515/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1180 (1.1 KiB) TX bytes:1906 (1.8 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) sh-5.2# ping 192.168.33.1 PING 192.168.33.1 (192.168.33.1): 56 data bytes 64 bytes from 192.168.33.1: seq=0 ttl=64 time=47.119 ms 64 bytes from 192.168.33.1: seq=1 ttl=64 time=3.998 ms 64 bytes from 192.168.33.1: seq=2 ttl=64 time=5.554 ms 64 bytes from 192.168.33.1: seq=3 ttl=64 time=6.622 ms 64 bytes from 192.168.33.1: seq=4 ttl=64 time=6.592 ms 64 bytes from 192.168.33.1: seq=5 ttl=64 time=7.873 ms ^C --- 192.168.33.1 ping statistics --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max = 3.998/12.959/47.119 ms sh-5.2# exit [ 90.841735] reboot: Restarting system Info: KVM session ended normally. Linux nucleisys 6.6.90+ #5 SMP Thu Nov 20 18:30:29 CST 2025 riscv64 GNU/Linux processor : 0 hart : 5 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 1 hart : 0 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 2 hart : 1 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 3 hart : 2 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 4 hart : 3 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 5 hart : 4 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 6 hart : 6 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 processor : 7 hart : 7 isa : rv64imafdcvh_zicbom_zicntr_zicsr_zifencei_zihpm_sscofpmf_sstc_svpbmt mmu : sv57 mvendorid : 0x0 marchid : 0x0 mimpid : 0x0 Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent e53ea3b commit cd5f1d7

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ linux: $(linux_wrkdir)/.config
289289

290290
$(initramfs): $(buildroot_initramfs_sysroot) $(linux_image)
291291
$(INITRAMFS_PRECMD)
292+
@echo "Copy KVM prebuilt tool and Kernel Image to RootFS root folder"
293+
[ -d $(confdir)/kvm ] && cp -rf $(confdir)/kvm $(buildroot_initramfs_sysroot)/root || true
292294
# Copy files required for xec network startup
293295
[ -f $(confdir)/S03net ] && cp -af $(confdir)/S03net $(buildroot_initramfs_sysroot)/etc/init.d/ || true
294296
cd $(linux_wrkdir) && \

conf/evalsoc/kvm/Image

21 MB
Binary file not shown.

conf/evalsoc/kvm/kvm.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
5+
export PATH=$PATH:${SCRIPT_DIR}
6+
7+
cd $SCRIPT_DIR
8+
echo "Execute KVM Testing Now"
9+
10+
set -x
11+
mkdir -p /tmp/myshared/
12+
mount /dev/mmcblk0p1 /tmp/myshared/
13+
chmod +x lkvm-static
14+
lkvm-static run --9p /tmp/myshared,myshare_tag -m 1536 -c2 -k Image

conf/evalsoc/kvm/lkvm-static

1.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)