Pandora Pandora Sdk Installer


Cpasjuste

Member
Joined
Apr 20, 2007
Messages
266
Note: Cpasjuste now recommends that you use the DJWillis toolchain. (source: post #70 in this thread)

-Gruso


--------------------------------------------------------------------------------------------------------------

Hi, i did re-write my little pandora toolchain/sdk scripts for an easier and better installation.
This stuff is writed/tested for deb based distributions ( debian, ubuntu ... ), 32 and 64 bits.

It comes in 3 files :

toolchain.sh : will download and install codesourcery arm toolchain ( arm-2009q3-67 ) and set the PNDSDK path variable ( /usr/local/pandora/arm-2009q3 ). It can be used alone to install the basic toolchain.

pnd_libs.sh : will download and install some libraries from the angstrom repository, based on the third file list. It need the "libraries.list" file.

libraries.list : a list of libraries URL from angstrom repo. So if pnd_libs.sh script isn't too crappy, we (you) should only need to update this list to update.


I encourage you to report me libraries that may miss you ( i just added a very few one for gles, x11 and sdl ), if they are part of the actual pandora base image, i'll add them to the "libraries.list" file.
The "toolchain.sh" script and "pnd_libs.sh" scripts will leave a "tmp" directory where it was launched with downloaded stuff, you can safely delete it.


toolchain.sh
pnd_libs.sh
libraries.list
 
Hi JayFoxRox, what do you mean by a better makefile ? There is none inclued currently, but i could probably include a basic makefile for reference.

Else i really don't know how qemu-arm work, so it could be difficult for me. Any hint would be great.
What i'd really like to see would be a scratchbox environement like with maemo, but based on angstrom (i own an n900 device, and theire scratchbox env. is really great, crosscompiling is transparent and really usefull for "./configure" like ports. )
 
Sorry, I should have been more specific (I just fail at forums and communicating with other people ;) ) - This is an example makefile from the PSPSDK

Code:
TARGET = blend
OBJS = blend.o ../common/callbacks.o ../common/vram.o

INCDIR =
CFLAGS = -G0 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =
LIBS= -lpspgu

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Blend Sample

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

Personally I think that this is quite easy to understand and use. It has well-defined variable names and you can specify options for packing the file directory.
The target "make" just makes the binary and PBP file (some sort of wrapper around the executable with infos for the "menu"), "make exploit" also creates an exploit directory to run it on 1.5 or non CFW firmwares and I think even "make clean" is defined. Besides that it automaticly picks psp-gcc instead of the normal GCC.
I think this could also work for Pandora, with an extra target like "make test" to run the executable directly in qemu or "make hwdebug" which would also establish a GDB remote connection after sending the executable to the Pandora for example.
 
Cpasjuste..

Include libpnd :) (can't check, I'm on phone)

also use the newer csl .. 2007q3 won't work all the time, as the glib is out of date. I get a lot o link errors with that, so use 2009q3 instead

jeff
 
In another thread I've uploaded to atili the actual arm libs from recent firmware (will change, but not too much) so can link against those too

jeff
 
skeezix said:
Cpasjuste..

Include libpnd :) (can't check, I'm on phone)

also use the newer csl .. 2007q3 won't work all the time, as the glib is out of date. I get a lot o link errors with that, so use 2009q3 instead

jeff

I did read around that the stable codesourcery toolchain was 2007q3, and i think notaz said that too. It's the one used by nokia too for maemo, so i may be right on this. I do not had any special problem / link error with it ! But if the 2009q3 is really better, then i should update the script yes.

For libpnd, i didn't had it since i had to install git from the script, but well your right it's needed so i will update it. But i have a little question for you : where should the include files be ? I could/should add them in the standard include folder ( "$PNDSDK/usr/include" for my toolchain config) in a "libpnd" folder. Is it right for you ? People would have to include "libpnd/pnd_apps.h" for example in theire project.
 
Last edited by a moderator:
Cpasjuste said:
skeezix said:
Cpasjuste..

Include libpnd :) (can't check, I'm on phone)

also use the newer csl .. 2007q3 won't work all the time, as the glib is out of date. I get a lot o link errors with that, so use 2009q3 instead

jeff

I did read around that the stable codesourcery toolchain was 2007q3, and i think notaz said that too. It's the one used by nokia too for maemo, so i may be right on this. I do not had any special problem / link error with it ! But if the 2009q3 is really better, then i should update the script yes.

For libpnd, i didn't had it since i had to install git from the script, but well your right it's needed so i will update it. But i have a little question for you : where should the include files be ? I could/should add them in the standard include folder ( "$PNDSDK/usr/include" for my toolchain config) in a "libpnd" folder. Is it right for you ? People would have to include "libpnd/pnd_apps.h" for example in theire project.
I would appreciate if you just left them in /usr/include (they already have the pnd prefix after all) because that's how all of my applications and skeezix' test applications refer to them.

But let's wait for what skeezix has to say...
 
Last edited by a moderator:
Cpasjuste said:
I updated the toolchain.sh script to install arm-2009q3-67 as suggested by skeezix :)
Thanks a bunch for that! I modified the script myself to do that, but good to see that everyone now gets that toolchain ;)
 
Last edited by a moderator:
I just updated the "libraries.list" too with latest gles packages. (previous one was not available anymore, so it was giving an error)
Remember to reports any missing libs, i'll add them to the "libraries.list" file if available on the "final" pandora image.
 
I had to update some of the version numbers to get this to install. I think it was: libts, libtiff, libgles-omap3

I think this is going to be tricky to maintain since they'll keep updating their packages.
EDIT: Also... the lib script still extracts to the 2007q3 directory and not the 2009q3. Just letting you know.
And I suggest SDL_gfx and SDL_mixer should be added.

Code:
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libts-1.0-0_1.0-r23.4.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libts-1.0-dev_1.0-r23.4.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxi6_1.3-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxi-dev_1.3-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxext6_1.1.1-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxext-dev_1.1.1-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxdmcp6_1.0.3-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxdmcp-dev_1.0.3-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxau6_1.0.5-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libxau-dev_1.0.5-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/libx11-6_1.1.5-r3.1_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/xproto_7.0.16-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/xproto-dev_7.0.16-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/kbproto-dev_1.0.4-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libx11-6_1.3.3-r7.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libx11-dev_1.3.3-r7.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libgles-omap3_3.01.00.02-r6.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libgles-omap3-dev_3.01.00.02-r6.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libz1_1.2.3-r5.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libjpeg62_6b-r8.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libjpeg-dev_6b-r8.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libtiff5_3.9.2+4.0.0beta5-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libtiff-dev_3.9.2+4.0.0beta5-r1.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libpng_1.2.42-r2.0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libpng-dev_1.2.42-r2.0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libz-dev_1.2.3-r5.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libfreetype6_2.3.9-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libfreetype-dev_2.3.9-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsdl-1.2-0_1.2.14-r3.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsdl-1.2-dev_1.2.14-r3.5_armv7a.ipk
     http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/libsdl-image-1.2-0_1.2.6-r1.1_armv7a.ipk
     http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/libsdl-image-1.2-dev_1.2.6-r1.1_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsdl-ttf-2.0-0_2.0.9-r0.5_armv7a.ipk
     http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsdl-ttf-2.0-dev_2.0.9-r0.5_armv7a.ipk
 
I did change the way it install libs since old revision are not stored on angstrom server, i upload them to my server and it will download it from there.
I also added more libs and added a routine to update pkg-config and "binrary" (sdl-config, png-config etc) library and include paths.

There is probably some bugs left, but could probably help some people !
 
Excellent. You know what you need though? A "sample_code.sh" script that downloads some samples and builds them with this toolkit. I'm thinking WakeBreaker (GL ES1.1 demo) and Jelly Invaders would be good to have .. shall I have have a go at making them easy-to-use and setup?
 
This was uber useful and helpful, I used a couple files from the angstrom repository (hey, it's dynamically linked, so I hope it's on the Pandora :p So far it seems so!)

Added the following to my libraries.list, someone tell me if this is a bad way to do it...
Code:
http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/libsdl-gfx-dev_2.0.17-r0.1_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libvorbisidec-dev_20041119-r1.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libvorbisidec1_20041119-r1.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libmikmod_3.1.12-r3.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libmikmod-dev_3.1.12-r3.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsmpeg-0.4-0_0.4.5+svnr370-r0.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libsmpeg-0.4-dev_0.4.5+svnr370-r0.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libmad-dev_0.15.1b-r5.5_armv7a.ipk
http://www.angstrom-distribution.org/unstable/feed/armv7a/base/libmad0_0.15.1b-r5.5_armv7a.ipk

So, now I got some work to do, neo geo pocket color at 1:1 pixel ratio of the pandora is the size of a tamagachi screen practically... Yays!!!
 
Sorry for being such a noob, but I'm new to cross-compiling. I got all this, but how do I actually get things like ./configure and Makefile's to use this?

I know I can set CC and CXX and the flags, but to what do I need to set them? Same with --host= and --build=, I don't quite know what to set that to. Also, how can I set the correct path for libraries? I'm sorry if this has all been addressed before, but I can't seem to find it.

Does anybody have a simple example of an existing project, which could be quite easily cross-compiled? I tried googling, but could not find a clear guide or example. Thanks in advance!

Edit: I wanted to compile openttd; here's the output of ./configure -h:

'configure' configures OpenTTD.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, --help display this help and exit

System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run
on HOST [BUILD]
--windres=WINDRES the windres to use [HOST-windres]
--strip=STRIP the strip to use [HOST-strip]
--awk=AWK the awk to use in configure [awk]
--lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]
--os=OS the OS we are compiling for [DETECT]
DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/
MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/
DOS/WINCE/PSP/HAIKU
--endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)
--revision=rXXXX overwrite the revision detection.
Use with care!

Paths:
--prefix-dir=dir specifies the prefix for all installed
files [/usr/local]
--binary-dir=dir location of the binary. Will be prefixed
with the prefix-dir [games]
--data-dir=dir location of data files (lang, data, gm).
Will be prefixed with the prefix-dir
[share/games/openttd]
--doc-dir=dir location of the doc files
Will be prefixed with the prefix-dir
[1]
--icon-dir=dir location of icons. Will be prefixed
with the prefix-dir [share/pixmaps]
--icon-theme-dir=dir location of icon theme.
Will be prefixed with the prefix-dir
and postfixed with size-dirs [1]
--man-dir=dir location of the manual page (UNIX only)
Will be prefixed with the prefix-dir
[1]
--menu-dir=dir location of the menu item. (UNIX only, except OSX)
Will be prefixed with the prefix-dir
[share/applications]
--personal-dir=dir location of the personal directory
[os-dependent default]
--shared-dir=dir location of shared data files
[os-dependent default]
--install-dir=dir specifies the root to install to.
Useful to install into jails [/]
--binary-name the name used for the binary, icons,
desktop file, etc. when installing [openttd]

Features and packages:
--enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)
--enable-desync-debug=[LVL] enable desync debug options (LVL=[012], 0 is none
--enable-profiling enables profiling
--enable-lto enables GCC's Link Time Optimization (LTO)/ICC's
Interprocedural Optimization if available
--enable-dedicated compile a dedicated server (without video)
--enable-static enable static compile (doesn't work for
all HOSTs)
--enable-translator enable extra output for translators
--enable-universal enable universal builds (OSX ONLY)
--enable-osx-g5 enables optimizations for G5 (OSX ONLY)
--disable-cocoa-quartz disable the quartz window mode driver for Cocoa (OSX ONLY)
--disable-cocoa-quickdraw disable the quickdraw window mode driver for Cocoa (OSX ONLY)
--disable-unicode disable unicode support to build win9x
version (Win32 ONLY)
--disable-network disable network support
--disable-assert disable asserts (continue on errors)
--enable-strip enable any possible stripping
--without-osx-sysroot disable the automatic adding of sysroot
(OSX ONLY)
--without-application-bundle disable generation of application bundle
(OSX ONLY)
--without-menu-entry Don't generate a menu item (Freedesktop based only)
--menu-group=group Category in which the menu item will be placed (Freedesktop based only)
--menu-name=name Name of the menu item when placed [OpenTTD]
--with-direct-music enable direct music support (Win32 ONLY)
--with-sort=sort define a non-default location for sort
--with-midi=midi define which midi-player to use
--with-midi-arg=arg define which args to use for the
midi-player
--with-libtimidity enables libtimidity support
--with-allegrol[=allegro-config]
enables Allegro video driver support
--with-cocoa enables COCOA video driver (OSX ONLY)
--with-sdl[=sdl-config] enables SDL video driver support
--with-zlib[=zlib.a] enables zlib support
--with-liblzo2[=liblzo2.a] enables liblzo2 support
--with-png[=libpng-config] enables libpng support
--with-freetype[=freetype-config]
enables libfreetype support
--with-fontconfig[=pkg-config fontconfig]
enables fontconfig support
--with-icu[=icu-config] enables icu (used for right-to-left support)
--static-icu try to link statically (libsicu instead of
libicu; can fail as the new name is guessed)
--with-iconv[=iconv-path] enables iconv support
--with-psp-config[=psp-config] enables psp-config support (PSP ONLY)
--disable-builtin-depend disable use of builtin deps finder
--with-makedepend[=makedepend] enables makedepend support
--with-ccache enables ccache support
--with-distcc enables distcc support

Some influential environment variables:
CC C compiler command
CXX C++ compiler command
CFLAGS C compiler flags
CXXFLAGS C++ compiler flags
WINDRES windres command
LDFLAGS linker flags, e.g. -L<lib dir> if you
have libraries in a nonstandard
directory <lib dir>

Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.

I have this in /usr/local/pandora/arm-2009q3/bin/
-rwxr-xr-x 1 laurens laurens 547548 2009-10-16 19:24 arm-none-linux-gnueabi-addr2line
-rwxr-xr-x 2 laurens laurens 572276 2009-10-16 19:24 arm-none-linux-gnueabi-ar
-rwxr-xr-x 2 laurens laurens 954556 2009-10-16 19:24 arm-none-linux-gnueabi-as
-rwxr-xr-x 2 laurens laurens 210380 2009-10-16 19:24 arm-none-linux-gnueabi-c++
-rwxr-xr-x 1 laurens laurens 547324 2009-10-16 19:24 arm-none-linux-gnueabi-c++filt
-rwxr-xr-x 1 laurens laurens 209228 2009-10-16 19:24 arm-none-linux-gnueabi-cpp
-rwxr-xr-x 2 laurens laurens 210380 2009-10-16 19:24 arm-none-linux-gnueabi-g++
-rwxr-xr-x 2 laurens laurens 207948 2009-10-16 19:24 arm-none-linux-gnueabi-gcc
-rwxr-xr-x 2 laurens laurens 207948 2009-10-16 19:24 arm-none-linux-gnueabi-gcc-4.4.1
-rwxr-xr-x 1 laurens laurens 26760 2009-10-16 19:24 arm-none-linux-gnueabi-gcov
-rwxr-xr-x 1 laurens laurens 2840960 2009-10-16 19:24 arm-none-linux-gnueabi-gdb
-rwxr-xr-x 1 laurens laurens 2840960 2009-10-16 19:24 arm-none-linux-gnueabi-gdbtui
-rwxr-xr-x 1 laurens laurens 607456 2009-10-16 19:24 arm-none-linux-gnueabi-gprof
-rwxr-xr-x 2 laurens laurens 959396 2009-10-16 19:24 arm-none-linux-gnueabi-ld
-rwxr-xr-x 2 laurens laurens 556092 2009-10-16 19:24 arm-none-linux-gnueabi-nm
-rwxr-xr-x 2 laurens laurens 705268 2009-10-16 19:24 arm-none-linux-gnueabi-objcopy
-rwxr-xr-x 2 laurens laurens 836092 2009-10-16 19:24 arm-none-linux-gnueabi-objdump
-rwxr-xr-x 1 laurens laurens 305253 2010-05-31 11:10 arm-none-linux-gnueabi-pkg-config
-rwxr-xr-x 2 laurens laurens 572308 2009-10-16 19:24 arm-none-linux-gnueabi-ranlib
-rwxr-xr-x 1 laurens laurens 307848 2009-10-16 19:24 arm-none-linux-gnueabi-readelf
-rwxr-xr-x 1 laurens laurens 551680 2009-10-16 19:24 arm-none-linux-gnueabi-size
-rwxr-xr-x 1 laurens laurens 342540 2009-10-16 19:24 arm-none-linux-gnueabi-sprite
-rwxr-xr-x 1 laurens laurens 547516 2009-10-16 19:24 arm-none-linux-gnueabi-strings
-rwxr-xr-x 2 laurens laurens 705268 2009-10-16 19:24 arm-none-linux-gnueabi-strip

EDIT:
In this specific case, ./configure --host=arm-none-linux-gnueabi --prefix-dir=$PNDSDK seems to help, but not sure if it really works quite yet.
 
Not sure if its relevant but for anyone still devving on Windows (AKA me), you can manually download the *.ipks then append ".tar" to the end and open with 7zip or something. You should find the includes in "/data.tar.gz/data.tar/./usr/include".
 
Back
Top