Re: Need to override KRNLCONFDIR variable in command line of make (file /usr/src/Makefile.inc1).
On Tue, Dec 03, 2002 at 10:54:28PM +0300, Oleg Sharoiko wrote: On Tue, 3 Dec 2002, Ruslan Ermilov wrote: RE KRNLCONFDIR shouldn't be overridden -- we already provide (undocumented) RE user-redefineable KERNCONFDIR which should be used in cases like this. RE KRNLCONFDIR, on the other hand, is dependent on src/ used, and should RE NOT be overridden. That's in -CURRENT, are there any plans on merging it into -STABLE ? Done (merged). Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg38469/pgp0.pgp Description: PGP signature
Need to override KRNLCONFDIR variable in command line of make (file/usr/src/Makefile.inc1).
Hello, I am developing a program which will allow me to build worlds and kernels for several hosts with different options (make.conf files, kernel configs and so on). I need to be able to override some variables in /usr/src/Makefile.inc1. For the moment they are defined with '=', and I suggest defining them with '?='. The variables I need to override are KRNLSRCDIR, KRNLCONFDIR, KRNLOBJDIR. I have sent PR (misc/45961) with patch to solve my request. Please, anyone who has a commit rights, commit this patch. Andrey Beresovsky To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Need to override KRNLCONFDIR variable in command line of make (file /usr/src/Makefile.inc1).
On Tue, Dec 03, 2002 at 05:37:34PM +0300, Andrey Beresovsky wrote: Hello, I am developing a program which will allow me to build worlds and kernels for several hosts with different options (make.conf files, kernel configs and so on). I need to be able to override some variables in /usr/src/Makefile.inc1. For the moment they are defined with '=', and I suggest defining them with '?='. The variables I need to override are KRNLSRCDIR, KRNLCONFDIR, KRNLOBJDIR. I have sent PR (misc/45961) with patch to solve my request. Please, anyone who has a commit rights, commit this patch. I was wondering about that when I saw your PR; actually, I think that the current FreeBSD kernel building infrastructure is quite sufficient for what you want to do, without any more modifications. To use different make.conf settings, you have three options: - use the same make.conf file, but with .ifdef FOO ... .endif blocks, containing per-host configuration variables; - use a single simple make.conf file with .ifdef FOO / .include make.foo.conf / .endif blocks, with different make.foo.conf files for the different hosts; - set the (slightly underdocumented) __MAKE_CONF variable to a different value. To use different kernel configs, just set the KERNCONF variable to the value you need. The object directory is set according to the KERNCONF value - if you have different kernel config file names, you will have different object directories. Why do you need different source trees and kernel config dirs? I see no problem with keeping all kernel configs for the same version of FreeBSD in the same src/sys/arch/conf/ directory, or at least keeping symlinks to different files in the same src/sys/arch/conf/ directory. Different source trees - if you have a source tree checked out to use for building the kernel, what is stopping you from invoking the 'buildkernel' target from the corresponding src/ directory, the one directly above the sys/ directory? Of course, I am probably overlooking some aspects, or missing information about your particular configuration. Still, I believe that for most configurations, the already-provided variables and build infrastructure are quite sufficient. G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED][EMAIL PROTECTED] PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 What would this sentence be like if pi were 3? msg38447/pgp0.pgp Description: PGP signature
Re: Need to override KRNLCONFDIR variable in command line of make(file /usr/src/Makefile.inc1).
On Tue, 3 Dec 2002, Peter Pentchev wrote: PP I was wondering about that when I saw your PR; actually, I think that PP the current FreeBSD kernel building infrastructure is quite sufficient PP for what you want to do, without any more modifications. PP PP Why do you need different source trees and kernel config dirs? I see no PP problem with keeping all kernel configs for the same version of FreeBSD PP in the same src/sys/arch/conf/ directory, or at least keeping symlinks PP to different files in the same src/sys/arch/conf/ directory. PP PP Different source trees - if you have a source tree checked out to use PP for building the kernel, what is stopping you from invoking the PP 'buildkernel' target from the corresponding src/ directory, the one PP directly above the sys/ directory? My project involves automatic or semiautomatic checkouts, updates and removals of source trees. It would be unwise to keep kernel configs in this source trees. Thats why I need to change KRNLCONFDIR variable. Of course, I can do it with the help of links, but I think it's not a good solution. I guess the changes I suggest will definitely not break anything but only add flexibility which is typical for BSD make files. The solution with links is not a right thing, because it involves more dirty work which can be avoided with a help of simple makefile modification. --- Andrey Beresovsky. Software and Network Engineer Computer Center of Rostov State University. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Need to override KRNLCONFDIR variable in command line of make (file /usr/src/Makefile.inc1).
On Tue, Dec 03, 2002 at 06:22:42PM +0300, Andrey Beresovsky wrote: On Tue, 3 Dec 2002, Peter Pentchev wrote: PP I was wondering about that when I saw your PR; actually, I think that PP the current FreeBSD kernel building infrastructure is quite sufficient PP for what you want to do, without any more modifications. PP PP Why do you need different source trees and kernel config dirs? I see no PP problem with keeping all kernel configs for the same version of FreeBSD PP in the same src/sys/arch/conf/ directory, or at least keeping symlinks PP to different files in the same src/sys/arch/conf/ directory. PP PP Different source trees - if you have a source tree checked out to use PP for building the kernel, what is stopping you from invoking the PP 'buildkernel' target from the corresponding src/ directory, the one PP directly above the sys/ directory? My project involves automatic or semiautomatic checkouts, updates and removals of source trees. It would be unwise to keep kernel configs in this source trees. Thats why I need to change KRNLCONFDIR variable. Of course, I can do it with the help of links, but I think it's not a good solution. I guess the changes I suggest will definitely not break anything but only add flexibility which is typical for BSD make files. The solution with links is not a right thing, because it involves more dirty work which can be avoided with a help of simple makefile modification. KRNLCONFDIR shouldn't be overridden -- we already provide (undocumented) user-redefineable KERNCONFDIR which should be used in cases like this. KRNLCONFDIR, on the other hand, is dependent on src/ used, and should NOT be overridden. Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg38451/pgp0.pgp Description: PGP signature
Re: Need to override KRNLCONFDIR variable in command line of make (file /usr/src/Makefile.inc1).
Peter Pentchev wrote: On Tue, Dec 03, 2002 at 05:37:34PM +0300, Andrey Beresovsky wrote: I am developing a program which will allow me to build worlds and kernels for several hosts with different options (make.conf files, kernel configs and so on). I need to be able to override some variables in /usr/src/Makefile.inc1. For the moment they are defined with '=', and I suggest defining them with '?='. The variables I need to override are KRNLSRCDIR, KRNLCONFDIR, KRNLOBJDIR. I have sent PR (misc/45961) with patch to solve my request. Please, anyone who has a commit rights, commit this patch. I was wondering about that when I saw your PR; actually, I think that the current FreeBSD kernel building infrastructure is quite sufficient for what you want to do, without any more modifications. Don't feel bad; this is the same thing they told me when I submitted the same patch. What they really mean is that it's sufficient for them, because they don't understand what it is you want to do. Specifically, if the kernel name isn't GENERIC, you get screwed by sysinstall, if you make a full release CDROM. The problem is that you are talking to people who rarely make their own release CDROM's, and, when they do, they use GENERIC. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Need to override KRNLCONFDIR variable in command line of make(file /usr/src/Makefile.inc1).
On Tue, 3 Dec 2002, Ruslan Ermilov wrote: RE KRNLCONFDIR shouldn't be overridden -- we already provide (undocumented) RE user-redefineable KERNCONFDIR which should be used in cases like this. RE KRNLCONFDIR, on the other hand, is dependent on src/ used, and should RE NOT be overridden. That's in -CURRENT, are there any plans on merging it into -STABLE ? -- Oleg Sharoiko. Software and Network Engineer Computer Center of Rostov State University. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Need to override KRNLCONFDIR variable in command line of make(file /usr/src/Makefile.inc1).
Andrey Beresovsky wrote: My project involves automatic or semiautomatic checkouts, updates and removals of source trees. It would be unwise to keep kernel configs in this source trees. Thats why I need to change KRNLCONFDIR variable. Of course, I can do it with the help of links, but I think it's not a good solution. I guess the changes I suggest will definitely not break anything but only add flexibility which is typical for BSD make files. The solution with links is not a right thing, because it involves more dirty work which can be avoided with a help of simple makefile modification. I've found that a patch like yours is necessary, but I did not change the configuration directory; instead, I changed the config file name. The other thing you need to do, if you do this, is to modify the sysinstall to know the name of the kernel on the CDROM image; you can pas this in as a -D on the command line, if you modify the release Makefile. This is particularly useful if you are supporting, for example, an engineering department, or a product release image golden master install CDROM, such that you can rebuild your product from source 2 years later, and get the same software (a commercial necessity for things like embedded systems). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message