From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 18 07:12:01 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0323106566C for ; Fri, 18 Sep 2009 07:12:00 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 74B4B8FC1E for ; Fri, 18 Sep 2009 07:12:00 +0000 (UTC) Received: from park.js.berklix.net (p549A4C21.dip.t-dialin.net [84.154.76.33]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id n8I71YD2095991 for ; Fri, 18 Sep 2009 07:01:35 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id n8HM7RBI051313 for ; Fri, 18 Sep 2009 00:07:27 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id n8HM9k4q043009 for ; Fri, 18 Sep 2009 00:09:51 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200909172209.n8HM9k4q043009@fire.js.berklix.net> To: hackers@freebsd.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Linux Unix Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com/~jhs/cv/ Date: Fri, 18 Sep 2009 00:09:46 +0200 Sender: jhs@berklix.com Cc: Subject: genuine cpu I386_CPU kernel support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2009 07:12:01 -0000 Hi hackers, I'm trying to get my Genuine 386 running 7.2. It currently runs 4.11. 386 was first base of FreeBSD, a shame to lose it. So far I've hacked diffs as below + the normal /etc/make.conf CFLAGS += -march=i386 cross compiled all bins libs etc & setenv DESTDIR /usr/7.2 i cd /usr/src/etc l make distrib-dirs cd .. ; make install But manually unloading 4.11 kernel & loading 7.2 kernel & booting doesnt yet boot far enough to encourage me to move bins yet, I think I need to do a bit more kernel before that ? This is what I gave so far. Input welcome. *** /pri/freebsd/releases/7.2-RELEASE/src/sys/./conf/options.i386 Wed Apr 15 05:14:26 2009 --- /usr/src/sys/./conf/options.i386 Thu Sep 17 10:53:11 2009 *************** *** 71,76 **** --- 71,78 ---- NO_MEMORY_HOLE opt_cpu.h # The CPU type affects the endian conversion functions all over the kernel. + // jhs@berklix added I386_CPU + I386_CPU opt_global.h I486_CPU opt_global.h I586_CPU opt_global.h I686_CPU opt_global.h *** /pri/freebsd/releases/7.2-RELEASE/src/sys/./crypto/blowfish/arch/i386/bf_enc.S Wed Apr 15 05:14:26 2009 --- /usr/src/sys/./crypto/blowfish/arch/i386/bf_enc.S Thu Sep 17 10:54:51 2009 *************** *** 10,16 **** * XXX Should use CPP symbols defined as a result of * XXX `cc -mcpu=pentiumpro'. */ ! #if defined(I486_CPU) || defined(I586_CPU) #include "bf_enc_586.S" #else #include "bf_enc_686.S" --- 10,17 ---- * XXX Should use CPP symbols defined as a result of * XXX `cc -mcpu=pentiumpro'. */ ! // jhs@berklix added I386_CPU ! #if defined(I386_CPU) || defined(I486_CPU) || defined(I586_CPU) #include "bf_enc_586.S" #else #include "bf_enc_686.S" *** /pri/freebsd/releases/7.2-RELEASE/src/sys/./i386/conf/GENERIC Wed Apr 15 05:14:26 2009 --- /usr/src/sys/./i386/conf/GENERIC Thu Sep 17 10:56:26 2009 *************** *** 18,23 **** --- 18,24 ---- # # $FreeBSD: src/sys/i386/conf/GENERIC,v 1.474.2.17.2.1 2009/04/15 03:14:26 kensmith Exp $ + cpu I386_CPU # jhs@berklix added I386_CPU cpu I486_CPU cpu I586_CPU cpu I686_CPU *** /pri/freebsd/releases/7.2-RELEASE/src/sys/./i386/i386/identcpu.c Wed Apr 15 05:14:26 2009 --- /usr/src/sys/./i386/i386/identcpu.c Thu Sep 17 11:05:05 2009 *************** *** 622,627 **** --- 622,628 ---- break; case CPUCLASS_386: printf("386"); + // jhs@berklix do we need to add code ? break; #if defined(I486_CPU) case CPUCLASS_486: *************** *** 909,915 **** { #if !defined(lint) ! #if !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU) #error This kernel is not configured for one of the supported CPUs #endif #else /* lint */ --- 910,917 ---- { #if !defined(lint) ! // jhs@berklix added I386_CPU ! #if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU) #error This kernel is not configured for one of the supported CPUs #endif #else /* lint */ *************** *** 920,926 **** --- 922,930 ---- */ switch (cpu_class) { case CPUCLASS_286: /* a 286 should not make it this far, anyway */ + #if !defined(I386_CPU) // jhs@berklix added I386_CPU case CPUCLASS_386: + #endif // jhs@berklix added I386_CPU #if !defined(I486_CPU) case CPUCLASS_486: #endif Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail ASCII plain text not HTML & Base64. http://asciiribbon.org Virused Microsoft PCs cause spam. http://berklix.com/free/