Share
Embed
Transcript
26 slides
-
kazueda(かずえだ)の紹介 • 大阪出身、丙午、おとめ座、O型 • 科学者(化学) • 2003年4月から浜松で、働き始める • 自転車での移動が生活の足 •
趣味は「ラジオを聴くこと」、「アメ リカのコミックの邦訳を読むこと」 @kazueda 2 slideshare speaker deck https://qiita.com/kazueda -
Milk-v duo 6 - CVITEK CV1800B (C906@1Ghz + C906@700MHz) -
Dual RV64 Core up to 1GHz - 64MB RAM - Provides 10/100Mbps Ethernet via optional add-on board - Technology supports running both Linux and RTOS 「Milk-v duoでPython」秋葉原ロボット部 第131回、2023. 8. 27 -
Milk-v duo 7 - CVITEK CV1800B (C906@1Ghz + C906@700MHz) -
Dual RV64 Core up to 1GHz - 64MB RAM - Provides 10/100Mbps Ethernet via optional add-on board - Technology supports running both Linux and RTOS 「Milk-v duoでPython」秋葉原ロボット部 第131回、2023. 8. 27 特徴 • コミュニィティ主体で展開 • 情報の鮮度が短い(すぐ、自動でパッチが当てられなくな る、ソースへのマージを待つ方が時間の節約)。 • 情報の主な言語が中国語(ソフトはBaidu、ハードは Oshwhub、利用にはWeChatのIDが必要) • Raspberry pi (pico)の情報や周辺機器を転用可能 • オープンハードウェアとオープンソフトウェア • Linuxのリソース • pinpongライブラリを介してPythonで制御 -
Mind+ 9 https://mindplus.cc/en.html 特徴 • Scratch3.0から派生 • ブロックを使ったビジュアルプログラミング環境 • 対応言語は、Arduino
CとPython • ブロックプログラムをテキストファイルに • 対応マイクロコントローラは、Arduino、microbit、ESP32ベ ースのデバイス等 -
Mind+ 10 https://mindplus.cc/en.html 特徴 • Scratch3.0から派生 • ブロックを使ったビジュアルプログラミング環境 • 対応言語は、Arduino
CとPython • ブロックプログラムをテキストファイルに • 対応マイクロコントローラは、Arduino、microbit、ESP32ベ ースのデバイス等 • Debian OSで動作するUNIHIKER -
Mind+ 11 https://mindplus.cc/en.html 特徴 • Scratch3.0から派生 • ブロックを使ったビジュアルプログラミング環境 • 対応言語は、Arduino
CとPython • ブロックプログラムをテキストファイルに • 対応マイクロコントローラは、Arduino、microbit、ESP32ベ ースのデバイス等 • Debian OSで動作するUNIHIKER <ーMilk-v duoでも使える? -
これまでの話 • ビジュアルプログラミング:Windows10上の「Mind+」 – 「Mind+」はpythonを利用可能なブロックプログラミング環境 • フィジカルコンピューティング:Linuxボードの「Milk-V Duo」 – 「Milk-V
Duo」では、buildrootで環境構築 • クライアント―サーバー間はSSH接続 12 -
これまでの話 1. 「Mind+」上でプログラムを作成 2. 「Mind+」から「Linuxボード」に作成したプログラムの ファイルをsftpプロトコルで転送 3. 「Linuxボード」上で、転送されたプログラムからpython スクリプトを取り出す 4.
プログラム実行 14 Linuxボード(Raspberry pi)上で 「Project upload error, Error: No such file or directory」 が表示されてファイル転送に失敗 -
これまでのお話 • SSH接続してきたクライアントのログをとる • 「/etc/ssh/sshd_config」 の Log Level「-l log_level」 Jan
21 16:29:34 raspi4 sftp-server[2043]: received client version 3 Jan 21 16:29:34 raspi4 sftp-server[2043]: open "/usr/local/lib/python3.7/dist-packages/.pth" flags WRITE,CREATE,TRUNCATE mode 0666 Jan 21 16:29:34 raspi4 sftp-server[2043]: sent status No such file Jan 21 16:29:34 raspi4 sftp-server[2043]: debug1: read eof Jan 21 16:29:34 raspi4 sftp-server[2043]: session closed for local user root from [192.168.0.31] 15 -
これまでのお話 • 「/etc/ssh/sshd_config」 の Log Level「-l log_level」 Jan 21 16:29:34
raspi4 sftp-server[2043]: received client version 3 Jan 21 16:29:34 raspi4 sftp-server[2043]: open "/usr/local/lib/python3.7/dist-packages/.pth" flags WRITE,CREATE,TRUNCATE mode 0666 Jan 21 16:29:34 raspi4 sftp-server[2043]: sent status No such file Jan 21 16:29:34 raspi4 sftp-server[2043]: debug1: read eof Jan 21 16:29:34 raspi4 sftp-server[2043]: session closed for local user root from [192.168.0.31] 16 Linuxマシン側に "/usr/local/lib/python3.7/dist-packages を作成 -
buildrootでsftpサーバー • 「Milk-V Duo」はSCPプロトコルのみサポート <ーSFTPプロトコルを追加 1. SSHサーバーの「dropbear」とsftpサーバーの 「gesftpserver」の組み合わせ 2. SSHサーバーの「dropbear」とsftpサーバーの「openssh-
sftp-server」との組み合わせ 3. SFTPプロトコル対応のSSHサーバーの「openssh-server」 17 -
buildrootでsftpサーバー • 「Milk-V Duo」はSCPプロトコルのみサポート <ーSFTPプロトコルを追加 1. SSHサーバーの「dropbear」とsftpサーバーの 「gesftpserver」の組み合わせ 2. SSHサーバーの「dropbear」とsftpサーバーの「openssh-
sftp-server」との組み合わせ 3. SFTPプロトコル対応のSSHサーバーの「openssh-server」 18 https://www.greenend.org.uk/rjk/sftpserver/ -
buildrootでsftpサーバー • Python2がないと、ビルド失敗 • Python3ではなくPython2を使う場合も、ビルド失敗 • 「gesftpserver.mk」にパッチを当てて、 Python2を探さな いようにする 20
https://git.buildroot.net/buildroot/commit/?id=422fd73fadfbe33523e1687f90bbfecd3f7ab5d5 -
buildrootでsftpサーバー The build of gesftserver in an environment without Python
fails with: checking for Python 2.4 or better... configure: error: cannot find Python 2.4 or better However, it turns out that Python is only needed for tests, which we don't run/use in Buildroot, so we can safely build gesftpserver without Python. 21 https://git.buildroot.net/buildroot/commit/?id=422fd73fadfbe33523e1687f90bbfecd3f7ab5d5 -
buildrootでsftpサーバー • Python2がないと、ビルド失敗 • Python3ではなくPython2を使う場合も、ビルド失敗 • 「gesftpserver.mk」にパッチを当てて、 Python2を探さな いようにする 22
https://git.buildroot.net/buildroot/commit/?id=422fd73fadfbe33523e1687f90bbfecd3f7ab5d5 -
buildrootでsftpサーバー @@ -23,6 +23,10 @@ GESFTPSERVER_DEPENDENCIES += ¥ $(if $(BR2_ENABLE_LOCALE),,libiconv)
¥ $(if $(BR2_PACKAGE_OPENSSH),openssh) +# Python on the host is only used for tests, which we don't use in +# Buildroot +GESFTPSERVER_CONF_ENV += rjk_cv_python24=false + # openssh/dropbear looks here define GESFTPSERVER_ADD_SYMLINK ln -sf gesftpserver $(TARGET_DIR)/usr/libexec/sftp-server 23 https://lore.kernel.org/buildroot/[email protected]/T/