0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Zybo Petalinuxにて「Network is down」が出続ける問題

Posted at

環境

  • ボード:Zybo
  • ホストPC:Ubuntu 24.04
  • カーネルコンパイル環境:Ubuntuコンテナ22.04
  • Petalinux Tools:2025.1
  • Vivado: v2025.1 (64bit)

はじめに

FPGAの学習用にZynq(Xilinx社)が搭載されているZyboを購入しました。

ZyboにてPetalinuxをインストールしたところ、「Network is down」が出続け、Linux カーネルが起動せず、ログインできませんでした。また、Ctrl+CCtrl+Z を押下しても反応しませんでした。

カーネルの起動ログは以下の通り。

macb [ETH_MAC]: Could not attach PHY (-22)
RTNETLINK answers: Invalid argument
udhcpc: broadcasting discover
udhcpc: sendto: Network is down
udhcpc: read error: Network is down, reopening socket
udhcpc: read error: Network is down, reopening socket
・・・ 

※ログ中のMACアドレスはマスクしています。

原因

カーネルのログからZynqのイーサネットコントローラがPHYチップを検出できていないことがわかります。

DHCPがパケットを送信できずに失敗して無限ループに入っているみたいです。

macb [ETH_MAC]: Could not attach PHY (-22)
RTNETLINK answers: Invalid argument

解決方法

参考にした記事:

ZYBO (Zynq) 初心者ガイド (13) LAN(Ethernet 0)を使う (PetaLinux) - Qiita

原因はVivadoデフォルト設定がMDIOの接続先が間違えていることでした。

VivadoのIP Integratorで下記を確認します。

  1. Zynq processing SystemMIO ConfigurationI/O Peripherals
  2. ENET0MDIO設定を確認
  3. デフォルトではEMIO が選択されていますがMIO52..53を選択

vivado_before.png

vivado_after.png

設定の変更後、カーネルを再度ビルドし、Zyboを起動します。


petalinux login: 

カーネルが無事に起動し、ログイン画面が出てきました。これでPetalinuxをZyboで使用できます。

カーネルの起動ログでも無事にPHYチップをカーネルが認識していることが確認できました。

macb [ETH_MAC]: PHY detected, driver [RTL8211E Gigabit Ethernet] (irq=POLL)
macb [ETH_MAC]: configuring for phy/rgmii-id link mode
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing

※今回はPetalinuxを起動させることが目的であり、LANコントローラ自体の動作確認は行っておりません。

まとめ

ZyboにてPetalinuxを使用する際に「Network is down」が発生し続け、Petalinuxにログインができませんでした。VivadoにてENET0の設定をMIO52..53に変更し、カーネルを再ビルドすることで、本問題を解決できました。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?