WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Boot piCore 16.0 in qemu?  (Read 285 times)

Offline oso2k

  • Newbie
  • *
  • Posts: 13
Boot piCore 16.0 in qemu?
« on: June 20, 2025, 07:24:26 PM »
My boy has decided to play with my old Pis and a learning electronics kit.  I've decided to join him and experiment with a spare Pi Zero W.  However, booting and developing on it is painful when I got multi-core,  multi-GB, NVMe machine sitting right next to it.  So I thought about using that machine emulate it instead (hopefully faster).

I found this repo (https://github.com/dhruvvyas90/qemu-rpi-kernel) with some hints.  I'm currently using Fedora 40 since I can't find the power brick for my TCL laptop.

In any case, I've landed on this command to kick off the VM
Code: [Select]
qemu-system-arm   -M raspi0  -m 512   -drive "file=piCore-16.0.0.img,if=none,index=0,media=disk,format=raw,id=disk0"      -net "user,hostfwd=tcp::5022-:22"   -dtb piCore_16/bcm2708-rpi-zero-w.dtb  -kernel piCore_16/kernel61225.img   -append 'root=/dev/vda2 panic=1'   -no-reboot
However, all that does is generate a black screen, no output in bash.  Has anyone figured out how to emulate & boot piCore with QEMU?

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 766
Re: Boot piCore 16.0 in qemu?
« Reply #1 on: June 21, 2025, 03:31:35 AM »
If you are a experience user take a look at tinycore /etc/inittab file in the initramfs so you enable the correct serial port to your pi.

You may have to build(EDIT) a new initramfs to accomplish what you want.
And tinycore have also some workarounds with the serial, like the script startserial.sh.
(I Don't like workarounds), and when starting qemu you have to provide -nographic to the command. Because the qemu-arm don't have any emulation for the graphic card.
I think you can get it working, don't give up. 

If you search i little bit in this forum, you could find lots of threads talking about the serial and inittab and startserial.sh and so on.

Happy Hacking.

Offline oso2k

  • Newbie
  • *
  • Posts: 13
Re: Boot piCore 16.0 in qemu?
« Reply #2 on: June 21, 2025, 02:29:51 PM »
Thanks for the tips.  I’ll take a look.  It’s been over 5 years since I used TCL in VMs so I’m getting reacquainted.