Subject: Re: Novice build.sh / mk.conf Questions
To: Jeff <beaker@freeshell.org>
From: Bruce O'Neel <edoneel@sdf.lonestar.org>
List: port-sparc
Date: 03/02/2006 11:01:08
Hi,

My /etc/mk.conf looks like:

-----
.ifdef BSD_PKG_MK

# pkgsrc only options

.else  # BSD_PKG_MK

COPTS?= -pipe ${DEFCOPTS}

# For cross-compiling
. if ${MACHINE_ARCH} == sparc
COPTS+=-mcpu=v8
. elif ${MACHINE_ARCH} == sparc64
COPTS+=-mcpu=ultrasparc
. elif ${MACHINE_ARCH} == powerpc
COPTS+=-mcpu=750
. elif ${MACHINE_ARCH} == alpha
COPTS+=-mcpu=21164a
. elif ${MACHINE_ARCH} == i386
COPTS+=-march=pentium2 -mcpu=pentium3
. endif

.endif  # BSD_PKG_MK

-----

I built current on a hypersparc system from a few days ago and it's
running just fine on a dual 135mhz Hypersparc system with -mcpu=v8.
OTOH, I don't see any huge speed increase...

I've, in the past, tried to build with -mcpu=hypersparc and not
been sucessful.  I can try again in a few days.

It's always possible that the machine description files for the hypersparc
have not been tested as much recently as the sparc ones.  This could mean 
that they don't quite work.  I'm also not sure that the hypersparc
gets any huge benefit from special scheduling.  It's not that complex.

cheers

bruce


On Tue, Feb 28, 2006 at 10:17:02PM -0800, Jeff wrote:
> Hey all,
> I recently acquired a nice SS20 w/ dual Ross CPUs (RT620/625 @ 200MHz) 
> and did a fresh 3.0 install w/ the GENERIC.MP kernel.  The system runs 
> just fine however I'm trying to bump up the performance by rebuilding 
> everything with the following (gleaned from various port-sparc posts) in 
> /etc/mk.conf:
> 
> # cat /etc/mk.conf
> CPUFLAGS=-mcpu=hypersparc
> COPTS+=-pipe
> BUILDFLAGS+=-j3
> 
> I've already built the toolchain and distribution per steps 2 & 3 in the 
> "Tracking NetBSD-current: updating" document (please see below and/or 
> http://www.netbsd.org/Documentation/current/#updating) but am having 
> problems with building a kernel - even GENERIC / GENERIC.MP .  GENERIC 
> and GENRIC.MP appear to build okay (no errors appear) however neither 
> will actually boot (GENERIC.MP causes a Watchdog Reset; GENERIC actually 
> hangs the system).  Both appear to get stuck right after the following 
> dmesg output:
> ...
> ms0 at zs1 channel 1: baud rate 1200
> 
> Not sure if that's actually meaningful of just a coincidence.  Anyways, 
> reading through the port-sparc and other list archives suggests that on 
> sparc a watchdog reset would be due to a kernel bug so maybe my mk.conf 
> needs tweaking (I'm assuming that GENERIC/GENERIC.MP _are_ configured 
> correctly since the system is currently running fine).  BTW, I'm working 
> with the netbsd-3-0 src checked out Feb 26, 2006 via CVS.
> 
> Along similar lines, are the steps in "Tracking NetBSD-current: 
> updating" appropriate and in the right order for what I want to do?
> I'm pretty much following the document exactly except for the TOOLDIR 
> and OBJDIR locations which are /var/usr/tools and /var/usr/obj respectively:
> 
> (from "Tracking NetBSD-current")
> 
> #1  From the root of the source tree:
> 
> $ cd /usr/src
> 
> #2 Build the toolchain:
> 
> $ ./build.sh -O ../obj -T ../tools -U -u tools
> 
> #3 Build the distribution:
> 
> $ ./build.sh  -O ../obj -T ../tools -U -u distribution
> 
> #4 Build the kernel:
> 
> $ ./build.sh  -O ../obj -T ../tools -U -u kernel=GENERIC
> 
> #5 Install the kernel:
> 
>     $ cd ../obj/sys/arch/<ARCH>/compile/GENERIC
>     $ su
>     # mv /netbsd /netbsd.old
>     # cp netbsd /netbsd
> 
> #6 Reboot into the new kernel:
> 
>     # shutdown -r now
> --
> 
> 
> My current dmesg (GENERIC.MP kernel) is below for reference.
> 
> Cheers,
> Jeff
> 
> --
> 
> NetBSD 3.0 (GENERIC.MP) #0: Mon Dec 19 04:05:22 UTC 2005
> 
> builds@b3.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/sparc/200512182024Z-obj/home/bui
> lds/ab/netbsd-3-0-RELEASE/src/sys/arch/sparc/compile/GENERIC.MP
> total memory = 255 MB
> avail memory = 245 MB
> bootpath: 
> /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
> mainbus0 (root): SUNW,SPARCstation-20: hostid 7237e346
> cpu0 at mainbus0: mid 8: RT620/625 @ 200 MHz, on-chip FPU
> cpu0: 512K byte write-back, 32 bytes/line, sw flush: cache enabled
> cpu1 at mainbus0: mid 10: RT620/625 @ 200 MHz, on-chip FPU
> cpu1: 512K byte write-back, 32 bytes/line, sw flush: cache enabled
> obio0 at mainbus0
> clock0 at obio0 slot 0 offset 0x200000: mk48t08
> timer0 at obio0 slot 0 offset 0x300000: delay constant 65
> zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
> zstty0 at zs0 channel 0 (console i/o)
> zstty1 at zs0 channel 1
> zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
> kbd0 at zs1 channel 0: baud rate 1200
> ms0 at zs1 channel 1: baud rate 1200
> fdc0 at obio0 slot 0 offset 0x700000 level 11 softpri 4: chip 82077
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> auxreg0 at obio0 slot 0 offset 0x800000
> power0 at obio0 slot 0 offset 0xa01000 level 2
> iommu0 at mainbus0 ioaddr 0xe0000000: version 0x1/0x1, page-size 4096, 
> range 64MB
> sbus0 at iommu0: clock = 25 MHz
> dma0 at sbus0 slot 15 offset 0x400000: DMA rev 2
> esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
> scsibus0 at esp0: 8 targets, 8 luns per target
> ledma0 at sbus0 slot 15 offset 0x400010: DMA rev 2
> le0 at ledma0 slot 15 offset 0xc00000 level 6: address 08:00:20:23:75:47
> le0: 8 receive buffers, 2 transmit buffers
> bpp0 at sbus0 slot 15 offset 0x4800000 level 2 (ipl 3): DMA rev 2
> SUNW,DBRIe at sbus0 slot 14 offset 0x10000 level 9 not configured
> cgsix0 at sbus0 slot 1 offset 0x0 level 9: SUNW,501-2325, 1152 x 900, 
> rev 11cgsix0: attached to /dev/fb
> dma1 at sbus0 slot 2 offset 0x400000: DMA rev 1+
> esp1 at sbus0 slot 2 offset 0x800000 level 5: FAS366/HME, 25MHz, SCSI ID 7
> scsibus1 at esp1: 16 targets, 8 luns per target
> PTI,sbs430 at sbus0 slot 2 offset 0x800000 not configured
> hme0 at sbus0 slot 3 offset 0x8c00000 level 4 (ipl 7): Sun Happy Meal 
> Ethernet (SUNW,hme)
> hme0: Ethernet address 08:00:20:23:75:47
> nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
> nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> eccmemctl0 at mainbus0 ioaddr 0x0: version 0x0/0x2
> Kernelized RAIDframe activated
> scsibus0: waiting 2 seconds for devices to settle...
> scsibus1: waiting 2 seconds for devices to settle...
> sd0 at scsibus0 target 1 lun 0: <COMPAQ, DGHS09Y, 01C0> disk fixed
> sd0: 8678 MB, 8152 cyl, 10 head, 218 sec, 512 bytes/sect x 17773500 sectors
> sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers, tagged 
> queueing
> cd0 at scsibus0 target 6 lun 0: <TOSHIBA, XM-4101TASUNSLCD, 1755> cdrom 
> removable
> cd0: async, 8-bit transfers
> root on sd0a dumps on sd0b
> root file system type: ffs
> cpu0: booting secondary processors: cpu1
> 
> EOF

-- 
edoneel@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org