Introduction Buildroot Buildroot overview Br2-external Additional infrastructure Making embedded Linux easy? Conclusion A real-life example. Yann E. MORIN <yann.morin@orange.com> Embedded Linux Conference Europe 2017
About me Introduction Context Team Build environment 2
About me "Yann E. MORIN" <yann.morin@orange.com> The other "Yann E. MORIN" Linux Linux Embedded Embedded Security Realtime Network Security FLOSS Network FLOSS 3
Context Targets: STB, STB-like Team Difgerent generations Three teams, ~30 developers Two geographical locations Performance R&D vs. production Application developers Inherit constraints Not all Linux experts Part of the fjrmware Not all embedded experts Not the main part Aggregation of multiple third-parties External integrator Complete rewrite from scratch 4
Choosing a development environment – Late 2013 Requirements OpenEmbedded Generic buildsystem Distribution generator Very versatile, highly customisable Target agnostic Run-time agnostic Steep learning curve Easy to learn and use No in-house knowledge No build-time overhead Existing solution Buildroot Not my choice! Firmware generator Flexible, extendable (BR2_EXTERNAL!) Moderate (leaning to easy) learning curve SoftCo SDK In-house knowledge Dedicated to the production devices Very specifjc, very custom Others: OpenWrt, OE-lite, PTXdist... Much smaller communities (!OpenWrt) 5 Not really investigated, no in-house knowledge
Quick introduction Buildroot Build sequence Package infrastructure overview Br2-external 6
Buildroot overview - Quick Introduction Buildroot # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Is a simple, effjcient and easy-to-use tool to # l p e g # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # generate embedded Linux systems through L P E G _ V E R S I O N = 1 . 0 . 1 - 1 cross-compilation L P E G _ L I C E N S E = M I T Is entirely community-driven $ ( e v a l $ ( l u a r o c k s - p a c k a g e ) ) Uses kconfjg-driven confjguration # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Uses Makefjles # f p i n g # Has a website https://buildroot.org/ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # F P I N G _ V E R S I O N = 4 . 0 Has a manual https://buildroot.org/manual.html F P I N G _ S I T E = h t t p : / / f p i n g . o r g / d i s t F P I N G _ L I C E N S E = B S D - l i k e F P I N G _ L I C E N S E _ F I L E S = C O P Y I N G Is fun! $ ( e v a l $ ( a u t o t o o l s - p a c k a g e ) ) 7
Buildroot overview – Build sequence install toolchain (package) confjgure, build, Buildroot overall build sequence install package Build packages, in sequence ... ... Dependency chain Finalise target ... ... Cleanups: .a .la .h man... Stripping ... Generate the fjlesystem image(s) confjgure, build, install package A tarball is a fjlesystem image ;-) target-fjnalize hooks cleanups, stripping Extras overlays post-build scripts target-fjnalize hooks post-build, fakeroot, post-image scripts fakeroot scripts generate fjlesystems post-image scripts 8
Buildroot overview – Package infrastructure pre-hook download post-hook Buildroot package infrastructure pre-hook Download extract post-hook Extract Patch pre-hook pre-hook patch rsync Confjgure post-hook post-hook Build pre-hook [Install in staging/] confjgure post-hook Install in target/ pre-hook build Extras post-hook Local rsync during development pre-hook pre-hook Pre- and post-hooks for each step staging install target install post-hook post-hook 9
Buildroot overview - BR2_EXTERNAL Local extensions Extensibility Without touching the Buildroot tree Defconfjgs For proprietary packages Packages Staging area before upstreaming Filesystems Access to all of Buildroot infrastructures Bootloaders Stackable Board fjles Extra logic 10
Warming-up Br2-external Buildroot Defconfjgs Packages Filesystems Board fjles Extra logic 11
BR2_EXTERNAL - Warming-up Local customisations $ l s - h l F - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 C o n f i g . i n - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 e x t e r n a l . m k 12
BR2_EXTERNAL - Buildroot Local customisations $ l s - h l F d r w x r w x r - x 1 3 y m o r i n y m o r i n 4 . 0 K A u g 2 9 1 5 : 5 7 b u i l d r o o t / Buildroot as a git submodule - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 C o n f i g . i n - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 e x t e r n a l . m k 13
BR2_EXTERNAL - Defconfjgs Local customisations $ l s - h l F d r w x r w x r - x 1 3 y m o r i n y m o r i n 4 . 0 K A u g 2 9 1 5 : 5 7 b u i l d r o o t / Buildroot as a git submodule d r w x r w x r - x 2 y m o r i n y m o r i n 4 . 0 K S e p 1 2 0 8 : 5 2 c o n f i g s / - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 C o n f i g . i n - r w - r w - r - - 1 y m o r i n y m o r i n 0 S e p 1 2 0 8 : 4 9 e x t e r n a l . m k New confjgurations $ l s - h l F c o n f i g s / - r w - r w - r - - 1 y m o r i n y m o r i n 4 . 0 K S e p 1 2 0 8 : 5 2 b o a r d 1 _ d e v _ d e f c o n f i g - r w - r w - r - - 1 y m o r i n y m o r i n 3 . 2 K S e p 1 2 0 8 : 5 2 b o a r d 1 _ e 2 e _ d e f c o n f i g - r w - r w - r - - 1 y m o r i n y m o r i n 3 . 0 K S e p 1 2 0 8 : 5 2 b o a r d 1 _ p r o d _ d e f c o n f i g - r w - r w - r - - 1 y m o r i n y m o r i n 4 . 2 K S e p 1 2 0 8 : 5 2 b o a r d 2 _ d e v _ d e f c o n f i g - r w - r w - r - - 1 y m o r i n y m o r i n 3 . 3 K S e p 1 2 0 8 : 5 2 b o a r d 2 _ e 2 e _ d e f c o n f i g - r w - r w - r - - 1 y m o r i n y m o r i n 3 . 1 K S e p 1 2 0 8 : 5 2 b o a r d 2 _ p r o d _ d e f c o n f i g 14
Recommend
More recommend