From owner-freebsd-arch@FreeBSD.ORG Thu Sep 8 18:19:11 2005 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42A8016A41F for ; Thu, 8 Sep 2005 18:19:11 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id B052143D46 for ; Thu, 8 Sep 2005 18:19:08 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id j88IOFu3027087 for ; Thu, 8 Sep 2005 14:24:15 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-arch@FreeBSD.org Date: Thu, 8 Sep 2005 14:18:44 -0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_HCIID6syY0rPUQu" Message-Id: <200509081418.47794.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.85.1/1069/Wed Sep 7 11:08:51 2005 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Subject: Bigger boot block size? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2005 18:19:11 -0000 --Boundary-00=_HCIID6syY0rPUQu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I have been working on boot2 recently. I faced constant problem with boot2 size limitation. Can we have bigger boot block size (aka BBSIZE)? In the future, we may have to support different file system to boot from and we won't have any space to add the support without dropping UFS1 support. In fact, I am using 32-sector boot block and I don't see any problem so far. The patch that I've been using is attached. Cheers, Jung-uk Kim --Boundary-00=_HCIID6syY0rPUQu Content-Type: text/x-diff; charset="us-ascii"; name="32sect.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="32sect.diff" Index: src/sys/boot/i386/boot2/Makefile =================================================================== RCS file: /home/ncvs/src/sys/boot/i386/boot2/Makefile,v retrieving revision 1.59 diff -u -r1.59 Makefile --- src/sys/boot/i386/boot2/Makefile 15 Jul 2005 12:22:14 -0000 1.59 +++ src/sys/boot/i386/boot2/Makefile 8 Sep 2005 18:13:32 -0000 @@ -60,9 +60,9 @@ boot2.s boot2.s.tmp boot2.h sio.o boot2: boot2.ld - @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + @set -- `ls -l boot2.ld`; x=$$((15872-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + dd if=boot2.ld of=${.TARGET} obs=15872 conv=osync boot2.ld: boot2.ldr boot2.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ Index: src/sys/boot/i386/boot2/boot1.S =================================================================== RCS file: /home/ncvs/src/sys/boot/i386/boot2/boot1.S,v retrieving revision 1.30 diff -u -r1.30 boot1.S --- src/sys/boot/i386/boot2/boot1.S 28 Aug 2004 08:32:23 -0000 1.30 +++ src/sys/boot/i386/boot2/boot1.S 8 Sep 2005 18:13:32 -0000 @@ -37,7 +37,7 @@ .set SIZ_PAG,0x1000 # Page size .set SIZ_SEC,0x200 # Sector size - .set NSECT,0x10 + .set NSECT,0x20 .globl start .globl xread .code16 Index: src/sys/sys/disklabel.h =================================================================== RCS file: /home/ncvs/src/sys/sys/disklabel.h,v retrieving revision 1.107 diff -u -r1.107 disklabel.h --- src/sys/sys/disklabel.h 7 Apr 2005 22:09:02 -0000 1.107 +++ src/sys/sys/disklabel.h 8 Sep 2005 18:13:32 -0000 @@ -68,7 +68,7 @@ #endif /* Size of bootblock area in sector-size neutral bytes */ -#define BBSIZE 8192 +#define BBSIZE 16384 #define LABEL_PART 2 /* partition containing label */ #define RAW_PART 2 /* partition containing whole disk */ --Boundary-00=_HCIID6syY0rPUQu--