先日 IN-9 VU メーターキットの部品補充で RS オンラインの Web サイトにログインしたついでで、この Raspberry Pi のマイコンボードも一緒にカートへ。今回は Type B というポートの多いほうを買いました。
- マイクロUSB(電源)
- 26ピンのヘッダ(各種 GPIO とか電源?)
- フラットケーブルのコネクタ × 2
- RCA コンポジット出力
- 3.5φ ステレオジャック
- USB2.0 × 2
- Ethernet
- HDMI
などが搭載されていて SD カードに入れた OS が動きます。Debian 系の Linux のようなネーミングの OS も本家 Web にあったので基本的なコマンドは使えそうです。問題は OS のファイルシステムが SD カード上に存在するので、まぁいつ SD カードの中身が駄目になってもいいような感じで遊び目的で使うことくらいですかね
何種類か OS イメージがあって、最初の起動時に必要なものがよくわかっていないので電源投入はもうちょっと後です。シリアルコンソールで最初の設定出来るとありがたい。なんでかというと、家の PC はデスクトップも含めて無線 LAN のため。とにかくなんらかの形でログインして Ether の IP アドレス固定で設定してあげられたら、居間にある光ルーターに接続して放置 & TeraTerm でログイン出来るのでそこまで行けば楽かなと
— 夕方追記 —
Raspberry Pi のオフィシャルサイト から、Raspbian という Debian 系の配布をダウンロード。ついでに Win32DiskImager というのもダウンロード。Raspbian は OS で、Win32DiskImager は dd コマンドの Windows 版みたいなやつです。ダウンロードした OS のイメージを展開して、Win32DiskImager で SD カードに書くだけです。Chrome のブラウザを普段使っていますが、デバイスを掴むので終了させないと Win32DiskImager がエラー吐いて動きませんでした。
Raspberry Pi の GPIO ポートは 3.3V なので、USART のポートも 3.3V で使用するのが安心です。手持ちの USB シリアル変換のうち、秋月さんとこの FT232RL USBシリアル変換モジュール が、ジャンパ差し替えですぐ IO 電圧変更出来るので、こいつを使用してシリアルコンソール接続と。115200bps/8bit/none で接続すれば OK です。boot もサクっと動いて問題なしです。
Uncompressing Linux… done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 – Linaro GCC 2012.08) ) #538 PREEMPT Fri Aug 30 20:42:08 BST 2013
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708
[ 0.000000] cma: CMA: reserved 16 MiB at 1b000000
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 113792
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0x681a392e smsc95xx.macaddr=B8:27:EB:1A:39:2E sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 448MB = 448MB total
[ 0.000000] Memory: 432220k/432220k available, 26532k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 – 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 – 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xdc800000 – 0xff000000 ( 552 MB)
[ 0.000000] lowmem : 0xc0000000 – 0xdc000000 ( 448 MB)
[ 0.000000] modules : 0xbf000000 – 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 – 0xc04ef844 (5023 kB)
[ 0.000000] .init : 0xc04f0000 – 0xc05111f0 ( 133 kB)
[ 0.000000] .data : 0xc0512000 – 0xc0546560 ( 210 kB)
[ 0.000000] .bss : 0xc0546584 – 0xc05ef738 ( 677 kB)
[ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:330
[ 0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[ 0.000000] Console: colour dummy device 80×30
[ 0.000000] console [tty1] enabled
[ 0.000971] Calibrating delay loop… 697.95 BogoMIPS (lpj=3489792)
[ 0.060124] pid_max: default: 32768 minimum: 301
[ 0.060613] Mount-cache hash table entries: 512
[ 0.061431] Initializing cgroup subsys cpuacct
[ 0.061487] Initializing cgroup subsys devices
[ 0.061520] Initializing cgroup subsys freezer
[ 0.061549] Initializing cgroup subsys blkio
[ 0.061693] CPU: Testing write buffer coherency: ok
[ 0.062013] hw perfevents: enabled with v6 PMU driver, 3 counters available
[ 0.062153] Setting up static identity map for 0x3a5238 – 0x3a5294
[ 0.063626] devtmpfs: initialized
[ 0.075109] NET: Registered protocol family 16
[ 0.081524] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[ 0.082598] bcm2708.uart_clock = 0
[ 0.083959] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[ 0.084013] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.084049] mailbox: Broadcom VideoCore Mailbox driver
[ 0.084139] bcm2708_vcio: mailbox at f200b880
[ 0.084251] bcm_power: Broadcom power driver
[ 0.084289] bcm_power_open() -> 0
[ 0.084313] bcm_power_request(0, 8)
[ 0.584999] bcm_mailbox_read -> 00000080, 0
[ 0.585036] bcm_power_request -> 0
[ 0.585061] Serial: AMBA PL011 UART driver
[ 0.585184] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[ 0.916669] console [ttyAMA0] enabled
[ 0.940914] bio: create slab at 0
[ 0.945813] SCSI subsystem initialized
[ 0.949874] usbcore: registered new interface driver usbfs
[ 0.955466] usbcore: registered new interface driver hub
[ 0.961058] usbcore: registered new device driver usb
[ 0.967393] Switching to clocksource stc
[ 0.971687] FS-Cache: Loaded
[ 0.974841] CacheFiles: Loaded
[ 0.989791] NET: Registered protocol family 2
[ 0.995070] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 1.002799] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 1.009584] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.016184] TCP: reno registered
[ 1.019436] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 1.025331] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 1.031974] NET: Registered protocol family 1
[ 1.036845] RPC: Registered named UNIX socket transport module.
[ 1.042890] RPC: Registered udp transport module.
[ 1.047613] RPC: Registered tcp transport module.
[ 1.052357] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.059472] bcm2708_dma: DMA manager at f2007000
[ 1.064247] bcm2708_gpio: bcm2708_gpio_probe c051fdf8
[ 1.069698] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[ 1.078895] audit: initializing netlink socket (disabled)
[ 1.084490] type=2000 audit(0.940:1): initialized
[ 1.216876] VFS: Disk quotas dquot_6.5.2
[ 1.221122] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 1.230300] FS-Cache: Netfs ‘nfs’ registered for caching
[ 1.236942] NFS: Registering the id_resolver key type
[ 1.242197] Key type id_resolver registered
[ 1.246401] Key type id_legacy registered
[ 1.250751] msgmni has been set to 876
[ 1.256731] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 1.264557] io scheduler noop registered
[ 1.268512] io scheduler deadline registered (default)
[ 1.273837] io scheduler cfq registered
[ 1.287868] Console: switching to colour frame buffer device 82×26
[ 1.298010] kgdb: Registered I/O driver kgdboc.
[ 1.304658] vc-cma: Videocore CMA driver
[ 1.309996] vc-cma: vc_cma_base = 0x00000000
[ 1.316149] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 1.322919] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
[ 1.338189] brd: module loaded
[ 1.347598] loop: module loaded
[ 1.352414] vchiq: vchiq_init_state: slot_zero = 0xdb000000, is_master = 0
[ 1.361275] Loading iSCSI transport class v2.0-870.
[ 1.368472] usbcore: registered new interface driver smsc95xx
[ 1.375937] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.588185] Core Release: 2.80a
[ 1.592710] Setting default values for core params
[ 1.598798] Finished setting default values for core params
[ 1.810716] Using Buffer DMA mode
[ 1.815349] Periodic Transfer Interrupt Enhancement – disabled
[ 1.822457] Multiprocessor Interrupt Enhancement – disabled
[ 1.829277] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 1.834906] Dedicated Tx FIFOs mode
[ 1.841045] dwc_otg bcm2708_usb: DWC OTG Controller
[ 1.847351] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[ 1.855948] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[ 1.862800] Init: Port Power? op_state=1
[ 1.867987] Init: Power Port (0)
[ 1.872646] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.880818] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.889434] usb usb1: Product: DWC OTG Controller
[ 1.895545] usb usb1: Manufacturer: Linux 3.6.11+ dwc_otg_hcd
[ 1.902684] usb usb1: SerialNumber: bcm2708_usb
[ 1.909256] hub 1-0:1.0: USB hub found
[ 1.914439] hub 1-0:1.0: 1 port detected
[ 1.920218] Initializing USB Mass Storage driver…
[ 1.926677] usbcore: registered new interface driver usb-storage
[ 1.934046] USB Mass Storage support registered.
[ 1.940092] usbcore: registered new interface driver libusual
[ 1.947457] mousedev: PS/2 mouse device common for all mice
[ 1.955080] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[ 1.962297] bcm2835-cpufreq: switching to governor powersave
[ 1.969233] bcm2835-cpufreq: switching to governor powersave
[ 1.976167] cpuidle: using governor ladder
[ 1.981531] cpuidle: using governor menu
[ 1.986697] sdhci: Secure Digital Host Controller Interface driver
[ 1.994108] sdhci: Copyright(c) Pierre Ossman
[ 1.999752] sdhci: Enable low-latency mode
[ 2.041686] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform’s DMA
[ 2.052142] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[ 2.061510] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.074232] usbcore: registered new interface driver usbhid
[ 2.081150] usbhid: USB HID core driver
[ 2.089051] TCP: cubic registered
[ 2.095878] Initializing XFRM netlink socket
[ 2.103648] NET: Registered protocol family 17
[ 2.111664] Indeed it is in host mode hprt0 = 00021501
[ 2.118366] Key type dns_resolver registered
[ 2.131989] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[ 2.152502] registered taskstats version 1
[ 2.172281] Waiting for root device /dev/mmcblk0p2…
[ 2.264047] mmc0: read SD Status register (SSR) after 7 attempts
[ 2.275920] mmc0: new SDHC card at address e624
[ 2.282626] mmcblk0: mmc0:e624 SD08G 7.40 GiB
[ 2.293392] mmcblk0: p1 p2
[ 2.351542] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 2.359641] Indeed it is in host mode hprt0 = 00001101
[ 2.428321] EXT4-fs (mmcblk0p2): recovery complete
[ 2.437844] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.448762] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.459123] devtmpfs: mounted
[ 2.464104] Freeing init memory: 132K
[ 2.572094] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[ 2.581134] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.590889] hub 1-1:1.0: USB hub found
[ 2.596492] hub 1-1:1.0: 3 ports detected
[ 2.881781] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 3.002152] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 3.010608] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.022682] smsc95xx v1.0.4
[ 3.096591] smsc95xx 1-1.1:1.0: eth0: register ‘smsc95xx’ at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:1a:39:2e
[ 4.141090] udevd[154]: starting version 175
[ 8.909855] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 9.417133] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Raspbian GNU/Linux 7 raspberrypi ttyAMA0
raspberrypi login: pi
Password:
Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
NOTICE: the software on this Raspberry Pi has not been fully configured. Please run ‘sudo raspi-config’
pi@raspberrypi:~$ sudo raspi-config
最初は sudo raspi-config を実行して、基本的な設定を済ませましょう。あとは、規模は小さいながらも Linux なので、メディアサーバーにするとか、Apple play 対応にするとかいろいろ応用事例はたくさんあるようです。基本的な確認が出来たので良しです。