Re: make release custom kernel conf not found

2012-01-31 Thread Rob Farmer
On Mon, Jan 30, 2012 at 10:39 AM, Rick Miller vmil...@hostileadmin.com wrote:
 Thanks Rob...

 I put the kernel conf file in the source tree as opposed to linking to
 it and it certainly did compile the custom kernel.

 What confuses me (not that I expect you to have the answer) is that
 Chapter 9 of the handbook has a tip that recommends keeping the kernel
 config in /root/kernels and symlinking to it from the source tree.  If
 it doesn't work, why is there a tip recommending this practice?


I think the idea is to avoid accidentally deleting it - sometimes
people who get weird build errors are told to delete /usr/src and
/usr/obj, to make sure everything is in a consistent state.

The symlink will work fine for normal builds, which is what the
handbook covers, but the release building process installs a new copy
of the base system and then runs within it, to try and ensure a
completely stock environment. Any changes you made to the main system
(make.conf, custom kernels, etc.) are intentionally ignored. As Lowell
points out, the right way to do this is make either a patch or a
script to add your changes and have the release framework apply it.
Copying it in is the quick and dirty fix.

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make release custom kernel conf not found

2012-01-31 Thread Rick Miller
Thanks Rob and Lowell,

I will keep this information handy.  It was helpful.

On Tue, Jan 31, 2012 at 4:22 AM, Rob Farmer rfar...@predatorlabs.net wrote:
 On Mon, Jan 30, 2012 at 10:39 AM, Rick Miller vmil...@hostileadmin.com 
 wrote:
 Thanks Rob...

 I put the kernel conf file in the source tree as opposed to linking to
 it and it certainly did compile the custom kernel.

 What confuses me (not that I expect you to have the answer) is that
 Chapter 9 of the handbook has a tip that recommends keeping the kernel
 config in /root/kernels and symlinking to it from the source tree.  If
 it doesn't work, why is there a tip recommending this practice?


 I think the idea is to avoid accidentally deleting it - sometimes
 people who get weird build errors are told to delete /usr/src and
 /usr/obj, to make sure everything is in a consistent state.

 The symlink will work fine for normal builds, which is what the
 handbook covers, but the release building process installs a new copy
 of the base system and then runs within it, to try and ensure a
 completely stock environment. Any changes you made to the main system
 (make.conf, custom kernels, etc.) are intentionally ignored. As Lowell
 points out, the right way to do this is make either a patch or a
 script to add your changes and have the release framework apply it.
 Copying it in is the quick and dirty fix.

 --
 Rob Farmer



-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make release custom kernel conf not found

2012-01-30 Thread Rick Miller
Thanks Rob...

I put the kernel conf file in the source tree as opposed to linking to
it and it certainly did compile the custom kernel.

What confuses me (not that I expect you to have the answer) is that
Chapter 9 of the handbook has a tip that recommends keeping the kernel
config in /root/kernels and symlinking to it from the source tree.  If
it doesn't work, why is there a tip recommending this practice?

On Sun, Jan 29, 2012 at 10:14 PM, Rob Farmer rfar...@predatorlabs.net wrote:
 On Sun, Jan 29, 2012 at 9:03 AM, Rick Miller vmil...@hostileadmin.com wrote:
 Hi All,

 I am performing a `make release` to build a new release with a custom
 kernel.  The `make release` fails with the following error:

 cd /usr/src/release/..;  make TARGET_ARCH=amd64 TARGET=amd64
 KERNCONF=MYKERNEL kernel  DESTDIR=/R/stage/kernels KODIR=/MYKERNEL
 ERROR: Missing kernel configuration file(s) (MYKERNEL).
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src/release.
 + umount /dev
 *** Error code 1

 Stop in /usr/src/release.

 I have the kernel config at /root/kernels/MYKERNEL and
 /usr/src/sys/amd64/conf/MYKERNEL is a symlink to the kernel config.
 The applicable environment variables are set in my .profile as
 follows:

 BUILDNAME=8.2-RELEASE-MYKERNEL-1.1
 CHROOTDIR=/app/release
 CVSROOT=/home/cvs
 EXTPORTSDIR=/usr/ports
 EXTSRCDIR=/usr/src
 KERNELS=GENERIC MYKERNEL
 MAKE_DVD=YES
 NODOC=YES
 NO_FLOPPIES=YES

 I am unsure how to get `make release` to realize the location of the
 kernel config.  Also, I notice that in the command to make the kernel,
 DESTDIR is set to /R/stage/kernels while the CHROOTDIR (and the
 location where I want the release to be built) is /app/release.

 I am wondering if someone knows how I may resolve the issue so I can
 get the release built.  I appreciate any advice and feedback.  Thanks.


 The kernel is built inside the chroot, so all paths are really
 /app/release/whatever. Your symlink points to
 /app/release/root/kernels/MYKERNEL. It will be easiest to get rid of
 the symlink and copy the actual file into your EXTSRCDIR before
 starting the make release; alternately you could use the LOCAL_PATCHES
 or LOCAL_SCRIPT variables to import it.

 --
 Rob Farmer



-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make release custom kernel conf not found

2012-01-30 Thread Lowell Gilbert
Rick Miller vmil...@hostileadmin.com writes:

 Thanks Rob...

 I put the kernel conf file in the source tree as opposed to linking to
 it and it certainly did compile the custom kernel.

 What confuses me (not that I expect you to have the answer) is that
 Chapter 9 of the handbook has a tip that recommends keeping the kernel
 config in /root/kernels and symlinking to it from the source tree.  If
 it doesn't work, why is there a tip recommending this practice?

It works fine; sounds like you just don't understand what a chroot is. 

Once a process is chroot'd to /app/release/, its idea of /root/kernels
is what non-chroot'd processes see as /app/release/kernels. It can't see
*any* files that aren't under /app/release. I would tend to recommend
adding to your build script a command that copies the kernel file into
the chroot before starting the chroot, but I'm sure others have other
preferred approaches.

 - Lowell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


make release custom kernel conf not found

2012-01-29 Thread Rick Miller
Hi All,

I am performing a `make release` to build a new release with a custom
kernel.  The `make release` fails with the following error:

cd /usr/src/release/..;  make TARGET_ARCH=amd64 TARGET=amd64
KERNCONF=MYKERNEL kernel  DESTDIR=/R/stage/kernels KODIR=/MYKERNEL
ERROR: Missing kernel configuration file(s) (MYKERNEL).
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src/release.
+ umount /dev
*** Error code 1

Stop in /usr/src/release.

I have the kernel config at /root/kernels/MYKERNEL and
/usr/src/sys/amd64/conf/MYKERNEL is a symlink to the kernel config.
The applicable environment variables are set in my .profile as
follows:

BUILDNAME=8.2-RELEASE-MYKERNEL-1.1
CHROOTDIR=/app/release
CVSROOT=/home/cvs
EXTPORTSDIR=/usr/ports
EXTSRCDIR=/usr/src
KERNELS=GENERIC MYKERNEL
MAKE_DVD=YES
NODOC=YES
NO_FLOPPIES=YES

I am unsure how to get `make release` to realize the location of the
kernel config.  Also, I notice that in the command to make the kernel,
DESTDIR is set to /R/stage/kernels while the CHROOTDIR (and the
location where I want the release to be built) is /app/release.

I am wondering if someone knows how I may resolve the issue so I can
get the release built.  I appreciate any advice and feedback.  Thanks.


-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make release custom kernel conf not found

2012-01-29 Thread Rob Farmer
On Sun, Jan 29, 2012 at 9:03 AM, Rick Miller vmil...@hostileadmin.com wrote:
 Hi All,

 I am performing a `make release` to build a new release with a custom
 kernel.  The `make release` fails with the following error:

 cd /usr/src/release/..;  make TARGET_ARCH=amd64 TARGET=amd64
 KERNCONF=MYKERNEL kernel  DESTDIR=/R/stage/kernels KODIR=/MYKERNEL
 ERROR: Missing kernel configuration file(s) (MYKERNEL).
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src/release.
 + umount /dev
 *** Error code 1

 Stop in /usr/src/release.

 I have the kernel config at /root/kernels/MYKERNEL and
 /usr/src/sys/amd64/conf/MYKERNEL is a symlink to the kernel config.
 The applicable environment variables are set in my .profile as
 follows:

 BUILDNAME=8.2-RELEASE-MYKERNEL-1.1
 CHROOTDIR=/app/release
 CVSROOT=/home/cvs
 EXTPORTSDIR=/usr/ports
 EXTSRCDIR=/usr/src
 KERNELS=GENERIC MYKERNEL
 MAKE_DVD=YES
 NODOC=YES
 NO_FLOPPIES=YES

 I am unsure how to get `make release` to realize the location of the
 kernel config.  Also, I notice that in the command to make the kernel,
 DESTDIR is set to /R/stage/kernels while the CHROOTDIR (and the
 location where I want the release to be built) is /app/release.

 I am wondering if someone knows how I may resolve the issue so I can
 get the release built.  I appreciate any advice and feedback.  Thanks.


The kernel is built inside the chroot, so all paths are really
/app/release/whatever. Your symlink points to
/app/release/root/kernels/MYKERNEL. It will be easiest to get rid of
the symlink and copy the actual file into your EXTSRCDIR before
starting the make release; alternately you could use the LOCAL_PATCHES
or LOCAL_SCRIPT variables to import it.

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make release custom kernel conf not found

2012-01-29 Thread Bernt Hansson

2012-01-29 18:03, Rick Miller skrev:

Hi All,

I am performing a `make release` to build a new release with a custom
kernel.  The `make release` fails with the following error:

cd /usr/src/release/..;  make TARGET_ARCH=amd64 TARGET=amd64
KERNCONF=MYKERNEL kernel  DESTDIR=/R/stage/kernels KODIR=/MYKERNEL


Shouldn't that be KERNCONF=MYKERNEL DESTDIR=/R/stage/kernels KODIR=/MYKERNEL


ERROR: Missing kernel configuration file(s) (MYKERNEL).
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src/release.
+ umount /dev
*** Error code 1

Stop in /usr/src/release.

I have the kernel config at /root/kernels/MYKERNEL and
/usr/src/sys/amd64/conf/MYKERNEL is a symlink to the kernel config.
The applicable environment variables are set in my .profile as
follows:

BUILDNAME=8.2-RELEASE-MYKERNEL-1.1
CHROOTDIR=/app/release
CVSROOT=/home/cvs
EXTPORTSDIR=/usr/ports
EXTSRCDIR=/usr/src
KERNELS=GENERIC MYKERNEL
MAKE_DVD=YES
NODOC=YES
NO_FLOPPIES=YES

I am unsure how to get `make release` to realize the location of the
kernel config.  Also, I notice that in the command to make the kernel,
DESTDIR is set to /R/stage/kernels while the CHROOTDIR (and the
location where I want the release to be built) is /app/release.

I am wondering if someone knows how I may resolve the issue so I can
get the release built.  I appreciate any advice and feedback.  Thanks.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org