Subject: Re: Compiling kernels
To: Duncan Ferguson <d.ferguson@worc.ac.uk>
From: Ale Terlevich <A.I.Terlevich@durham.ac.uk>
List: port-arm32
Date: 07/01/1997 11:50:56
> Hiya
>
> Quick question (yet again ;o).
>
> I want to compile my own kernel so i have the sys.tar.gz fom NetBSD
> (as of the 28th June) but i am unsure which patches i need for
> RiscBSD.
>
> Looking back over the mailing listarchive sites at NetBSD
> and at Noxious it _seems_ that i only need the ffs_inode.c.patch. Is
> this right?
Yep. Unles you plan on using the cumana scsi II driver.
However, the ffs_inode.c.patch doesn't work since the ext2fs was added
a couple of weeks ago.
Here's my modified version wich works. (At least I've had no problems).
I just changed the i_din.di_ib to i_ffs_ib in the patch. (Ant the other
structures which have changed similarly. See sys/ufs/ufs/inode.h for a list.)
Ale.
*** ffs_inode.c.orig Tue Jul 1 11:42:42 1997
--- ffs_inode.c Tue Jul 1 11:43:06 1997
***************
*** 96,101 ****
--- 96,121 ----
if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)
return (0);
ip = VTOI(ap->a_vp);
+
+ /* Lets us validate the indirect addsresses */
+
+ if ((ip->i_ffs_mode & IFMT) != IFLNK) {
+ int j;
+ for (j = 0; j < NIADDR; j++) {
+ if (ip->i_ffs_ib[j] >= 0x00400000) {
+ printf("ffs_update: bad indirect addr (%d): inode=%d %d/%08x ip=%08x adr=%08x\n",
+ j, ip->i_number, ip->i_ffs_ib[j], ip->i_ffs_ib[j],
+ (u_int)ip, (u_int)&ip->i_ffs_ib[j]);
+ vprint("inode vp", ip->i_devvp);
+ }
+ if (ip->i_ffs_ib[j] == 0x00400000) {
+ ip->i_ffs_ib[j] = 0;
+ printf("ffs_update: bad indirect addr patched inode=%d\n",
+ ip->i_number);
+ }
+ }
+ }
+
TIMEVAL_TO_TIMESPEC(&time, &ts);
FFS_ITIMES(ip, ap->a_access, ap->a_modify, &ts);
if ((ip->i_flag & IN_MODIFIED) == 0)