Cross-build server for system

Hello everyone,

I published some time ago, a subject of centralization packages and I got an answer: poudriere. I always use and I'm happy. I want to do something similar but with FreeBSD.

Currently, I use the solution given in the handbook to design a cross-builder for world and kernel. I want to keep doing this but I want to change things like:

  • Change the location of sources and results (/usr/src to /storage/src and /usr/obj to /storage/build for example)
  • Find a solution to avoid to declare the make.conf and src.conf the client machines as described in the handbook
  • Continue or use anything other than the NFS service to update client systems (I think a system like used NetASQ)

I would also like to find more documentation to optimize the world and kernels. I read the manuals and make.conf and src.conf for it. I also look at the sources in order to really make my lightest system (size of the system and remove unnecessary drivers) but it is not particularly well documented or simply that I do not fall on the right pages.

Thank you in advance for your answers!


Best regards.
 
Here's some hints:

  • The location of the source tree does not matter. You just have to start make in the root of it, so the same directory that has the UPDATING file and the Makefile.inc1.
  • You can change the location of the object tree by specifying MAKEOBJDIRPREFIX in your environment. You cannot set this is in /etc/make.conf or /etc/src.conf. So on your build machine put it in /etc/login.conf and run cap_mkdb. See the respective manual pages for more information.
  • There are two simple ways to make different builds on one machine:
    1. You specify all the flags in separate "src.conf" files. For example, you use /etc/src.desktop.conf and /etc/src.server.conf and fill them with the switches. Then you run your make commands with the SRCCONF environment variable set to the one you need.
    2. You use /etc/src.conf but wrap the variables in defines:
      Code:
      .if defined(DESKTOP_BUILD)
      KERNCONF=DESKTOP
      WITHOUT_SENDMAIL=yes
      # etc
      .endif
      .if defined(SERVER_BUILD)
      KERNCONF=SERVER
      WITHOUT_BLUETOOTH=yes
      WITHOUT_GCC=yes
      WITHOUT_PROFILE=yes
      # etc
      .endif
      Then your run make as make -DDESKTOP_BUILD buildworld to run your desktop build. Using separate files may be easier to maintain, however using one file, you have all the information in one place and can share settings amongs all builds (good candidates are WITHOUT_PROFILE and WITHOUT_ATM for example). You can share settings too with different src.conf files, by using for example .include /etc/src.shared.conf.
  • All switches that are recognized are in /usr/share/mk/bsd.own.mk

Hope this helps you along.
 
Hi Melvyn,

A big thank you for your reply.

I'll watch it and continue my research in addition to your information.


Best regards :)


al.
 
Back
Top