[RSB] port graphic libraries into rsb

QIAO YANG yangqiao0505 at me.com
Tue Jul 21 12:21:07 UTC 2015


Hi Pavel Pisa,

On Jul 19, 2015, at 10:35 PM, Pavel Pisa <pisa at cmp.felk.cvut.cz> wrote:

> 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.

So the library works if I've got it right. No problem with the build process.

>
>
> 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.
 
Do you mean that the libraries are not installed in the bsp dir? In fact, I've got all libraries installed in the right place.
Firstly, I doubt if the bsp pc686 exists in arch i386. I can only find pc386 in mainline. Make sure that the bsp name is correct.
Secondly, verify the path you passed is what the builder expects as chris explained. I haven't  found out why the JPEG works while others can't, but I do use the paths to determin where to install.

I followed alan's blog to setup my environment.

alias i386-kernel-configuer='cd $HOME/development/rtems-386/rtems-git/; \
    ./bootstrap; \
    mkdir $HOME/development/rtems-386/build-rtems-386/; \
        cd $HOME/development/rtems-386/build-rtems-386/; \
        ../rtems-git/configure --target=i386-rtems4.11 \
            --enable-rtemsbsp=pc386 \
            --enable-tests=samples \
            --enable-networking \
            --enable-posix \
            --prefix=$HOME/development/rtems-386/bsps/4.11'

So in my case I've got a directory 'build-rtems-386' and a directory 'bsp' . What I passed to sb-set-builder is the directory:
--prefix=$HOME/development/rtems-386/bsps/4.11, the same path used for kernel configure.

The libraries should be finally installed into directories
$HOME/development/rtems-386/bsps/4.11/pc386/lib
$HOME/development/rtems-386/bsps/4.11/pc386/lib/include
$HOME/development/rtems-386/bsps/4.11/pc386/bin

I hope this may help. Tell me if I misunderstood anything.
>
>
> 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
>

Best wishes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150721/00495e88/attachment-0002.html>


More information about the devel mailing list