Bug 8136 - Extensible SDK: ability to generate target packages in SDK
Summary: Extensible SDK: ability to generate target packages in SDK
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: High enhancement
Target Milestone: 1.9 M3
Assignee: Brendan Le Foll
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-08-10 14:27 UTC by Alexander Kanevskiy
Modified: 2015-10-14 15:15 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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