From owner-freebsd-questions Wed Feb 23 13: 6: 5 2000 Delivered-To: freebsd-questions@freebsd.org Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (Postfix) with ESMTP id 9628137C19D; Wed, 23 Feb 2000 13:05:33 -0800 (PST) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.9.3/8.9.3) id UAA81995; Wed, 23 Feb 2000 20:58:27 GMT (envelope-from nik) Date: Wed, 23 Feb 2000 20:58:27 +0000 From: Nik Clayton To: "Eric J. Schwertfeger" Cc: Rich Neswold , Nik Clayton , FreeBSD-Questions List Subject: Re: FreeBSD as Palm Pilot development platform Message-ID: <20000223205827.A80125@catkin.nothing-going-on.org> References: <20000215122326.A6264@drmemory.fnal.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Eric J. Schwertfeger on Tue, Feb 15, 2000 at 11:55:08AM -0800 Organization: FreeBSD Project Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eric, Rich, and -questions. For future reference: On Tue, Feb 15, 2000 at 11:55:08AM -0800, Eric J. Schwertfeger wrote: > On Tue, 15 Feb 2000, Rich Neswold wrote: > > The are two attempts to bring the GNU tools up-to-date in developing palm > > applications. I first tried John Marshall's implementation, but kept > > getting compiler errors when building the tools. I tried to take notes of > > all the mods I had to make, but the list grew too big. > > > > I then found another person (Michael Sokolov) who was doing the same thing. > > His version of the tools compiled cleanly and worked. You can download his > > tarball at: > > > > ftp://ftp.jpsystems.com/prc-tools.0.6.0beta.tar.gz > > > > You also need a resource compiler. A useful one can be found at: > > > > http://www.hig.se/~ardiri/development/palmIII/pilrc/index.html > > > > I think I'd like to get John Marshall's version to work, because his > > installation tries to build a C++ compiler, as well. Michael's version is > > just a C compiler. But first I need to familiarize myself with Palm > > development, so I went with the project that worked. > > An important note is that *VERY* recently, John Marshall's tools bumped up > to version 2.0, and seem to be officially adopted by 3Com. The official > download site for 2.0 is the 3Com site, and 3Com has released updated > SDKs patched to work with gcc. > > I haven't played around with John's version lately, but I was able to get > it to work before. Maybe I'll put on my porter hat one weekend this > month. I've been playing around with all this this evening, and have got things to work with version 2.0 of prc-tools. Included here is my notes on what I did. The installed binaries are sufficient to build the "Hello World" application from O'Reilly "Palm Programming" book, which is a good first step. I'll turn this in to an article for the FDP in the near future. I don't doubt that you'll be able to suggest improvements. Many thanks for the help and pointers you both provided. N Using FreeBSD as a Palm Pilot Development Host This was all done on a 3.4-stable system, all commands executed by /bin/sh. 1. Download and install ports/devel/autoconf ports/lang/egcs ports/devel/gmake 2. Download and build a resource compiler, such as http://www.hig.se/~ardiri/development/palmIII/pilrc/index.html This uses GTK, so you might need ports/devel/gtk12. You also need to tweak it's Makefile, as our library and include directories include the version number. 3. Go to http://www.palm.com/devzone/tools/gcc/ and download prc-tools-2.0.tar.gz from that page. You also need binutils-2.9.1 gdb-4.18 gcc-2.95.2 These are part of FreeBSD, but the prc-tools install will patch them, so you'll need a local copy from your nearest GNU mirror. Also, download the Unix Palm OS SDK 4. Create a directory somewhere to do the build, and move the distfiles in to this directory. Assuming you've already installed the gtk port binutils-2.9.1.tar.gz gcc-2.95.2.tar.bz2 gdb-4.18.tar.bz2 palmos-1-2-3.1-sdks-1.tar.gz pilrcsrc.zip prc-tools-2.0.tar.gz Now copy in the /usr/ports/distfiles/make-3.77.tar.gz file you should have from the gmake port. 5. Extract palmos-1-2-3.1-sdks-1.tar.gz. This will create some sdk* directories, corresponding to differing PalmOS revisions. You need to move these files somewhere, and create a symlink so that sdk/ is a link to one of the sdk* directories, depending on which version of PalmOS you want to default to. The prc-tools expect /usr/local/palmdev, so unless you want to change that, do mkdir /usr/local/palmdev mv sdk* /usr/local/palmdev ln -s /usr/local/palmdev/sdk-3.1 /usr/local/palmdev/sdk 6. Extract all the archives, and apply the patches in prc-tools*/ cat prc-tools-2.0/*.palmos.diff | patch -p0 Now symlink all the packages under the prc-tools*/ directory. cd prc-tools-2.0 ln -s ../binutils-2.9.1 binutils ln -s ../gdb-4.18 gdb ln -s ../gcc-2.95.2 gcc ln -s ../make-3.77 make cd .. 7. Apply patches to gcc from the FreeBSD port cd gcc-2.95.2 cat /usr/ports/lang/egcs/patches/* | patch cd .. 8. Do the configure and build in a separate build directory: mkdir -p build/empty cd build CC=gcc295 CXX=g++295 ../prc-tools-2.0/configure \ --target=m68k-palmos \ --enable-languages=c,c++ \ --with-headers=`pwd`/empty \ --sharedstatedir=/usr/local/palmdev \ --prefix=/usr/local/palmdev Make sure you're logged in as a user who can write to /usr/local/palmdev. Remove "doc" from the host_subdirs line in the Makefile. Now you can do the build. Parts of the build expect to run programs they've installed, so you need to include /usr/local/palmdev/bin in the PATH. PATH=/usr/local/palmdev/bin:$PATH gmake all-install 9. That's it. The tools are in /usr/local/palmdev/bin. If you want docs you can cd build gmake html gmake install-html which should populate /usr/local/palmdev/html with prctools related docs (but no docs for GCC et al). -- If you want to imagine the future, imagine a tennis shoe stamping on a penguin's face forever. --- with apologies to George Orwell To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message