2015年11月29日日曜日

[Intel Edison]Intel Edison Board Firmware Software Release 2.1インストール手順



既に世の中に懇切丁寧なEdisonのインストール情報山ほどあると思いますので、普通に使われる方は、そちらをお勧めします。
ここでの記載内容は、ディスク容量削減&セットアップや初期化の手順の簡易化を備忘録とログを兼ねて記録したものです。

必要となるもの


Release 2.1 Yocto complete image
・Flash Tool Lite(WindowsMacLinux
・FTDI Driver(x86 : 32-bitx64 : 64-bit)(Windowsのみ:必須!!
Windows Standalone Driver 1.2.1(Windowsのみ:必要ないかも?)
TeraTermもしくはPuTTy(Windowsのみ)

当たり前ですが、この内の前二つは必須なのでダウンロードしておきます。
※私はOSXを主体に使用しおり、Windows環境での行程は、あまりチェックしていため動作不具合があるようでしたら、他の解説サイトを見ていただくかコメント頂けますよう御願いいたします。


Intel Edison本体
Kit for Arduino Board

Intel Edison Kit for Arduinoを購入したばかりであれば、まず組み立てを行います。

既に組み立てが完了している場合は、こちらは読み飛ばしてください。

・同梱されている樹脂スペーサー4本を上記画像のネジ留めしてある場所に設置します。
・Edison本体をArduino Boardに設置します。Edison本体をボード上に突き出たネジに沿って差し込み、ソケットがある箇所を軽く押し込み、ネジ部分に同梱のナットをラジオペンチなどを使ってしっかり留めて下さい。
※ソケットの接続が甘いと動作が不安定になります。


組み立て完了

必要なダウンロードとEdisonの組み立てが完了したら、以下の手順に進んで下さい。
※Windowsの場合は、ドライバのインストールも必要になります。

Flash Tool Liteのインストール


インストール手順はOSにより異なるので、
FLASH TOOL LITE USER MANUAL(May 6, 2015)
の指示に従いOSに合わせたインストール手順をとる。

Windowsの場合

事前にダウンロードしたPhoneFlashToolLite_5.2.4.0_win32.exeをダブルクリックして実行します。
”Setup - Intel Phone Flash Tool Lite"のウィンドウが開いたら、[Next]→
"License Agreement"の項目で"I accept the agreement"にチェックして[Next]→
"Information"の項目で[Next]→
"Installation"の項目で"Standard(Components will be automatically installed or updated"にチェックして[Next]→
"Select Additional Tasks"の項目で[Next]→
"Ready to Install"の項目で[Install]→
USBドライバをリプレースするのでSoCデバイスを接続しているなら外すように指示されます。接続しているようなら取り外して、[Yes]→でインストール完了です。

Macの場合

事前にダウンロードしたPhoneFlashToolLite_5.2.4.22_mac64.pkgをダブルクリックして開きます。
Flash Tool Liteのドライブがマウントされた状態になるので、画面の指示に従いFlash Tool Lite.appをApplicationsフォルダに移動させて完了です。

Linuxに関しては、このブログなぞ見られる事もない猛者の方々かと思いますので、敢えて省略させていただきます。

Release 2.1 Yocto complete imageのインストールの準備


ダウンロードしたYocto complete image(”edison-iotdk-image-280915.zip”)を解凍しておきます。

Arduinoボードの状態を確認します。赤字部分は必須です。


シリアル接続してインストール状況をモニタしたい場合は、この時点でUSBケーブルを接続し、ターミナルを起動しておきます。シリアル接続しているとインストールに失敗した等の報告を見かけましたので、もしエラーが発生してファームウェアの更新に失敗した場合はシリアル接続のケーブルを取り外してみて下さい。私は幸運にもその状況に遭遇していないので未確認です。

Macだと以下のように”screen”でUSB Serialを指定(????は接続したポートの番号が入ります。)して接続します。"screen /dev/cu.usb"まで打ち込んで"tab"キーを押せば候補が表示されます。

Terminal -- bash -- 80x24
Mac-no-Terminal:~ forEdison$ screen /dev/cu.usbserial-???????? 115200 -L

Release 2.1 Yocto complete imageのインストール


Phone Flash Tool Liteを起動させ、”Browse...”ボタンを押して先ほど解凍したフォルダ内にある”FlashEdison.json”を選択します。

Phone Flash Tool Liteの以下の項目が、
・Flash file: FlashEdison.json
・Configuration: RNDIS(Windows)or CDC(Mac、Linux)
になっているかを確認。なっていない場合は上記のように変更します。

"Start to Flash"ボタンを押して、書き込みを開始。
ウィンドウ右下に写真付きの解説でUSB接続する旨指示が出るので従い接続を行う。
既にUSBを接続している場合は、一旦抜いて挿し直せば書き込みが開始されます。

書き込み終了まで暫くかかるので気長に待ちます。
右上の方にある進行状況が100%になれば終了です。

ちなみにシリアル接続してある状況だと、

Terminal -- bash -- 80x24
******************************
PSH KERNEL VERSION: b0182b2b
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 11:24:08 Feb  5 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application *** 


******************************
PSH KERNEL VERSION: b0182b2b
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 11:24:08 Feb  5 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application *** 


U-Boot 2014.04 (Jun 19 2015 - 12:05:55)

       Watchdog enabled
DRAM:  980.6 MiB
MMC:   tangier_sdhci: 0
In:    serial
Out:   serial
Err:   serial
Writing to redundant MMC(0)... done
Writing to MMC(0)... done
Hit any key to stop autoboot:  1 0 
Target:ifwi
Partitioning using GPT
Writing GPT: success!
Saving Environment to MMC...
Writing to redundant MMC(0)... done
Partitioning already done...
Saving Environment to MMC...
Writing to MMC(0)... done
GADGET DRIVER: usb_dnl_dfu
#
DFU complete CRC32: 0x6ad212b0
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0xe511e42b
DOWNLOAD ... OK
Ctrl+C to exit ...
#
DFU complete CRC32: 0xe511e42b
DOWNLOAD ... OK
Ctrl+C to exit ...
resetting ...

******************************
PSH KERNEL VERSION: b0182b2b
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 11:24:08 Feb  5 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application *** 


U-Boot 2014.04 (Jun 19 2015 - 12:05:55)

       Watchdog enabled
DRAM:  980.6 MiB
MMC:   tangier_sdhci: 0
In:    serial
Out:   serial
Err:   serial
Writing to redundant MMC(0)... done
Writing to MMC(0)... done
Hit any key to stop autoboot:  1 0 
Target:blank
Partitioning using GPT
Writing GPT: success!
Saving Environment to MMC...
Writing to redundant MMC(0)... done
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
#
  DFU complete CRC32: 0xb98db2f8
DOWNLOAD ... OK
Ctrl+C to exit ...
######################################################################################################################
DFU complete CRC32: 0x5601e158
DOWNLOAD ... OK
Ctrl+C to exit ...
resetting ...

と、進んでファームウェアのインストールが完了して再起動が行われます。

Terminal -- bash -- 80x24
******************************
PSH KERNEL VERSION: b0182b2b
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 11:24:08 Feb  5 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application *** 


U-Boot 2014.04 (Jun 19 2015 - 12:05:55)

       Watchdog enabled
DRAM:  980.6 MiB
MMC:   tangier_sdhci: 0
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
reading vmlinuz
5434848 bytes read in 134 ms (38.7 MiB/s)
Valid Boot Flag
Setup Size = 0x00003c00
Magic signature found
Using boot protocol version 2.0c
Linux kernel version 3.10.17-poky-edison+ (sys_dswci@tlsndgbuild004) #1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015
Building boot_params at 0x00090000
Loading bzImage at address 00100000 (5419488 bytes)
Magic signature found
Kernel command line: "rootwait root=PARTUUID=012b3303-34ac-284d-99b4-34e03a2335f4 rootfstype=ext4 console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 g_multi.ethernet_config=cdc systemd.unit=multi-user.target hardware_id=00 g_multi.iSerialNumber=4dc63dfdeba53ade1f438263aa7587f4 g_multi.dev_addr=02:00:86:75:87:f4 platform_mrfld_audio.audio_codec=dummy"

Starting kernel ...

[    0.749426] pca953x 1-0020: failed reading register
[    0.753876] pca953x 1-0021: failed reading register
[    0.759453] pca953x 1-0022: failed reading register
[    0.764575] pca953x 1-0023: failed reading register
[    1.612626] snd_soc_sst_platform: Enter:sst_soc_probe
[    2.016307] pmic_ccsm pmic_ccsm: Error reading battery profile from battid frmwrk
[    2.034444] pmic_ccsm pmic_ccsm: Battery Over heat exception
[    2.034536] pmic_ccsm pmic_ccsm: Battery0 temperature outside boundary

Welcome to Linux!

         Expecting device dev-ttyMFD2.device...
[  OK  ] Reached target Remote File Systems.
         Expecting device dev-disk-by\x2dpartlabel-rootfs.device...
         Expecting device dev-disk-by\x2dpartlabel-factory.device...
         Expecting device dev-disk-by\x2dpartlabel-update.device...
         Expecting device dev-disk-by\x2dpartlabel-home.device...
         Expecting device sys-subsystem-net-devices-usb0.device...
[  OK  ] Reached target Paths.
[  OK  ] Reached target Swap.
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Created slice System Slice.
         Mounting Temporary Directory...
         Starting Load Kernel Modules...
         Starting Create list of required static device nodes...rrent kernel...
         Starting udev Coldplug all Devices...
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Mounting Debug File System...
         Mounting POSIX Message Queue File System...
         Starting Apply Kernel Variables...
         Starting Journal Service...
[  OK  ] Started Journal Service.
[  OK  ] Reached target Slices.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Set up automount boot.automount.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Create list of required static device nodes ...current kernel.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started udev Coldplug all Devices.
         Starting Load/Save Random Seed...
         Mounting Configuration File System...
         Mounting FUSE Control File System...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /var/volatile...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Mounted /var/volatile.
[  OK  ] Reached target Local File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
[  OK  ] Found device /sys/subsystem/net/devices/usb0.
[  OK  ] Found device /dev/ttyMFD2.
[  OK  ] Created slice system-systemd\x2drfkill.slice.
         Starting Load/Save RF Kill Switch Status of rfkill2...
         Starting Load/Save RF Kill Switch Status of rfkill1...
         Starting Load/Save RF Kill Switch Status of rfkill0...
         Starting Opkg first boot configure...
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill2.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill1.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill0.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Found device /dev/disk/by-partlabel/factory.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Found device /dev/disk/by-partlabel/home.
[  OK  ] Found device /dev/disk/by-partlabel/rootfs.
[  OK  ] Found device /dev/disk/by-partlabel/update.
[  OK  ] Started Opkg first boot configure.
         Mounting Mount for factory...
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Reached target Timers.
         Starting Restore Sound Card State...
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Mounted Mount for factory.
[  OK  ] Listening on sshd.socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Edison PWR button handler...
[  OK  ] Started Edison PWR button handler.
         Starting Telephony service...
         Starting Daemon to load edison mcu app binary...
[  OK  ] Started Daemon to load edison mcu app binary.
Application available at (physical) address 0x04819000
        VRL mapped to 0xff217000
        App sizRLH      Startin
508 bytes

        App Authentication feature is disabled!
        Resetting IPC

*** Ready to receive application *** 
[  OK  ] Started Daemon to handle arduino sketches.
         Starting Daemon to reset sketches...
[  OK  ] Started Daemon to reset sketches.
         Starting Bluetooth rf kill event daemon...
[  OK  ] Started Bluetooth rf kill event daemon.
         Starting Start or stop WiFI AP Mode in Edison...
[  OK  ] Started Start or stop WiFI AP Mode in Edison.
         Starting Login Service...
         Starting Permit User Sessions...
         Starting Post install service...
         Starting Watchdog sample daemon...
[  OK  ] Started Watchdog sample daemon.
         Starting Crashlog service...
[  OK  ] Started Crashlog service.
[    9.695408] sh[218]: Starting Post Install (try: 0)
         Starting Generate unique machine-id...
         Starting Cleanjournal service...
[  OK  ] Started Cleanjournal service.
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Telephony service.
         Starting Network Service...
[  OK  ] Started Restore Sound Card State.
[  OK  ] Started Permit User Sessions.
[   10.455843] systemd-machine-id-setup[247]: Initializing machine ID from random generator.
[  OK  ] Started Network Service.
[   10.780788] systemctl[250]: rm '/etc/systemd/system/basic.target.wants/edison-machine-id.service'
[  OK  ] Started Generate unique machine-id.
[  OK  ] Started Login Service.
         Starting Bluetooth service...
         Starting Edison Arduino board LED Blinker...
[  OK  ] Started Edison Arduino board LED Blinker.
         Starting Network Name Resolution...
         Starting PulseAudio Sound System...
[   11.986231] sh[218]: Backup home/root contents of rootfs : Success
[   12.078838] sh[218]: mke2fs 1.42.9 (28-Dec-2013)
[  OK  ] Created slice system-systemd\x2dfsck.slice.
         Starting File System Check on /dev/disk/by-partlabel/boot...
[  OK  ] Reached target Network.
         Starting Zero-configuration networking...
         Starting Mosquitto - lightweight server implementati...SN protocols...
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
[  OK  ] Started Network Name Resolution.
[  OK  ] Started Mosquitto - lightweight server implementatio...T-SN protocols.
[  OK  ] Started Bluetooth service.
[  OK  ] Started Zero-configuration networking.
[   12.762219] systemd-fsck[271]: dosfsck 2.11, 12 Mar 2005, FAT32, LFN
[   12.765062] systemd-fsck[271]: /dev/mmcblk0p7: 5 files, 2742/2971 clusters
[  OK  ] Started File System Check on /dev/disk/by-partlabel/boot.
         Mounting /boot...
         Starting Hostname Service...
         Starting The Edison status and configuration service...
[  OK  ] Started The Edison status and configuration service.
         Starting Intel_XDK_Daemon...
[  OK  ] Started Intel_XDK_Daemon.
[  OK  ] Started Hostname Service.
[  OK  ] Mounted /boot.
[   13.640451] sh[218]: Discarding device blocks: done         
[   13.722491] sh[218]: Filesystem label=
[   13.802445] sh[218]: OS type: Linux
[   13.902181] sh[218]: Block size=4096 (log=2)
[   13.967857] sh[218]: Fragment size=4096 (log=2)
[   14.023039] sh[218]: Stride=0 blocks, Stripe width=0 blocks
[   14.087363] sh[218]: 87120 inodes, 348155 blocks
[   14.166675] sh[218]: 0 blocks (0.00%) reserved for the super user
[   14.222124] sh[218]: First data block=0
[   14.246718] sh[218]: Maximum filesystem blocks=356515840
[   14.325057] sh[218]: 11 block groups
[   14.361585] sh[218]: 32768 blocks per group, 32768 fragments per group
[   14.388103] sh[218]: 7920 inodes per group
[   14.426421] sh[218]: Superblock backups stored on blocks:
[   14.473759] sh[218]: 32768, 98304, 163840, 229376, 294912
[   14.502870] sh[218]: Allocating group tables: done 
[   14.546584] sh[218]: Writing inode tables: done 
[   14.637516] sh[218]: Creating journal (8192 blocks): done
[  OK  ] Started PulseAudio Sound System.
[   17.362000] sh[218]: Writing superblocks and filesystem accounting information: done 
[   17.393587] sh[218]: Formatting home partition : Success
[   17.454004] sh[218]: Mount /home partition : Success
[   17.515838] sh[218]: Restore home/root contents on new /home partition : Success
[   17.551860] sh[218]: The number of cylinders for this disk is set to 24576.
[   17.616079] sh[218]: There is nothing wrong with that, but this is larger than 1024,
[   17.672206] sh[218]: and could in certain setups cause problems with:
[   17.762467] sh[218]: 1) software that runs at boot time (e.g., old versions of LILO)
[   17.822470] sh[218]: 2) booting and partitioning software from other OSs
[   17.882465] sh[218]: (e.g., DOS FDISK, OS/2 FDISK)
[   17.932457] sh[218]: Command (m for help): Command action
[   17.972520] sh[218]: e   extended
[   18.034193] sh[218]: p   primary partition (1-4)
[   18.065281] sh[218]: Partition number (1-4): Partition 1 is already defined, delete it before re-adding
[   18.102492] sh[218]: Command (m for help): Command (m for help): Command (m for help): Selected partition 1
[   18.152468] sh[218]: Hex code (type L to list codes):
[   18.212452] sh[218]: Command (m for help):
[   18.253127] sh[218]: Disk /dev/disk/by-partlabel/update: 805 MB, 805306368 bytes
[   18.267432] sh[218]: 4 heads, 16 sectors/track, 24576 cylinders
[   18.282753] sh[218]: Units = cylinders of 64 * 512 = 32768 bytes
[   18.332386] sh[218]: Device Boot      Start         End      Blocks  Id System
[   18.372679] sh[218]: /dev/disk/by-partlabel/update1               1       24576      786424   b Win95 FAT32
[   18.682000] sh[218]: Command (m for help): The partition table has been altered.
[   18.714728] sh[218]: Calling ioctl() to re-read partition table
[   18.796122] sh[218]: fdisk: WARNING: rereading partition table failed, kernel still uses old table: Invalid argument
[   18.930949] sh[218]: Formatting update partition Step 1 : Success
[   19.023172] sh[218]: Formatting update partition Step 2 : Success
[   19.054197] sh[218]: mkfs.vfat 2.11 (12 Mar 2005)
[   19.102506] sh[218]: Loop device does not match a floppy size, using default hd params
[   19.140179] sh[218]: Formatting update partition Step 3 : Success
[   19.182845] sh[218]: Formatting update partition Step 4 final : Success
[   40.572432] sh[218]: Generating sshd keys : Success
[   40.594709] sh[218]: Update file system table /etc/fstab : Success
[   41.883976] sh[218]: Generating Wifi Access Point SSID and passphrase : Success
[   41.926614] sh[218]: Post install success
[   42.092693] sh[218]: No journal files were found.
[   43.273781] systemctl[389]: rm '/etc/systemd/system/basic.target.wants/post-install.service'
[  OK  ] Started Post install service.
         Starting Serial Getty on ttyMFD2...
[  OK  ] Started Serial Getty on ttyMFD2.
[  OK  ] Reached target Login Prompts.
         Starting Increases rootfs image size to fit partition...
[   44.489934] resize2fs[400]: resize2fs 1.42.9 (28-Dec-2013)
[   44.586288] resize2fs[400]: Filesystem at /dev/disk/by-partlabel/rootfs is mounted on /; on-line resizing required
[   44.662229] resize2fs[400]: old_desc_blocks = 1, new_desc_blocks = 1
[   44.708478] resize2fs[400]: The filesystem on /dev/disk/by-partlabel/rootfs is now 393216 blocks long.
[   44.765896] systemctl[402]: rm '/etc/systemd/system/default.target.wants/resize-rootfs.service'
[  OK  ] Started Increases rootfs image size to fit partition.
[  OK  ] Reached target Multi-User System.

Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMFD2

edison login: 


起動が完了したら、ログインしてファームのバージョンとディスクの使用率を確認してみましょう。初期化時点ではパスワードなしの"root"でログインできます。

Terminal -- bash -- 80x24
Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMFD2

edison login: root
root@edison:~# uname -a
Linux edison 3.10.17-poky-edison+ #1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015 i686 GNU/Linuxroot@edison:~# df  
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root              1473344    554088    833776  40% /
devtmpfs                491272         0    491272   0% /dev
tmpfs                   491560         0    491560   0% /dev/shm
tmpfs                   491560       524    491036   0% /run
tmpfs                   491560         0    491560   0% /sys/fs/cgroup
tmpfs                   491560         4    491556   0% /tmp
systemd-1                 5942      5484       458  92% /boot
tmpfs                   491560         0    491560   0% /var/volatile
/dev/mmcblk0p7            5942      5484       458  92% /boot
/dev/mmcblk0p10        1337936      2044   1319508   0% /home
/dev/mmcblk0p5            1003        19       913   2% /factory
root@edison:~# 

インストール完了時点でrootの使用量が40%、bootは92%となっています。
容量の無さも気になりますが、まずは、タイムゾーンが世界標準時間になっているので日本時間に変更しておきましょう。

タイムゾーンの設定


Terminal -- bash -- 80x24
root@edison:~# date              
Fri Jun 19 06:36:59 UTC 2015
root@edison:~# timedatectl set-timezone Asia/Tokyo
root@edison:~# date
Fri Jun 19 15:37:16 JST 2015
root@edison:~# 

この時点では、NTPが機能していないのでインターネット接続の設定を行う必要があります。WiFiだけの設定でも良いのですが、初期状態のままなので全般の設定を行っておきましょう。

configure_edisonの実行


"configure_edison"についての詳細は、"[Intel Edison]configure_edisonで何が設定出来るのか”を参照して下さい。以下では全体の設定を行う"--setup"で設定しています。


Terminal -- bash -- 80x24
root@edison:~# configure_edison --setup

Configure Edison: Device Password

Enter a new password (leave empty to abort)
This will be used to connect to the access point and login to the device.
Password:       ***********
Please enter the password again:        ***********

Configure Edison: Device Name

Give this Edison a unique name.
This will be used for the access point SSID and mDNS address.
Make it at least five characters long (leave empty to skip): 
Skipping name change...
Do you want to set up wifi? [Y or N]: Y

Configure Edison: WiFi Connection

Scanning: 1 seconds left eft 

0 :     Rescan for networks
1 :     Exit WiFi Setup
2 :     Manually input a hidden SSID
3 :     Your-WiFi-Network


Enter 0 to rescan for networks.
Enter 1 to exit.
Enter 2 to input a hidden network SSID.
Enter a number between 3 to 10 to choose one of the listed network SSIDs: 3
Is Youe-WiFi-Network correct? [Y or N]: Y 
Password must be between 8 and 63 characters.
What is the network password?: ***************************************************************
Initiating connection to Your-WiFi-Network. Please wait...
Attempting to enable network access, please check 'wpa_cli status' after a minute to confirm.
Done. Please connect your laptop or PC to the same network as this device and go to http://xxx.xxx.xxx.xxx or http://edison.local in your browser.
root@edison:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root              1473344    554104    833760  40% /
devtmpfs                491272         0    491272   0% /dev
tmpfs                   491560         0    491560   0% /dev/shm
tmpfs                   491560       528    491032   0% /run
tmpfs                   491560         0    491560   0% /sys/fs/cgroup
tmpfs                   491560         4    491556   0% /tmp
systemd-1                 5942      5484       458  92% /boot
tmpfs                   491560         0    491560   0% /var/volatile
/dev/mmcblk0p7            5942      5484       458  92% /boot
/dev/mmcblk0p10        1337936      2048   1319504   0% /home
/dev/mmcblk0p5            1003        19       913   2% /factory
root@edison:~# 

以上の設定でWiFi接続が正常に行われていれば、日付と時刻が現在のものに修正されていることが確認出来るかと思います。

opkgのアップデート


OPKGについては、各所でリポジトリの追加作業を行ってから進めていますが、ディスク容量も少ないので、その都度必要なものだけインストールする事にして初期設定のまま進めます。
初期状態でのアップデートを行い、アップデートが有効なパッケージだけを調べてみます。

Terminal -- bash -- 80x24
root@edison:~# opkg update
Downloading http://iotdk.intel.com/repos/2.0/intelgalactic/Packages.
Updated list of available packages in /var/lib/opkg/iotkit.
root@edison:~# opkg list-upgradable
mraa - 0.8.0 - 0.8.1
root@edison:~# 

アップグレード対象はmraaが0.8.0から0.8.1に更新されるだけのようです。
公式サイトでも0.8.1なので、更新してしまいましょう。

Terminal -- bash -- 80x24
root@edison:~# opkg install mraa
Upgrading mraa from 0.8.0 to 0.8.1 on root.
Downloading http://iotdk.intel.com/repos/2.0/intelgalactic/mraa_0.8.1_i586.ipk.
Removing obsolete file /usr/lib/libmraa.so.0.8.0.
Configuring mraa.
root@edison:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root              1473344    554148    833716  40% /
devtmpfs                491272         0    491272   0% /dev
tmpfs                   491560         0    491560   0% /dev/shm
tmpfs                   491560       528    491032   0% /run
tmpfs                   491560         0    491560   0% /sys/fs/cgroup
tmpfs                   491560         4    491556   0% /tmp
systemd-1                 5942      5484       458  92% /boot
tmpfs                   491560         0    491560   0% /var/volatile
/dev/mmcblk0p7            5942      5484       458  92% /boot
/dev/mmcblk0p10        1337936      2048   1319504   0% /home
/dev/mmcblk0p5            1003        19       913   2% /factory
root@edison:~# 

とりあえずは最新状態になりました。
ついでに、何かと使うことになる"git"もインストールしておきます。

Gitのインストール


"git"のパッケージの所在を調べます。
以下のサイトの中で該当するパッケージがあるか調べてみましょう。
http://iotdk.intel.com/repos/
http://repo.opkg.net/edison/repo
調べてみると、
・http://iotdk.intel.com/repos/2.0/iotdk/i586/git_2.0.1-r0.0_i586.ipk
・http://repo.opkg.net/edison/repo/core2-32/git_2.0.1-r0_core2-32.ipk
二件ほど、それっぽいのが見つかりましたが、git_2.0.1-r0.0_i586.ipkはエラーでインストールが停止するので、正解は”git_2.0.1-r0_core2-32.ipk”のようです。

git_2.0.1-r0_core2-32.ipkをインストールしてみます。

Terminal -- bash -- 80x24
root@edison:~# opkg install http://repo.opkg.net/edison/repo/core2-32/git_2.0.1-r0_core2-32.ipk
Downloading http://repo.opkg.net/edison/repo/core2-32/git_2.0.1-r0_core2-32.ipk.
Installing git (2.0.1-r0) on root.
Configuring git.
root@edison:~# git --version
git version 2.0.1
root@edison:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root              1473344    589700    798164  42% /
devtmpfs                491272         0    491272   0% /dev
tmpfs                   491560         0    491560   0% /dev/shm
tmpfs                   491560       524    491036   0% /run
tmpfs                   491560         0    491560   0% /sys/fs/cgroup
systemd-1                 5942      5484       458  92% /boot
tmpfs                   491560         4    491556   0% /tmp
systemd-1              1337936      2056   1319496   0% /home
tmpfs                   491560         0    491560   0% /var/volatile
/dev/mmcblk0p5            1003        19       913   2% /factory
/dev/mmcblk0p10        1337936      2056   1319496   0% /home
/dev/mmcblk0p7            5942      5484       458  92% /boot
root@edison:~# 

無事にインストールされたようです。
てな感じで手間はかかりますが、リポジトリの登録しなくても必要なものはインストール可能です。
必要なものだけを、必要時に応じてインストールを行い不要なものは都度削除しておけばシステムの容量はなんとか保てるかと思います。

変な解説になってしまいましたが、色々触っているとリポジトリの追加登録が結構無駄を生むのを感じたので、この様な形でまとめてみました。

0 件のコメント:

コメントを投稿