| NetBSD 解説 | sysinst | pkgsrc 各論 | packages | macppc | TsubaiBSD | 絹/software/全文検索
at www.ki.nu

NetBSD 解説

Last Update: "2007/03/17 11:49:54 makoto"

4.99.5

4.99.5 を NetBSD-3.1 で compile
  • (gcc) gcc-3.4.6 を用意
    cd /usr/pkgsrc/lang/gcc43
    sudo make package 
  • (src) 次の三点を用意
    src/sys
    src/common
    src/usr.bin/config  
  • (conf) 名前は何でもいい訳ですが、例えば macppc/conf/L2-1M-PB2-SHM の名前で用意
    include "arch/macppc/conf/GENERIC"
    
    options         L2CR_CONFIG="(L2SIZ_1M|L2CLK_20|L2RAM_PB2)"
    options         SHMMAXPGS=2048
    
    #options         NKMEMPAGES_MAX=24576
    options         DDB_ONPANIC=0  
  • /usr/bin/config を設置
    cd /usr/src/usr.bin/config
    make
    sudo cp config /usr/bin
    sudo mv /usr/sbin/config /usr/sbin/config-3.1
    
  • config and make
       180  11:02   env PATH=/usr/pkg/gcc43/bin:${PATH} config L2-1M-PB2-SHM
       181  11:02   cd ../compile/L2-1M-PB2-SHM/
       182  11:03   env PATH=/usr/pkg/gcc43/bin:${PATH} make depend netbsd
    ../../../../arch/powerpc/powerpc/mem.c: In function `mmrw':
    ../../../../arch/powerpc/powerpc/mem.c:95: warning: dereferencing type-punned pointer will break strict-aliasing rules
    *** Error code 1
    2006/12/12 の日記
    --- sys/arch/powerpc/powerpc/mem.c.orig	2007-01-30 17:09:33.000000000 +0900
    +++ sys/arch/powerpc/powerpc/mem.c	2007-03-17 11:31:38.000000000 +0900
    @@ -72,7 +72,7 @@
     	int flags;
     {
     	vaddr_t v;
    -	u_int c;
    +	psize_t *c;
     	struct iovec *iov;
     	int error = 0;
     	static caddr_t zeropage;
    @@ -90,16 +90,18 @@
     
     		case DEV_MEM:
     			v = uio->uio_offset;
    -			c = uio->uio_resid;
    +			c = (psize_t *) uio->uio_resid;
     			/* This doesn't allow device mapping!	XXX */
    -			pmap_real_memory((paddr_t *) &v, (psize_t *) &c);
    -			error = uiomove((caddr_t)v, c, uio);
    +			pmap_real_memory(
    +	(paddr_t *) &v, 
    +	(psize_t *) c);
    +			error = uiomove((caddr_t)v, (u_int) c, uio);
     			break;
     
     		case DEV_KMEM:
     			v = uio->uio_offset;
    -			c = min(iov->iov_len, MAXPHYS);
    -			error = uiomove((caddr_t)v, c, uio);
    +			c = (psize_t *) min(iov->iov_len, MAXPHYS);
    +			error = uiomove((caddr_t)v, (u_int) c, uio);
     			break;
     
     		case DEV_NULL:
    @@ -116,8 +118,8 @@
     				zeropage = malloc(NBPG, M_TEMP, M_WAITOK);
     				bzero(zeropage, NBPG);
     			}
    -			c = min(iov->iov_len, NBPG);
    -			error = uiomove(zeropage, c, uio);
    +			c = (psize_t *) min(iov->iov_len, NBPG);
    +			error = uiomove(zeropage, (u_int) c, uio);
     			break;
     
     		default:
    
    --- sys/arch/macppc/macppc/bus_dma.c.orig	2007-03-17 11:37:03.000000000 +0900
    +++ sys/arch/macppc/macppc/bus_dma.c	2007-03-17 11:32:28.000000000 +0900
    @@ -152,7 +152,7 @@
     			curaddr = vtophys(vaddr);
     		else
     			pmap_extract(vm_map_pmap(&vm->vm_map),
    -			    vaddr, (paddr_t *)&curaddr);
    +			    vaddr, (paddr_t *) curaddr);
     
     		/*
     		 * If we're beyond the bounce threshold, notify
    
       183  11:10   env LANG=C PATH=/usr/pkg/gcc43/bin:${PATH} make
    
old pkgsrc

この画面は Jeedosaquin によって表示しています。

1.66 2008/03/08