Poll

Would you be interested in having a QEMU based Sharp ROM X-devel environment?

Yes
11 (73.3%)
No (I target OE or pdaXrom)
4 (26.7%)
No (I prefer a higher level language than C/C++)
0 (0%)
No (I want native tools - QEMU is too slow)
0 (0%)
No (I don't want to develop Zaurus software)
0 (0%)

Total Members Voted: 15

Author Topic: Qemu Based Sharp Rom X-devel Environment  (Read 4783 times)

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Qemu Based Sharp Rom X-devel Environment
« on: July 07, 2005, 08:47:52 am »
There's been a good deal of discussion lately regarding barriers to Zaurus software development. One of the issues seems to be the difficulty of setting up a cross-development environment.

I have a QEMU disk image that features a minimal Linux install plus the Sharp ROM compatible cross development toolchain and I'm wondering if it would be worth the effort to clean it up and release it.

There is (or at least was) already a Live CD that had the x-devel tools, but rebooting every time you want to hack a little code is mighty inconvenient and that still leaves Mac users high and dry. QEMU  is a full x86 PC emulator that can run on Linux, Windows, and the Mac. It allows you to run a complete virtual Linux machine in a window on your desktop right along with all your other apps. It's a good deal slower than native execution (about 10 - 15X) but I've found it more than adequate for building Zaurus apps.

Though I still advocate the use of higher level languages like Python and Ruby for Zaurus app development, there are a variety of reasons for folks to want to develop in C/C++. This wouldn't help with the C/C++/Linux/Qtopia learning curve, but at least folks wouldn't have to struggle with tools. How about it? Would this be a big help or are there still too many barriers to development for this to make a difference?

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Qemu Based Sharp Rom X-devel Environment
« Reply #1 on: July 08, 2005, 03:50:45 pm »
I tried to use that Live CD but I couldn't figure out how to use the tools. (Following the docs for regular (not Live CD) development didn't work because the commands keep trying to write to the CD.)

I would be interested in seeing this thing that you have.
SL-5600
Watapon 1.2 Rom

Tom61

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
Qemu Based Sharp Rom X-devel Environment
« Reply #2 on: July 08, 2005, 06:34:48 pm »
Curious, why cross-compilation under QEmu, when it can emulate Arm?

Edit: I've thought of one reason, with an x86 based QEmu image, one could just mount the image as a loopback, and develop with it at full speed under x86 based Linux. Though, I'm curious what your reasoning was.
« Last Edit: July 08, 2005, 06:42:23 pm by Tom61 »

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Qemu Based Sharp Rom X-devel Environment
« Reply #3 on: July 08, 2005, 07:43:40 pm »
Definitely a good idea. "just add tarballs" instant dev stuff will help get a lot of software ported, I think.

a qemu arm image would be interesting. what would you do? setup debian-arm on a disk image and have at it? Would that work for the z (other than pocket workstation, which needs a sort of host system)? Does qemu setup a similar enough virtual arm environment to seem "native"?

even with the accelerator on x86 you'll still not get 100% speed. I thnk 50% would be more like it. It would be interesting to see a speed comparison between arm emulation compiling and x86 emulation cross compiling. Though I guess you are essentially right..on an x86 box the x86 emulator should be faster.
« Last Edit: July 08, 2005, 07:46:07 pm by adf »
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Qemu Based Sharp Rom X-devel Environment
« Reply #4 on: July 08, 2005, 08:10:26 pm »
Quote
Curious, why cross-compilation under QEmu, when it can emulate Arm?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=87596\"][{POST_SNAPBACK}][/a][/div]

The main reasons are convenience and reliability. The "official" Sharp tools are packaged for x86 Linux. Sure, one can build native ARM tools or use Debian ARM packages but that's extra work. And if a binary fails to run corrrectly on the Zaurus it's harder to rule out the toolchain as the source of the problem.

A secondary reason is that my approach uses Damn Small Linux for the environment and that's strictly x86. Stripping down Debian ARM is a lot of work and rolling a custom distro is even more work.

Mine may not be the optimal solution, but on balance it works quite well. I'm wrining an article that will explain my approach (and the decisions behind it) in more detail. Stay tuned.

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Qemu Based Sharp Rom X-devel Environment
« Reply #5 on: July 09, 2005, 04:57:03 am »
because you would get a 12 to 15 times reduction in cpu power (from thier site), so that nice 3.4ghz cpu becomes a 300mhz arm or less machine with alot of ram, not bad i guess but it wouldbe faster to cross compile

btw qemu doent do system emulation (ie hardware such as a full arm board with network and stuff) emulation it only supports program emulation so you can run a program on a non native host (see: http://fabrice.bellard.free.fr/qemu/status.html)

edit:
 it says 5 to 10 times my mistake, that means a 3.4ghz machine would be 700 mhz in theroy, i would like to see some benchmarks when it does system emulation thogh
« Last Edit: July 09, 2005, 04:58:59 am by Da_Blitz »
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Qemu Based Sharp Rom X-devel Environment
« Reply #6 on: July 18, 2005, 05:55:43 pm »
The system I've described in this thread is now ready for folks to try out. See this post in the Development forums for more details.