Updated cpuflags to 0.9:
Update SA-110 in Risc PC with problem memory bus switch: - Pickup post 1.5 cats, dnard, hpcarm, or netwinder as OK. - If in 1.5 check for footbridge0 or ofw0 as OK. Thanks to Chris Gilbert for details.
This commit is contained in:
parent
50be31bda2
commit
ad86e589aa
2 changed files with 23 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.8 2001/08/10 09:03:07 abs Exp $
|
||||
# $NetBSD: Makefile,v 1.9 2001/08/27 20:58:38 abs Exp $
|
||||
#
|
||||
|
||||
DISTNAME= cpuflags-0.8
|
||||
DISTNAME= cpuflags-0.9
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= # empty
|
||||
DISTFILES= # empty
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: cpuflags.NetBSD,v 1.8 2001/08/10 09:03:07 abs Exp $
|
||||
# $NetBSD: cpuflags.NetBSD,v 1.9 2001/08/27 20:58:38 abs Exp $
|
||||
|
||||
if [ -x /sbin/sysctl ] ;then
|
||||
hw_model=`/sbin/sysctl -n hw.model`
|
||||
else # NetBSD 1.3
|
||||
hw_model=`/usr/sbin/sysctl -n hw.model`
|
||||
SYSCTL=/sbin/sysctl
|
||||
else
|
||||
SYSCTL=/usr/sbin/sysctl # NetBSD 1.3
|
||||
fi
|
||||
|
||||
hw_model=`$SYSCTL -n hw.model`
|
||||
|
||||
case $hw_model in
|
||||
# i386
|
||||
*386-class*) FLAGS='-march=i386' ;;
|
||||
|
@ -27,14 +29,21 @@ case $hw_model in
|
|||
ARM610*) FLAGS="-mcpu=arm610" ;; # risc pc
|
||||
ARM710*) FLAGS="-mcpu=arm710" ;; # risc pc
|
||||
SA-110*)
|
||||
# The memorybus in strongarm risc pc machines cannot support
|
||||
# certain strongarm instructions, but we cannot tell a shark
|
||||
# from such a risc pc via uname or sysctl (Certainly for 1.5)
|
||||
if grep -q ofbus0 /var/run/dmesg.boot 2>/dev/null ; then
|
||||
FLAGS="-mcpu=strongarm110" # shark
|
||||
else
|
||||
FLAGS="-march=armv3m -mtune=strongarm" # risc pc
|
||||
fi ;;
|
||||
hw_machine=`$SYSCTL -n hw.machine` # arm32 split post 1.5
|
||||
case $hw_machine in
|
||||
cats|dnard|hpcarm|netwinder)
|
||||
FLAGS="-mcpu=strongarm110" ;;
|
||||
*)
|
||||
# The memorybus in strongarm risc pc machines cannot support
|
||||
# certain strongarm instructions, but in 1.5 and earlier all
|
||||
# strongarm machines are 'arm32', so uname or sysctl no use
|
||||
if egrep -q ofbus0|footbridge0 /var/run/dmesg.boot 2>/dev/null \
|
||||
; then
|
||||
FLAGS="-mcpu=strongarm110" # dnard/cats
|
||||
else
|
||||
FLAGS="-march=armv3m -mtune=strongarm" # risc pc
|
||||
fi
|
||||
esac ;;
|
||||
#
|
||||
*) echo "Unknown hw.model '$hw_model'" >&2
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue