Presentation is loading. Please wait.

Presentation is loading. Please wait.

Videolösungen © DResearch 2009 The build framework for embedded Linux Thilo Fromm, März 2010.

Similar presentations


Presentation on theme: "Videolösungen © DResearch 2009 The build framework for embedded Linux Thilo Fromm, März 2010."— Presentation transcript:

1 Videolösungen © DResearch 2009 The build framework for embedded Linux Thilo Fromm, März 2010

2 Videolösungen © DResearch 2009 Agenda Classification and Overview Technology Build Commands Recipes “research agenda” by “optimal tweezers”, cc-by-a, from http://www.flickr.com/photos/jwdill/3213617446/

3 Videolösungen © DResearch 2009 Classification: what is OpenEmbedded? “Fruit on Parade” by davekentuk, cc-by-a-nd, from http://www.flickr.com/photos/davekentuk/3682789819/

4 Videolösungen © DResearch 2009 OpenEmbedded != make OpenEmbedded != autotools OpenEmbedded > ant OpenEmbedded ≈ maven Classification: what is OpenEmbedded?

5 Videolösungen © DResearch 2009 Powerful build system + comprehensive collection of recipes “Construction” by cyrillicus, cc-by-a-nd, http://www.flickr.com/photos/ksiniy/1079381730/; “Cookbooks” by Jami Dwyer, cc-by-a, http://www.flickr.com/photos/jamidwyer/2092331887/http://www.flickr.com/photos/ksiniy/1079381730/ Classification: what is OpenEmbedded?

6 Videolösungen © DResearch 2009 Overview – what does it do? “Men at work sign” by Jeremy Burgin, cc-by-a, from http://www.flickr.com/photos/jburgin/2981622208/

7 Videolösungen © DResearch 2009 Provide a Cross Toolchain “Studley Tool Chest” by “public.resource.org”, cc-by-a, from http://www.flickr.com/photos/publicresourceorg/493813720/ cross compiler, cross development sandbox from scratch

8 Videolösungen © DResearch 2009 Resolve Build Dependencies “Ruby 1.8.4 grammar dependency graph” by nicksieger, cc-by-a, from http://www.flickr.com/photos/nicksieger/280661836/ Application → High Level Libraries → Base System Libraries

9 Videolösungen © DResearch 2009 Automated Source Package Download “Fully Loaded Bike” by “vipworld”, cc-by-a, from http://www.flickr.com/photos/vipworld/1336063127/ Releases via HTTP, Snapshots from SVN, etc.

10 Videolösungen © DResearch 2009 Software (cross) Build “Construction site” by Matti Mattila, cc-by-a, from http://www.flickr.com/photos/mattimattila/3602654187/ Autotools configure, make, then installation in a sandbox

11 Videolösungen © DResearch 2009 Binary Software Packaging “Books in Hall — So Many!” by “Editor B”, cc-by-a, from http://www.flickr.com/photos/editor/4123272431/ With dependency tracking

12 Videolösungen © DResearch 2009 Technology “Atlas” by Ethan Hein, cc-by-a, from http://www.flickr.com/photos/ethanhein/2293062616/

13 Videolösungen © DResearch 2009 bitbake bb recipes

14 Videolösungen © DResearch 2009 bitbake bb recipes http://

15 Videolösungen © DResearch 2009 bitbake bb recipes GNU autotools GNU make http:// qmake

16 Videolösungen © DResearch 2009 bitbake bb recipes GNU autotools GNU make http:// qmake opkg

17 Videolösungen © DResearch 2009 bitbake bb recipes GNU autotools GNU make #!/bin/bash http:// qmake opkg

18 Videolösungen © DResearch 2009 It's a Build Framework And a Distribution Builder Highly FOSS Project compatible (autotools etc.) Numerous FOSS Applications already integrated

19 Videolösungen © DResearch 2009 Build Commands “USACE continues construction on forward operating site in Bulgaria” by “USACE Europe District”, cc-by-a, http://www.flickr.com/photos/europedistrict/3884707790/

20 Videolösungen © DResearch 2009 Full Build w/ Dependencies $ bitbake bacula-client NOTE: Handling BitBake files: - (8091/8091) [100 %] NOTE: Parsing finished. 7418 cached, 340 parsed, 333 skipped, 0 masked... NOTE: Running task 525 of 526 (ID: 14, /.../bacula/bacula-client_1.38.11.bb, do_package_stage_all) NOTE: Running task 526 of 526 (ID: 0, /.../bacula/bacula-client_1.38.11.bb, do_build) NOTE: Tasks Summary: Attempted 526 tasks of which 509 didn't need to be rerun and 0 failed.

21 Videolösungen © DResearch 2009 Direct Build w/o Dependencies $ bitbake -b recipes/bacula/bacula-client_1.38.11.bb NOTE: Preparing runqueue NOTE: Executing runqueue NOTE: Tasks Summary: Attempted 17 tasks of which 17 didn't need to be rerun and 0 failed.

22 Videolösungen © DResearch 2009 Run a specific Build Stage $ bitbake bacula-client -c fetch $ bitbake -b recipes/bacula/bacula-client_1.38.11.bb -c build $ bitbake -b recipes/bacula/bacula-client_1.38.11.bb -c clean $ bitbake linux -c devshell

23 Videolösungen © DResearch 2009 Build a portable Cross Toolchain for Compile Hosts $ bitbake meta-toolchain

24 Videolösungen © DResearch 2009 Recipes (“metadata”) “IMGP2863” by “AlphaTangoBravo / Adam Baker”, cc-by-a, from http://www.flickr.com/photos/atbaker/1998298856/

25 Videolösungen © DResearch 2009 simple bitbake recipe 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd"

26 Videolösungen © DResearch 2009 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd" Dependency Definition

27 Videolösungen © DResearch 2009 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd" Package Source

28 Videolösungen © DResearch 2009 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd" “configure” stage extra parameters

29 Videolösungen © DResearch 2009 Some popular Build Stages fetch unpack patch configure compile populate_staging install package package_write

30 Videolösungen © DResearch 2009 $ bitbake -b common/recipes/drstorage/drstorage_svn.bb -c listtasks do_build do_devshell do_fetchall do_recipe_sanity_all do_cleanall do_distclean do_qa_staging do_distsrcall do_listtasks do_package_update_index_ipk do_package_stage_all do_mrproper do_fetch do_checkuri do_clean do_populate_staging do_package do_package_stage do_install do_recipe_sanity do_package_write_ipk do_rebuild do_configure do_setscene do_distribute_sources do_qa_configure do_patch do_compile do_buildall do_unpack do_distribute_sources_all do_package_write do_checkuriall Build Stage Tasks

31 Videolösungen © DResearch 2009 So where are the task definitions? 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd"

32 Videolösungen © DResearch 2009 1 DESCRIPTION = "Bacula file daemon. Bacula is a network based backup program" 2 SECTION = "console/network" 3 PRIORITY = "optional" 4 HOMEPAGE = "http://www.bacula.org" 5 LICENSE = "GPL" 6 PR ="r1" 7 DEPENDS = "gmp openssl zlib readline" 8 9 SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \ 10 file://findlib-attribs.patch;patch=1;pnum=1 \ 11 file://bacula-fd.init" 12 13 S = "${WORKDIR}/bacula-1.38.11" 14 15 CCACHE = "" 16 17 inherit autotools update-rc.d 18 19 EXTRA_OECONF = "--enable-client-only --with-fd-user=root --with-fd-group=bacula" 20 INITSCRIPT_NAME = "bacula-fd" In a base class. Recipes are inheritable.

33 Videolösungen © DResearch 2009 1 do_configure () { 2 echo "configure step" 3 } Writing custom tasks - shell

34 Videolösungen © DResearch 2009 1 python do_configure () { 2 print "configure step" 3 } Writing custom tasks - python

35 Videolösungen © DResearch 2009 1 python do_annoy () { 2 print "BOOOOOOO!!!!" 3 } 4 5 addtask annoy before do_fetch Insert a task into the build stages

36 Videolösungen © DResearch 2009 Recipes are universal

37 Videolösungen © DResearch 2009 Simple Tasks (.bb) Doggie picture by “sruthi…N. Lol ”, from http://ihasahotdog.com/2009/04/03/funny-dog-pictures-goggie-park/

38 Videolösungen © DResearch 2009 Whole Applications (.bb) Remixed “PowerBook applications” by Don Nunn, cc-by-sa, from http://www.flickr.com/photos/donnunn/207330250/

39 Videolösungen © DResearch 2009 Classes (.class) “grade7 class11” by “Rivard”, cc-by-a-nd, from http://www.flickr.com/photos/rivard/74384523/

40 Videolösungen © DResearch 2009 Cross Toolchains “Studley Tool Chest” by “public.resource.org”, cc-by-a, from http://www.flickr.com/photos/publicresourceorg/493813720/ Portable, packaged Cross Compiler Toolchain for Compile Hosts

41 Videolösungen © DResearch 2009 Whole Platforms / Machines “Borgland Dolphin” by “Kristen462”, cc-by-sa, from http://www.flickr.com/photos/krister462/4146198197/

42 Videolösungen © DResearch 2009 Comprehensive Firmware Images “Freer Gallery Paintings” by “Mr.T in DC”, cc-by-a-nd, from http://www.flickr.com/photos/mr_t_in_dc/4191970931/

43 Videolösungen © DResearch 2009 And so much more “Planet Fort Point Channel (062/365)” by “rawheadrex”, cc-by-sa, from http://www.flickr.com/photos/rawhead/3326541913/sizes/o/

44 Videolösungen © DResearch 2009 http://docs.openembedded.org/usermanual/usermanual.html http://bitbake.berlios.de/manual/ RTFM “R.T.F.M” by “zteamie”, cc-by-a, from http://www.flickr.com/photos/zteamie/2640990555/

45 Videolösungen © DResearch 2009 Ready – Set – Go ! “Starting line” by Jon Marshall, cc-by-a, from http://www.flickr.com/photos/jon_marshall/260978898/ Run some software package builds Adopt a bitbake recipe for a FOSS project you need Add a recipe for your own FOSS project


Download ppt "Videolösungen © DResearch 2009 The build framework for embedded Linux Thilo Fromm, März 2010."

Similar presentations


Ads by Google