2014年06月15日
beagleboneblackでOpenSim setup
今回は ubuntu セットアップ編です。
まず、ルーターにて自動的に割り振られたIPアドレスを確認します
(beaglebone blackはデフォルトでDHCPに設定されています)
beagleboneblackに電源とLANを接続します。
電源を入れると、 4つの青いLEDが点滅します。
少し 間を置くと 一番端のLEDだけの点滅に変わります。
IPの確認のために次のコマンドを母艦の端末を一つ開いて実行します
$ sudo arp-scan --interface=eth0 192.168.1.0/24
192.168.1.1 MAC アドレス
192.168.1.26 MAC アドレス (Unknown)
192.168.1.30 MAC アドレス
192.168.1.??に接続されているIPとMACアドレスが表示されます。
ここで beagleboneblackのLANを引き抜いて もう一度先ほどのコマンドを
実行します。
$ sudo arp-scan --interface=eth0 192.168.1.0/24
192.168.1.1 MAC アドレス
192.168.1.30 MAC アドレス
なんか 192.168.1.26に割り振りされているみたいなので
念の為にpingコマンドで確認します。
LANは接続していないので 無応答になるはずです。
rika@rika-Linux:~$ ping 192.168.1.26
PING 192.168.1.26 (192.168.1.26) 56(84) bytes of data.
From 192.168.1.21 icmp_seq=1 Destination Host Unreachable
From 192.168.1.21 icmp_seq=2 Destination Host Unreachable
From 192.168.1.21 icmp_seq=3 Destination Host Unreachable
以下 略
強制的に CTRL + Zで停止
ここでLANケーブルを接続して もう一度pingコマンドを発行します。
$ ping 192.168.1.26
PING 192.168.1.26 (192.168.1.26) 56(84) bytes of data.
64 bytes from 192.168.1.26: icmp_seq=1 ttl=64 time=0.672 ms
64 bytes from 192.168.1.26: icmp_seq=2 ttl=64 time=0.226 ms
64 bytes from 192.168.1.26: icmp_seq=3 ttl=64 time=0.270 ms
以下 略
強制的に CTRL + Zで停止
正常に返答があったので 192.168.1.26がルーターで自動的に割り振られている
IPのようです。(接続されている環境で変わります。これはリカの環境での例です)
ここから、 母艦にて SSHで接続します。
デフォルトのユーザーは ubuntu パスワードは temppwd です。
$ ssh ubuntu@192.168.1.26
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
????????????????????????????????????????
Please contact your system administrator.
Add correct host key in /home/rika/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/rika/.ssh/known_hosts:3
remove with: ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26
ECDSA host key for 192.168.1.26 has changed and you have requested strict checking.
Host key verification failed.
初めての接続なので ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26 を実行してねと
怒られちゃいます^^;
早速、 指示通りに コマンドを実行します。
$ ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26
# Host 192.168.1.26 found: line 3 type ECDSA
/home/rika/.ssh/known_hosts updated.
Original contents retained as /home/rika/.ssh/known_hosts.old
これで準備ができたので、再度 sshで再接続します。
途中に接続を続けますかとの質問に yes
続いて パスワードを入力します
$ ssh ubuntu@192.168.1.26
The authenticity of host '192.168.1.26 (192.168.1.26)' can't be established.
ECDSA key fingerprint is ????????????????????????????????????
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.26' (ECDSA) to the list of known hosts.
Ubuntu@192.168.1.26's password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.8.13-bone56 armv7l)
* Documentation: https://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo".
See "man sudo_root" for details.
ubuntu@arm:~$
無事 ログインできたでしょうか?
ubuntuのバージョンと アーキテクチャを調べてみました
ubuntu@arm:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
ubuntu@arm:~$ uname -a
Linux arm 3.8.13-bone56 #1 SMP Thu Jun 5 03:28:17 UTC 2014 armv7l armv7l armv7l GNU/Linux
ubuntu@arm:~$

無事 ログインできたら、早速 SD−CRADに合わせて パーティションの容量をアップします。
使用しているSD−CRADは 8Gのものを今回使用しています。
容量を確認すると
ubuntu@arm:/opt/scripts/tools$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 1582864 512240 988552 35% /
none 4 0 4 0% /sys/fs/cgroup
udev 252508 4 252504 1% /dev
tmpfs 50852 252 50600 1% /run
none 5120 0 5120 0% /run/lock
none 254244 0 254244 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/mmcblk0p1 98094 72712 25382 75% /boot/uboot
と 2Gしか使われていないようです
次の操作で容量を拡大します。
toolsディレクトリーに移動
ubuntu@arm:~$ cd /opt/scripts/tools
とりあえず 中身はと?
ubuntu@arm:/opt/scripts/tools$ ls
beaglebone-black-eMMC-flasher.sh grow_partition.sh update_initrd.sh
developers init-eMMC-flasher.sh update_kernel.sh
eMMC start_cloud9.sh wm
graphics update_bootloader.sh
続いて git pull 実行
ubuntu@arm:/opt/scripts/tools$ git pull
remote: Counting objects: 104, done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 100 (delta 74), reused 31 (delta 5)
Receiving objects: 100% (100/100), 10.94 KiB | 0 bytes/s, done.
Resolving deltas: 100% (74/74), completed with 2 local objects.
From https://github.com/RobertCNelson/boot-scripts
1fdb3b3..0f41122 master -> origin/master
Updating 1fdb3b3..0f41122
Fast-forward
boot/omap5_uevm.sh | 74 +++++++++++++++++++++++++
tools/wm/efl.sh | 138 +++++++++++++++++++++++++++++++++++++++++++++++
tools/wm/weston-drm.sh | 7 +++
tools/wm/weston-fbdev.sh | 8 +++
tools/wm/weston.sh | 12 +++++
5 files changed, 239 insertions(+)
create mode 100755 boot/omap5_uevm.sh
create mode 100755 tools/wm/efl.sh
create mode 100755 tools/wm/weston-drm.sh
create mode 100755 tools/wm/weston-fbdev.sh
create mode 100755 tools/wm/weston.sh
grow_partition.shを実行
ubuntu@arm:/opt/scripts/tools$ sudo sh ./grow_partition.sh
[sudo] password for ubuntu:
sfdisk: backing up partition layout.
sfdisk: initial calculation.
Disk /dev/mmcblk0: 243040 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
start: (c,h,s) expected (32,0,1) found (0,32,33)
end: (c,h,s) expected (1023,3,16) found (12,93,17)
/dev/mmcblk0p2 97 1699 1603 1641472 83 Linux
start: (c,h,s) expected (1023,3,16) found (12,93,18)
end: (c,h,s) expected (1023,3,16) found (216,183,31)
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 7594 7498 7677952 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
reboot
リブートしなさいということなので リブート実行、再度sshで接続
ubuntu@arm:/opt/scripts/tools$ sudo reboot
[sudo] password for ubuntu:
Broadcast message from ubuntu@arm
(/dev/pts/0) at 7:39 ...
The system is going down for reboot NOW!
ubuntu@arm:/opt/scripts/tools$ Connection to 192.168.1.26 closed by remote host.
Connection to 192.168.1.26 closed.
ssh 再接続
容量確認 (8Gあるかな)
ubuntu@arm:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 7528056 513528 6693504 8% /
none 4 0 4 0% /sys/fs/cgroup
udev 252508 4 252504 1% /dev
tmpfs 50852 252 50600 1% /run
none 5120 0 5120 0% /run/lock
none 254244 0 254244 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/mmcblk0p1 98094 72712 25382 75% /boot/uboot
ついでに パスワード変更します
ubuntu@arm:~$ passwd
Changing password for ubuntu.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ubuntu@arm:~$
システムのアップデートします。
ubuntu@arm:~$ sudo apt-get update
ubuntu@arm:~$ sudo apt-get upgrade
途中 アップデートしますか聞いてくるので yを入力
ふ〜〜 とりあえず ここまで 次回に続きます www
まず、ルーターにて自動的に割り振られたIPアドレスを確認します
(beaglebone blackはデフォルトでDHCPに設定されています)
beagleboneblackに電源とLANを接続します。
電源を入れると、 4つの青いLEDが点滅します。
少し 間を置くと 一番端のLEDだけの点滅に変わります。
IPの確認のために次のコマンドを母艦の端末を一つ開いて実行します
$ sudo arp-scan --interface=eth0 192.168.1.0/24
192.168.1.1 MAC アドレス
192.168.1.26 MAC アドレス (Unknown)
192.168.1.30 MAC アドレス
192.168.1.??に接続されているIPとMACアドレスが表示されます。
ここで beagleboneblackのLANを引き抜いて もう一度先ほどのコマンドを
実行します。
$ sudo arp-scan --interface=eth0 192.168.1.0/24
192.168.1.1 MAC アドレス
192.168.1.30 MAC アドレス
なんか 192.168.1.26に割り振りされているみたいなので
念の為にpingコマンドで確認します。
LANは接続していないので 無応答になるはずです。
rika@rika-Linux:~$ ping 192.168.1.26
PING 192.168.1.26 (192.168.1.26) 56(84) bytes of data.
From 192.168.1.21 icmp_seq=1 Destination Host Unreachable
From 192.168.1.21 icmp_seq=2 Destination Host Unreachable
From 192.168.1.21 icmp_seq=3 Destination Host Unreachable
以下 略
強制的に CTRL + Zで停止
ここでLANケーブルを接続して もう一度pingコマンドを発行します。
$ ping 192.168.1.26
PING 192.168.1.26 (192.168.1.26) 56(84) bytes of data.
64 bytes from 192.168.1.26: icmp_seq=1 ttl=64 time=0.672 ms
64 bytes from 192.168.1.26: icmp_seq=2 ttl=64 time=0.226 ms
64 bytes from 192.168.1.26: icmp_seq=3 ttl=64 time=0.270 ms
以下 略
強制的に CTRL + Zで停止
正常に返答があったので 192.168.1.26がルーターで自動的に割り振られている
IPのようです。(接続されている環境で変わります。これはリカの環境での例です)
ここから、 母艦にて SSHで接続します。
デフォルトのユーザーは ubuntu パスワードは temppwd です。
$ ssh ubuntu@192.168.1.26
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
????????????????????????????????????????
Please contact your system administrator.
Add correct host key in /home/rika/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/rika/.ssh/known_hosts:3
remove with: ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26
ECDSA host key for 192.168.1.26 has changed and you have requested strict checking.
Host key verification failed.
初めての接続なので ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26 を実行してねと
怒られちゃいます^^;
早速、 指示通りに コマンドを実行します。
$ ssh-keygen -f "/home/rika/.ssh/known_hosts" -R 192.168.1.26
# Host 192.168.1.26 found: line 3 type ECDSA
/home/rika/.ssh/known_hosts updated.
Original contents retained as /home/rika/.ssh/known_hosts.old
これで準備ができたので、再度 sshで再接続します。
途中に接続を続けますかとの質問に yes
続いて パスワードを入力します
$ ssh ubuntu@192.168.1.26
The authenticity of host '192.168.1.26 (192.168.1.26)' can't be established.
ECDSA key fingerprint is ????????????????????????????????????
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.26' (ECDSA) to the list of known hosts.
Ubuntu@192.168.1.26's password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.8.13-bone56 armv7l)
* Documentation: https://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo
See "man sudo_root" for details.
ubuntu@arm:~$
無事 ログインできたでしょうか?
ubuntuのバージョンと アーキテクチャを調べてみました
ubuntu@arm:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
ubuntu@arm:~$ uname -a
Linux arm 3.8.13-bone56 #1 SMP Thu Jun 5 03:28:17 UTC 2014 armv7l armv7l armv7l GNU/Linux
ubuntu@arm:~$

無事 ログインできたら、早速 SD−CRADに合わせて パーティションの容量をアップします。
使用しているSD−CRADは 8Gのものを今回使用しています。
容量を確認すると
ubuntu@arm:/opt/scripts/tools$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 1582864 512240 988552 35% /
none 4 0 4 0% /sys/fs/cgroup
udev 252508 4 252504 1% /dev
tmpfs 50852 252 50600 1% /run
none 5120 0 5120 0% /run/lock
none 254244 0 254244 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/mmcblk0p1 98094 72712 25382 75% /boot/uboot
と 2Gしか使われていないようです
次の操作で容量を拡大します。
toolsディレクトリーに移動
ubuntu@arm:~$ cd /opt/scripts/tools
とりあえず 中身はと?
ubuntu@arm:/opt/scripts/tools$ ls
beaglebone-black-eMMC-flasher.sh grow_partition.sh update_initrd.sh
developers init-eMMC-flasher.sh update_kernel.sh
eMMC start_cloud9.sh wm
graphics update_bootloader.sh
続いて git pull 実行
ubuntu@arm:/opt/scripts/tools$ git pull
remote: Counting objects: 104, done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 100 (delta 74), reused 31 (delta 5)
Receiving objects: 100% (100/100), 10.94 KiB | 0 bytes/s, done.
Resolving deltas: 100% (74/74), completed with 2 local objects.
From https://github.com/RobertCNelson/boot-scripts
1fdb3b3..0f41122 master -> origin/master
Updating 1fdb3b3..0f41122
Fast-forward
boot/omap5_uevm.sh | 74 +++++++++++++++++++++++++
tools/wm/efl.sh | 138 +++++++++++++++++++++++++++++++++++++++++++++++
tools/wm/weston-drm.sh | 7 +++
tools/wm/weston-fbdev.sh | 8 +++
tools/wm/weston.sh | 12 +++++
5 files changed, 239 insertions(+)
create mode 100755 boot/omap5_uevm.sh
create mode 100755 tools/wm/efl.sh
create mode 100755 tools/wm/weston-drm.sh
create mode 100755 tools/wm/weston-fbdev.sh
create mode 100755 tools/wm/weston.sh
grow_partition.shを実行
ubuntu@arm:/opt/scripts/tools$ sudo sh ./grow_partition.sh
[sudo] password for ubuntu:
sfdisk: backing up partition layout.
sfdisk: initial calculation.
Disk /dev/mmcblk0: 243040 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
start: (c,h,s) expected (32,0,1) found (0,32,33)
end: (c,h,s) expected (1023,3,16) found (12,93,17)
/dev/mmcblk0p2 97 1699 1603 1641472 83 Linux
start: (c,h,s) expected (1023,3,16) found (12,93,18)
end: (c,h,s) expected (1023,3,16) found (216,183,31)
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 7594 7498 7677952 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
reboot
リブートしなさいということなので リブート実行、再度sshで接続
ubuntu@arm:/opt/scripts/tools$ sudo reboot
[sudo] password for ubuntu:
Broadcast message from ubuntu@arm
(/dev/pts/0) at 7:39 ...
The system is going down for reboot NOW!
ubuntu@arm:/opt/scripts/tools$ Connection to 192.168.1.26 closed by remote host.
Connection to 192.168.1.26 closed.
ssh 再接続
容量確認 (8Gあるかな)
ubuntu@arm:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 7528056 513528 6693504 8% /
none 4 0 4 0% /sys/fs/cgroup
udev 252508 4 252504 1% /dev
tmpfs 50852 252 50600 1% /run
none 5120 0 5120 0% /run/lock
none 254244 0 254244 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/mmcblk0p1 98094 72712 25382 75% /boot/uboot
ついでに パスワード変更します
ubuntu@arm:~$ passwd
Changing password for ubuntu.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ubuntu@arm:~$
システムのアップデートします。
ubuntu@arm:~$ sudo apt-get update
ubuntu@arm:~$ sudo apt-get upgrade
途中 アップデートしますか聞いてくるので yを入力
ふ〜〜 とりあえず ここまで 次回に続きます www
Posted by rikachann Aabye at 17:07│Comments(0)
│beaglebone black