Re: Own Install CD with custom kernel

2007-10-05 Thread Matthias Fechner
Hello Ulrich,

* Ulrich Spoerlein <[EMAIL PROTECTED]> [25-09-07 18:27]:
> [...]
> install.cfg, take a look at
> /usr/src/usr.sbin/sysinstall/install.cfg

thx a lot for your emails I was now able to generate the CD so it does
exactly what i want.

Best regards,
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Own Install CD with custom kernel

2007-09-24 Thread Matthias Fechner
Hello Ulrich,

* Ulrich Spoerlein <[EMAIL PROTECTED]> [23-09-07 17:19]:
> I'm using a Makefile to drive our release and package building and for
> the releases I'm using an install.cfg, which gets created on the fly,
> since the names of the kernels change now and then, here is the release
> target

thx a lot for your really great answer, but I have some more short
questions. :)
Do you copy the release target to the Makefile in
/usr/src/release/Makefile or do you execute from another place?


> rm -f ${TLR}/usr/src/release/.install.cfg
> [...]
> cd ${TRR}/R/ftp && find -d . | cpio --quiet -dumpl ${TFR}

hm, cannot found the variables TLR and TRR anywhere defined. Can you
please give me some more information how your buildprocess looks?

> And files/install.cfg contains the following

where should I store that file?
man release doesn't give here any information about it.

> So basically, sysinstall is intructed to not install any kernel, but
> after all distributions are extracted the following commands are run
> 
> command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh GENERIC"
> system
> command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh SMP"
> system

where can you say sysinstall that it should run such commands after
the installation?


Best regards,
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Own Install CD with custom kernel

2007-09-20 Thread Matthias Fechner
Hi,

I'm new to that list and I hope it is the right own to rise my question :)

I'm working currently on a custom FreeBSD install CD with included I4B.
But I have my problems and every try takes about 8 hours to rebuild
the CDs again so hopefully I'll get some help here to speed it up a
little :)

What I did:
Prepared my environment like (checkout cvs, copy files, created patch
etc. - default FreeBSD CDs builds fine)

It seems that sysinstall will not install per default the new kernel.
For a non SMP system (like mine) it is I4B.
So it seems to me that I must change /usr/src/usr.sbin/sysinstall to
do this. I attached a patch to this email which should do it.

cd /usr/src/release
make release CHROOTDIR=/home/storage/ownfreebsd BUILDNAME=FreeBSD-I4B \
CVSROOT=/home/storage/ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \
KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \
LOCAL_PATCHES=/root/patch.diff PATCH_FLAGS=-p1 \
KERNELS="I4B I4BSMP GENERIC SMP" |tee /root/build.log

Then I execute the make release command and some hours later I got all
the ISOs I need to install my new system.

Ok so far so good. Now I booted with the new created ISO and try to
install from it. I checked if the right kernel is select in the
distribution selection and yes that is fine.
But at the installation itself it seems that sysinstall is not copying
the kernel to the right place. I got the following message (debugging
messages in sysinstall are enabled):
DEBUG: installFixupKernel: Install I4B kernel
DEBUG: Executing command 'mv /boot/I4B /boot/kernel'
mv: rename /boot/I4B to /boot/kernel: No such file or directory
DEBUG: Command 'mv /boot/I4B /boot/kernel' ressturns status of 1

I checked now the the installed system and there is absolutly no kernel
installed. (no /boot/GENERIC, no /boot/I4B or anything else)

I'm sure that I must oversaw something in sysinstall to change but I
cannot find it.
Can please anyone provide with some help?

Thx a lot!

Best regards,
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

diff -Nur src.orig/usr.sbin/sysinstall/Makefile src/usr.sbin/sysinstall/Makefile
--- src.orig/usr.sbin/sysinstall/Makefile	2006-03-11 19:52:47.0 +0100
+++ src/usr.sbin/sysinstall/Makefile	2007-09-05 07:38:50.0 +0200
@@ -50,6 +50,9 @@
 .if exists(${.CURDIR}/../../sys/${MACHINE}/conf/SMP)
 CFLAGS+=-DWITH_SMP	
 .endif
+.if exists(${.CURDIR}/../../sys/${MACHINE}/conf/I4B)
+CFLAGS+=-DWITH_I4B	
+.endif
 DPADD+=	${LIBDEVINFO}
 LDADD+=	-ldevinfo
 .endif
diff -Nur src.orig/usr.sbin/sysinstall/dist.c src/usr.sbin/sysinstall/dist.c
--- src.orig/usr.sbin/sysinstall/dist.c	2007-03-30 21:21:56.0 +0200
+++ src/usr.sbin/sysinstall/dist.c	2007-09-06 01:37:43.0 +0200
@@ -100,8 +100,16 @@
 static Distribution KernelDistTable[] = {
 DTE_TARBALL("GENERIC",  &KernelDists, KERNEL_GENERIC, "/boot"),
 #ifdef WITH_SMP
+#ifdef WITH_I4B
+DTE_TARBALL("I4BSMP",   &KernelDists, KERNEL_I4BSMP,  "/boot"),
+#else
 DTE_TARBALL("SMP", 	&KernelDists, KERNEL_SMP,	  "/boot"),
 #endif
+#else
+#ifdef WITH_I4B
+DTE_TARBALL("I4B",  &KernelDists, KERNEL_I4B, "/boot"),
+#endif
+#endif
 DTE_END,
 };
 
@@ -216,11 +224,19 @@
 selectKernel(void)
 {
 #ifdef WITH_SMP
+#ifdef WITH_I4B
+return DIST_KERNEL_I4B;
+#else
 /* select default kernel based on deduced cpu count */
 return NCpus > 1 ? DIST_KERNEL_SMP : DIST_KERNEL_GENERIC;
+#endif
+#else
+#ifdef WITH_I4B
+return DIST_KERNEL_I4B;
 #else
 return DIST_KERNEL_GENERIC;
 #endif
+#endif
 }
 
 int
diff -Nur src.orig/usr.sbin/sysinstall/dist.h src/usr.sbin/sysinstall/dist.h
--- src.orig/usr.sbin/sysinstall/dist.h	2006-03-11 19:52:47.0 +0100
+++ src/usr.sbin/sysinstall/dist.h	2007-09-06 01:31:31.0 +0200
@@ -74,6 +74,8 @@
 /* Subtypes for KERNEL distribution */
 #define DIST_KERNEL_GENERIC	0x1
 #define DIST_KERNEL_SMP		0x2
+#define DIST_KERNEL_I4B		0x4
+#define DIST_KERNEL_I4BSMP	0x8
 #define DIST_KERNEL_ALL		0xF
 
 /* Canned distribution sets */
diff -Nur src.orig/usr.sbin/sysinstall/install.c src/usr.sbin/sysinstall/install.c
--- src.orig/usr.sbin/sysinstall/install.c	2006-12-31 19:34:58.0 +0100
+++ src/usr.sbin/sysinstall/install.c	2007-09-15 09:27:35.0 +0200
@@ -910,13 +910,30 @@
 	 * NB: we assume any existing kernel has been saved
 	 * already and the /boot/kernel we remove is empty.
 	 */
+	msgDebug("installFixupKernel: Remove /boot/kernel\n");
 	vsystem("rm -rf /boot/kernel");
-#if WITH_SMP
-	if (dists & DIST_KERNEL_SMP)
+
+	msgDebug("installFixupKernel: Checking for SMP and I4B\n");
+	if (dists & DIST_KERNEL_I4BSMP)
+	{
+		msgDebug("installFixupKernel: Install I4BSMP kernel\n");
+		vsystem("mv /boot/I4BSMP /boot/kernel");
+	}
+	else if (dists & DIST_KERNEL_SMP)
+	{
+		msgDebug("installFixupKernel: Install SMP kernel\n");
 		vsystem