Skip to contentSkip to conversation

qemuppc: replace emulation of qemuppc

PATCH In review Liming Wang 4 participants 14 messages Jan 5, 2012 – Jan 23, 2012

lore
Share & tools
lore
#0 lore raw

cover qemuppc: replace emulation of qemuppc

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99. With this new emulation, qemuppc now supports framebuffer and the network works well.

The kernel config also needs modification and I will let Bruce to review the patches.

The following changes since commit 0ff1d667dc23b0cc903c18f1b5e032c2b6630aae:

distro: Add poky-tiny distro definition

are available in the git repository at:

git://128.224.162.211/poky.git qemuppc-new

Liming Wang (4):
qemuppc: replace emulation of qemuppc from prep to mac99
qemuppc: add pointercal file
qemuppc: add machconfig
tslib: enable big endian support for qemuppc

 meta/conf/machine/qemuppc.conf                     |    2 +-
 .../formfactor/files/qemuppc/machconfig            |   10 ++++++++++
 .../pointercal/files/qemuppc/pointercal            |  Bin 0 -> 36 bytes
 meta/recipes-graphics/tslib/tslib_1.0.bb           |    1 +
 scripts/runqemu                                    |    7 +------
 scripts/runqemu-internal                           |   16 ++++++++--------
 6 files changed, 21 insertions(+), 15 deletions(-)
 create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc/machconfig
 create mode 100644 meta/recipes-bsp/pointercal/files/qemuppc/pointercal
#1 lore raw

PATCH 1/4 qemuppc: replace emulation of qemuppc from prep to mac99

With this new emulation, qemuppc can support framebuffer and the nfs booting works well.

---
 meta/conf/machine/qemuppc.conf |    2 +-
 scripts/runqemu                |    7 +------
 scripts/runqemu-internal       |   16 ++++++++--------
 3 files changed, 10 insertions(+), 15 deletions(-)
meta/conf/machine/qemuppc.conf +1 -1
index bcc408f..48eecb7 100644
@@ -5,7 +5,7 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-ppc603e.inc
 
-KERNEL_IMAGETYPE = "zImage"
+KERNEL_IMAGETYPE = "vmlinux"
 
 SERIAL_CONSOLE = "115200 ttyS0"
 
scripts/runqemu +1 -6
index bed6a29..ac5facf 100755
@@ -262,7 +262,7 @@ QEMUARM_DEFAULT_FSTYPE=ext3
 QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
 QEMUMIPS_DEFAULT_FSTYPE=ext3
 
-QEMUPPC_DEFAULT_KERNEL=zImage-qemuppc.bin
+QEMUPPC_DEFAULT_KERNEL=vmlinux-qemuppc.bin
 QEMUPPC_DEFAULT_FSTYPE=ext3
 
 AKITA_DEFAULT_KERNEL=zImage-akita.bin
@@ -365,11 +365,6 @@ if [ -z "$FSTYPE" ]; then
     fi
 fi
 
-if [ "$FSTYPE" = "nfs" -a "$MACHINE" = "qemuppc" ]; then
-    echo "Error: usermode NFS boot is not available for qemuppc."
-    exit 1
-fi
-
 # FSTYPE is now set for all cases
 
 # Handle cases where a ROOTFS type is given instead of a filename, e.g.
scripts/runqemu-internal +8 -8
index 2968ed9..c55619b 100755
@@ -389,13 +389,13 @@ fi
 
 if [ "$MACHINE" = "qemuppc" ]; then
     QEMU=qemu-system-ppc
-    MACHINE_SUBTYPE=prep
-    CPU_SUBTYPE=603e
-    BIOS=powerpc_rom.bin
-    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic"
+    MACHINE_SUBTYPE=mac99
+    CPU_SUBTYPE=G4
+    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
+    QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD"
     if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
-        KERNCMDLINE="root=/dev/hda rw console=ttyS0 3 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
+        KERNCMDLINE="root=/dev/hda rw console=ttyS0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
     fi
     if [ "$FSTYPE" = "nfs" ]; then
         if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
@@ -403,8 +403,8 @@ if [ "$MACHINE" = "qemuppc" ]; then
             cleanup
             return
         fi
-        KERNCMDLINE="root=/dev/nfs console=ttyS0 3 nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -no-reboot $QEMU_UI_OPTIONS"
+        KERNCMDLINE="root=/dev/nfs console=ttyS0 nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
     fi
 fi
 
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/4 qemuppc: add pointercal file

In reply to Liming Wang

This file is for tslib to make touchscreen work well.

---
 .../pointercal/files/qemuppc/pointercal            |  Bin 0 -> 36 bytes
 1 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-bsp/pointercal/files/qemuppc/pointercal
meta/recipes-bsp/pointercal/files/qemuppc/pointercal new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c2d6e37bf0c0d956ba17ba9955613c4cee5a147a
GIT binary patch
Signature · 1 line
1.7.5.4
#3 lore raw

PATCH 3/4 qemuppc: add machconfig

In reply to Liming Wang
---
 .../formfactor/files/qemuppc/machconfig            |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc/machconfig
meta/recipes-bsp/formfactor/files/qemuppc/machconfig new file +10 -0
new file mode 100755
index 0000000..5ea2270
@@ -0,0 +1,10 @@
+HAVE_TOUCHSCREEN=1
+HAVE_KEYBOARD=1
+ 
+DISPLAY_CAN_ROTATE=0
+DISPLAY_ORIENTATION=0
+DISPLAY_WIDTH_PIXELS=800
+DISPLAY_HEIGHT_PIXELS=600
+DISPLAY_BPP=16
+DISPLAY_DPI=150
+DISPLAY_SUBPIXEL_ORDER=vrgb
Signature · 1 line
1.7.5.4
#4 lore raw

PATCH 4/4 tslib: enable big endian support for qemuppc

In reply to Liming Wang

This enables wacom tablet/touchscreen support on qemuppc.

---
 meta/recipes-graphics/tslib/tslib_1.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-graphics/tslib/tslib_1.0.bb +1 -0
index f47116f..54ff3d4 100644
@@ -22,6 +22,7 @@ SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "92b2eb55b1e4ef7e2c0347069389390e"
 SRC_URI[sha256sum] = "9c40d914e4f6fe00bdd77137d671c7ce4f211686228f2eb8b2d3c2360bc249c8"
 SRC_URI_append_qemumips += " file://32bitBE-support.patch"
+SRC_URI_append_qemuppc += " file://32bitBE-support.patch"
 
 
 inherit autotools pkgconfig
Signature · 1 line
1.7.5.4
#5 lore raw
In reply to Liming Wang
Quoted 8 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99. With this new emulation, qemuppc now supports framebuffer and the network works well.

The kernel config also needs modification and I will let Bruce to review the patches.

I have the patches in my inbox now, I'm reviewing and merging them shortly. I'll pull these changes in to do some boot and runtime testing as well.

Richard/Saul: if it works better for coordination purposes, I can do the kernel part, take this into my tree as well and then send a single coordinated pull request when everything is known to work together.

Cheers,

Bruce

Quoted 29 lines

The following changes since commit 0ff1d667dc23b0cc903c18f1b5e032c2b6630aae:

 distro: Add poky-tiny distro definition

are available in the git repository at:

 git://128.224.162.211/poky.git qemuppc-new

Liming Wang (4):
     qemuppc: replace emulation of qemuppc from prep to mac99
     qemuppc: add pointercal file
     qemuppc: add machconfig
     tslib: enable big endian support for qemuppc

 meta/conf/machine/qemuppc.conf                     |    2 +- .../formfactor/files/qemuppc/machconfig            |   10 ++++++++++ .../pointercal/files/qemuppc/pointercal            |  Bin 0 -> 36 bytes meta/recipes-graphics/tslib/tslib_1.0.bb           |    1 + scripts/runqemu                                    |    7 +------ scripts/runqemu-internal                           |   16 ++++++++--------

 6 files changed, 21 insertions(+), 15 deletions(-)

 create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc/machconfig create mode 100644 meta/recipes-bsp/pointercal/files/qemuppc/pointercal

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#6 lore raw
Quoted 10 lines · Bruce Ashfield
Quoted 8 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99. With this new emulation, qemuppc now supports framebuffer and the network works well.

The kernel config also needs modification and I will let Bruce to review the patches.

Quoted 6 lines

I have the patches in my inbox now, I'm reviewing and merging them shortly. I'll pull these changes in to do some boot and runtime testing as well.

Richard/Saul: if it works better for coordination purposes, I can do the kernel part, take this into my tree as well and then send a single coordinated pull request when everything is known to work together.

Yes please.

The userspace bits look reasonable to me but they need to be in step with the kernel changes. I'm looking forward to working framebuffer support :)

Cheers,

Richard

#7 lore raw
Quoted 18 lines · Richard Purdie
Quoted 10 lines · Bruce Ashfield
Quoted 8 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99. With this new emulation, qemuppc now supports framebuffer and the network works well.

The kernel config also needs modification and I will let Bruce to review the patches.

Quoted 6 lines

I have the patches in my inbox now, I'm reviewing and merging them shortly. I'll pull these changes in to do some boot and runtime testing as well.

Richard/Saul: if it works better for coordination purposes, I can do the kernel part, take this into my tree as well and then send a single coordinated pull request when everything is known to work together.

Quoted 5 lines

Yes please.

The userspace bits look reasonable to me but they need to be in step with the kernel changes. I'm looking forward to working framebuffer support :)

In case anyone is wondering, I merged and started testing this on Friday. I'm working with Liming to hunt down a mouse grab/cusor and keyboard issue that I'm seeing. But other than that, everything worked nicely. If I can't resolve the two
minor items quickly, I'll send the queue anyway and more eyes can be put on the problem.

Cheers,

Bruce

Quoted 5 lines

Cheers,

Richard

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#8 lore raw
In reply to Liming Wang
Quoted 6 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99. With this new emulation, qemuppc now supports framebuffer and the network works well.

Is there anything that needs to be setup differently for the runqemu scripts? Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

THanks
Sau!

Quoted 27 lines

The kernel config also needs modification and I will let Bruce to review the patches.

The following changes since commit 0ff1d667dc23b0cc903c18f1b5e032c2b6630aae:

distro: Add poky-tiny distro definition

are available in the git repository at:

   git://128.224.162.211/poky.git qemuppc-new

Liming Wang (4):
qemuppc: replace emulation of qemuppc from prep to mac99
qemuppc: add pointercal file
qemuppc: add machconfig
tslib: enable big endian support for qemuppc

  meta/conf/machine/qemuppc.conf                     |    2 +-
  .../formfactor/files/qemuppc/machconfig            |   10 ++++++++++
  .../pointercal/files/qemuppc/pointercal            |  Bin 0 ->  36 bytes
  meta/recipes-graphics/tslib/tslib_1.0.bb           |    1 +
  scripts/runqemu                                    |    7 +------
  scripts/runqemu-internal                           |   16 ++++++++--------
  6 files changed, 21 insertions(+), 15 deletions(-)

create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc/machconfig create mode 100644 meta/recipes-bsp/pointercal/files/qemuppc/pointercal

#9 lore raw
Quoted 4 lines · Saul Wold
Quoted 3 lines · Liming Wang

Hi Richard,

Quoted 8 lines
Quoted 5 lines

These patches are aimed to replace emulation of qemuppc from prep to mac99.
With this new emulation, qemuppc now supports framebuffer and the network works well.

Is there anything that needs to be setup differently for the runqemu scripts?  Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

What type of failure ? boot ? I'm building and booting it all the time, so I can help there. Or are you talking about something in particular like the network ? disk ?

Bruce

Quoted 40 lines

THanks
       Sau!

Quoted 26 lines

The kernel config also needs modification and I will let Bruce to review the
patches.

The following changes since commit
0ff1d667dc23b0cc903c18f1b5e032c2b6630aae:

  distro: Add poky-tiny distro definition

are available in the git repository at:

  git://128.224.162.211/poky.git qemuppc-new

Liming Wang (4):
      qemuppc: replace emulation of qemuppc from prep to mac99
      qemuppc: add pointercal file
      qemuppc: add machconfig
      tslib: enable big endian support for qemuppc

 meta/conf/machine/qemuppc.conf                     |    2 +- .../formfactor/files/qemuppc/machconfig            |   10 ++++++++++ .../pointercal/files/qemuppc/pointercal            |  Bin 0 ->  36 bytes meta/recipes-graphics/tslib/tslib_1.0.bb           |    1 + scripts/runqemu                                    |    7 +------ scripts/runqemu-internal                           |   16
++++++++--------

Quoted 4 lines
 6 files changed, 21 insertions(+), 15 deletions(-)

 create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc/machconfig create mode 100644 meta/recipes-bsp/pointercal/files/qemuppc/pointercal

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#10 lore raw
Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Saul Wold
Quoted 8 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99.
With this new emulation, qemuppc now supports framebuffer and the network works well.

Quoted 7 lines
Quoted 3 lines

Is there anything that needs to be setup differently for the runqemu scripts? Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

What type of failure ? boot ? I'm building and booting it all the time, so I can help there. Or are you talking about something in particular like the network ? disk ?

I ran a test build and can confirm that whilst qemuppc can boot, there is no network. We need to fix the network ASAP as our automated testing depends on working network access...

Cheers,

Richard

#11 lore raw
Quoted 15 lines · Richard Purdie
Quoted 14 lines · Bruce Ashfield
Quoted 12 lines · Saul Wold
Quoted 8 lines · Liming Wang

Hi Richard,

These patches are aimed to replace emulation of qemuppc from prep to mac99.
With this new emulation, qemuppc now supports framebuffer and the network works well.

Is there anything that needs to be setup differently for the runqemu scripts?  Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

Quoted 7 lines
Quoted 3 lines

What type of failure ? boot ? I'm building and booting it all the time, so I can help there. Or are you talking about something in particular like the network ? disk ?

I ran a test build and can confirm that whilst qemuppc can boot, there is no network. We need to fix the network ASAP as our automated testing depends on working network access...

Liming is out for the next week or so, but I'll see what I can do on Monday. He did report a properly working networking with his initial submission, so it should just be a configuration issue.

Cheers,

Bruce

Quoted 10 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#12 lore raw
Quoted 21 lines · Bruce Ashfield
Quoted 19 lines · Richard Purdie
Quoted 17 lines · Bruce Ashfield
Quoted 4 lines · Saul Wold
Quoted 3 lines · Liming Wang

Hi Richard,

Quoted 8 lines
Quoted 5 lines

These patches are aimed to replace emulation of qemuppc from prep to mac99.
With this new emulation, qemuppc now supports framebuffer and the network works well.

Is there anything that needs to be setup differently for the runqemu scripts?  Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

What type of failure ? boot ? I'm building and booting it all the time, so I can help there. Or are you talking about something in particular like the network ? disk ?

Quoted 7 lines
Quoted 3 lines

I ran a test build and can confirm that whilst qemuppc can boot, there is no network. We need to fix the network ASAP as our automated testing depends on working network access...

Liming is out for the next week or so, but I'll see what I can do on Monday. He did report a properly working networking with his initial submission, so it should just be a configuration issue.

Does anyone have more details on this for me ? I just did a build and boot into sato and everything worked here. Mouse was fine, opened the terminal, ifconfig reports and up and running ethernet, and I can ping and ssh out of qemppc to my host machine.

So I've got nothing to test here, since it all worked.

Note: there is one small change to runqemu that I can send along to enable the keyboard in sato, but that's all that I have to go on.

Cheers,

Bruce

Quoted 21 lines

Cheers,

Bruce

Quoted 10 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#13 lore raw
Quoted 36 lines · Bruce Ashfield
Quoted 21 lines · Bruce Ashfield
Quoted 19 lines · Richard Purdie
Quoted 17 lines · Bruce Ashfield
Quoted 4 lines · Saul Wold
Quoted 3 lines · Liming Wang

Hi Richard,

Quoted 8 lines
Quoted 5 lines

These patches are aimed to replace emulation of qemuppc from prep to mac99.
With this new emulation, qemuppc now supports framebuffer and the network works well.

Is there anything that needs to be setup differently for the runqemu scripts?  Our sanity tests have failed after changing to the new ppc code and I wonder if there is something for the command line or ???

What type of failure ? boot ? I'm building and booting it all the time, so I can help there. Or are you talking about something in particular like the network ? disk ?

Quoted 7 lines
Quoted 3 lines

I ran a test build and can confirm that whilst qemuppc can boot, there is no network. We need to fix the network ASAP as our automated testing depends on working network access...

Liming is out for the next week or so, but I'll see what I can do on Monday. He did report a properly working networking with his initial submission, so it should just be a configuration issue.

Does anyone have more details on this for me ? I just did a build and boot into sato and everything worked here. Mouse was fine, opened the terminal, ifconfig reports and up and running ethernet, and I can ping and ssh out of qemppc to my host machine.

Quoted 4 lines

So I've got nothing to test here, since it all worked.

Note: there is one small change to runqemu that I can send along to enable the keyboard in sato, but that's all that I have to go on.

As was discussed on IRC, I was booting my 3.2 kernel .. where everything worked. I've fixed this on 3.0 and sent a pull request.

Bruce

Quoted 32 lines

Cheers,

Bruce

Quoted 18 lines

Cheers,

Bruce

Quoted 10 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Quoted 3 lines

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"