vol.3 2015-07-25
Chap. 1 OpenNebula PCI passthrough OpenNebula 14 Mellanox ConnectX-3 InniBand HCA InniBand HCA 1.1 OpenNebula OpenNebula Ubuntu gihyo.jp Ubuntu Weekly Recipe 345 346 http://gihyo.jp/admin/serial/01/ubuntu-recipe/0345 http://gihyo.jp/admin/serial/01/ubuntu-recipe/0346 OpenNebula Ubuntu & OpenNebula 1.2 OpenNebula OpenNebula OpenNebula Ubuntu 14.04.2 OpenNebula 4.12.1 1
Chap. 1 OpenNebula PCI passthrough 1.3 PCI passthrough SR-IOV OpenNebula OpenNebula Marketplace Ubuntu 14.04 KVM *1 KVM OpenNebula CPU BIOS/UEFI I/O kernel 1.3 PCI passthrough SR-IOV CPU I/O x86_64 Intel VT-d AMD AMD-Vi AMD IOMMU I/O PCI PCI passthrough SR-IOV PCI passthrough PCI 1 PCI 1 SR-IOV PCI passthrough PCI / SR-IOV Mellanox ConnextX-3 InniBand HCA SR-IOV SR-IOV PCI PT3*2 PCI passthrough SR-IOV PCI passthrough OpenNebula InniBand HCA SR-IOV 1.4 libvirt PCI passthrough OpenNebula libvirt libvirt PT3 PCI passthrough PCI passthrough lspci PT3 lspci "Multimedia controller: Altera Corporation *1 OpenNebula Marketplace: http://marketplace.opennebula.systems/appliance *2 PT1 PT2 PT2 PCI PT3 2
Chap. 1 OpenNebula PCI passthrough 1.4 libvirt PCI passthrough Device..." $ lspci grep -i altera 06:00.0 Multimedia controller: Altera Corporation Device 4c15 (rev 01) 06:00.0 " ":" "." " libvirt Domail XML *3 PCI 1.1: libvirt Domain XML PCI <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </source> </hostdev> Domain XML virsh create hostdev managed 'yes' libvirt OS( ) PCI PT3 virsh nodedev-detach PT3 PT3 hostdev managed='no' *4 Domain XML virsh create managed='yes' 1.4.1 managed='yes' / virsh nodedev-detach *3 libvirt Domain XML format: http://libvirt.org/formatdomain.html#elementshostdev *4 libvirt Domain XML format managed 'no' Ubuntu 14.04 libvirt 1.2.2 'yes' libvirt / managed='no' 3
Chap. 2 Let s note CF-RZ4 Ubuntu Rakugou Rakugou Let's note CF-RZ4 2.1 Let s note 2 ultrabook Let's note CF-RZ4 Ubuntu Oce SSD 128GB 17 11 8000 745g JEITA2.0 10 10 Fn Ctrl *1 SD USB3.0 3 VGA HDMI Windows 8.1 CF-RZ4 Ubuntu *2 *1 BIOS Ctrl Fn *2 SSD Windows OS 12
Chap. 2 Let s note CF-RZ4 Ubuntu 2.2 Ubuntu 2.2 Ubuntu Ubuntu Ubuntu Windows Windows Transcend 128GB M.2 SSD MTS800 SSD Ubuntu M.2 SSD SATA SSD M.2 SSD SSD SAMSUNG MZ-NTE1280 22mm 80mm SSD SSD : SSD 2.2.1 Windows 8.1 Windows BIOS Windows 8.1 UEFI BIOS Live USB USB Live USB SSD Live USB Ubuntu Windows SSD 13
Chap. 2 Let s note CF-RZ4 Ubuntu 2.2 Ubuntu 2.2.2 CF-RZ4 M.2 SSD M.2 SSD SSD AC 2 : Let's note SSD 2.2.3 Ubuntu BIOS Live USB Try Ubuntu without installing Ubuntu Bluetooth 14
Chap. 3 21 Device Tree Raspberry Pi ARM I2C Device Tree *1 3.1 Device Tree (DT) CPU GPIO Device Tree ARM Device Tree Device Tree Power Open Firmware *1 Linux 4.0.6 Raspberry Pi GitHub Raspberry Pi 28
Chap. 3 21 Device Tree 3.1 ARM Device Tree Device Tree Source (DTS) Device Tree DTS.dts.dtsi 3.2.2 Device Tree Compiler (DTC) DTS DTB Linux dtc DTB Ubuntu device-tree-compiler dtc Device Tree Blob Binary (DTB) Device Tree DTB U-Boot DTB fdt Flattened Device Tree (FDT) DTB DTB DTS DTB FDT Open Firmware (OF) Power SPARC Device Tree Open Firmware Device Tree CONFIG_OF DTB drivers/of/ of_foo() Device Tree ARM Device Tree 3.1.1 Device Tree Device Tree ARM arch/arm/ Ubuntu ARM NetWalker Linux 3 *2 29
Chap. 3 21 Device Tree 3.1 $ grep -ri MACHINE_START arch/arm/mach-mx51/.../mx51_erdos.c:machine_start(mx51_babbage, "SHARP PC-Z1").../mx51_babbage.c:MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board").../mx51_3stack.c:MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") NetWalker Freescale SoC i.mx51 MX51_BABBAGE i.mx51 EVK Evaluation Kit MX51_3DS i.mx51 PDK Product Development Kit NetWalker PC-Z1 MX51_BABBAGE MACHINE_START machine_desc Device Tree NetWalker RedBoot *3 machine_desc arch/arm/tools/mach-types mx51_erdos.c MX51_BABBAGE machine_desc arch/arm/mach-omap2/board-n8x0.c SoC platform_device platform_device_register() platform_device I/O PC-Z1 LCD SDHCI platform_device 3.1: LCD static struct platform_device mxc_lcd_device = {.name = "lcd_sharp",.id = 0,.dev = {.release = mxc_nop_release,.coherent_dma_mask = 0xFFFFFFFF,.platform_data = &lcd_data, }, }; static void init mxc_init_lcd(void) { *2 BeagleBone Black Ubuntu NetWalker Linux 2.6.28 NetWalker i.mx51 Linux *3 stext r1 30
Chap. 3 21 Device Tree 3.1 } if (!enable_vga) { platform_device_register(&mxc_lcd_device); } platform_device_register() platform_driver.name platform_device probe() 3.1.name "lcd_sharp" LCD drivers/video/mxc/mxcfb_sharp_wsvga.c 3.2 platform_driver mxcfb_sharp_wsvga probe() 3.1 mxc_lcd_device 3.2: LCD static struct platform_driver lcd_driver = {.driver = {.name = "lcd_sharp"},.probe = lcd_probe,.remove = devexit_p(lcd_remove),.suspend = lcd_suspend,.resume = lcd_resume, }; platform_device Linux ARM 3 platform_device platform_device platform_device_register() 3.1.2 Device Tree platform_device Device Tree platform_device_register() 31
Chap. 4 PC ( Ubuntu Japanese Team ) 2015 Intel CPU/Soc Windows Ubuntu Desktop PC PC 4.1 PC PC Gateway EC19C-N52C/B AC ( ) CPU PC PC OSC Lenovo G580 *1 2.6kg PC 53
Chap. 4 PC 4.2 PC 4.1 EC19C PC PC PC... 4.2 PC PC Intel CPU/SoC Chromebook 1366x768(WXGA) 4K 8K HD PC Retina MacBook HD PC 11 Windows *2 MS Oce PC1 20 *3 *1 3 PC CPU PC blog http://chonan.blog.pid0.org/2013/02/lenovo-g580.html 54
Chap. 4 PC 4.3 PC 4.3 PC G580 PC *4 Lenovo ThinkPad X1 12862HJ NEC Lavie LL730/TG 2 PC PC 4.4 Lenovo ThinkPad X1 12862HJ Lenovo ThinkPad X1 Enter Thinkpad *5 8GB 250GB SSD *2 Windows 8.1 with Bing Ubuntu *3 *4 PC 55
Chap. 5 kazken3(@kazken3) A... kazken3 A... kazken3 A kazken3 A kazken3......... 5.1 Chinachu *1 5.2 Raspberry Pi2 Ubuntu 14.04 Hubot Slack *1 Chinachu... 67
Chap. 5 5.3 Node.js Raspberry Pi2 Raspberry Pi2 ARM Node.js Raspberry Pi2 *2 Raspberry Pi2 Ubuntu gihyo Ubuntu Weekly Recipe openssh-server 5.3 Node.js Hubot Node.js Node.js Ubuntu apt Node.js Node.js nvm Node.js $ sudo apt-get install git build-essential curl nvm $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh bash nvm.bashrc nvm source nvm $ source ~/.bashrc $ nvm nvm ls-remote Node.js *3 $ nvm ls-remote : v0.12.7 *2 BeagleBone Black... *3 io.js 68
Chap. 5 5.4 Hubot *4 v0.12.7 nvm install v0.12.7 Node.js Raspberry pi2 *5 $ nvm install v0.12.7 : Node.js nvm use Node.js node -v Node.js nvm use Node.js ~/.bashrc $ nvm use v0.12.7 Now using node v0.12.7 (npm v2.11.3) $ node -v v0.12.7 v0.12.7 Node.js Hubot 5.4 Hubot Hubot GitHub (bot) Node.js CoeeScript CoeeScript JavaScript Hubot Node.js npm yo generator-hubot $ npm install -g yo generator-hubot Hubot yo hubot Hubot $ mkdir kayochin $ cd kayochin $ yo hubot *4 2015/07/11 *5... 69
Chap. 6 1 2! Arduino *1 2015 10 6.1 Ubuntu Weekly Recipe AquesTalk Pi HIGH HIGH *2 (500 ) *3 ( ) *1 GND *2 PDF *3 84
Chap. 6 6.2 6.2 MM-DE21D 2.54mm L IC 6.1 MM-DE21D( ) VDD 5V 1.6 3.6V VDD OK 5V 5V 3.3V OUT VDD Arduino Leonardo 3.3V VDD GND Arduino GND OUT1/OUT2 HIGH (S/N) HIGH OUT1/2 Arduino 8 9 5k 3.3V 85
Chap. 6 6.2 *4 10 LED LED 1k 10 HIGH L LED 6.2 Arduino *4 86
Chap. 7 Mozc 7.1 Mozc 1.15.1857.102 tar Google Code Google Code GitHub tar Google Code Wiki GitHub *1 2.17.2095.102 master *2 7.2 Mozc Docker *3 fcitx-mozc uim-mozc Docker Mozc Debian/Ubuntu fcitx-mozc *1 https://github.com/google/mozc/blob/master/doc/release_history.md *2 master 2.17.2102.102 fcitx-mozc *3 https://github.com/google/mozc/blob/master/doc/build_mozc_in_docker.md 97
Chap. 7 Mozc 7.3 lxc pbuilder lxc Ubuntu 14.04 7.3 Ubuntu Mozc $ mkdir mozc $ cd mozc $ sudo apt-get install ubuntu-dev-tools git subversion ninja-build \ clang libdistro-info-perl $ sudo apt-get build-dep mozc $ pull-lp-source -m http://jp.archive.ubuntu.com/ubuntu mozc vivid fcitx-mozc Mozc $ wget http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-2.16.2037.102.2.patch $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $ PATH=$PATH:$(pwd)/depot_tools fcitx-mozc *4 fcitx-mozc fcitx-mozc Mozc *5 Mozc $ mkdir mozc-git $ cd mozc-git/ $ gclient config https://github.com/google/mozc.git --name=. --deps-file=src/deps $ gclient sync --revision=321e0656b0f2e233ab1c164bd86c58568c9e92f2 gclient sync tar *4 http://download.fcitx-im.org/ *5 https://github.com/fcitx/mozc Pull Request issue 98
vol.3 (C) 2015 Ubunchu! Magazine Zapppaaan