ptxdist config and barebox re-compile

bluscape
I had to downgrade my PTX dist due to a MD5 checksuk problem in 06.
I've configured ptxdist 2011.05 but when I execute ptxdist go (to compile a
file system) it gives me the following error:

ptxdist go
error:    The ptxconfig file version and ptxdist version do not match:

    configfile version: 2011.06.0
    ptxdist version:    2011.05.0

    You can either migrate from an older ptxdist release with:
    'ptxdist migrate'

    or, to ignore this error, add '--force'
    to ptxdist's parameters, e.g.:
    'ptxdist --force go'

1.) How can I update the configfile version to have the same version as
ptxdist (Change configfile version to 2011.05.0)?

To get past this I used ptxdist migrate and compiled the filesystem.
I configured barebox to use dhcp but I now want to chnage thise and
therefore need to recompile.

After editing the configs and selecting them I again executed ptxdist. But
this time I get:

make: Nothing to be done for `world'.

2.) How do I resolve this?

Thank you

davef
I had 05 in a folder and 06 in another folder.  I had to use ptxdist
--force menuconfig once, but haven't tried to change config file versions.

 

For 2.) I just do <ptxdist clean> and start over again.  But, wait for the
correct answer, he's probably at lunch :)

Dave

Juergen Beisert
All PTXdist releases can life side by side. I would recommend you to set a
local symbolic link from your BSP project to the correct PTXdist version.

For example in the Mini2440-2011.05.0 BSP you could create a link like
$ ln -s /usr/local/bin/ptxdist-2011.0.5 p

And then you can enter all commands in the form

$ ./p select ...
$ ./p platform ...
$ ./p go
$ ./p images

and so on and you will use always the correct PTXdist version.

And in the Mini2440-2011.06.0 BSP you create this link to the
PTXdist-2011.06.0 instead.

The intention is: The BSP defines all external parts, that are required to
build it in the same way as we did prior the release. So it defines the to
be used PTxdist versions and also the to be used Toolchain.

That's why "--force" is most of the time not a good idea when you try to
use an older PTXdist than the BSP defines.

bluscape
Hi Juergen,

Thanks again. I subscribed to your mail list but I'm not sure to which
email address I should send questions?

I would like to edit the kernel boot image but is not familiar with the BSP
structure yet. 

With a standard kernel compilation I would replace the
logo_linux_clut224.ppm in kernel/drivers/video/logo with the required boot
image but I don't know where to do that in the BSP.

Lastly, I'm using a different LCD, one which has a landscape orientation.
I have the patches for the display but is not exactly sure where to place
them and how to activate them.

Thank you

davef
http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

A different display than all the ones with this BSP support?

Juergen Beisert
A PTXdist project works with 'patches'. It defines a base version of each
package via an archive for example. And then applies patches on top of this
version if a patch stack exists with the same name in one of the possible
'patches' directory.
In your case its the kernel "linux-2.6.39" and you will find the patch
stack in "configs/platform-friendlyarm-mini2440/patches/linux-2.6.39/". If
you are familiar with 'quilt' you can use it to manipulate your patch
stack. Refer chapter 4.2.5 at our "How to become a PTXdist Guru" at
"http://www.pengutronix.de/software/ptxdist/appnotes_en.html";

Adding your display patch works in the same way as our patch
"configs/platform-friendlyarm-mini2440/patches/linux-2.6.39/PATCH_1_4_s3c24
40_mini2440_Add_support_for_new_LCD_panels.diff".
Maybe you must rebase your own patch to match again.

The email address is "oselas@community.pengutronix.de"

Is your display a generic one everybody can buy and use with the Mini2440?
If yes, please send your display patch to our list. Then I will add it to
the repository, and it will be part of the BSP in its next release (July)

davef
http://www.pengutronix.de/software/ptxdist/appnotes_en.html

davef
Juergen,

If you send email to "oselas@community.pengutronix.de" does that mean I do
not even have navigate the blog unless I want to look at stuff that is
archived?

Can you add attachments to the email message?

Thanks,
Dave

bluscape
Hi Dave,

thanks for the reply.
how are your things coming along?

You said: "A different display than all the ones with this BSP support?"

Its sounds as if there are quite a few supported displays. I read in the
Quickstart Manual OSELAS.BSP() FriendlyARM mini2440 p.16. 

• 3.5” TFT + touchscreen (LCDN3502/NL2432HC22-23B)
• 7” TFT + touchscreen
• VGA shield
• 3.5” TFT + touchscreen (T35)
• 5.6” TFT + touchscreen (AT056TN52)
• 3.5” TFT + touchscreen (X35)

This list corresponds to the 0..9 selection in the platform config file.
Are these the only supported displays? If not, where can I find a list of
supported displays?

How is Arora coming along?
Everytime I select to install the webkit for Qt my compilation hangs with
something like: ".......-lz -lm -ldl -lrt -lpthread"

Its still busy compiling, but will it ever complete or is it stuck/hanging.

In the past this happened when I selected -webkit for the Qt ./configure.
I've now checked the boxes for Qt and arora and I assume that the BSP will
now automatically select the -webkit. So it hangs as used to in the past.
Should I just wait and be patient or is something actually wrong?

Juergen Beisert
bluscape,

these displays you already found in the platform file are the currently
supported displays. For your own needs you can extend this list, or replace
an entry (or remove all others and only add your own).

Does it really hang or is your machine still busy while it shows this
output? Linking large binaries can take a long time. Depends on your
computing power and system memory.

As everytime: If you send us your logfile, we can take a look into it and
we may will find the reason, like we found the reason why Dave's host
always failed compiling Arora.

davef
bluscape,

You'll see that webkit is included (-*-) when you tick Arora.  And all the
other things that are required, ie optional libraries.

Well, got the keyboard and touchscreen (stylus input) to work with Arora,
now would like to get my USB mouse to work as well.  Ah, the other thing is
that it won't access even the local network.  Just requires some more
effort on my part.  The other issue re cross-compiling Qt is that if you
make a change it takes another two hours + to complete.  For my 2nd attempt
I ticked most of the mouse and keyboard drivers, to "cover all my bases".

The big problem I had with compiling Arora was that there was an old
.qmake.cache kicking around and it seems that becomes the default every
time you subsequently try to compile an application using Qt.  I had
probably tried 20-30 times over the last year to get Qt/embedded
cross-compiled and application to run on it.  I only managed to do it once
thanks to the script that mini2440vietnam posted a few month ago.

Left-over .qmake.cache contents doesn't seem to be a problem for anyone
else who has cross-compile Qt.  Certainly, never seen any mention of it :(
I just deleted it.  Doing a cross-compile on Arora with the Pengutronix BSP
doesn't not appear to generate this file.

Off, to sort out the mouse and the network issue.

Dave

bluscape
This has been resolved.
had to edit /etc/profile (or /etc/profile.d/tslib.sh)

Addeded the following lines:

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export QWS_MOUSE_PROTO=tslib:/dev/input/event1
export QWS_DISPLAY=LinuxFB:mmWidth=232:mmHeight=142

But I now have a new problem. Since my last in this thread I've started
working with PTX dist. PTX dist is working and I can run ts_calibrate and
ts_test.
I've been using my own Qt and ts libraries to write apps using Qt. These
apps was working on my previous FS (angstrom), but now with ptx, when I run
my app, I get the following error:

"error while loading shared libraries: libts-1.0.so.0: cannot open shared
object file: No such file or directory"

I'm still learning the ptx bsp structure and is not sure where everything
is placed. I selected Qt and some of its libraries and examples to be
compiled with the bsp. That succeeded. So my app is not finding the
libraries.

1.) Is this because the version of tslib I used to create the app is
different from that available on ptx? If so, will I have to compile my app
with the new ptx Qt and ts libs? Or can I modify the paths such that my app
can find the new ptx libraries (I guess I'll have to create symbolic
links?)
2.) Where can I find the Qmake and Qt libs compoiled with ptx such that I
can use them on the host machine to develop apps using Qtcreator?

Juergen Beisert
bluscape,

yes, PTXdist comes with a "libts-0.0.so.0.1.1". And your application was
linked against another version of this library. Just run a "readelf -d
<your application binary>" and look for (NEEDED). These are the libraries
your program expects on the target at run-time.

Recompiling your application is more or less simple. If you have a
Makefile, configure the same toolchain (compiler/linker/glibc) as you have
used for the Mini2440 BSP, and also add:

Include path:
 - platform-mini2440/sysroot-target/include/
 - platform-mini2440/sysroot-target/usr/include/

Library search path:

 - platform-mini2440/sysroot-target/lib/
 - platform-mini2440/sysroot-target/usr/lib/

These paths contain all the headers and libraries you need. And after you
link your program against these libraries, it will match with the
libraries. Or try a "ptxdist newpackage src-qmake-prog" and let PTXdist
build your program for you.

Juergen Beisert
Forgotten: And the other parts you will find in
"platform-mini2440/sysroot-cross/bin/"

davef
bluscape,

> export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
> export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts

Have you got a /usr/local directory?

bluscape
Great!! Thanks for the support, I really appreciate it guys. Thank you.

For Qt creator I need to specify qmake for Qt cross compilation on the
host. Which one should I use?

1.)
/platform-mini2440/build-host/qt-everywhere-opensource-src-4.6.3-buil/bin/qmake
2.)
/platform-mini2440/build-target/qt-everywhere-opensource-src-4.6.3-buil/bin/qmak
e
3.) /platform-mini2440/sysroot-hostq/bin/qmake

I've tried 1.) but it gave me an error in Qt Creator and after trying to
compile with it, it messed up my entire home directory (made all the files
for root access only). But this could be due to something else too.

Hi Dave,

No, I did not want to add another tslib if there is already one in the file
system. But I think I did try that at some stage and then I would have
added the local dir to the usr path and copy my libs to local. Thanks.

In the linux examples they show that one can access the leds/IOs using the
following:

#include <sys/ioctl.h>

fd = open("/dev/leds0", 0);
if (fd < 0) {
fd = open("/dev/leds", 0);
}
if (fd < 0) {
perror("open device leds");
exit(1);
}
ioctl(fd, 1, 0);
close(fd);

Now PTX does not enumerate its peripherals and IOs in /dev and its
abstraction layer seems to be different from that of ioctl.
In the oselas documentation they show that one can access peripherals and
IOs from /sys/class/leds in the command line. How would one access the
peripherals and IOs from C code in PTX? Is there any examples available.

Juergen Beisert
bluscape,

note the little difference in the path: "build" versus "sysroot". "build"
only contains all the sources. And these sources where also build in this
directory. But they install their _results_ into "sysroot" (headers,
libraries, applications). "sysroot" is the one you need to use, when you
build packages that need some header and libraries from the other packages.

 build         results
build-host -> sysroot-host
build-cross -> sysroot-cross
build-target -> sysroot-target

The "qmake" you need you will find in
"platform-mini2440/sysroot-cross/bin". "cross" in the path here means, it
runs on your host, but creates binaries for your target (the same thing,
when we talk about a "cross-compiler").
"platform-mini2440/sysroot-host/bin" contains tools that run on your host
and creates/handles data for the host.
"platform-mini2440/sysroot-target/bin" contains things for your target.

So, take care to not mix up things. If you build a program for your target,
but you do it on your host, you need the "sysroot-cross" tools to do the
jobs, with data from the "sysroot-target". Don't panic. Welcome to the
world of cross-development! ;-)

bluscape
Hi Dave, 

Is the Qt examples working on your PTX?
I've included some of the Qt example programs into the PTXdist compilation.
In ptx on the target I browse to the examples directory:

cd /usr/bin/qt4-examples/dialogs/standarddialogs

and then execute the app using:

./standarddialogs -qws

but I get the following message:

: driver not found
Aborted

Juergen is also looking at the problem but I think he is done for the day.
Maybe you have some advice for me in the meanwhile?

Juergen Beisert
Did you check your emails? ;-)

davef
bluscape,

Got Arora to boot up once.  I touched something on the display and got an
unusual "menu" pop up on the top left corner, couldn't get rid of it and
now every time I run Arora it crashes. After the crash free says about 1m
of memory left.  I thought running via NFS wouldn't place high demands on
the RAM in my 64M machine.

Have you checked that standarddialogs has all the required libraries in
/usr/lib?

I didn't tick the box for the examples.

Can you confirm that any change in Qt requires a lengthy re-build?

Thanks,
Dave

bluscape
I can't comment on any change for qt itself but any change in qt examples =
lengthy re-build

bluscape
adding examples automatically selects required qt libraries which could
answer your question, change to qt = lengthy rebuild

bluscape
Do you know how GPIO's are mapped to /sys/class/gpioXXX where XXX is the
sys gpio number. Meaning what gpioXXX should be used for GPA0 on the
s3c2440?

davef
Not the same chip, but maybe useful reading:
http://www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO

Appears that Arora requires about 60Megs to load a blank page.  I suspect
adding another, perhaps unnecessary keyboard driver has pushed it over the
top.  I possibly added unnecessary drivers because of the lengthy re-build
process.  

Will now try using an SD card with some swap space.

davef
Do you know what the Linux Touch Panel driver is for?  Do you need it for
the touchscreen on the mini2440?

bluscape
Where is that dave? Could you indicate to me where you selected that?

davef
qt --->
  mouse drivers --->

PTXCONF_QT4_MOUSE_LINUXTP

bluscape
from Juergen himself:

Driver selection for Qt:

Graphics & Multimedia --->
 qt --->
 graphics driver --->
   LinuxFb (none   ) <<< select "builtin" here instead of "none"
 keyboard drivers  --->
   [*] Linux Input  <<< enable this if you want to use the key buttons on
the
                        Mini2440
 mouse drivers  --->
   [*] Tslib  <<< you already did

davef
I was trying to get the USB mouse to work in conjunction with the
touchscreen.  In a previous browser application and in the exports for
tslib I found a command that allowed this.

I will deselect some of the options in Qt.

Linux input . . . just enables the key buttons on the dev board.  OK, looks
like I don't need this as well.

Thanks,
Dave

prathap
hey i'm Building the OSELAS.Toolchain for
OSELAS.BSP-Pengutronix-Mini2440-2013.10.0

when type on command ptxdist select ptxconfigs/&#8629;
i'm getting error like this plz help me . i'm very new to this

cannot select
  'ptxconfigs/'
  does not exist, or is not a file.

Juergen Beisert
Try "ptxdist select
ptxconfigs/arm-v4t-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6
-sanitized.ptxconfig"
instead.

The 'arrow' after the "ptxconfigs/" in the manual just mean: continue
typing with the content on the next line. Sorry, but the pages in the
manual are not wide enough to print the whole command in one line.

Jawad Tarawneh
Dear Sirs;
I have Phycore-OMAP4460 development board and ubuntue 13.04 version. When i
tried to execute this command "ptxdist go", i get the following error :

error: The ptxconfig file version and ptxdist version do not match: 
configfile version: 2011.11.0 
ptxdist version: 2013.01.0 
You can either migrate from an older ptxdist release with: 
'ptxdist migrate' 
or, to ignore this error, add '--force' 
to ptxdist's parameters, e.g.: 
'ptxdist --force go' 


How can I solve this problem, Please.

Thank You;

davef
Throw <ptxdist migrate> into the search engine on these sites:

http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

http://blog.gmane.org/gmane.comp.embedded.ptxdist.devel

Jawad
Dear Sir/Sirs,
I need to reduce i2c-3 bus speed from 400kHz to 100kHz. I modify
"board-omap4pcm049.c" file, but when i use ptxdist-2013.01.0 go
command,there is nothing to be happened. what should i do to recompile and
rebuild the kernel after modifying the board source file.

Note :i am using Phytec 1348.2 board with phycore omap4460

Thank You;

davef
I think it would be better to ask this question here:

http://blog.gmane.org/gmane.comp.embedded.ptxdist.devel

although I see that the site is currently not available.

After you modify a file you need to a ptxdist clean  then ptxdist go.

If the file you modify is associated with app you can do a:
ptxdist clean msmtp (for example) and ptxdist go that way it happens
faster.

You seem to be modifying a file that might required a complete rebuild.

Good luck! 

Perhaps a read through their How to be a PTXdist Guru might be useful.