[RSB] port graphic libraries into rsb

Pavel Pisa pisa at cmp.felk.cvut.cz
Mon Jul 20 09:34:43 UTC 2015


Hello Chris and Qiao Yang,

On Monday 20 of July 2015 01:12:33 Chris Johns wrote:
> On 20/07/2015 6:55 am, QIAO YANG wrote:
> > I've ported the graphic libraries into rsb so that we can build them
> > much easier. All Build passed, tested on arm with raspberrypi and i386
> > with pc386.
>
> Fantastic and thank you.

I have reproduced build for i386. Thanks for instructions.
I return to the Microwindows suggestions in a separate message.

I would like to speak about source builder related questions first

> > the libraries can be built with the command like:
> >
> > ../source-builder/sb-set-builder \
> >     --log=graphic-build-log.txt \
> >     --prefix=$HOME/development/rtems-386/bsps/4.11 \
> >     --with-rtems-bsp=pc386 \
> >     --host=i386-rtems4.11 \
> >     4.11/graphics/freetype2.bset \
> >     4.11/graphics/libjpeg.bset \
> >     4.11/graphics/libpng.bset \
> >     4.11/graphics/libtiff.bset \
> >     4.11/graphics/t1lib.bset \
> >     4.11/graphics/microwindows.bset \
> >     4.11/graphics/nxlib.bset
> >
> > Patches that I used is available on my github fork of rtems-tools.
> > Waiting for more tests and reviews.
>
> I am closing in on finishing ticket https://devel.rtems.org/ticket/2374
> and I will test this after it has been resolved.

I use system wide prefix for my RTEMS install. When I specified that

 --prefix=/opt/rtems4.11

When I specified that to sb-set-builder then it silently skips install
steps. This leads not only to problem that I have not received resulting
binaries (even not found them in temporary RSB trees) but even build of
later packages dependant on previous ones failed.

I resolved that by use of RSB option

  --pkg-tar-files

tar files has been generated and I could extract content to the right 
directory and continue build with followup with sucesfull Microwindows
package build. I have been able to use that (after tar extraction)
to build and run my graphic application in QEMU then.

But I have failed into other trap with RSB first. I am used never
run commands with current directory in the git. So I have setup
build directory for the test and tried to run next script

-----------------------------------------------------------------
#!/bin/sh

SB_DIR="../../git/rtems-source-builder-yangqiao"

SB_DIR="$(cd -L "$SB_DIR" ; pwd -L )"

mkdir -p yangqiao-graphics

cd yangqiao-graphics

#    --prefix=$HOME/development/rtems-386/bsps/4.11 \

"$SB_DIR/source-builder/sb-set-builder" \
    --log=graphic-build-log.txt \
    --prefix=/opt/rtems4.11 \
    --with-rtems-bsp=pc686 \
    --host=i386-rtems4.11 \
    --configdir "$SB_DIR/rtems/config" \
    --pkg-tar-files \
    "$SB_DIR/rtems/config/4.11/graphics/freetype2.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/libjpeg.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/libpng.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/libtiff.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/t1lib.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/microwindows.bset" \
    "$SB_DIR/rtems/config/4.11/graphics/nxlib.bset"
-----------------------------------------------------------------

I tried to modify parameters different ways but it seems that
invocation outside of "git/rtems-source-builder/rtems" is not
supported. I.e. if --configdir is set then relative subdirectory
components pointing to *.cfg files are stripped. It can be good
idea on one hand if it is expected to put then all *.cfg files
to local/build specific/ directory but means finding and copying
of all dependences *.cfg.

I expect, that viceversa setup, i.e. CWD in "git/rtems-source-builder/rtems"
and option --topdir would work but I have not tested that.

I am not sure if described behavior is bug or feature and would like
to hear what is expected use.

The last question is on the border of RSB build and graphic packages
specific area.

Because libraries build is specific than I expect that all build
results should be installed in BSP directory, i.e.
/opt/rtems4.11/i386-rtems4.11/pc686/{lib,bin,lib/include} in my case.
It seems that JPEG library is configured right. But there are significant
leakages from freetype, libpng, t1lib and libtiff to
"/opt/rtems4.11/bin" and "/opt/rtems4.11/share" directories.
t1lib even installs to /share/t1lib directly.

It would be great if it is possible to limit these leaks.
I expect that most can be prevented by right prefix path related
options during packages configuration. I would be probably reasonable
to disable build of test code and utilities by config options
if possible. They are of zero value as host RTEMS tools "/opt/rtems4.11/bin"
when compiled for target and even on target there are usable libraries
only because RTEMS does not load applications at runtime.

None of above is critical but it would worth to clean up for better
experience.

Best wises,

             Pavel






More information about the devel mailing list