Author Topic: Sharp Zaurus Sdk The Easy Way  (Read 73229 times)

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Sharp Zaurus Sdk The Easy Way
« on: July 18, 2005, 05:53:06 pm »
From some of the discussion in the General topics, it's become clear that getting the Zaurus SDK up and running is a stumbling block for aspiring Zaurus developers. In an effort to lower the bar, I've created an entire development environment (based on Damn Small Linux) that has the toolchain and SDK pre-installed in a complete lightweight Linux distro and ready to run.

I've written an article that details the advantages of this approach along with download and installation instructions. You can find the article at
http://kopsisengineering.com/kopsis/SharpZaurusSdkDsl

I had initially hoped that this solution would be radically simpler than the tool installation itself. I'm not entirely certain that I've succeeded in that.  I may just be pushing the complexity into a different area (getting Damn Small Linux and possibly QEMU running) so I'm very interested in getting feedback from anyone who tries my approach.

Note that these tools are for Sharp ROM development only. They will definitely not work for OpenZaurus, and I suspect they won't work for pdaXrom either. If this approach proves to be sufficiently easy for people, then I may try to set up similar DSL based environments for those systems.

Good luck!

lpotter

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
    • http://qtopia.net
Sharp Zaurus Sdk The Easy Way
« Reply #1 on: July 19, 2005, 01:45:02 am »
hey, great idea!  We have an sdk iso that we haven't released...

I dont think qemu is really necessary (but a good idea), although. But anyway, thanks for this... will add a link over at qtopia.net. Don't forget there are developer docs over there also.
« Last Edit: July 19, 2005, 02:34:02 am by lpotter »
Software Engineer, Systems Group, MES, Trolltech
irc.freenode.net #qtopia
http://qtopia.net

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Sharp Zaurus Sdk The Easy Way
« Reply #2 on: July 19, 2005, 08:12:11 am »
Quote
hey, great idea!  We have an sdk iso that we haven't released...

I dont think qemu is really necessary (but a good idea), although. But anyway, thanks for this... will add a link over at qtopia.net. Don't forget there are developer docs over there also.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=88777\"][{POST_SNAPBACK}][/a][/div]

I think QEMU is a great idea! For me it opens the door to convenient development. I have a Windows laptop at work, which must run Windows all the time (because there run tasks on it all day). I'd love to be able to do development on this machine. So running a Linux-based development system in a virtual machine is probably the best way in my situation, even if the emulation slows down things a bit.

I'll definitely try the ISO with QEMU setup.

However, must first read the instructions. Seems to be a not _that_ easy to set up though.

But many thanks for all the work!!

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Sharp Zaurus Sdk The Easy Way
« Reply #3 on: July 19, 2005, 12:07:13 pm »
Quote
However, must first read the instructions. Seems to be a not _that_ easy to set up though.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=88804\"][{POST_SNAPBACK}][/a][/div]

Actually, with QEMU it's pretty simple. The most difficult part is creating a batch file to launch QEMU with the right settings. The article explaining everything is long but that's because it includes tons of background info

Orchid

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://www.cattail.nu
Sharp Zaurus Sdk The Easy Way
« Reply #4 on: July 26, 2005, 07:04:34 am »
Here are my first comments about your document (which was a very nice read!),
of things I'd like to have seen:

**********************

A list of files to expect in the sharp_zsdk_dsl.zip -
and what they are for, particularly the optional directory.

**********************

A zip file of sharp_zsdk_dsl.zip that unzips under DSL.
dsl@box:~$ unzip sharp_zsdk_dsl.zip
Archive:  sharp_zsdk_dsl.zip
  inflating: Embedix.uci
unzip: Unsupported compression method 0

dsl@box:~$ gunzip sharp_zsdk.dsl.zip
gunzip: sharp_zsdk.dsl.zip.gz: No such file or directory
dsl@box:~$

**********************

A note about how to possibly find the disk if the tools do not show up:
dsl@box:~$ sudo su
root@ttyp1[sda]# dmesg | grep disk
RAMDISK driver initialized: 16 RAM disks of 100000K size 1024 blocksize
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0

**********************

A simple summary at the top for weary readers, like:
This is how to program Sharp Zaurus ROM applications
using a Linux bootable disk (DSL), with appropriate toolchain modules,
under a virtual machine (QEMU).

It would need appropriate links for DSL, the zip, and QEMU, for those
Linux gurus who could figure it out just from that.

**********************

I'll try actual development later today.  Thanks!!!!

- T
6000L
Sharp ROM Version 1.12
Sandisk 1 GB
Pocketop Keyboard
Jeode 1.10.7

Gondola

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #5 on: August 09, 2005, 04:44:27 pm »
Kopsis,

I installed QEMU and the Sharp/Qtopia dev environment using your instructions, and I had the example program compiled with little problem.

I'm having one issue with keyboard focus in QEMU, however.  When I alt-tab out to Windows (XP) and then alt-tab back, it appears that there is a bug that makes the keyboard not function because the alt- part of the alt-tab sequence.  I have to alt-tab back and forth a few times in order to get the keyboard working again.

I've done some Googling on the subject and reading the QEMU forums.  *THEY* say that you just have to hit alt again to toggle the key off, but that doesn't work for me.  I have to alt-tab back and forth several times to get the keyboard working again within QEMU.

Also, any tips on how to convert a Makefile to the Sharp/Qtopia environment? I am attempting to compile an EyeToy-compatible webcam driver, but my clumsy Makefile hacking doesn't appear to be good enough.  You can check out the thread I created on this topic by clicking the link in my sig below.

Thanks in advance for any assistance!
« Last Edit: August 09, 2005, 04:45:02 pm by Gondola »
[span style=\'font-size:8pt;line-height:100%\']Nokia 770, running latest firmware.
1GB RS-MMC sandisk card
Garmin Etrex Legend GPS/USB Earthmate GPS
Rooted, with an SSH server, VNC viewer, etc.
[/span]

drakecoldwinter

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://
Sharp Zaurus Sdk The Easy Way
« Reply #6 on: August 17, 2005, 01:09:22 pm »
Humm... I tried Suse with the rpm Zaurus tools(half working) then the demo linux distro, who doesn<t even boot... (I<m using VMWare BTW) and then I tryed this DSL... got it installed in my hd quickly, and I installed your toold in under 1 hour (the OS+ tools) everything working at the first shot.... very clean. I love DSL btw, is very crude and esential, not plenty of useless stuff lying around.

Now, I'm a linux newbie (despite having tried several distros I consider myself a beginner) so I have plenty of questions that maybe you could answer :

1 - first I did the example, and it worked, then I got the mahjongg game sources from http://www.killefiz.de/zaurus/search.php?q=mahjongg&x=21&y=9  (I got mahjongg, not Zmahjongg and not tkcmahjongg) then I do a tmake to create the Makefile, it works perfect, then I do a make and it begins good but then suddently I get layout_1 undeclared .... ; and layout_2 undeclared... in the end I don't get a compiled file, so I can't execute it...  What I'm doing wrong ???

2 - I have done shortcuts for QT designer and qvfb they work wonderfull, I can start the qvfb without any trouble, then I tryed to do shortcuts to change the source (x86 or arm) but they don<t seem to work... humm i dunno if I did something wrong or not, but it seems that I need to execute the source x86 in a Xterm each time I want to compile anything, they don't seem to stay permanent.... anyway, here is my shortcut just in case I did something wrong
----------------------------
table Icon
  Type: Program
  Caption: Source X86
  Command: "source /home/dsl/dev-x86-qpe.sh"
  Icon: .xtdesktop/1400.gif
  X: 78
  Y: 158
end
-----------------------------

3-I have Qt Designer to do the interfaces (mahjongg doesn<t have any UI files then I guess it generates the interfaces using something else, anyway, I would be able to do the interfaces, but what program must I use to work in the code ? is there any code editor in the Qtopia suite ?? where it is located ??

Thanks for all your answers, if you don<t give answers then thanks anyway for putting on the net this very light setting for Zaurus programming (DSL + Zaurus)



Edit:
-------------------------------------------------------------------------------------------------------------------
For the 3 point, well I'm a windows developper, used to visual studio, then in QT designer I try to double click on the controls to get access to the code or something like that, and I get nothing... ; then I guess that the code is done with another program and then linked with the UI in someway...
« Last Edit: August 17, 2005, 01:14:33 pm by drakecoldwinter »
---------------------------------------------------------------------------
SL-C3100
Cacko lite 1.23
Lynksys Wifi card
---------------------------------------------------------------------------

drakecoldwinter

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://
Sharp Zaurus Sdk The Easy Way
« Reply #7 on: August 17, 2005, 01:25:14 pm »
4 - DSL is installed on my hd, I have a sda1 now, how can I do so embedix.uci, qtopia.uci and gcc are loaded automatically on boot ? I have put them on the sda1 repertory is that enough ?



Edit :
--------------------------------------------------------------------------
I<m getting several times gcc command not found, then I guess the trouble is the gcc binaries not being mounted.... hummm how can I install those binaries ?



Another Edit :
--------------------------------------------------------------------------
humm... I don't see any code editors, then I'm starting to see that I must get an editor of my own, then I found Kdevelop who is integrated with QT Designer... but I don't seem to be able to install it... (kde-config not found) I think it really needs KDE and DSL doesn't have KDE installed...  Then I think that your tools package needs something very important, an editor... beaver is not powerfull enough, is very basic...
« Last Edit: August 18, 2005, 03:05:00 pm by drakecoldwinter »
---------------------------------------------------------------------------
SL-C3100
Cacko lite 1.23
Lynksys Wifi card
---------------------------------------------------------------------------

magicbb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • http://
Sharp Zaurus Sdk The Easy Way
« Reply #8 on: August 24, 2005, 12:21:41 pm »
just install everything according to your instruction, but have some problem;

1) How can I connect the virtual linx with the host or internet? if can't how can i copy the source code to it?

2) I try your example, but it complains that there is no tmake command, i have tried to search all files but still can't find this file


any idea/

thanks
Zaurus C-1000, AmbiCom Wifi, Pdaxrom beta 3

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #9 on: August 24, 2005, 04:12:05 pm »
Wow Kopsis, this sounds great. I was just about to try installing the Sharp tools for the third time. (I tried it with Red Hat 9 and with Mepis, but couldn't get either one to work. I was about to try it with Mandrake 10. I also tried the DemoLinux CD with the tools, but couldn't figure how to use it -- it keep trying to write to the CD)

I'm going to try this out as soon as I get a chance. Thanks for putting this all together.
SL-5600
Watapon 1.2 Rom

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Sharp Zaurus Sdk The Easy Way
« Reply #10 on: August 24, 2005, 04:17:52 pm »
woohoo!  this might mean I can get rid of my rhat installation...not that I was doing much with it.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #11 on: August 26, 2005, 11:57:59 am »
Great work kopsis. I was finally able to get a Z program to compile! (Kind of ironic that it was on a Windows machine.)

Just a couple of comments:

1. I'm using Windows for this. You've got links to QEMU in two different places. The first place gives links for Win/Lin/OSX versions. The second place only links to Linux version. (I was a little confused at first. Wasn't sure which site I should be getting it from. But I figured out that it was the first one.)

2. I don't remember what the other comment was. :-)

Anyway, good job. It was actually much easier to set up than I thought it would be. There's no install for QEMU--you just unzip it into a directory and it's ready to run. Then I just downloaded the Z image, changed the batch file to point to it and I was in business.

Now I have to see if I can get this thing on my jump drive....
SL-5600
Watapon 1.2 Rom

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #12 on: August 27, 2005, 07:36:22 am »
Thanks for the information.  

I have Windows XP.  If you have Windows, you can get the accelerated version of QEMU by downloading:

http://qemu.dad-answers.com/download/win32/qemu-0.7.1-3.zip

Unzip the file to C:\qemu

Download the Sharp SDK image from one of the SourceForge mirror sites:

http://prdownloads.sourceforge.net/pyqplay...sk.zip?download

Unzip or copy the contents of the the sharp_zsdk_ds1_disk.zip file to C:\qemu

Contrary to the instructions on Fabrice Bellard's web site, I had to navigate to the C:\qemu folder with Windows Explorer and right-click on the kqemu.inf file and select "Install" from the context menu.  After you do that, restart your computer.

Create a batch file in C:\qemu.  I called my batch file "go.bat".  This batch file will start the QEMU emulator when you execute it.

Code: [Select]
c:
cd \qemu
net start kqemu
qemu -L c:\qemu -m 128 sharp_zsdk_ds1_disk.img -enable_audio -localtime
net stop kqemu

The -L switch indicates the directory which contains the bios.bin file.  In a different version of QEMU that I tried, the bios file was located in a subdirectory.  The -m switch seems to indicate how many megabytes of memory the emulated machine should have.

The contents of my C:\qemu folder are:

Code: [Select]
             patches
 Â           65,536 bios.bin
 Â              114 go.bat
 Â            1,616 kqemu.inf
 Â           59,004 kqemu.sys
 Â            5,550 kqemu-doc.html
 Â          524,288 ppc_rom.bin
 Â          152,807 proll.elf
 Â          825,344 qemu.exe
 Â          103,241 qemu-doc.html
 Â          132,608 qemu-img.exe
 Â          451,584 qemu-system-mips.exe
 Â          666,624 qemu-system-ppc.exe
 Â          524,800 qemu-system-sparc.exe
 Â        1,025,024 qemu-system-x86_64.exe
 Â           57,013 qemu-tech.html
 Â              389 readme.txt
 Â          290,816 sdl.dll
 Â      144,113,664 sharp_zsdk_dsl_disk.img
 Â           32,768 vgabios.bin
 Â           32,768 vgabios-cirrus.bin
 Â             20 File(s)    149,065,558 bytes
« Last Edit: August 27, 2005, 08:14:20 am by qx773 »

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #13 on: August 30, 2005, 02:35:13 pm »
Kopsis,

  I've got a question about the bootable DSL CD. Is it possible to put the extensions on the CD itself and have it load them when it boots? I've seen some posts over at the DSL forum that hint at this being possbile, but I can't find anything telling how to do it.  (Wouldn't you need to add it to the ISO before burning?)
SL-5600
Watapon 1.2 Rom

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Sharp Zaurus Sdk The Easy Way
« Reply #14 on: August 30, 2005, 05:04:28 pm »
OK, I think I found the answer in the DSL Forums:

http://damnsmalllinux.org/cgi-bin/forums/i...=ST;f=16;t=8356
SL-5600
Watapon 1.2 Rom