Bug 8136

Summary: Extensible SDK: ability to generate target packages in SDK
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Alexander Kanevskiy <alexander.kanevskiy>
Component: devtools / tool chainAssignee: Brendan Le Foll <brendan.le.foll>
Status: VERIFIED FIXED QA Contact: Costin <costin.c.constantin>
Severity: enhancement    
Priority: High CC: alexandru.c.georgescu, bluelightning, bogdanx.a.voiculescu, markus.lehtonen, meta.mr.watcher, meta.watcher, richard.purdie
Version: 1.9   
Target Milestone: 1.9 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Alexander Kanevskiy 2015-08-10 14:27:33 UTC
For developer story, by using SDK environment, developer should be able to produce binary package suitable to be published into binary package feed or installed on device.
Comment 1 Paul Eggleton 2015-09-24 15:13:32 UTC
This was implemented in master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7b1f670ca385c33db3687f07d305e3a1510cf181
Comment 2 Costin 2015-10-14 15:15:34 UTC
Hello,

Tested on master with d302c98822efe2cb78a63b620aed1b94b4ed4a68 on Ubuntu 15.04 os.

Steps performed:
1) bitbake -c populate_sdk_ext core-image-minimal
2) cd tmp/deploy/sdk/   and run the sdk generating script:
e.g. ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.0.sh
3) cd to resulting SDK directory and export the environment:
cd /home/cosscat/poky_sdk
. ./environment-setup-core2-64-poky-linux
4) create a directory with source code in it and use devtool to create a recipe:
cosscat@ubnt:~/poky_sdk/software$ ls
hellofunc.c  hellomake.c  hellomake.h  makefile
devtool add test ./software/
5) edit the resulting recipe:
cosscat@ubnt:~/poky_sdk/workspace/recipes/test$ pwd
/home/cosscat/poky_sdk/workspace/recipes/test
vi test.bb
...
do_compile () {
        # Specify compilation commands here
        make
}
do_install() {
    install -d ${D}/${bindir}
    install -m 0755 hello ${D}/${bindir}
}
...
6) perform the packaging with devtool:
devtool package test
7) verify the results:
cosscat@ubnt:~/poky_sdk/tmp/deploy/rpm/core2_64$ ls test*
test-1.0-r0.core2_64.rpm  test-dbg-1.0-r0.core2_64.rpm  test-dev-1.0-r0.core2_64.rpm
cosscat@ubnt:~/poky_sdk/tmp/deploy/rpm/core2_64$ rpm -qlp test-1.0-r0.core2_64.rpm
/usr
/usr/bin
/usr/bin/hellomake


Marking as verified