SlideShare a Scribd company logo
1 of 22
Download to read offline
fperrad@fpw2014
Perl on embedded Linux
with BuildRoot (40’)
François Perrad
francois.perrad@gadz.org
fperrad@fpw2014
OLinuXino iMX233 Board
fperrad@fpw2014
OLinuXino iMX233 Board
 Features
 Freescale i.MX233 @ 454MHz
 ARM926J Core (ARMv5)
 RAM 64 Mb
 microSD card connector
 Ethernet 100 Mbit
 2 USB Host
 TV video ouput, 40 pin GPIO
 Arch Linux ARM support
 Olimex Ltd, a Bulgarian company
 Schematic Open Source (like Arduino)
 45 €
fperrad@fpw2014
BuildRoot Project
 Created in 2001 by uClibc dev. for testing
 Around 2005, becomes an independant
build system for embedded linux device
 Peter Korsgaard, maintainer since 2009
 Scheduled releases every 3 months
 300+ contributors
 1000+ packages
 Homepage : buildroot.net
 Well documented (manual)
 Git repository:
http://git.buildroot.net/buildroot/tree/
 Mailing list : buildroot@busybox.net
 GPL v2 Licence
fperrad@fpw2014
BuildRoot aims
 BR is a build system which configures/build
all components of an embedded Linux
system
 Cross toolchain
 Bootloader (U-Boot, Barebox, …)
 Linux kernel
 Userland libraries & applications
 Rootfs image
 from sources (fetched by BR), with your
configuration choices and in a reproductible
way
 The minimal system contains only the Linux
Kernel and Busybox
 BuildRoot is easily usable and customizable
fperrad@fpw2014
BuildRoot aims
 Many architectures :
 x86, x86_64, ARM, MIPS, PowerPC, NIOS,
microblaze
 Many toolchains :
 Linaro, Sourcery CodeBench, …
 Many C librairies (with internal
toolchain) :
 uClibc
 glibc
 eglibc
 musl
fperrad@fpw2014
BuildRoot Technos
 Makefile (gmake)
 Kconfig language
Documentation/kbuild/kconfig-language.txt
 Patch
 Bash
 Git (format-patch, send-email, …)
fperrad@fpw2014
Package example
 Config.in
config BR2_PACKAGE_GZIP
bool "gzip"
depends on BR2_USE_WCHAR
help
Standard GNU compressor.
Provides things like gzip, gunzip, gzcat, e
http://www.gnu.org/software/gzip/gzip.html
comment "gzip needs a toolchain w/ wchar"
depends on !BR2_USE_WCHAR
fperrad@fpw2014
Package example
 gzip.mk
GZIP_VERSION = 1.6
GZIP_SOURCE = gzip-$(GZIP_VERSION).tar.xz
GZIP_SITE = $(BR2_GNU_MIRROR)/gzip
GZIP_LICENSE = GPLv3+
GZIP_LICENSE_FILES = COPYING
$(eval $(autotools-package))
fperrad@fpw2014
Package example
fperrad@fpw2014
Perl History in BR
 2009.02 : microperl 5.8.8
 2012.05 : microperl 5.12.4
 2012.11 : perl 5.16.1
 2013.02 : perl 5.16.2
 2013.05 : perl 5.16.3
 2013.11 : perl 5.18.1
 2014.02 : perl 5.18.2
 2014.05 : CPAN infrastructure
fperrad@fpw2014
Perl-Cross project
 Perl-Cross provides alternative configure
script (bash), top-level Makefile, and some
auxilliary files
 Started in 2009
 Used in BR since 2012, with series 5.16 and
5.18
 Alex Suykov
 single author (and single point of failure)
 5.20 ? 5.2x ?
 Homepage http://arsv.github.io/perl-cross/
 Previously on http://perlcross.berlios.de/
fperrad@fpw2014
Perl with BR
fperrad@fpw2014
Perl with BR
fperrad@fpw2014
CPAN infrastructure
 package/pkg-perl.mk
 target & host package
 Makefile.PL & Build.PL
 Configure, Build, Install
 Use BR infrastructure for download,
extract, patch
 support/scripts/scancpan
 Populates Perl packages with
dependencies and metadata fetched
from https://metacpan.org/
 Perl script using MetaCPAN-API-Tiny
fperrad@fpw2014
Perl package example
 Config.in
config BR2_PACKAGE_PERL_DATETIME
bool "perl-datetime"
select BR2_PACKAGE_PERL_DATETIME_LOCALE
select BR2_PACKAGE_PERL_DATETIME_TIMEZONE
select BR2_PACKAGE_PERL_PARAMS_VALIDATE
select BR2_PACKAGE_PERL_TRY_TINY
help
A date and time object
 perl-datetime.mk
PERL_DATETIME_VERSION = 1.10
PERL_DATETIME_SOURCE = DateTime-$(PERL_DATETIME_VERSION).tar.gz
PERL_DATETIME_SITE = $(BR2_CPAN_MIRROR)/authors/id/D/DR/DROLSKY/
PERL_DATETIME_DEPENDENCIES = perl host-perl-module-build perl-
datetime-locale perl-datetime-timezone perl-params-validate perl-
try-tiny
PERL_DATETIME_LICENSE = artistic_2
$(eval $(perl-package))
fperrad@fpw2014
Dancer2 demo
 Busybox, Dropbear (ssh), ntp, Perl
 Dancer2, GD, DateTime
 74 target packages
 21 host packages
 ExtUtils::MakeMaker, Module::Build,
Module::Build::Tiny
 60.3 MB used on disk
 Dancer2 is a good test for the BR
infrastructure, but not the best Web
framework for this kind of target
fperrad@fpw2014
Dancer2 demo
fperrad@fpw2014
Demo recipe
 All stuff on Github :
https://github.com/fperrad/br/tree/dancer2
 Build
$ make defconfig
BR2_EXTERNAL=dancer2
BR2_DEFCONFIG=dancer2/configs/olimex_imx233_olinuxino_defcon
$ make
 Flashing in SD card
$ umount /dev/mmcblk0p2
$ sudo dd if=output/images/imx23_olinuxino_dev_linux.sb
bs=512 of=/dev/mmcblk0p1 seek=4
$ sudo dd if=output/images/rootfs.ext2 of=/dev/mmcblk0p2
bs=512
$ sync
fperrad@fpw2014
Working with Qemu system
 Working without hardware target
 BR has many defconfig for Qemu
$ make qemu_x86_defconfig
$ make gconfig
$ make
$ qemu-system-i386 -M pc -kernel
output/images/bzImage -drive
file=output/images/rootfs.ext2,if=ide
-append root=/dev/sda -net
nic,model=rtl8139 -net user
 Next step ? VirtualBox or VmWare
fperrad@fpw2014
Testing on Target
 BuildRoot doesn’t handle the test step
 My way :
 Copy the whole build tree (130 MB) on the target
 Then :
 (remember no make, no toolchain, …)
$ cd t
$ ln –s ../perl perl
$ ./perl harness
 256 MB of RAM required
 Impossible on real target OLinuXino
 With qemu-system-arm
 Take 6 hours or more
 Many patches for test suite
 merged in perl 5.20.0
fperrad@fpw2014
Bibliography / Webography
 http://www.buildroot.net/
 https://www.olimex.com/Products/OLin
uXino/iMX233/
 http://archlinuxarm.org/
 http://arsv.github.io/perl-cross/
 https://github.com/fperrad/br/tree/danc
er2

More Related Content

What's hot

How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1Naoto MATSUMOTO
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의Juhong Jung
 
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHenry Schreiner
 
Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by OpenstackMarton Kiss
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux AwarenessPeter Griffin
 
Introduction to Gstreamer
Introduction to GstreamerIntroduction to Gstreamer
Introduction to GstreamerRand Graham
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
Introduction GStreamer
Introduction GStreamerIntroduction GStreamer
Introduction GStreamerShih-Yuan Lee
 
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)Sam Kim
 
Explorando Go em Ambiente Embarcado
Explorando Go em Ambiente EmbarcadoExplorando Go em Ambiente Embarcado
Explorando Go em Ambiente EmbarcadoAlvaro Viebrantz
 
Deploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuDeploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuJ.J. Ciarlante
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Sam Kim
 
UDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIIUDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIINEEVEE Technologies
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpnAshwajit Maske
 
Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7Sam Kim
 
Low Overhead System Tracing with eBPF
Low Overhead System Tracing with eBPFLow Overhead System Tracing with eBPF
Low Overhead System Tracing with eBPFAkshay Kapoor
 
IL: 失われたプロトコル
IL: 失われたプロトコルIL: 失われたプロトコル
IL: 失われたプロトコルRyousei Takano
 
Rtl sdr software defined radio
Rtl sdr   software defined radioRtl sdr   software defined radio
Rtl sdr software defined radioEueung Mulyana
 

What's hot (20)

How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의
 
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
 
Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by Openstack
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
 
Introduction to Gstreamer
Introduction to GstreamerIntroduction to Gstreamer
Introduction to Gstreamer
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
packaging
packagingpackaging
packaging
 
Introduction GStreamer
Introduction GStreamerIntroduction GStreamer
Introduction GStreamer
 
Readme
ReadmeReadme
Readme
 
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
 
Explorando Go em Ambiente Embarcado
Explorando Go em Ambiente EmbarcadoExplorando Go em Ambiente Embarcado
Explorando Go em Ambiente Embarcado
 
Deploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuDeploying Prometheus stacks with Juju
Deploying Prometheus stacks with Juju
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 
UDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIIUDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIII
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
 
Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7
 
Low Overhead System Tracing with eBPF
Low Overhead System Tracing with eBPFLow Overhead System Tracing with eBPF
Low Overhead System Tracing with eBPF
 
IL: 失われたプロトコル
IL: 失われたプロトコルIL: 失われたプロトコル
IL: 失われたプロトコル
 
Rtl sdr software defined radio
Rtl sdr   software defined radioRtl sdr   software defined radio
Rtl sdr software defined radio
 

Similar to Perl on embedded Linux with Buildroot‎

Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zeroSoheilSabzevari2
 
Chromium Sandbox on Linux (NDC Security 2019)
Chromium Sandbox on Linux (NDC Security 2019)Chromium Sandbox on Linux (NDC Security 2019)
Chromium Sandbox on Linux (NDC Security 2019)Patricia Aas
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsGergely Szabó
 
Chromium Sandbox on Linux (BlackHoodie 2018)
Chromium Sandbox on Linux (BlackHoodie 2018)Chromium Sandbox on Linux (BlackHoodie 2018)
Chromium Sandbox on Linux (BlackHoodie 2018)Patricia Aas
 
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)Patricia Aas
 
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...Patricia Aas
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratchjoshuasoundcloud
 
Linux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxLinux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxPatricia Aas
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)Naoto MATSUMOTO
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup晓东 杜
 
Debugging Hung Python Processes With GDB
Debugging Hung Python Processes With GDBDebugging Hung Python Processes With GDB
Debugging Hung Python Processes With GDBbmbouter
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdockerJaehwa Park
 
Rust & Python : Python WA October meetup
Rust & Python : Python WA October meetupRust & Python : Python WA October meetup
Rust & Python : Python WA October meetupJohn Vandenberg
 

Similar to Perl on embedded Linux with Buildroot‎ (20)

Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
 
Chromium Sandbox on Linux (NDC Security 2019)
Chromium Sandbox on Linux (NDC Security 2019)Chromium Sandbox on Linux (NDC Security 2019)
Chromium Sandbox on Linux (NDC Security 2019)
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native Environments
 
SPDK benchmark memo
SPDK benchmark memoSPDK benchmark memo
SPDK benchmark memo
 
Chromium Sandbox on Linux (BlackHoodie 2018)
Chromium Sandbox on Linux (BlackHoodie 2018)Chromium Sandbox on Linux (BlackHoodie 2018)
Chromium Sandbox on Linux (BlackHoodie 2018)
 
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)
Linux Security APIs and the Chromium Sandbox (SwedenCpp Meetup 2017)
 
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...
Linux Security and How Web Browser Sandboxes Really Work (Security Researcher...
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
App container rkt
App container rktApp container rkt
App container rkt
 
Linux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxLinux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium Sandbox
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
curl --http3 cheatsheet
curl --http3 cheatsheetcurl --http3 cheatsheet
curl --http3 cheatsheet
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup
 
Debugging Hung Python Processes With GDB
Debugging Hung Python Processes With GDBDebugging Hung Python Processes With GDB
Debugging Hung Python Processes With GDB
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdocker
 
Rust & Python : Python WA October meetup
Rust & Python : Python WA October meetupRust & Python : Python WA October meetup
Rust & Python : Python WA October meetup
 

Recently uploaded

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Recently uploaded (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Perl on embedded Linux with Buildroot‎

  • 1. fperrad@fpw2014 Perl on embedded Linux with BuildRoot (40’) François Perrad francois.perrad@gadz.org
  • 3. fperrad@fpw2014 OLinuXino iMX233 Board  Features  Freescale i.MX233 @ 454MHz  ARM926J Core (ARMv5)  RAM 64 Mb  microSD card connector  Ethernet 100 Mbit  2 USB Host  TV video ouput, 40 pin GPIO  Arch Linux ARM support  Olimex Ltd, a Bulgarian company  Schematic Open Source (like Arduino)  45 €
  • 4. fperrad@fpw2014 BuildRoot Project  Created in 2001 by uClibc dev. for testing  Around 2005, becomes an independant build system for embedded linux device  Peter Korsgaard, maintainer since 2009  Scheduled releases every 3 months  300+ contributors  1000+ packages  Homepage : buildroot.net  Well documented (manual)  Git repository: http://git.buildroot.net/buildroot/tree/  Mailing list : buildroot@busybox.net  GPL v2 Licence
  • 5. fperrad@fpw2014 BuildRoot aims  BR is a build system which configures/build all components of an embedded Linux system  Cross toolchain  Bootloader (U-Boot, Barebox, …)  Linux kernel  Userland libraries & applications  Rootfs image  from sources (fetched by BR), with your configuration choices and in a reproductible way  The minimal system contains only the Linux Kernel and Busybox  BuildRoot is easily usable and customizable
  • 6. fperrad@fpw2014 BuildRoot aims  Many architectures :  x86, x86_64, ARM, MIPS, PowerPC, NIOS, microblaze  Many toolchains :  Linaro, Sourcery CodeBench, …  Many C librairies (with internal toolchain) :  uClibc  glibc  eglibc  musl
  • 7. fperrad@fpw2014 BuildRoot Technos  Makefile (gmake)  Kconfig language Documentation/kbuild/kconfig-language.txt  Patch  Bash  Git (format-patch, send-email, …)
  • 8. fperrad@fpw2014 Package example  Config.in config BR2_PACKAGE_GZIP bool "gzip" depends on BR2_USE_WCHAR help Standard GNU compressor. Provides things like gzip, gunzip, gzcat, e http://www.gnu.org/software/gzip/gzip.html comment "gzip needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR
  • 9. fperrad@fpw2014 Package example  gzip.mk GZIP_VERSION = 1.6 GZIP_SOURCE = gzip-$(GZIP_VERSION).tar.xz GZIP_SITE = $(BR2_GNU_MIRROR)/gzip GZIP_LICENSE = GPLv3+ GZIP_LICENSE_FILES = COPYING $(eval $(autotools-package))
  • 11. fperrad@fpw2014 Perl History in BR  2009.02 : microperl 5.8.8  2012.05 : microperl 5.12.4  2012.11 : perl 5.16.1  2013.02 : perl 5.16.2  2013.05 : perl 5.16.3  2013.11 : perl 5.18.1  2014.02 : perl 5.18.2  2014.05 : CPAN infrastructure
  • 12. fperrad@fpw2014 Perl-Cross project  Perl-Cross provides alternative configure script (bash), top-level Makefile, and some auxilliary files  Started in 2009  Used in BR since 2012, with series 5.16 and 5.18  Alex Suykov  single author (and single point of failure)  5.20 ? 5.2x ?  Homepage http://arsv.github.io/perl-cross/  Previously on http://perlcross.berlios.de/
  • 15. fperrad@fpw2014 CPAN infrastructure  package/pkg-perl.mk  target & host package  Makefile.PL & Build.PL  Configure, Build, Install  Use BR infrastructure for download, extract, patch  support/scripts/scancpan  Populates Perl packages with dependencies and metadata fetched from https://metacpan.org/  Perl script using MetaCPAN-API-Tiny
  • 16. fperrad@fpw2014 Perl package example  Config.in config BR2_PACKAGE_PERL_DATETIME bool "perl-datetime" select BR2_PACKAGE_PERL_DATETIME_LOCALE select BR2_PACKAGE_PERL_DATETIME_TIMEZONE select BR2_PACKAGE_PERL_PARAMS_VALIDATE select BR2_PACKAGE_PERL_TRY_TINY help A date and time object  perl-datetime.mk PERL_DATETIME_VERSION = 1.10 PERL_DATETIME_SOURCE = DateTime-$(PERL_DATETIME_VERSION).tar.gz PERL_DATETIME_SITE = $(BR2_CPAN_MIRROR)/authors/id/D/DR/DROLSKY/ PERL_DATETIME_DEPENDENCIES = perl host-perl-module-build perl- datetime-locale perl-datetime-timezone perl-params-validate perl- try-tiny PERL_DATETIME_LICENSE = artistic_2 $(eval $(perl-package))
  • 17. fperrad@fpw2014 Dancer2 demo  Busybox, Dropbear (ssh), ntp, Perl  Dancer2, GD, DateTime  74 target packages  21 host packages  ExtUtils::MakeMaker, Module::Build, Module::Build::Tiny  60.3 MB used on disk  Dancer2 is a good test for the BR infrastructure, but not the best Web framework for this kind of target
  • 19. fperrad@fpw2014 Demo recipe  All stuff on Github : https://github.com/fperrad/br/tree/dancer2  Build $ make defconfig BR2_EXTERNAL=dancer2 BR2_DEFCONFIG=dancer2/configs/olimex_imx233_olinuxino_defcon $ make  Flashing in SD card $ umount /dev/mmcblk0p2 $ sudo dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/mmcblk0p1 seek=4 $ sudo dd if=output/images/rootfs.ext2 of=/dev/mmcblk0p2 bs=512 $ sync
  • 20. fperrad@fpw2014 Working with Qemu system  Working without hardware target  BR has many defconfig for Qemu $ make qemu_x86_defconfig $ make gconfig $ make $ qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append root=/dev/sda -net nic,model=rtl8139 -net user  Next step ? VirtualBox or VmWare
  • 21. fperrad@fpw2014 Testing on Target  BuildRoot doesn’t handle the test step  My way :  Copy the whole build tree (130 MB) on the target  Then :  (remember no make, no toolchain, …) $ cd t $ ln –s ../perl perl $ ./perl harness  256 MB of RAM required  Impossible on real target OLinuXino  With qemu-system-arm  Take 6 hours or more  Many patches for test suite  merged in perl 5.20.0
  • 22. fperrad@fpw2014 Bibliography / Webography  http://www.buildroot.net/  https://www.olimex.com/Products/OLin uXino/iMX233/  http://archlinuxarm.org/  http://arsv.github.io/perl-cross/  https://github.com/fperrad/br/tree/danc er2