Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki3762: BulkBuild (Version 6)

Bulk Build on QNX (WIP)#

There's various pages out there describing bulk builds on various platforms, all slightly different. Here's one more.

Base install separation#

If you look around you'll see that most people try to do their build in a sandbox of some sort. There's various ways to to this on each platform. I actually did a bulk build in a chroot on QNX once but it wasn't stock :). Here's the layout I'm using now:

  • One drive in two partitions.
    1. Approx 8Gig for the qnx install which gets mounted read only (type 179).
    2. The rest of the driver where all the work gets done (type 178).
  • Here's a sample build file that does this BulkBuild/qnxbasepbulk.build. Notice this mounts the small install partition (hd0t179) to / read only and the second work partition (hd0t178) as /fs/hd0-qnx6-2 as would normally be done by 'diskboot' in the default image.

When performing setup and administration on the box I build from the normal qnxbasesmp image. When doing an actual bulk build I boot from the qnxbasebulk image.

To make the system usable in either configuration, I add procmgr symlinks for /tmp, /home and /var to the work partition which is read / write in either case. Two other directories are used during bulk builds as I have them configured: /pbulk and /usr/pkg. /pbulk is where I check out the pkgsrc repository and where I install packages required by the controlling part of the build (the outer layer). /usr/pkg is where resulting packages created by this outer layer are staged before being tarred up in a binary package. In pkgsrc parlance the outer layer controls the inner layer which builds packages with the same default prefix of /usr/pkg that would normally be used if one were to build packages themselves outside of a bulk build.

Here's a sample /etc/rc.d/rc.local that sets up these links BulkBuild/rc.local.

Notice also that this rc.local script adds /pbulk/pkg_bulk/lib to the CS_LIBPATH. As mentioned above, the outer, controlling part of the bulk build requires a few packages for its operation (here's where we get into some pbulk specifics). I install these into /pbulk/pkg_bulk so the first step in the actual pbulk process is to bootstrap in this location:

# cd /pbulk
< checkout pkgsrc repo to pkgsrc>
# cd pkgsrc/bootstrap
# ./bootstrap --prefix=/pbulk/pkg_bulk --pkgdbdir=/pbulk/pkg_bulk/.pkgdb

Now install the packages needed for a bulk build and anything else you find generally useful. For example.

# cd /pbulk/pkgsrc/pkgtools/pbulk
# /pbulk/pkg_bulk/bin/bmake install
Attachments:
Text mk-fragment.conf [BulkBuild/mk-fragment.conf]
Text rc.local [BulkBuild/rc.local]
Text qnxbasepbulk.build [BulkBuild/qnxbasepbulk.build]