Enabling "directfb.​h" for i.MX233 running L2.6.31.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enabling "directfb.​h" for i.MX233 running L2.6.31.

1,068 Views
myke_predko
Senior Contributor III

Hi,

 

I would like to try out DirectFB for my application - I have enabled the package in ltib (2.6.31) as well as run:

 

./ltib -p DirectFB.spec -f

 

and opened up the examples using:

 

./ltib --mode prep --pkg DirectFB-examples

 

But, I don't seem to have "directfb.h" put onto my system.  Those were the only .spec files I could find with "DirectFB" in them. 

 

Is there anything else I should be doing to put the directfb.h into the include paths?  If this isn't showing up I'm wondering if the kernel is being built properly. 

 

One other anomaly that I see is that I don't have the <LTIB_PATH>/rpm/linux/include produced.  I did see it when I was working with the i.MX257 and its ltib but I don't here - could I have built it incorrectly? 

 

I'm also curious as to what is the correct way to invoke an application which uses DirectFB?  I'm curious because the input parameters (argc & argv) are passed to the DirectFBInit function. 

  

Finally, where can I find some good examples showing how to create DirectFB applications (especially using a touch screen)?  I have brought out the included examples (as you can see above) and have looked at the ones at DirectFB.org, but I'm wondering if there are any others.

 

Thanx!

 

myke

Labels (1)
0 Kudos
Reply
3 Replies

771 Views
myke_predko
Senior Contributor III

I think I have it.

 

I am able to successfully run ltib, build an application as well as debug using the cross-gdb tools on Eclipse.

 

To properly build the kernel with DirectFB 1.4.9 (the latest version) you must (this was taken from the other thread where I was having problems getting DirectFB to build properly):

 

1. Execute ./ltib -c and make sure DirectFB is not selected.

 

2. I would recommend executing ./ltib -f to make sure everything has been built without any possible lingering references to DirectFB.

 

3. Copy DirectFB-1.4.9.tar.gz (from http://www.directfb.org) into the /opt/freescale/pkgs directory of your (Linux) PC.

 

4. Click on DirectFB-1.4.9.tar.gz to bring up the extraction tool and double click on "configure" to bring it up into the text editor. Find the statement with "ffast-math" and add a "-lm" link flag after it. This will eliminate the missing "sqrt" errors. NOTE: that when you save the file after the changes you will be prompted by the extraction tool to update the tar file - click to update.

 

5. Repeat step 4 for "configure.in" file.

 

6. Modify dist/lfs-5.1/DirectFB/DirectFB.spec with the following changes:

a. Version should be 1.4.9

b. Delete the patches

c. Optionally remove the "/" characters (as they come out double when the build takes place) from the "export FREETYPE" statements.

 

7. Run ./ltib -c and select DirectFB. The build should take place without errors.

 

After doing this, load the kernel and rfs onto the NAND Flash of your i.MX233 EVK.

 

When building a DirectFB app, you must add the following flags to the Eclipse (Version 3.4) Project "Properties" under "Miscellaneous" which is under "GCC Linker":

-lz

-ldirectfb

-lfusion

-ldirect

 

To be honest, this has been successful once in a row, but I have been able to work through the DirectFB_Line example app from http://www.directfb.org and I will go through additional example apps from the site as well as the "DirectFB-0.9.23-example" Package that comes with ltib. I'm pretty sure this is correct as I have done numerous output captures and I was able to characterize the errors as well as when the application was working correctly.

 

myke

0 Kudos
Reply

771 Views
myke_predko
Senior Contributor III

Hey,

 

I think I'm halfway there - I have created the directfb.h file as well as am now able to compile. 

 

After a lot of googling and searching, I:

1.  Found a DirectFB patch which is part of the ltib tar file that I think I have included in my build.

2.  Reran ./ltib -c with DirectFB disabled to clear my previous work

3.  Ran ./ltib -p tslib.spec -f as this is the package which puts together the TSLIB functions as well as inserts the DirectFB patch that is included in the ltib tar.  After doing this...

4.  Went back to ./ltib -c and re-enabled DirectFB and then built the kernel image and the boot stream. 

 

I have one of the example DirectFB apps from the http://www.directfb.org web site (the first one "DirectFB_Line") that I have set up as an Eclipse project for and added the directory <ltib_directory>/rootfs/usr/include/directfb and it seems to compile without any problems. 

 

Now, I have to figure out how to link.  I get two types of errors:

1.  In the form of: "warning: libz.so.1, needed by .../libdirectfg.so, not found (try using -rpath or -rpath-link)"

2.  ".../libdirectfb.so: undefined reference to 'fusion_arena_get_shared_field'"

These errors don't make sense because the .so files are in <ltib_director>/rootfs/usr/lib which is referenced as one of the linker library source directories. 

 

Any suggestions that I can try?

 

Thanx,

 

myke

0 Kudos
Reply

771 Views
myke_predko
Senior Contributor III

It's good when I answer my own question; the execution parameters and their use are described here:

 

http://www.directfb.org/wiki/index.php/Configuring_DirectFB

 

I'm still trying to figure out what I'm doing wrong with my set up so that I don't have directfb.h for the build.

 

Thanx,

 

myke

0 Kudos
Reply