User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Thu Mar 08, 2012 8:54 pm

bob_binz said:


@Sailing_Nut

This may not be much help, but I got a blank screen in QEMU at one attempt at building a kernel, which could perhaps point to a corrupt kernel image.  Did you download it or roll your own?  Perhaps worth downloading again, just to see?

BBz



Tried again (verified MD5 and SHA1 first) and still get the same result. Going to try for some Qemu support.

User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Thu Mar 08, 2012 9:27 pm

In my search for support I found version 1.0.1 precompiled for Windows.

Using that the system starts to boot but Qemu crashes part way through. Has anyone else tried this and gotten it to work?

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Official image and QEMU?

Thu Mar 08, 2012 9:46 pm

Sailing_Nut said:


In my search for support I found version 1.0.1 precompiled for Windows.

Using that the system starts to boot but Qemu crashes part way through. Has anyone else tried this and gotten it to work?


It's not just me that it crashes on - will try a Win XP box in the morning.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Official image and QEMU?

Thu Mar 08, 2012 9:52 pm

Another poster reported success with the (Windows compiled version from that site) 0.15 versions.  But, it looks like you two (and me as well) decided to go for the 1.0.1 release.  That may account for the difference.  I haven't tried to run it yet.

I remember earlier, someone reported that the 0.15 version worked when the 1.0.x version didn't.  This was in a Linux context, but the concept may be the same.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Thu Mar 08, 2012 10:03 pm

Joe Schmoe said:


Another poster reported success with the (Windows compiled version from that site) 0.15 versions.  But, it looks like you two (and me as well) decided to go for the 1.0.1 release.  That may account for the difference.  I haven't tried to run it yet.

I remember earlier, someone reported that the 0.15 version worked when the 1.0.x version didn't.  This was in a Linux context, but the concept may be the same.



I had to resort to the -net none option or else it would crash every time I booted it up.

Now I am struggling to get a resolution higher than 640x480. I have not found any command line switches that will get me a higher resolution. I tried the -g switch but when I add that qemu does not even start.

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Official image and QEMU?

Fri Mar 09, 2012 2:08 am

Sailing_Nut said:


I had to resort to the -net none option or else it would crash every time I booted it up.

Now I am struggling to get a resolution higher than 640x480. I have not found any command line switches that will get me a higher resolution. I tried the -g switch but when I add that qemu does not even start.



For the network problem, it happened to me when I tried the Fedora image. I compiled the latest version of qemu-linaro (http://www.cnx-software.com/20.....-in-linux/) and worked for me.

To change the resolution to 800x600 :

Create the file “/etc/X11/xorg.conf” with the following content:

Section “Screen”
Identifier “Default Screen”
DefaultDepth 16
SubSection “Display”
# Viewport 0 0
Depth 16
Modes “800×600?
EndSubsection
EndSection

User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Fri Mar 09, 2012 3:02 am

OK, now I'm stuck becasue I can't get a root terminal. I looked all around and all of the suggestions for the root password don't work. So far I have tried:


suse
[blank]
raspberry
password
debian

So, if soneone can enlighten me I'd appreciate it!

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Official image and QEMU?

Fri Mar 09, 2012 3:13 am

I'm just guessing, but couldn't you mount the partition (whatever you are using as the root filesystem), on another machine, then edit the /etc/passwd and/or /etc/shadow files? (set the root password to empty [none])

That's the usual hack to use when you "lose" the root pw...
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Fri Mar 09, 2012 3:34 am

Unfortunately I don't have a Linux system that I can easily mount the partition. (Not sure if there is a way to do it in Windows.)

I am getting closer on getting networking to work in Qemu in Windows. I had to specify the -net nic,model=smc91c111 It's funny that is the only model that is supported for the qemu-system-arm but it does not seem that it defaults to that!

Now I can boot with the network card enabled, but during boot it fails to reach my DHCP server. When I try to specify the option -net user,net= I get the same behavior as before where it craps out when it tries to access the network during the boot.

I have also played with -net tap but can't amke much sense of those options. (Probably because I don't understand tap. Time for some reading!)

Anyone have any ideas?

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Official image and QEMU?

Fri Mar 09, 2012 3:45 am

Sailing_Nut said:


OK, now I'm stuck becasue I can't get a root terminal. I looked all around and all of the suggestions for the root password don't work. So far I have tried:


suse
[blank]
raspberry
password
debian

So, if soneone can enlighten me I'd appreciate it!



Assuming you are playing with the Debian image, there is no root, you need to use "sudo" in front of commands that require root privileges.

User avatar
Sailing_Nut
Posts: 40
Joined: Sat Mar 03, 2012 10:29 pm

Re: Official image and QEMU?

Fri Mar 09, 2012 3:56 am

cnxsoft said:


Sailing_Nut said:


OK, now I'm stuck becasue I can't get a root terminal. I looked all around and all of the suggestions for the root password don't work. So far I have tried:


suse
[blank]
raspberry
password
debian

So, if soneone can enlighten me I'd appreciate it!


Assuming you are playing with the Debian image, there is no root, you need to use "sudo" in front of commands that require root privileges.



OK, I can work with that. The thing that really fooled me is that there is an entry in the menu from LXDE for "root terminal" and that asks for a password.

fireshipjohn
Posts: 8
Joined: Thu Jan 26, 2012 12:34 am

Re: Official image and QEMU?

Fri Mar 16, 2012 10:23 am

You can just 'sudo bash' to get a root prompt and then use passwd to set the root password and then you can use it in the normal way

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 12:40 am

Well this topic is Official image and qemu - but I have not seen the answer to this question yet.

I built my kernel by cloning the raspberrypi tree on gethub. This is Linux 3.1.9.

I am using the same qemu invocation that works for my 3.0.4 Debian kernel:

qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda /media/raspberry-pi/rootfs.ext2 -kernel zImage -append "root=/dev/sda" -serial stdio

With my new pi kernel, a qemu console window opens but nothing is written to it.

I think it is because the raspberrypi hardware uses different addresses for the console.

My assumption is that once I get the official pi kernel running, it will work for either debian or fedora. Debian is working great for me on the 3.0.4 kernel.

So my question is how do I invoke qemu with enough parameters to remap the pi physical addresses?

Thanks!

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Official image and QEMU?

Thu Mar 22, 2012 1:47 am

rmm200 said:


I built my kernel by cloning the raspberrypi tree on gethub. This is Linux 3.1.9.


If you built your kernel with the raspberry pi config it won't work with qemu.

qemu emulates versatile board (-M versatilepb), so you need a kernel compatible with that board.

If you want to build kernel 3.1.9 for qemu, follow the instructions at http://www.cnx-software.com/20.....with-qemu/ (Section Build Kernel for ARM11). Just download Kernel 3.1.9 instead of Kernel 3.0.4.

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 2:48 am

cnxsoft said:

...
If you built your kernel with the raspberry pi config it won't work with qemu.

...


Thanks cnxsoft! I was trying to keep the kernel as close to the real one as I could, to see what kind of peripheral support was included. I guess I will be happy with one that works instead! Your tip about downloading 3.1.9 instead of 3.0.4 was very helpful - I had no idea which builds would work otherwise. I am off to build a 3.1.9 for qemu.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 3:01 am

I just want to remind you that you don't need to build the kernel, since you can download it from the place referenced in this (very useful) article:

http://www.smallbulb.net/2012/.....berry-pi 
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 4:17 am

Well I am anticipating the stock kernels not supporting the funny usb wifi adapter I chose.

Not to mention building kernels keeps me busy until the pi arrives.

I will add that my 3.1.9 kernel can not open the root device on sda. Think I read something about that - somewhere...

User avatar
jojopi
Posts: 3079
Joined: Tue Oct 11, 2011 8:38 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 8:38 am

rmm200 said:


Well I am anticipating the stock kernels not supporting the funny usb wifi adapter I chose.


In QEMU?

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Official image and QEMU?

Thu Mar 22, 2012 2:40 pm

jojopi said:


rmm200 said:


Well I am anticipating the stock kernels not supporting the funny usb wifi adapter I chose.


In QEMU?



This is a BUFFALO WLI-UC-GNM thumbnail sized usb adapter. It is sold as Windows only, but runs great with WPA under Ubuntu using default drivers. RALINK RT3070V based. I know of no way to pass a USB device through qemu, but my goal is to verify included drivers and play with adding and removing them. I suspect Pi will have a pretty restricted set of drivers.

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Official image and QEMU?

Thu Mar 22, 2012 2:51 pm

rmm200 said:


jojopi said:


rmm200 said:


Well I am anticipating the stock kernels not supporting the funny usb wifi adapter I chose.


In QEMU?


This is a BUFFALO WLI-UC-GNM thumbnail sized usb adapter. It is sold as Windows only, but runs great with WPA under Ubuntu using default drivers. RALINK RT3070V based. I know of no way to pass a USB device through qemu, but my goal is to verify included drivers and play with adding and removing them. I suspect Pi will have a pretty restricted set of drivers.


I would except any USB dongle that works in x86 Linux to work in the raspberry pi, as long as the drivers are part of the kernel source or you can download the drivers source.

Dennis
Posts: 9
Joined: Fri Jan 20, 2012 9:05 am

Re: Official image and QEMU?

Thu Mar 22, 2012 3:53 pm

rmm200 said:


jojopi said:


rmm200 said:


Well I am anticipating the stock kernels not supporting the funny usb wifi adapter I chose.


In QEMU?


This is a BUFFALO WLI-UC-GNM thumbnail sized usb adapter. It is sold as Windows only, but runs great with WPA under Ubuntu using default drivers. RALINK RT3070V based. I know of no way to pass a USB device through qemu, but my goal is to verify included drivers and play with adding and removing them. I suspect Pi will have a pretty restricted set of drivers.


When it comes to drivers you should try to look beyond manufacturer name and model number. Try to get information which chipsets are involved. A more common brand/modell may use the same chipset. So when looking for drivers.. search for chipsetname not brand name.

/cheers

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Official image and QEMU?

Fri Mar 23, 2012 2:27 am

rmm200 said:

...
I will add that my 3.1.9 kernel can not open the root device on sda.
...
On the off chance it may help another kernel newbie - if you let an "m" slip through instead of an "*" when you are selecting kernel options - this is the error you may get. SCSI drivers have to be linked in. Pi is not even here yet, and I am already learning a lot...

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Official image and QEMU?

Sat Apr 14, 2012 4:20 am

Out of curiosity, I'm not overly familiar with qemu, but I have the .img file up and running to let me play while I wait patiently for my turn in the order queue to come up, and I was wondering, how accurate is this?  I mean if I get a program running in qemu using the arm1136-r2 option am I really accurately representing the r-pi such that I can be reasonably sure that anything I compile on it will run on the r-pi, or is this more of an "getting to know you" experience for ARM in general?
Dear forum: Play nice ;-)

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Official image and QEMU?

Sat Apr 14, 2012 4:24 am

Abishur said:


Out of curiosity, I'm not overly familiar with qemu, but I have the .img file up and running to let me play while I wait patiently for my turn in the order queue to come up, and I was wondering, how accurate is this?  I mean if I get a program running in qemu using the arm1136-r2 option am I really accurately representing the r-pi such that I can be reasonably sure that anything I compile on it will run on the r-pi, or is this more of an "getting to know you" experience for ARM in general?


Any program that runs in the emulator should run in the real hardware, although it should faster in the real hardware, unless you've got a really fast PC.

Bakul Shah
Posts: 320
Joined: Sun Sep 25, 2011 1:25 am

Re: Official image and QEMU?

Sat Apr 14, 2012 6:05 am

Qemu emulates arm1176 or arm1136-r (depending the chosen -M option) but *not* the raspi hardware.  So as long as your program doesn't touch gpio or anything else specified in the peripherals databook it should be fine. In another thread I suggested adding raspi specific code to qemu but I don't know if anyone is working on it.

Return to “General discussion”