The State of PTXdist Roland Hieber <rhi@pengutronix.de> - - PowerPoint PPT Presentation

the state of ptxdist
SMART_READER_LITE
LIVE PREVIEW

The State of PTXdist Roland Hieber <rhi@pengutronix.de> - - PowerPoint PPT Presentation

https://pengutronix.de The State of PTXdist Roland Hieber <rhi@pengutronix.de> FOSDEM 2020 What is PTXdist? Build system geared towards Embedded Linux Building blocks: GNU Make Kconfjg Bash some AWK First


slide-1
SLIDE 1

https://pengutronix.de

The State of PTXdist

Roland Hieber <rhi@pengutronix.de> FOSDEM 2020

slide-2
SLIDE 2

What is PTXdist?

  • Build system geared towards

Embedded Linux

  • Building blocks:

– GNU Make – Kconfjg – Bash – some AWK

  • First version before August 2003
  • Monthly releases
  • License: GPL-2.0
  • Online documentation:

https://ptxdist.org/doc

slide-3
SLIDE 3

Statistics

  • 914 target packages
  • 184 host packages
  • 18 pre-built toolchain architectures (via OSELAS.Toolchain)

– ARM-v4/v5/ARM-v7, AArch64, x86, x86_64, MIPS, RISC-V, PowerPC 600

(as of PTXdist 2019.12.0)

slide-4
SLIDE 4

A First Look

$ ptxdist menuconfig $ ptxdist platformconfig

slide-5
SLIDE 5

A Typical BSP

Idea

  • BSP structure == PTXdist structure
  • Extend and overwrite upstream fjles locally
slide-6
SLIDE 6

Package Build Stages

mypackage.get

  • Download upstream tarball

mypackage.extract

  • Extract tarball, apply local patches

mypackage.prepare

  • Run ./confjgure, CMake, …

mypackage.compile

  • make -j

mypackage.install

  • make install into isolated directory

mypackage.targetinstall

  • Cherry-pick fjles into rootfs
slide-7
SLIDE 7

Applying Patches

  • Automatically applied during the extract stage
  • Edit patch queue with git or quilt
slide-8
SLIDE 8

Package Defjnition: rules/mypackage.in

slide-9
SLIDE 9

Package Defjnition: rules/mypackage.make

slide-10
SLIDE 10

Package Defjnition: rules/mypackage.make

slide-11
SLIDE 11

Package Types

Target packages

  • Built on the build host for the target architecture

– e.g: systemd, busybox, coreutils, kernel, bootloader

Host packages

  • Built on the host, executed on the host
  • Compatible build environment on different host systems

– e.g.: host-dosfstools, host-python3, host-cmake

Image packages

  • Determine the image format and the list of installed

packages

– e.g. hdimage, root.tgz, RAUC bundles

slide-12
SLIDE 12

Layering Mechanisms

  • Platforms
  • Collections
  • Alternative confjg fjles
  • Kconfjg diffs
  • Base layers
slide-13
SLIDE 13

Layering: Platforms

slide-14
SLIDE 14

Layering: Platforms

slide-15
SLIDE 15

Layering: Collections

slide-16
SLIDE 16

Layering: Alternative Confjg Files

With platform v7a:

  • 1. my-bsp/projectroot.v7a/etc/printcap
  • 2. my-bsp/projectroot/etc/printcap.v7a
  • 3. my-bsp/confjgs/platform-v7a/projectroot/etc/printcap.v7a
  • 4. my-bsp/projectroot/etc/printcap
  • 5. my-bsp/confjgs/platform-v7a/projectroot/etc/printcap
  • 6. projectroot/etc/printcap from PTXdist install dir
  • 7. /etc/printcap from cups install dir
  • 8. /etc/printcap from cups build dir
slide-17
SLIDE 17

Layering: Kconfjg Diffs

slide-18
SLIDE 18

Layering: Base Layers

Remember this?: Idea

  • BSP structure == PTXdist structure
  • Extend and overwrite upstream fjles locally

Better Idea

  • “All problems in computer science can be solved by

another level of indirection.” (David Wheeler)

slide-19
SLIDE 19

Layering: Base Layers

Remember this?: Idea

  • BSP structure == PTXdist structure
  • Extend and overwrite upstream fjles locally

Better Idea

  • “All problems in computer science can be solved by

another level of indirection.” (David Wheeler)

slide-20
SLIDE 20

Layering: Base Layers

slide-21
SLIDE 21

Goodies: Package Info

slide-22
SLIDE 22

Goodies: BSP Info

slide-23
SLIDE 23

Goodies: License Report

$ ptxdist make license-report

slide-24
SLIDE 24

Trying it all out

DistroKit

  • preconfjgured BSP for a variety of dev boards (and

qemu-arm)

  • https://git.pengutronix.de/cgit/DistroKit
slide-25
SLIDE 25

Contributing

  • Currently: ~85% Pengutronix contributions…
  • Patches welcome:

https://www.ptxdist.org/doc/contributing.html

Questions?

slide-26
SLIDE 26

Contributing

  • Currently: ~85% Pengutronix contributions…
  • Patches welcome:

https://www.ptxdist.org/doc/contributing.html

Questions?