Qtopia Home · Home · Reference · User Guide · Internals

Image, prefix and SDK location


Qtopia versions prior to 4.2 used -prefix in the same way that Qt uses it. It carried a double meaning, specifying both the image and the prefix (which is hardcoded into libQtCore.so). To work around the fact that you don't usualy want these locations to be the same on an embedded system, you could override the image location by running make install PREFIX=/somewhere/else.

When building an SDK, you also had to override PREFIX so that the binaries would end up in the correct location. A significant drawback to this approach is that the build tree must have a longer path than the SDK location (because the binaries are patched to use the SDK location).

The Qtopia 4.2.0 solution

To reduce confusion and to enable a smoother install process, the three locations are now specified explicitly to configure. The switches are -image, -prefix and -sdk. Specifying -image will give the same behaviour as -prefix in prior versions because the prefix location defaults to the image location.

If the -sdk parameter is not passed (or you pass -sdk <build>) then make sdk does not work. This is because you cannot change the location an SDK will be installed to and you cannot install an SDK to the build tree. You can use the build tree in the same way that you would use an SDK. When you do pass -sdk to configure, make sdk is implcitly run when you run make install because the host binaries have SDK/qtopiacore/host/lib added to their RPATH and they will fail to find their libraries if the SDK has not been created. It is still possible to override the image location when you run make install. You must now run make install IMAGE=/somewhere/else. This facility remains becase it is required by make packages.

Qtopia 4.2.5, relocating the SDK

Qtopia 4.2.5 added the ability to relocate the SDK. This is still not available if you do not pass the -sdk parameter (or if you pass -sdk <build>). Details can be found in Installing into a sandbox.

Summing it up

For reference, the following table lists the locations for the SDK, IMAGE and PREFIX in a variety of situations.

Qtopia 4.1
configure -prefix /Qtopia<build>/Qtopia/Qtopia
make install PREFIX=/foounchanged/foounchanged
make sdk PREFIX=/bar/barunchangedunchanged
Qtopia 4.2
configure<build><build>/imageIMAGE (<build>/image)
configure -prefix /Qtopia<build><build>/image/Qtopia
configure -image /Qtopia<build>/QtopiaIMAGE (/Qtopia)
configure -sdk /sdk -image /image -prefix /prefix/sdk/image/prefix
make install IMAGE=/foounchanged/foounchanged
Qtopia 4.2.5
configure -sdk /sdk -image /image -prefix /prefix/sdk/image/prefix
make sdk SDKSANDBOX=/foo/foo/sdkunchangedunchanged

See also Overviews.

Copyright © 2008 Nokia Qtopia Build System Documentation