BSDCan2011 - Final (with audio).5

BSDCan 2011
The Technical BSD Conference

Speakers
Simon Gerraty
Schedule
Day Talks - 2 - 2011-05-14
Room DMS 1140
Start time 11:30
Duration 01:00
Info
ID 253
Track Hacking
Language used for presentation English

Building BSD in "meta mode"

Evolution of the Junos build

Junos is a BSD derrived OS.

This talk will discuss the latest evolution of the Junos build, taking advantage of "meta mode" in bmake - which has also been contributed to NetBSD. The key makefiles discussed will be available as part of the generic mk-files distribution that accompanies bmake.

Building BSD with meta mode

Junos is a BSD derrived OS.

For over 10 years, it has been built using bmake (the portable version of NetBSD's make), it has been through several evolutions taking advantage of techniques such as automated dependency collection both on a per directory, and tree wide to facilitate parallel building.
The author has added many features to NetBSD's make in that time.

This talk will discuss the latest evolution of the Junos build, taking advantage of "meta mode" in bmake - which has also been contributed to NetBSD. The key makefiles discussed are available as part of the generic mk-files distribution that accompanies bmake.

A previous talk at BSDCan described John Birrell's Jbuild which was a prototype tool. The basic idea, of capturing "meta" info as targets are built remains, but the implementation has been overhauled as part of the merging to bmake. The result retains the benefits without sacrificing any flexibility.

The original prototype for the FreeBSD build leveraged DTrace to track "interesting" (successful) system calls during the building of each target. This was replaced with a simple kernel module (filemon), which make can use to get the same (and in some cases better) results. The "meta" info thus collected allows for much more accurate update builds, as well as capturing tree based dependencies, to allow a clean tree build to be initiated from any point of interest.