Apple II版の Wizardry がやりたいんだ俺は - ハードウェア入手編(本体)

II Plus や IIe は結構プレミア付いてたりするしさすがに古すぎるので、IIgs 狙いでオークションを物色(ebay, ヤフオク!)

今回は ROM03 の IIgs を入手することが出来ました

メモリは1MB搭載なので、System6もメモリ増設無しで起動可能

f:id:yoshimot0:20171125175122j:plain
Apple IIgs ROM03

IIgs もかなり古いので ReActiveMicro から購入したパーツで電源内部を交換しています

www.reactivemicro.com

www.reactivemicro.com

また、VGA 液晶に表示できるように

www.reactivemicro.com

で 15pin に変換し、さらに

を使用して15KHz をアップスキャンします

GBS8200 のケースは3Dプリンタで制作したものを ebay で入手しました (IIgs本体よりパーツの方が高い・・・)

f:id:yoshimot0:20171125175608j:plain
GBS8200ケース

とりあえずFDから Wizardry が起動できることを確認(実際にはFDDエミュレータからFDイメージを読み込んで起動)

f:id:yoshimot0:20171125180113j:plain
Apple II Wizardry

Apple II版の Wizardry がやりたいんだ俺は - ソフトウェア入手編

無性にWizardryがやりたくなった
しかもオリジナルのApple II版がやりたい

合法的にプレイしたいので、ソフトウェアの入手をどうするか...
Wizardry自体はebayなどでも手に入るが、この時代に5inch FDは厳しい・・・ ドライブもいるしね

で、かなり昔の本であるがウィザードリィコレクション

を購入してディスクイメージを入手することにした (本は大切に保管しておきましょう)

次にハードウェアなのだが、当然Apple IIなんて持ってないので、ハードウェアを探す・・・
Apple IIeとか大きくてアレなので IIgs狙いかなと(IIgsは安く手に入るというのもある)

IIgs には ROMの種類がいくつかあったりして、RAMの搭載容量が違ったりするみたいだけど、ゲームをプレイする分にはあまりこだわらなくてよさそう

ESなXeon E5 v3(2650L相当)にUnixBenchしてみた

ESなので2650Lとはいろいろ違っています(クロックが低いとか、TBの上限も低いなど) ちなみにヤフオクに出品されていたヤツです

UnixBench 5.1.3 は16core以上だとpatch が必要

github.com

で、計測してみた

$ ./Run
make all
make[1]: Entering directory `/home/yoshimoto/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/home/yoshimoto/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

24 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

24 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

24 x Execl Throughput  1 2 3

24 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

24 x File Copy 256 bufsize 500 maxblocks  1 2 3

24 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

24 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

24 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

24 x Process Creation  1 2 3

24 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

24 x Shell Scripts (1 concurrent)  1 2 3

24 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: gamera: GNU/Linux
   OS: GNU/Linux -- 3.10.0-229.el7.x86_64 -- #1 SMP Fri Mar 6 11:36:42 UTC 2015
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 4: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 5: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 6: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 7: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 8: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 9: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 10: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 11: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 12: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 13: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 14: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 15: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 16: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 17: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 18: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 19: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 20: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 21: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 22: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 23: Genuine Intel(R) CPU @ 1.40GHz (2799.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   15:59:57 up 16:18,  2 users,  load average: 0.00, 0.01, 0.05; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Thu Dec 31 2015 15:59:57 - 16:27:49
24 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       16580017.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2072.4 MWIPS (9.9 s, 7 samples)
Execl Throughput                               1692.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        561306.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          152137.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1678529.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                              793954.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  91365.5 lps   (10.0 s, 7 samples)
Process Creation                               7110.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3780.0 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2284.1 lpm   (60.0 s, 2 samples)
System Call Overhead                        1341319.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   16580017.6   1420.7
Double-Precision Whetstone                       55.0       2072.4    376.8
Execl Throughput                                 43.0       1692.4    393.6
File Copy 1024 bufsize 2000 maxblocks          3960.0     561306.2   1417.4
File Copy 256 bufsize 500 maxblocks            1655.0     152137.9    919.3
File Copy 4096 bufsize 8000 maxblocks          5800.0    1678529.0   2894.0
Pipe Throughput                               12440.0     793954.9    638.2
Pipe-based Context Switching                   4000.0      91365.5    228.4
Process Creation                                126.0       7110.4    564.3
Shell Scripts (1 concurrent)                     42.4       3780.0    891.5
Shell Scripts (8 concurrent)                      6.0       2284.1   3806.8
System Call Overhead                          15000.0    1341319.1    894.2
                                                                   ========
System Benchmarks Index Score                                         873.9

------------------------------------------------------------------------
Benchmark Run: Thu Dec 31 2015 16:27:49 - 16:55:53
24 CPUs in system; running 24 parallel copies of tests

Dhrystone 2 using register variables      226486890.8 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    42181.9 MWIPS (10.0 s, 7 samples)
Execl Throughput                              28516.5 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        629987.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          165448.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1937059.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                            11151774.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                2186051.6 lps   (10.0 s, 7 samples)
Process Creation                              73608.0 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  45719.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   6210.4 lpm   (60.1 s, 2 samples)
System Call Overhead                        2752075.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  226486890.8  19407.6
Double-Precision Whetstone                       55.0      42181.9   7669.4
Execl Throughput                                 43.0      28516.5   6631.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     629987.4   1590.9
File Copy 256 bufsize 500 maxblocks            1655.0     165448.0    999.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    1937059.3   3339.8
Pipe Throughput                               12440.0   11151774.0   8964.4
Pipe-based Context Switching                   4000.0    2186051.6   5465.1
Process Creation                                126.0      73608.0   5841.9
Shell Scripts (1 concurrent)                     42.4      45719.4  10782.9
Shell Scripts (8 concurrent)                      6.0       6210.4  10350.7
System Call Overhead                          15000.0    2752075.8   1834.7
                                                                   ========
System Benchmarks Index Score                                        5096.8

消費電力を考えて Lモデル にしてるので、まぁこんなもんですかね ESだし。

Planex GW-450S を Raspberry Pi で使う(その3)

wlan0 を dhcp で設定するように /etc/network/interfaces を修正します

pi@raspberrypi ~ $ sudo vi /etc/network/interfaces

ファイルの中身は以下の様に

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

次に ssid と passphrase を暗号化して /etc/wpa_supplicant/wpa_supplicant.conf に登録します

pi@raspberrypi ~ $ sudo sh -c 'wpa_passphrase SSID PASSPHRASE >> /etc/wpa_supplicant/wpa_supplicant.conf'

/etc/wpa_supplicant/wpa_supplicant.conf には network が追加かれ以下の様になっているはず

pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="SSID"
    #psk="PASSPHRASE"
    psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
}

#psk= の行は 生でパススレーズが書かれているので削除してください

pi@raspberrypi ~ $ sudo reboot

リブートすれば指定した SSID に接続して dhcpIPアドレスが割り当てられます

pi@raspberrypi ~ $ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:192.168.XX.XX  Bcast:192.168.XX.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3207 errors:0 dropped:0 overruns:0 frame:0
          TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:395384 (386.1 KiB)  TX bytes:19201 (18.7 KiB)

Planex GW-450S を Raspberry Pi で使う(その2)

その1 でカーネルモジュールをコンパイルする環境が用意できているので、 GW-450S 用のカーネルモジュールをコンパイルします

Planex からダウンロードできる linux 用ドライバがうまく動かなかったので、 適当なやつに patch したものを github に用意しました

まずリポジトリを手元にクローンしてください

pi@raspberrypi ~ $ git clone -b planex_gw-450s_for_raspi https://github.com/negachov/rtl8812au.git
Cloning into 'rtl8812au'...
remote: Counting objects: 416, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 416 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (416/416), 1.46 MiB | 288 KiB/s, done.
Resolving deltas: 100% (161/161), done.

コンパイルします

pi@raspberrypi ~ $ cd rtl8812au/
pi@raspberrypi ~/rtl8812au $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/3.12.35+/build M=/home/pi/rtl8812au  modules
make[1]: Entering directory '/usr/src/linux-source-3.12'
  CC [M]  /home/pi/rtl8812au/core/rtw_cmd.o
  CC [M]  /home/pi/rtl8812au/core/rtw_security.o
    :
    :
    :
  CC      /home/pi/rtl8812au/8821au.mod.o
  LD [M]  /home/pi/rtl8812au/8821au.ko
make[1]: Leaving directory '/usr/src/linux-source-3.12'

カーネルモジュールをインストールしてリブート

pi@raspberrypi ~/rtl8812au $ sudo make install
install -p -m 644 8821au.ko  /lib/modules/3.12.35+/kernel/drivers/net/wireless/
/sbin/depmod -a 3.12.35+
pi@raspberrypi ~/rtl8812au $ sudo reboot

GW-450S を USB ポートに挿せば認識されます

pi@raspberrypi ~ $ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:4 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Access Point が見えるかスキャンしてみます

pi@raspberrypi ~ $ iwlist wlan0 scanning
wlan0     Scan completed :
          Cell 01 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"HOGEHOGEHOGE"
                    Protocol:IEEE 802.11AC
                    Mode:Master
                    Frequency:5.18 GHz (Channel 36)
                    Encryption key:on
                    Bit Rates:867 Mb/s
                    Extra:rsn_ie=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=0/100  Signal level=47/100  
    :
    :
    :

大丈夫そうですねー

wpa_supplicant の設定は次回...

Planex GW-450S を Raspberry Pi で使う(その1)

Planex GW-450S を Raspberry Pi で使えるようにする手順

カーネルモジュールをコンパイルする必要があるため、まずはその環境を準備

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux

使用しているカーネルが 3.12 なので

pi@raspberrypi ~ $ apt-cache search linux-source
linux-source - Linux kernel source (meta-package)
linux-source-2.6 - Linux kernel source (dummy package)
linux-source-3.10 - Linux kernel source for version 3.10 with Debian patches
linux-source-3.12 - Linux kernel source for version 3.12 with Debian patches
linux-source-3.2 - Linux kernel source for version 3.2 with Debian patches
linux-source-3.6 - Linux kernel source for version 3.6 with Debian patches

linux-source-3.12 をインストール

pi@raspberrypi ~ $ sudo apt-get -y install linux-source-3.12
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bc
Suggested packages:
  libncurses-dev ncurses-dev libqt4-dev
The following NEW packages will be installed:
  bc linux-source-3.12
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 80.4 MB of archives.
After this operation, 80.5 MB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main bc armhf 1.06.95-2 [106 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main linux-source-3.12 all 3.12.9-1+rpi2 [80.3 MB]
Fetched 80.4 MB in 60s (1,339 kB/s)                                                                                     
Selecting previously unselected package bc.
(Reading database ... 74923 files and directories currently installed.)
Unpacking bc (from .../bc_1.06.95-2_armhf.deb) ...
Selecting previously unselected package linux-source-3.12.
Unpacking linux-source-3.12 (from .../linux-source-3.12_3.12.9-1+rpi2_all.deb) ...
Processing triggers for menu ...
Processing triggers for install-info ...
Processing triggers for man-db ...
Setting up bc (1.06.95-2) ...
Setting up linux-source-3.12 (3.12.9-1+rpi2) ...
Processing triggers for menu ...

インストールしたカーネルソースを展開し

pi@raspberrypi ~ $ cd /usr/src
pi@raspberrypi /usr/src $ ls -l
total 76924
drwxr-xr-x 2 root root     4096 Dec 30 00:29 linux-config-3.12
-rw-r--r-- 1 root root    80640 Dec 17 20:06 linux-patch-3.12-rt.patch.xz
-rw-r--r-- 1 root root 78680668 Dec 17 20:06 linux-source-3.12.tar.xz
pi@raspberrypi /usr/src $ sudo tar Jxvf linux-source-3.12.tar.xz 
    :
    :
    :
linux-source-3.12/tools/perf/command-list.txt
linux-source-3.12/tools/perf/builtin-sched.c
linux-source-3.12/tools/perf/builtin-bench.c

シンボリックリンクを張る

pi@raspberrypi /usr/src $ sudo ln -s /usr/src/linux-source-3.12 /lib/modules/`uname -r`/build

今使っているカーネルの config を元にして .config を作成

pi@raspberrypi /usr/src $ cd /lib/modules/`uname -r`/build
pi@raspberrypi /lib/modules/3.12.35+/build $ sudo make mrproper
pi@raspberrypi /lib/modules/3.12.35+/build $ sudo sh -c "gzip -dc /proc/config.gz > .config"
pi@raspberrypi /lib/modules/3.12.35+/build $ sudo make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
*
* Restart config...
*
    :
    :
    :
  Aufs (Advanced multi layered unification filesystem) support (AUFS_FS) [N/m/y/?] (NEW) N
    :
    :
    :
#
# configuration written to .config
#

今回 Aufs は使わないので 'N' としましたが、必要に応じて 'm' を選択するなどお好みで

modules_prepare でカーネルモジュールをコンパイルするために必要なファイルを用意

pi@raspberrypi /lib/modules/3.12.35+/build $ sudo make modules_prepare
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
    :
    :
    :
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/sortextable

最新の Module.symvers をとってくる

pi@raspberrypi /lib/modules/3.12.35+/build $ sudo wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
--2014-12-30 01:03:59--  https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
Resolving github.com (github.com)... 192.30.252.131
Connecting to github.com (github.com)|192.30.252.131|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/Module.symvers [following]
--2014-12-30 01:04:05--  https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/Module.symvers
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 103.245.222.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|103.245.222.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 507347 (495K) [text/plain]
Saving to: `Module.symvers'

100%[===============================================================================>] 507,347     2.21M/s   in 0.2s    

2014-12-30 01:04:11 (2.21 MB/s) - `Module.symvers' saved [507347/507347]

その2へつづく...

Raspberry Pi の firmware を更新

事前にパッケージを更新しておく

pi@raspberrypi ~ $ sudo apt-get update
Hit http://raspberrypi.collabora.com wheezy Release.gpg                                                                 
Get:1 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B]                                                     
Get:2 http://archive.raspberrypi.org wheezy Release.gpg [490 B]            
Hit http://raspberrypi.collabora.com wheezy Release                         
Get:3 http://mirrordirector.raspbian.org wheezy Release [14.4 kB]                 
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages                                                    
Get:4 http://archive.raspberrypi.org wheezy Release [10.2 kB]
Get:5 http://mirrordirector.raspbian.org wheezy/main armhf Packages [6,893 kB]              
Get:6 http://archive.raspberrypi.org wheezy/main armhf Packages [106 kB]                                         
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB                                                
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en                
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB                                                        
Ign http://archive.raspberrypi.org wheezy/main Translation-en                                                           
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages                                                    
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages                                                   
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages                                                        
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB                                                 
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 7,025 kB in 1min 5s (107 kB/s)        
Reading package lists... Done
pi@raspberrypi ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  dosfstools mime-support unzip
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 298 kB of archives.
After this operation, 61.4 kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main dosfstools armhf 3.0.13-1+rpi1 [67.4 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main unzip armhf 6.0-8+deb7u1 [195 kB]            
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main mime-support all 3.52-1+deb7u1 [35.5 kB]
Fetched 298 kB in 1s (160 kB/s)                                
(Reading database ... 74923 files and directories currently installed.)
Preparing to replace mime-support 3.52-1 (using .../mime-support_3.52-1+deb7u1_all.deb) ...
Unpacking replacement mime-support ...
Preparing to replace dosfstools 3.0.13-1 (using .../dosfstools_3.0.13-1+rpi1_armhf.deb) ...
Unpacking replacement dosfstools ...
Preparing to replace unzip 6.0-8 (using .../unzip_6.0-8+deb7u1_armhf.deb) ...
Unpacking replacement unzip ...
Processing triggers for man-db ...
Setting up mime-support (3.52-1+deb7u1) ...
Setting up dosfstools (3.0.13-1+rpi1) ...
Setting up unzip (6.0-8+deb7u1) ...

ファームを更新して

pi@raspberrypi ~ $ sudo rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7811  100  7811    0     0  18716      0 --:--:-- --:--:-- --:--:-- 22706
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 3.12.35+
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    196      0 --:--:-- --:--:-- --:--:--   267
  0     0    0 23.0M    0     0   216k      0 --:--:--  0:01:48 --:--:--  204k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 3.12.35+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 1ca344ce9524cf02102c3a5af3e65009266a5ba1
 *** A reboot is needed to activate the new firmware

リブートしたら完了

pi@raspberrypi ~ $ sudo reboot