From 436d7da2df7ca8a8ed92ee174c91b05033d758fa Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 11 Aug 2009 09:51:45 +0200 Subject: usermanual: Start a chapter on how to build your own SDK. --- docs/usermanual/chapters/common_use_cases.xml | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) (limited to 'docs/usermanual/chapters') diff --git a/docs/usermanual/chapters/common_use_cases.xml b/docs/usermanual/chapters/common_use_cases.xml index 241eb5318b..2c693c681c 100644 --- a/docs/usermanual/chapters/common_use_cases.xml +++ b/docs/usermanual/chapters/common_use_cases.xml @@ -402,4 +402,117 @@ ASSUME_SHLIBS = "libqtopia2.so.2:qtopia2_2.4 libc.so.6:libc" This section is a stub, help us by expanding it + +
+ Creating Software Development Kits (SDKs) + +
+ What is provided by a SDK + + The Software Development Kit (SDK) should be easy to install and + enable your userbase to create binaries and libraries that work on the + target hardware. + + + To accomplish this goal OpenEmbedded SDKs contain tools for the + host and tools for the target hardware. Among these tools is a cross + compiler, libraries and header files for additional dependencies, pkg-config + files to allow buildsystems to easily find the dependencies, a file with + results for autoconf and a script that can be sourced to setup the + environment. + +
+ +
+ Creating a SDK with your libraries pre-installed + +
+ Preparing the host side + Your SDK might need utilities that will run on the + host. These could include scripts, buildsystem software like + cmake, or an emulator like qemu. For these dependencies it is + imported that they inherit sdk and by + convention end with -sdk in the + PN. + + + A new task should be created that will assure that all + host utilities will be installed. Place a file called + task-YOUR-toolchain-host.bb in the + recipes/tasks directory and place the + following content in it: + +require task-sdk-host.bb +DESCRIPTION = "Host packages for YOUR SDK" +LICENSE = "MIT" +ALLOW_EMPTY = "1" +RDEPENDS_${PN} += "YOUR-DEPENDENCY-sdk" + + +
+ +
+ Preapring the target side + Your SDK should provide your user with header files and libraries + he will need when doing application development. In OpenEmbedded the + ${PN}-dev isi providing the header files, pkg-config + files and symbolic links to libraries to allow using the library. The SDK + should install these development packages to the SDK. + + + To install the development packages you will need to create a + new task. Create a new file task-YOUR-toolchain-target.bb + in the recipes/tasks directory and place the + following content in it: + +DESCRIPTION = "Target package for YOUR SDK" +LICENSE = "MIT" +ALLOW_EMPTY = "1" + +PR = "r0" + +RDEPENDS_${PN} += "\ + task-sdk-bare \ + your-lib-dev \ + your-data + " + + +
+ +
+ Putting it together + In the previous two sections we have prepared the host and + target side. One thing that is missing is combining the two newly + created tasks and actually create the SDK. This is what we are going + to do now. + + Create meta-toolchain-YOU.bb in the + recipes/meta directory and place the following + content in it: + +PR = "r0" +TOOLCHAIN_TARGET_TASK = "task-YOUR-toolchain-target" +TOOLCHAIN_HOST_TASK = "task-YOUR-toolchain-host" + +require meta-toolchain.bb +SDK_SUFFIX = "toolchain-YOUR" + + + + + Using bitbake meta-toolchain-YOU the SDK + creation should be started and you should find a sdk + directory inside your deploy directory with a SDK waiting for you. With + the above command you still need to have OE configured with your + conf/local.conf to select the machine and + distribution you are targetting. + + + SDK creation currently does not work with the DISTRO + set to micro. +
+
+ +
-- cgit v1.2.3