Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G62T3-0003fO-Nn for qemu-devel@nongnu.org; Thu, 27 Jul 2006 05:47:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G62T0-0003ey-Nv for qemu-devel@nongnu.org; Thu, 27 Jul 2006 05:47:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G62T0-0003ev-Ig for qemu-devel@nongnu.org; Thu, 27 Jul 2006 05:47:42 -0400 Received: from [209.191.124.133] (helo=web38106.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1G62Uk-0001rx-0D for qemu-devel@nongnu.org; Thu, 27 Jul 2006 05:49:30 -0400 Message-ID: <20060727094741.18440.qmail@web38106.mail.mud.yahoo.com> Date: Thu, 27 Jul 2006 02:47:41 -0700 (PDT) From: Tieu Ma Dau In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-770717208-1153993661=:18398" Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] Adding a device into Qemu ARM Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --0-770717208-1153993661=:18398 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all, I'm running Qemu ARM system and Debian Sarge on it. I try to add a new device, for example a LED, into Qemu ARM system. And I think that I must do the following steps: 1. Make a file led.c which simulates this LED, edit the file vl.c and vl.h 2. In file integratorcp.c, function integratorcp_init(), I must register a MEMORY SPACE for this LED (as the PL011 UART at 0x16000000) 3. Write a character device driver; this device driver will function on the MEMORY SPACE of the LED device. And this device driver has a MAJOR NUMBER 4. Make a character device file with the corresponding MAJOR NUMBER: mknod /dev/my_LED c MAJOR_NUMBER 0 5. Write an application which opens the file /dev/my_LED and write on it (to communication with my LED on Linux) OR: for example "echo -n a > /dev/my_LED" to communication with my LED on Linux I find that some of you who added the devices into Qemu ARM system, but I don't sure the steps I think above is as you 've done or not? Please confirm it for me, thank a lot! Furthermore, I have some questions on the steps above: + step 2: which interrupt I can register with the PIC? Or in my case, it must not? + step 2: which value of MEMORY SPACE I can register for this LED? Best regards, Tieu --------------------------------- Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta. --0-770717208-1153993661=:18398 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all,
I'm running Qemu ARM system and Debian Sarge on it.
I try to add a new device, for example a LED, into Qemu ARM system. And I think that I must do the following steps:
1. Make a file led.c which simulates this LED, edit the file vl.c and vl.h
2. In file integratorcp.c, function integratorcp_init(), I must register a MEMORY SPACE for this LED (as the PL011 UART at 0x16000000)
3. Write a character device driver; this device driver will function on the MEMORY SPACE of the LED device. And this device driver has a MAJOR NUMBER
4. Make a character device file with the corresponding MAJOR NUMBER: mknod /dev/my_LED c MAJOR_NUMBER 0
5. Write an application which opens the file /dev/my_LED and write on it (to communication with my LED on Linux)
OR: for example "echo -n a > /dev/my_LED" to communication with my LED on Linux

I find that some of you who added the devices into Qemu ARM system, but I don't sure the steps I think above is as you 've done or not? Please confirm it for me, thank a lot!

Furthermore, I have some questions on the steps above:
+ step 2: which interrupt I can register with the PIC? Or in my case, it must not?
+ step 2: which value of MEMORY SPACE I can register for this LED?
Best regards,
Tieu


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta. --0-770717208-1153993661=:18398--