Hitchhiker's Guide to Openbsd


Download 1.27 Mb.
Pdf ko'rish
bet73/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   69   70   71   72   73   74   75   76   ...   258
Bog'liq
obsd-faq49

5.3.5 - Building the userland
There is a specific process used by OpenBSD. Processes used on other OSs you may have been familiar 
with will most likely not work on OpenBSD, and will get you laughed at when you ask why. 

Clear your 
/usr/obj
directory and rebuild symbolic links: 
rm -rf /usr/obj/*
cd /usr/src
make obj
Note that the use of the 
/usr/obj
directory is mandatory. Failing to do this step before building 
the rest of the tree will likely leave your 
src
tree in bad shape. 

Make sure all the appropriate directories are created. 
cd /usr/src/etc && env DESTDIR=/ make distrib-dirs

Build the system: 
cd /usr/src
make build
This compiles and installs all the "userland" utilities in the appropriate order. This is a fairly time 
consuming step -- a very fast machine may be able to complete it in well under an hour, a very 
slow machine may take many days. When this step is complete, you have newly compiled 
binaries in place on your system. 

If building -current: Update 
/dev
and 
/etc
, with the changes listed in 
current.html
. If 
following -stable after a proper 
upgrade process
 or a install of the 
proper starting binary
, this step 
is not needed or desired. 
5.4 - Building a Release
What is a "release", and why would I want to make one?
http://www.openbsd.org/faq/faq5.html (11 of 26)9/4/2011 10:02:02 AM


5 - Building the System from Source
A release is the complete set of files that can be used to install OpenBSD on another computer. If you 
have only one computer running OpenBSD, you really don't have any reason to make a release, as the 
above
build process will do everything you need. An example use of the release process would be to 
build -stable on a fast machine, then make a release to be installed on all your other machines in your 
office. 
The release process uses the binaries created in the 
/usr/obj
directory in the building process above, 
so you must successfully complete the build first, and nothing must disturb the 
/usr/obj
directory. A 
time where this might be a problem is if you use a 
memory disk
as your 
/usr/obj
for a little extra 
performance in the build process, you would not want to reboot the computer between the "build" and 
"release" steps! 
The release process requires two work directories, which we will call DESTDIR and RELEASEDIR. All 
the files that are part of a "clean" OpenBSD install will be copied to their proper place within the 
DESTDIR. They will then be tar(1)ed up and placed in the RELEASEDIR. At the end of the process, 
RELEASEDIR will hold the completed OpenBSD release. The release process will also use the 
/mnt
location, so this should not be used by anything while the release process is running. For the purpose of 
example, we will use the DESTDIR of 
/usr/dest
and the RELEASEDIR of 
/usr/rel

The release process involves a utility
crunchgen(8)
, which is used to create a single executable file 
made up of many individual binaries. The name this single executable file is invoked by determines 
which component binary is run. This is how a number of individual program files are squeezed into the 
ramdisk kernel that exists on boot floppies and other boot media. 
You must have root privileges to make a release. 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   69   70   71   72   73   74   75   76   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling