SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
Peter Griffin
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
Kernel TLV
 
Introduction GStreamer
Introduction GStreamerIntroduction GStreamer
Introduction GStreamer
Shih-Yuan Lee
 

La actualidad más candente (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 a Perl on embedded Linux with Buildroot‎

Similar a 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
 

Último

+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
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+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...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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 🔝✔️✔️
 
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
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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 ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
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 🔝✔️✔️
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

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