| Introduction |
| In this howto I will walk you through the process of building PicoGUI for the Casio Cassiopeia BE-300 pda. This is intended to be a follow up tutorial to the uClibc/BusyBox ramdisk tutorial here. Please visit http://www.linux4.be for more information on linux for the BE. Suggestions and questions can be directed to me at jroark@linux4.be. |
| First preparation |
|
First create a working directory and an install directory, export the path, and check out a local copy of PicoGUI from CVS. mkdir picogui cd picogui mkdir pgui_install export PGUIPATH=`pwd` cvs -d:pserver:anonymous@cvs.pgui.sourceforge.net:/cvsroot/pgui login Just hit enter when prompted for a password. Then check out the appropriate modules: cvs -z3 -d:pserver:anonymous@cvs.pgui.sourceforge.net:/cvsroot/pgui co pgserver cvs -z3 -d:pserver:anonymous@cvs.pgui.sourceforge.net:/cvsroot/pgui co cli_c cvs -z3 -d:pserver:anonymous@cvs.pgui.sourceforge.net:/cvsroot/pgui co apps cvs -z3 -d:pserver:anonymous@cvs.pgui.sourceforge.net:/cvsroot/pgui co res_c Your directory should look something like this when you are finished. total 20k 4.0k drwxrwxr-x 5 johnbot johnbot 4.0k Dec 1 14:22 ./ 4.0k drwxrwxr-x 3 johnbot johnbot 4.0k Dec 1 00:27 ../ 4.0k drwxrwxr-x 70 johnbot johnbot 4.0k Dec 1 14:22 apps/ 4.0k drwxrwxr-x 8 johnbot johnbot 4.0k Dec 1 14:22 cli_c/ 4.0k drwxrwxr-x 25 johnbot johnbot 4.0k Dec 1 00:58 pgserver/ 4.0k drwxrwxr-x 2 johnbot johnbot 4.0k Dec 1 14:28 pgui_install/ 4.0k drwxrwxr-x 6 johnbot johnbot 4.0k Dec 1 16:48 res_c/ |
| Building pgserver |
|
Pgserver is the PicoGUI server. First change into the pgserver src directory and run autogen.sh to create the configure script. cd $PGUIPATH/pgserver ./autogen.sh Now run configure with the proper flags. (make sure to have the mipsel-uclibc- toolchain in your PATH) CC=mipsel-uclibc-gcc LD=mipsel-uclibc-ld STRIP=mipsel-uclibc-strip \ ./configure --host=mipsel-linux --build=`./config.guess` \ --prefix=$PGUIPATH/pgui_install Next we need to configure the options for PicoGUI. Luckily PicoGUI comes with a very simple menu based config system very similar to the kernel's make menuconfig. In order to use this you must have curses or ncurses installed. make menuconfig Most of the defualts are fine. You should uncheck all the options under the "Debug" menu, uncheck everything except "Linux framebuffer device" under the "Video Drivers" menu, uncheck all the options under "Input Drivers" (eventually there will be an option for the BE touchscreen if we decide to use PicoGUI), uncheck everything except "Linear framebuffer @ 4bpp" & @ 16bpp under "Video Base Libraries", and uncheck "JPEG: lossy compression (needs libjpeg)" and "PNG: portable network graphic (needs libpng)" from the "File Formats" menu. Select "Exit" and save your configuration. Here is my profile.user for reference. Now run make and install. make make install After it builds and installs your $PGUIPATH/pgui_install directory should look something like this. total 20k 4.0k drwxrwxr-x 5 johnbot johnbot 4.0k Dec 1 14:58 ./ 4.0k drwxrwxr-x 6 johnbot johnbot 4.0k Dec 1 14:28 ../ 4.0k drwxrwxr-x 2 johnbot johnbot 4.0k Dec 1 14:58 bin/ 4.0k drwxrwxr-x 4 johnbot johnbot 4.0k Dec 1 14:58 include/ 4.0k drwxrwxr-x 2 johnbot johnbot 4.0k Dec 1 14:58 lib/ Now that we have the PicoGUI server and libraries we can build the client C library. |
| Building cli_c |
|
Cli_c is the client C library and is needed to build any C apps for PicoGUI. First cd into the cli_c directory and run autogen.sh to build the configure script. cd $PGUIPATH/cli_c ./autogen.sh Now run configure with the proper flags. CC=mipsel-uclibc-gcc LD=mipsel-uclibc-ld STRIP=mipsel-uclibc-strip \ ./configure --prefix=$PGUIPATH/pgui_install --host=mipsel-linux \ --build=`./config.guess` --with-extra-ipath=$PGUIPATH/pgui_install/include \ --with-pgserver=$PGUIPATH/pgserver Next we need to build the client c lib and install it. make make install With the client C library built we need to build the res_c library before building the included apps. |
| Building res_c |
|
To build and install res_c cd into the res_c directory and run autogen.sh. cd $PGUIPATH/res_c ./autogen.sh Now that the configure script has been created run configure. CC=mipsel-uclibc-gcc LD=mipsel-uclibc-ld STRIP=mipsel-uclibc-strip \ ./configure --prefix=$PGUIPATH/pgui_install --host=mipsel-linux \ --build=`./config.guess` --with-pgserver=$PGUIPATH/pgserver Next we build and install the res_c library. make make install We now have everything we need to build the included apps. |
| Building apps |
|
Change directories to apps and run autogen.sh to build the proper configure script. cd $PGUIPATH/apps ./autogen.sh Next run configure. CC=mipsel-uclibc-gcc LD=mipsel-uclibc-ld STRIP=mipsel-uclibc-strip \ ./configure --prefix=$PGUIPATH/pgui_install --host=mipsel-linux \ --build=`./config.guess` --with-pgserver=$PGUIPATH/pgserver Now run make and install. make LDFLAGS=-L$PGUIPATH/pgui_install/lib \ CFLAGS=-I$PGUIPATH/pgui_install/include make install Note: at the time of this writing (12/01/2002) I was unable to build some of the apps in $PGUIPATH/apps/pgl. I just removed the directory pgl from the list of SUBDIRS & DIST_SUBDIRS in the top level Makefile. |
| Installing PicoGUI and the apps |
|
To install PicoGUI and the sample apps mount the ramdisk that you made in the last tutorial, copy the shared libraries to <ramdisk>/lib, the binaries to <ramdisk>/usr/bin, and the contents of $PGUIPATH/pgui_install/share to <ramdisk>/usr/share. mount -t ext2 -o loop initrd ramdisk cd ramdisk cp -dp $PGUIPATH/pgui_install/lib/*.so* lib cp -dp $PGUIPATH/pgui_install/bin/* usr/bin cp -Rdp $PGUIPATH/pgui_install/share/* usr/share You will also need to create the file <ramdisk>/etc/pgserver.conf. This is the PicoGUI server config file. cat > etc/pgserver.conf << "EOF" > [pgserver] > width = 320 > height = 256 > depth = 16 > mode = 320x256x16 > session = /usr/bin/pgstartup > video = fbdev > > [video-fbdev] > device = /dev/fb > EOF Most of those lines are self explanitory. The line that starts with session tells PicoGUI what executable to start. This can be any executable or shell script. In this example it tells PicoGUI to start /usr/bin/pgstartup which is just a simple shell script that starts several PicoGUI apps, below is an example. cat > usr/bin/pgstartup << "EOF" > #!/bin/sh > > /usr/bin/pgboard /usr/share/pgboard/us_qwerty_scalable_color.kb & > /usr/bin/omnibar & > /usr/bin/canvastst & > EOF chmod 755 usr/bin/pgstartup In this example, our shell script starts pgboard (a touchscreen keyboard app), omnibar (a simple control bar), and canvastst (a screensaver like gfx test). We could start any application that we want to start with PicoGUI by simply adding it to the shell script. If you want pgserver to start on boot (you probably do since there is no way to start it after boot right now) you have to add the line /usr/bin/pgserver to the end of your <ramdisk>/etc/init.d/rcS file. Once you are done customizing your ramdisk unmount it, gzip it, copy it to the ramdisk dir, and rebuild your kernel. cd .. umount ramdisk gzip -9 initrd cp initrd.gz ../path/to/your/kernel/linux/arch/mips/ramdisk/ramdisk.gz Make sure to include TCP/IP networking in your kernel. |
| Post install notes |
|
If everything goes well you should have a ramdisk with PicoGUI and the sample apps on it. |
| Last modified on 12/01/2002 18:36:04 |