WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore for Raspberry Pi Emulated by QEMU  (Read 7091 times)

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
TinyCore for Raspberry Pi Emulated by QEMU
« on: May 13, 2014, 02:22:50 AM »
I do apologize if this is the wrong place for this
question but it seemed the most appropriate.

Problem in a nutshell: I am desiring to use QEMU to emulate TCL on a rasPi in Win8. When ran in QEMU,  it is giving an error of “Kernel panic – not syncing: no init found. Try passing init= option to kernel”.

Where I have looked: I have tried the init parameters I know and read through TCL's wiki & book, and google, all yielding no info on the init parameter. I did some searching on TCL's forum and found this forum.tinycorelinux.net/index.php?topic=14080.0. It talks about a specific piCore kernel for QEMU needed, I tried my best guess from it's link, yeah, no, I did not understand it. It does not seem to have current information.

What I have tried
: I have attempted to use QEMU compiled for windows from lassauge.free.fr/qemu/ (from the above post), qemu.weilnetz.de, and sourceforge.net/projects/rpiqemuwindows/. The first 2 could not run any distro for me without go get more files and still errors. However, the one at sourceforge worked for raspbian and noobs "out of the box". I used the following command to start it
Code: (CMD) [Select]
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -append "root=/dev/sda2 panic=0 rootfstype=ext4 rw" -hda piCore-5.2.2-X.img
Thank you for your time and help.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #1 on: May 13, 2014, 03:43:33 AM »
Running any Raspberry Pi OS in QEMU requires a dedicated kernel built for QEMU, stock kernels do not work. Also, to run any LINUX systems in general you need a kernel matching modules used by the system. You can't use a kernel built for Raspbian with piCore. Even if these would match, you can't start piCore as it is in your script.

In the beginning back in 2012 we provided QEMU kernel and images for piCore 4.x when tha RPi penetration was low and it was not available. We do not have it for recent 5.x version, however it is planned. An alternative can be an RPI compatible QEMU for like https://github.com/Torlus/qemu but it is not tried yet. Anyhow, you may read

http://forum.tinycorelinux.net/index.php/topic,14080.0.html
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #2 on: May 13, 2014, 04:09:24 AM »
First, thank you for your fast response. I did find your forum post you linked, I noted finding it in my original post.

The QEMU from sourceforge is able to run Raspbian and noobs RPi OSes, but if I understand you there is an additional custom file required to run TCL 5.2.2 in QEMU that does not exist?

I will try your suggestion at github and see if it works for me.

UPDATE: I looked into the link, you gave and was not able to find a precompiled one. Did some more digging and find it is one of several repositories for qemu.org, who do not directly create or support QEMU on windows. I am not much into compiling code.

So I guess my last questions at this point (unless someone else has an idea)
  • Could you explain what you meant by a custom kernel for TCL to use with QEMU? TCL RPi images are found at tinycorelinux.net/5.x/armv6/release/
  • What is wrong with my command for QEMU running TCL?
  • Is there any other emulation option available?
« Last Edit: May 13, 2014, 04:37:41 AM by GeminiEngine »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #3 on: May 13, 2014, 04:45:40 AM »
1) Custom kernel means kernel built for running in QEMU

2) Nothing wrong, just it is not for piCore but Raspbian.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #4 on: May 13, 2014, 05:37:55 AM »
Just to clarify, TCL must be specially compiled for QEMU to run it (TCL RPi image != TCL QEMU Arm image)?

Any other ideas for emulation options?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #5 on: May 13, 2014, 05:56:05 AM »
piCore, as every other RPi system need a special kernel. Normal images do nor run in QEMU.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #6 on: May 13, 2014, 10:47:20 AM »
I built a QEMU version of 5.2.2 which runs fine. Will upload shortly.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #7 on: May 13, 2014, 03:30:08 PM »
I built a QEMU version of 5.2.2 which runs fine. Will upload shortly.
Thank you very much.

I have some high school and college classes around programming but I finished my associates in domain/network administration and getting my bachelors in security. I am not against brushing up my programming but my interests for now is more targeted at learning how to cross compile.

I am interested in learning how to ?cross? compile and maybe make packages for TCL. To that:
Where is a good tutorial to self educate around learning how to compile to different "architectures"?
And a tutorial for creating packages for TCL?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #8 on: May 13, 2014, 03:51:05 PM »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #9 on: May 13, 2014, 07:38:31 PM »
Well, I checked the downloads that came with the QEMU at sourceforge, they are different than the maintainers of Raspbian and noobs images. Lesson learned. Thank you.

I assume the download will be found on http://tinycorelinux.net/ports.html
When do you think you will have time to upload it?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #10 on: May 14, 2014, 01:23:42 AM »
When do you think you will have time to upload it?

Planned today
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline GeminiEngine

  • Newbie
  • *
  • Posts: 18
  • New to and loving this distribution.
Re: TinyCore for Raspberry Pi Emulated by QEMU
« Reply #12 on: May 14, 2014, 02:02:45 PM »
Woo! Thanks again, good sir.