LoginSignup
0

More than 5 years have passed since last update.

ZYBOでxillinux-2.0を動かすまで#3(Ubuntu16.04使用)

Posted at

前回のつづき

いきなり余談だが
ボード交換や連携先や接続先のことなどを想定してMACアドレスを固定しておきたい場合はSPIフラッシュにあらかじめ書いておくといいらしい。
私的には全く用のない話(V2Vではやらなくもない)だが一応読むとu-bootプロンプトで環境変数を設定しておくらしい。

xillinux-uboot> set ethaddr 00:11:22:33:44:55
xillinux-uboot> saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done

ちなみにSPIフラッシュに設定してある環境変数は次のようにしてみることができる。

# env print

u-bootでsdbootと入力するとsdカードから起動する。

xillinux-uboot> sdboot

もろもろ表示のあと1分ほどで下記の表示となる。

Ubuntu 16.04 LTS localhost.localdomain ttyPS0
localhost login: root (automatic login)
Last login: ~~~~~~~~ on tty1
Welcome to the Xillinux distribution for Zynq-7000 EPP.
You may communicate data with standard FPGA FIFOs in the logic fabric by
writing to or reading from the /dev/xillybus_* device files. Additional
pipe files of that sort can be set up by configuring and downloading a
custom IP core from Xillybus’ web site (at the IP Core Factory).
For more information: http://www.xillybus.com.
root@localhost:˜#

自動でrootログインする仕様。
ここまで来ればPL部の回路にも/dev/xillybus_*でアクセスできるようになっているのでcatやtaill -fなどで回路の状態を確認できる。

SDカードのファイルシステム領域を拡張する
ラズパイでは自動、またはraspi-configのメニューから設定するがxillinuxでは手動なだけでやることは同じ。

root@localhost:˜# fdisk /dev/mmcblk0
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n

Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended

Select (default p):
Using default response p

Partition number (1-4, default 2):
Using default value 2
First sector (32130-15523839, default 32130):
Using default value 32130
Last sector, +sectors or +size{K,M,G} (32130-15523839, default 15523839):
Using default value 15523839
Command (m for help): w

The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16:
Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

root@localhost:˜# shutdown -r now ##念のためリブート

リブート後

root@localhost:˜# resize2fs /dev/mmcblk0p2

あとは普通のUbuntuと同じように使いやすい環境を作っていく。
sshdはすでに2.0ではインストール済みのため、一般ユーザを作って/etc/sudoersに追加しておけばOK

ちなみに再起動はGUIなら右上のボタンからでもよいしSHUTDOWNコマンドでも、または下記のように

# halt

としてもよい。

やっとスタートラインに立つ
これでXillybusを使える状態になったのでLinuxから各種IPを使ってみたり、ドライバをインストールしてみたりと楽しくなってくる予定。
その時に読むのが
「Linuxホストを使用してXillybusを使用するには(PDF:英文)」
だということです。

。。。。。そのうち読む。

Yoctoも整理したいのでこれもそのうちに。
jethroブランチでbitbakeしてみたらxorg.confがないといわれたがディレクトリ作っておいてやれば普通にcore-image-satoで焼けた。

早く自分で作ったIPcoreとかを動かしてみたいがソフト屋には色々と先が長いな。

とりあえずここ見たり
「Zybo」をUbuntuからプログラムする

新約聖書読んだり

買ってきたけど読んでないC級本

でも読んでみようかな。

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
0