The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
The make-world script
30 July 2000
|
Do you remember that makefile I had for my upgrade from FreeBSD 4.0-Release to FreeBSD 4.0-Stable. Well, gill wrote in with an improvement. It doesn't make things any faster. But it does make the script easier to configure. I've updated the old script with his changes and the script is available here. WARNING: Do not use copy/paste to get the makefile. Makefiles contains tabs. The copy/paste process will convert the tabs to spaces. You don't want that. You need the tabs. Instead, use fetch to get the file (e.g fetch <filename>). Also remember that this script puts logs into Some people say there is no need for this script. Well, that's true. But I like it because it keeps the logs for you in case something goes wrong. "But you can do those logs yourself!". Well, yes, but if I use the script, it is done for me. If you don't like the idea, you won't be using it. |
The assumptions
|
|
Using the script
|
On 26 August, 2001, I changed the script slightly. It now requires changes to /etc/make.conf (you should create that file if it doesn't already exist). Ensure the following entries exist in that file:
NOTE: I have not been able to get the above to work. I have had to resort to upgrading my source by issuing the cvsup command directly. Here are the steps I go through to build my world. Before you use the script,
remember to change the variable in the script to suit your requirements. You must
set NOTE: If you have not previously downloaded the kernel source and created a kernel configuration file, then you must create this file after step 2 and before step 5. Please refer to the Configuring the FreeBSD Kernel section in the FreeBSD handbook. Pay special attention to the section on Building and Installing a Custom Kernel. If you have previously done a build world, you should remember to do a make clean first. It clears out /usr/obj as well as deleting your old log files. This section outlines the steps which are detailed below. This intended to be a
quick reference for those who are familiar with the steps and just need a quick reminder
of what to do. Again, this assumes you have installed the makefile in Remember to create your kernel configuration file first and set the name of this file
within the Makefile (see These instructions are for the Makefile provided at the top of this page.
*WARNING! WARNING!: If you encounter the following error:
then you don't have any source to be updated. I suggest you issue the following command instead:
where
It could also be that upgrading from an older version of FreeBSD which does not support
|
making a kernel when not making world
|
You can also use this script to build a kernel when you aren't building world.
You can use make kerneloldstyle . If you try to make a kernel, and get an
error like this:
then try |
Using mergemaster
|
mergemaster is a most awesome piece of code. It simplifies
the process of merging system file changes to a level which is quite simple. Without
it, I would not like to do a build world. mergemaster looks at the files in existing system and compares them to the new files, which are temporarily located in another directory. For each new file which differs from the existing file, it prompts you for instructions. The options are generally:
During the merge, you are presented with left and right images of the before and after images. You may have to scroll back up to figure out which is the new file and which is the old file. Quite often, the first line mergemaster shows you contains a version number. That will differentiate the new file from the old file. It takes a while to get used to it, but after a while you will get the hang of it. |