今日のボク
2007/10/08(月) 25:17 今日のボク はてブ情報 はてブに登録 はてブ数

きょうはOpenBlockS用のCFを買いにアキバに行ってきました。なんか最近また頻繁にアキバに行ってますね。

うろうろしまくって足がかなり疲れたみたいです。

そのかわりと言っては何ですが、ジグソーパズルを買いました。70ピースで難しいかなと思ったのですが、案の定、一発目は全然歯が立たない状態で助けまくって何とか完成しました。

あとは健康器具のコーナーで、足下が高速で揺れるやつが気に入ったみたい。笑いながらやっていたら外人にも受けていたみたい。


CFといえばSanDiskの一番シンプルでスタンダードな奴(SDCFBシリーズ)が動作実績が高く、いわば指名買いしたい逸品なわけです。

が、いつものあきばおーに行ってもお目当てのCFは置いておらず、UltraIIIなどの高速版しか売っていません。

途方に暮れて、店員さんにUltraとかついていない奴はあるかと聞いてみたら、特価品のコーナーに容量のちいさな物ならありますと言われたので、小さいとちょっとなぁと思いながらサイズを聞くと256Mbytesだって。

kernel, base, etcぐらいなら余裕なのでそれを買いました。何かあると困るので2枚買いました。999円でした。

あ、あとヨドバシでメモステ用のケースを買ったのですが、メモステPro Duoにはでかく使えない代物でした。完全なムダです。

名前:  非公開コメント   

  • TB-URL  http://www.tokuda.net/diary/0355/tb/

V3きました
2007/10/08(月) 25:09 ギタドラ はてブ情報 はてブに登録 はてブ数

ヨドバシ.comから送られてきました。

さて、いまからやるか。

名前:  非公開コメント   

  • TB-URL  http://www.tokuda.net/diary/0354/tb/

NetBSD/mpc860を作るときのメモ
2007/10/08(月) 24:48 NetBSD はてブ情報 はてブに登録 はてブ数

なにはなくとも、まずは20070526-UTCなソースを準備します。

macppc-070526.tar.gzをテンポラリで展開し、hfs関連を削除しておきます。
具体的には二つのディレクトリ(sbin/mount_hfs, sys/fs/hfs)を削除します。

20070526-UTCなソースにrm -rf sys/arch/powerpc,macppcします。

hfs抜きのmacppc-070526.tar.gzを展開します。

mpc860-070526.tar.gzを展開します。

etc, distrib関連のファイルを作成します。
  • distrib/sets/lists/base/md.mpc860
  • distrib/sets/lists/comp/md.mpc860
  • etc/etc.mpc860/MAKEDEV.conf
  • etc/etc.mpc860/Makefile.inc
  • etc/etc.mpc860/ttys
tools/Makefile.disklabelにパッチをあてます。reloc.hがちゃんとコピーされるようにするものです。
--- ./tools/Makefile.disklabel.orig     2007-09-26 02:36:32.000000000 +0900
+++ ./tools/Makefile.disklabel  2007-09-26 02:40:01.000000000 +0900
@@ -12,6 +12,8 @@
 
 _ARCH_INCS+=   ews4800mips/include/pdinfo.h ews4800mips/include/vtoc.h
 
+_ARCH_INCS+=   powerpc/include/reloc.h mpc860/include/reloc.h
+
 _INCS=         disktab.h
 _SYSINCS=      bootblock.h \
                disklabel.h disklabel_acorn.h disklabel_gpt.h dkbad.h
Makefile.mpc860.diffにパッチをあてます。toolsで作ったものを使うように変更します。
--- ./sys/arch/mpc860/conf/Makefile.mpc860.orig 2007-09-21 22:54:39.000000000 +0900
+++ ./sys/arch/mpc860/conf/Makefile.mpc860      2007-09-26 03:03:01.000000000 +0900
@@ -17,19 +17,19 @@
 # DEBUG is set to -g if debugging.
 # PROF is set to -pg if profiling.
 
-AR?=   ar
-AS?=   as
-CC?=   cc
-CPP?=  cpp
-LD?=   ld
-LORDER?=lorder
-MKDEP?=        mkdep
-NM?=   nm
-OBJCOPY?=objcopy
-RANLIB?=ranlib
-SIZE?= size
-STRIP?=        strip
-TSORT?=        tsort -q
+AR=    ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-ar
+AS=    ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-as
+CC=    ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-gcc
+CPP=   ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-cpp
+LD=    ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-ld
+LORDER=${TOOLDIR}/bin/nblorder
+MKDEP= ${TOOLDIR}/bin/nbmkdep
+NM=    ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-nm
+OBJCOPY=${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-objcopy
+RANLIB=${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-ranlib
+SIZE=  ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-size
+STRIP= ${TOOLDIR}/bin/${MACHINE_ARCH}--netbsd-strip
+TSORT= ${TOOLDIR}/bin/nbtsort -q
 
 COPTS?= -O2 -pipe
 
@@ -127,7 +127,7 @@
 %LOAD
 
 assym.h: ${PPC}/mpc860/genassym.cf
-       genassym ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
+       ${TOOLDIR}/bin/nbgenassym ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
            < ${PPC}/mpc860/genassym.cf > assym.h.tmp && \
        mv -f assym.h.tmp assym.h
 
@@ -188,7 +188,7 @@
 .if ${SFILES} != ""
        ${MKDEP} -a -- ${AFLAGS} ${CPPFLAGS} ${SFILES}
 .endif
-       genassym ${MKDEP} -f assym.dep -- ${CFLAGS} \
+       ${TOOLDIR}/bin/nbgenassym ${MKDEP} -f assym.dep -- ${CFLAGS} \
          ${CPPFLAGS} < ${PPC}/mpc860/genassym.cf
        @sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
        @rm -f assym.dep
ad.powerpcにパッチです。checkflistを通すためにごりごり書いています。
--- ./distrib/sets/lists/comp/ad.powerpc.orig   2007-10-03 10:30:50.000000000 +0900
+++ ./distrib/sets/lists/comp/ad.powerpc        2007-10-01 02:30:20.000000000 +0900
@@ -6,7 +6,6 @@
 ./usr/include/powerpc/ansi.h                   comp-c-include
 ./usr/include/powerpc/aout_machdep.h           comp-c-include
 ./usr/include/powerpc/asm.h                    comp-c-include
-./usr/include/powerpc/atomic.h                 comp-c-include
 ./usr/include/powerpc/bat.h                    comp-obsolete           obsolete
 ./usr/include/powerpc/bswap.h                  comp-c-include
 ./usr/include/powerpc/bus.h                    comp-obsolete           obsolete
@@ -20,11 +19,6 @@
 ./usr/include/powerpc/frame.h                  comp-c-include
 ./usr/include/powerpc/hid.h                    comp-obsolete           obsolete
 ./usr/include/powerpc/hid_601.h                        comp-obsolete           obsolete
-./usr/include/powerpc/ibm4xx                   comp-c-include
-./usr/include/powerpc/ibm4xx/cpu.h             comp-c-include
-./usr/include/powerpc/ibm4xx/pmap.h            comp-c-include
-./usr/include/powerpc/ibm4xx/pte.h             comp-obsolete           obsolete
-./usr/include/powerpc/ibm4xx/tlb.h             comp-c-include
 ./usr/include/powerpc/ieee.h                   comp-c-include
 ./usr/include/powerpc/ieeefp.h                 comp-c-include
 ./usr/include/powerpc/int_const.h              comp-c-include
@@ -32,6 +26,7 @@
 ./usr/include/powerpc/int_limits.h             comp-c-include
 ./usr/include/powerpc/int_mwgwtypes.h          comp-c-include
 ./usr/include/powerpc/int_types.h              comp-c-include
+./usr/include/powerpc/ipkdb.h          comp-c-include
 ./usr/include/powerpc/kcore.h                  comp-c-include
 ./usr/include/powerpc/limits.h                 comp-c-include
 ./usr/include/powerpc/lock.h                   comp-c-include
@@ -47,18 +42,10 @@
 ./usr/include/powerpc/mpc6xx/sr_601.h          comp-obsolete           obsolete
 ./usr/include/powerpc/mpc6xx/vmparam.h         comp-obsolete           obsolete
 ./usr/include/powerpc/mutex.h                  comp-c-include
-./usr/include/powerpc/oea                      comp-c-include
-./usr/include/powerpc/oea/bat.h                        comp-c-include
-./usr/include/powerpc/oea/hid.h                        comp-c-include
-./usr/include/powerpc/oea/hid_601.h            comp-c-include
-./usr/include/powerpc/oea/pmap.h               comp-c-include
-./usr/include/powerpc/oea/pte.h                        comp-c-include
-./usr/include/powerpc/oea/sr_601.h             comp-c-include
-./usr/include/powerpc/oea/vmparam.h            comp-c-include
 ./usr/include/powerpc/param.h                  comp-c-include
 ./usr/include/powerpc/pcb.h                    comp-c-include
+./usr/include/powerpc/pio.h                    comp-c-include
 ./usr/include/powerpc/pmap.h                   comp-c-include
-./usr/include/powerpc/pmc.h                    comp-c-include
 ./usr/include/powerpc/proc.h                   comp-c-include
 ./usr/include/powerpc/profile.h                        comp-c-include
 ./usr/include/powerpc/psl.h                    comp-c-include
@@ -69,7 +56,6 @@
 ./usr/include/powerpc/rwlock.h                 comp-c-include
 ./usr/include/powerpc/setjmp.h                 comp-c-include
 ./usr/include/powerpc/signal.h                 comp-c-include
-./usr/include/powerpc/spr.h                    comp-c-include
 ./usr/include/powerpc/stdarg.h                 comp-c-include
 ./usr/include/powerpc/trap.h                   comp-c-include
 ./usr/include/powerpc/types.h                  comp-c-include
build.shにパッチをあてます。mpc860を追加するだけです。
--- ./build.sh.orig     2007-09-21 10:05:31.000000000 +0900
+++ ./build.sh  2007-09-21 22:54:10.000000000 +0900
@@ -336,7 +336,7 @@
                MACHINE_ARCH=powerpc64
                ;;
 
-       amigappc|bebox|evbppc|ibmnws|macppc|mvmeppc|ofppc|pmppc|prep|sandpoint)
+       amigappc|bebox|evbppc|ibmnws|macppc|mpc860|mvmeppc|ofppc|pmppc|prep|sandpoint)
                MACHINE_ARCH=powerpc
                ;;
 
ip_compat.hにパッチをあてます。caddr_tの重複定義を回避するんですがよくわかりません。
--- ./sys/dist/ipf/netinet/ip_compat.h.orig     2007-09-26 08:30:22.000000000 +0900
+++ ./sys/dist/ipf/netinet/ip_compat.h  2007-10-01 04:39:47.000000000 +0900
@@ -737,7 +737,10 @@
 #  define      GETKTIME(x)     microtime((struct timeval *)x)
 #  define      IPF_PANIC(x,y)  if (x) { printf y; panic("ipf_panic"); }
 #if __NetBSD_Version__ >= 499001000
+#ifndef CADDR_T_DEFINED
+#define CADDR_T_DEFINED
 typedef unsigned char * caddr_t;
+#endif
 #  define      COPYIN(a,b,c)   copyin((a), (b), (c))
 #  define      COPYOUT(a,b,c)  copyout((a), (b), (c))
 #  define      BCOPYIN(a,b,c)  bcopy((a), (b), (c))
types.hへのパッチです。ip_compat.hと対です。
--- ./sys/arch/powerpc/include/types.h.orig     2007-09-26 08:31:26.000000000 +0900
+++ ./sys/arch/powerpc/include/types.h  2007-09-26 09:41:28.000000000 +0900
@@ -41,9 +41,12 @@
 #if defined(_KERNEL) || defined(_STANDALONE)
 #ifndef caddr_t
 typedef char *caddr_t;         /* core address */
+#ifndef CADDR_T_DEFINED
+#define CADDR_T_DEFINED
 #define caddr_t __caddr_t
 #endif
 #endif
+#endif
 
 #ifdef _KERNEL
 typedef struct label_t {
これでbuild.shでreleaseまで一直線のはず。

名前:  非公開コメント   

  • TB-URL  http://www.tokuda.net/diary/0353/tb/

NetBSD/mpc860 久しぶりに動きました
2007/10/08(月) 24:23 NetBSD はてブ情報 はてブに登録 はてブ数

20070526-UTCなsource + macppc-070526.tar.gz + mpc860-070526.tar.gz + いくつかのパッチをあてることで数年ぶりにNetBSD/mpc860が更新されました。久しぶりすぎて本当に嬉しい。

SanDiskの256MbytesのCFにインストールして起動した様子は次のとおりです。
>> OpenBlockS Boot, Revision 1.2
>> (root@r1.home.tokuda.net, Tue Oct  4 02:57:22 UTC 2005)
1659188+100736 [110160+105435]=0x1e2884
 start=0x10000
ssym = 1bdab4, esym = 1fb000
NetBSD 4.99.20 (MPC860) #0: Thu Oct  4 10:39:09 JST 2007
        tokuda@MacBook.local:/Users/tokuda/NetBSD/s/20070526/src/sys/arch/mpc860/compile/MPC860
total memory = 16384 KB
avail memory = 13964 KB
mainbus0 (root)
cpu0 at mainbus0: 860 (Revision 0)
pbus0 at mainbus0
scc0 at pbus0: vec 9 (console)
fec0 at pbus0: vec 7 address 00:80:6d:47:29:d5
tqphy0 at fec0 phy 1: 78Q2120 10/100 media interface, rev. 11
tqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sce0 at pbus0: vec 9 address 00:80:6d:47:29:d6
obus0 at mainbus0
wdc0 at obus0: vec 8 addr 0x80000010
atabus0 at wdc0 channel 0
wd0 at atabus0 drive 0: <SanDisk SDCFB-256>
wd0: 245 MB, 980 cyl, 16 head, 32 sec, 512 bytes/sect x 501760 sectors
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
Mon Oct  8 16:46:44 UTC 2007
Checking for botched superblock upgrades: done.
Starting file system checks:
/dev/rwd0a: file system is clean; not checking
Setting tty flags.
Setting sysctl variables:
^LStarting network.
Hostname: obs50
Configuring network interfaces: fec0.
add net default: gateway 192.168.100.1
Adding interface aliases:
Building databases: dev, utmp, utmpx done
Starting syslogd.
Checking for core dump...
savecore: no core dump (invalid dumplo)
Mounting all filesystems...
Clearing temporary files.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
/etc/rc: WARNING: No swap space configured!
Starting virecover.
Starting local daemons:.
Updating motd.
Starting inetd.
Starting cron.
Mon Oct  8 16:46:59 UTC 2007

NetBSD/mpc860 (obs50) (console)

login: tokuda
Password:
Last login: Mon Oct  8 16:44:18 2007 on tty??
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.20 (MPC860) #0: Thu Oct 4 10:39:09 JST 2007

Welcome to NetBSD!

This system is running a development snapshot of the NetBSD operating system,
also known as NetBSD-current.  It is highly possible for it to contain serious
bugs, regressions, broken features or other problems.  Please bear this in mind
and use the system with care.

You are encouraged to test this version as thoroughly as possible.  Should you
encounter any problem, please report it back to the development team using the
send-pr(1) utility (requires a working MTA).  If yours is not properly set up,
use the web interface at: http://www.NetBSD.org/Misc/send-pr.html

Thank you for helping us test and improve NetBSD.

% uname -a
NetBSD obs50 4.99.20 NetBSD 4.99.20 (MPC860) #0: Thu Oct  4 10:39:09 JST 2007  tokuda@MacBook.local:/Users/tokuda/NetBSD/s/20070526/src/sys/arch/mpc860/compile/MPC860 mpc860
%

1: Gao 2009年09月05日(土) 午前8時32分

Hi, will the patch to support mpc860 to be public?

2: Hiroshi Tokuda 2009年09月23日(水) 午前11時00分

>Hi, will the patch to support mpc860 to be public?

macppc + mpc860
ftp://nandra.segv.jp/pub/NetBSD/


名前:  非公開コメント   

  • TB-URL  http://www.tokuda.net/diary/0352/tb/