LoginSignup
2
3

More than 5 years have passed since last update.

Jetson TX2でOSインストール後の設定まとめ

Last updated at Posted at 2019-01-23

はじめに

Jetson TX2を購入して、色々と設定するのに少し苦戦したのでメモしておきます。

SSH

リモートアクセス用ソフト

sudo apt update
sudo apt install -y ssh

nano

テキストエディタ

sudo apt install -y nano

pip

Python用ライブラリ管理ソフト

sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install -y python-pip

nfcpy

Python用Felicaカード用ライブラリ

使用したデバイスはこちら。
PaSoRi RC-S380

ユーザー権限でデバイスを使用できるように設定追加

sudo nano /etc/udev/rules.d/nfcdev.rules

以下を入力

SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="06c3", MODE="0666"

または

SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="06c3", GROUP="dialout"

設定を読込

sudo udevadm control --reload-rules

ライブラリのインストール

sudo pip install nfcpy

動作確認

git clone https://github.com/nfcpy/nfcpy.git
cd nfcpy
sudo python examples/tagtool.py show

GPS

GPSデーモンがインストール済みなので、設定を変更
ちなみに、使用したデバイスはこちら
USB接続GPSモジュール

sudo nano /etc/default/gpsd

以下のとおり変更

DEVICES="/dev/gps0"

Pythonのサンプルプログラムで動作確認

wget https://gist.github.com/wolfg1969/4653340/raw/142eb5746619257b0cd4e317fd8f5fd63ddf2022/gpsdData.py
python gpsdData.py

OpenCV

sudo apt install -y python-opencv

SSD追加

SATAコネクタにSSDを接続
ここでは以下で購入した450GBのSSDを使用
シリコンパワー SSD 480GB TLC採用 SATA3 6Gb/s 2.5インチ 7mm 3年保証 S55シリーズ SP480GBSS3S55S25AC

sudo fdisk -l | grep /dev/sd

実行後、以下のような表示が出れば認識されている

Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors

パーティションを作成して、ディスクにパーティション情報を書き込む。

sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x52e19481.

Command (m for help): p
Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xXXXXXXXX

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (2048-1000215215, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-1000215215, default 1000215215): 

Created a new partition 1 of type 'Linux' and of size 477 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

フォーマット

sudo mkfs.ext4 /dev/sda1

mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done                            
Creating filesystem with 125026646 4k blocks and 31260672 inodes
Filesystem UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done     

マウントするディレクトリを作成

sudo mkdir /home/data

UUIDの確認

sudo blkid /dev/sda1
/dev/sda1: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTUUID="xxxxxxxx-xx"

起動時にマウントされるよう設定

sudo nano /etc/fstab

以下を追記

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home/data ext4 defaults 0 0

再起動

sudo reboot

マウントされていることを確認

df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        28G  3.5G   23G  14% /
devtmpfs        7.7G     0  7.7G   0% /dev
tmpfs           7.7G  188K  7.7G   1% /dev/shm
tmpfs           7.7G   14M  7.7G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/sda1       470G   70M  446G   1% /home/data
tmpfs           786M  8.0K  786M   1% /run/user/1001
tmpfs           786M   28K  786M   1% /run/user/106

成功!

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3