履歴: 電気回路/zynq/Petalinux のビルド

各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 18 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます

日時タイトル文字数追加削除内容差分基準
2022/10/25 15:21:26電気回路/zynq/Petalinux のビルド 最新版47,023+1 -42表示差分—
2022/10/25 15:21:26電気回路/zynq/Petalinux のビルド 49,525+2 -1表示差分選択
2017/5/23 0:07:40電気回路/zynq/Petalinux のビルド 49,524+2 -1表示差分選択
2017/5/23 0:07:40電気回路/zynq/Petalinux のビルド 49,519+3 -0表示差分選択
2017/5/23 0:07:40電気回路/zynq/Petalinux のビルド 49,468+1 -0表示差分選択
2017/5/21 12:57:13電気回路/zynq/Petalinux のビルド 49,365+23 -0表示差分選択
2017/5/19 11:03:54電気回路/zynq/Petalinux のビルド 47,852+16 -0表示差分選択
2017/3/22 17:38:55電気回路/zynq/Petalinux のビルド 46,973+6 -2表示差分選択
2017/3/22 17:38:55電気回路/zynq/Petalinux のビルド 46,845+17 -9表示差分選択
2017/3/22 17:38:55電気回路/zynq/Petalinux のビルド 46,650+5 -0表示差分選択
2017/2/20 3:18:11電気回路/zynq/Petalinux のビルド 46,517+3 -2表示差分選択
2017/2/20 3:18:11電気回路/zynq/Petalinux のビルド 46,475+17 -0表示差分選択
2017/2/16 13:27:46電気回路/zynq/Petalinux のビルド 46,042+21 -2表示差分選択
2017/2/16 13:27:46電気回路/zynq/Petalinux のビルド 45,719+308 -23表示差分選択
2017/2/16 4:45:46電気回路/zynq/Petalinux のビルド 35,848+326 -2表示差分選択
2017/2/15 17:01:09電気回路/zynq/Petalinux のビルド 23,410+141 -9表示差分選択
2017/2/15 13:18:34電気回路/zynq/Petalinux のビルド 17,838+202 -322表示表示中選択
2017/2/15 6:25:02電気回路/zynq/Petalinux のビルド 24,450— —表示—基準

基準: 電気回路/zynq/Petalinux のビルド (2017/2/15 6:25:02) → 比較: 電気回路/zynq/Petalinux のビルド (2017/2/15 13:18:34)

@@ -6,6 +6,8 @@
登録は必要だが無料で使える。
+#contents
+
* ダウンロード [#w38e9003]
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
@@ -16,22 +18,36 @@
によれば カーネルバージョンは 4.6 だそうだ。
-* インストール [#q2587901]
+* 環境は Ubuntu 16.04 LTS [#be55f93b]
-ここでは VirtualBox 内の Debian9 stretch に入れてみる
+VirtualBox に入れた Ubuntu 16.04 LTS 上で開発環境構築を行います。
+始め Debian 9 で試したのですが、libtool の実行ファイルの名前が違う、
+libc6 のバージョンコンフリクトで mknod, mknodat が見つからず
+"No real function for mknod" などのエラーで止まる、
+などややこしいことが起こり、断念しました。
+
+今時 VirtualBox で気軽に OS を準備できますので、
+Petalinux の推奨する環境を選ぶのが無難そうです。
+
+[[>>> VirtualBox への Ubuntu 16.04 LTS の導入はこちらで紹介しました>電気回路/zynq/VirtualBox に Ubuntu 16.04 LTS を入れる]]
+* インストール [#q2587901]
+
インストール方法は、~
https://japan.xilinx.com/support/documentation-navigation/development-tools/software-development/petalinux-tools.html から
ug1144-petalinux-tools-reference-guide.pdf にあります。
先に petalinux が要求するパッケージを入れます。
-diffstat xvfb chrpath xterm libtool は上記ガイドに書かれていませんが、
+diffstat xvfb chrpath xterm libtool socat autoconf unzip texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386 は上記ガイドに書かれていませんが、
インストール時に入れろと言われます。
+(言われた瞬間に ^Z で中断して、これらのパッケージをインストールしてから再開すれば、
+問題なく続行できるようでした。インストーラーの中身をチェックして、解凍して、動き出すまでに
+ものすごく待たされるので、この対処法はかなり重要です)
LANG:console
$ sudo apt-get install build-essential binutils ncurses-dev u-boot-tools file
$ sudo apt-get install tofrodos iproute2 gawk net-tools libncurses5-dev tftp tftpd-hpa zlib1g-dev libssl-dev flex bison libselinux1
- $ sudo apt-get install diffstat xvfb chrpath xterm libtool
+ $ sudo apt-get install diffstat xvfb chrpath xterm libtool socat autoconf unzip texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386
petalinux のインストーラは巨大なバイナリを含んだ bash スクリプトです。
bash スクリプトなので実行権限が無くても bash に読ませれば実行できます。
@@ -44,14 +60,19 @@
一方、インストーラを 非root で走らせると、/opt などのルート権限の
必要なフォルダにはインストールできません。
-基本的に、ユーザーのホーム以下へのインストールが期待されているようです?~
+基本的にこのインストーラは、ユーザー権限で動かして、
+ユーザーのホーム以下へのインストールすることが想定されているようです?
+(インストール後に単に mv でフォルダを動かしても動作しないと書かれていました)
+
ここでは ~/z-turn/petalinux へインストールすることにしました。
+[必要ディスク容量]~
ところでこれ、元のインストールファイルが大きく、/tmp に展開される
-ファイルも大きくて、インストール後も大きいので、インストールファイル
-ダウンロード前の VirtualBox の空き容量が 30GB 弱だと途中でぎりぎり
-Disk Full になりました。35GB もあれば大丈夫そうですが、かなり
-待たされた後でエラーが出るので、余裕を持った方が精神的に楽です。
+ファイルも大きく、インストール後の容量も大きいので、インストールファイル
+ダウンロード前の VirtualBox の空き容量が 30GB 弱だと、途中で Disk Full
+になりました。35GB もあればインストールは大丈夫そうですが、
+ビルド時にはここからさらにカーネルソースが吐き出されますので、
+十分余裕をみておくのが良さそうです。
インストール後は 15.9 GB でした。
@@ -96,16 +117,9 @@
INFO: Checking installation environment requirements...
INFO: Checking free disk space
INFO: Checking installed tools
- ERROR: You are missing the following system tools required by PetaLinux:
-
- - libtool
- Please check PetaLinux installation guide - required tools and libraries
- pacakge section for detailed information
-
INFO: Checking installed development libraries
- Please install them with your operating system package manager, and try again
INFO: Checking network and other services
- INFO: Installing PetaLinux SDK to "/home/osamu/z-turn/petalinux/."
+ INFO: Installing PetaLinux SDK to "/home/osamu/z-turn/petalinux/." # これもかなりかかる
INFO: Installing PetaLinux zynqMP Yocto SDK to "/home/osamu/z-turn/petalinux/./components/yocto/source/aarch64"...
PetaLinux Extensible SDK installer version 2016.4
=================================================
@@ -121,11 +135,10 @@
INFO: PetaLinux Yocto SDK for microblaze has been successfully installed.
INFO: PetaLinux SDK has been installed to /home/osamu/z-turn/petalinux/.
-libtool はすでに入っているのだけれど・・・とりあえず無視して続行します。
* 動作環境の構築 [#v45a3c2e]
-libtoolize を libtool として起動できるようにする
+libtoolize を libtool として起動できるようにする必要がありました。
LANG:console
$ source ~/z-turn/petalinux/settings.sh
@@ -134,44 +147,8 @@
bash is PetaLinux recommended shell. Please set your default shell to bash.
INFO: Checking free disk space
INFO: Checking installed tools
- ERROR: You are missing the following system tools required by PetaLinux:
-
- - libtool
- Please check PetaLinux installation guide - required tools and libraries
- pacakge section for detailed information
-
INFO: Checking installed development libraries
- Please install them with your operating system package manager, and try again
INFO: Checking network and other services
- WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide"
- for its impact and solution
- $ sudo apt-get install libtool
- libtool はすでに最新バージョン (2.4.6-2) です。
- アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 336 個。
- $ libtool
- -bash: libtool: コマンドが見つかりません
- $ libtoolize --version
- libtoolize (GNU libtool) 2.4.6
- Written by Gary V. Vaughan <gary@gnu.org>, 2003
-
- Copyright (C) 2015 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- $ apt-get install libtool-bin
- $ libtool
- -bash: libtool: コマンドが見つかりません
- $ # 別名を付けるだけでいいという噂も?
- $ sudo ln -s /usr/bin/libtoolize /usr/local/bin/libtool
- $ source z-turn/petalinux/settings.sh
- PetaLinux environment set to '/home/osamu/z-turn/petalinux'
- WARNING: /bin/sh is not bash!
- bash is PetaLinux recommended shell. Please set your default shell to bash.
- INFO: Checking free disk space
- INFO: Checking installed tools
- INFO: Checking installed development libraries
- INFO: Checking network and other services
- WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide"
- for its impact and solution
$ echo $PETALINUX
/home/osamu/z-turn/petalinux
$ arm-linux-gnueabihf-gcc --version
@@ -188,28 +165,15 @@
パッケージ使用状況のサーベイを off にする
LANG:console
- $ z-turn/petalinux/tools/common/petalinux/bin/petalinux-util --webtalk off
+ $ petalinux-util --webtalk off
INFO: Turn off webtalk feature!
-*** 新しいプロジェクトを作る [#aabc4100]
+* 新しいプロジェクトを作る [#aabc4100]
z-turn ボード用にビルドしたいのだけれど、公式にはサポートされていないので、
-試しに zedboard 用のテンプレートを落としてみた。
+zynq 用の汎用テンプレートを使って作る。
LANG:console
- $ file avnet-digilent-zedboard-v2016.4-final1.bsp
- avnet-digilent-zedboard-v2016.4-final1.bsp: gzip compressed data, last modified: Fri Dec 16 03:02:22 2016, from Unix
- $ tar fxz avnet-digilent-zedboard-v2016.4-final1.bsp
- $ cd avnet-digilent-zedboard-2016.4/
- $ ls
- components config.project hardware pre-built project-spec
-
-かなりいろいろ入ってる。。。
-
-これを元にプロジェクトを作るのというのがチュートリアルだけれど、
-ここではそんな便利なものはないので、zynq 用の汎用テンプレートを使って作る。
-
- LANG:console
$ cd ~/z-turn
$ petalinux-create -t project --template zynq -n zturn-v2016.4
INFO: Create project: zturn-v2016.4
@@ -223,13 +187,15 @@
images
EOT
$ git add .
+ $ git config --global user.email "osamu@big.jp"
+ $ git config --global user.name "Osamu Takeuchi"
$ git commit -m "newly created"
$ ls project-spec/
attributes configs hw-description meta-user
どうやら project-spec/ というのが petalinux のプロジェクト本体のようだ。
-*** vivado のハードウェア設定を出力する [#a82e50cc]
+* vivado のハードウェア設定を出力する [#a82e50cc]
z-turn についていた mys-xc7z020-trd.xpr から [File]-[Export]-[Export Hardware...]
@@ -247,27 +213,27 @@
&ref(exported-hardware-configuration.png,,66%);
-*** vivado のハードウェア設定を取り込みつつ基本の設定 [#y20ed9c0]
+* vivado のハードウェア設定を取り込みつつ基本の設定 [#y20ed9c0]
上記フォルダ(コピーしたもの)を指定して petalinux-config すると、
ハードウェア設定を取り込んだ後、いろいろ設定可能なメニューが現れます。
LANG:console
- $ cd (petalinux-project-dir)
- $ petalinux-config --get-hw-description=../design_1_wrapper_hw_platform_1
+ $ cd ~/z-turn/zturn-v2016.4
+ $ petalinux-config --get-hw-description=path/to/design_1_wrapper_hw_platform_1
INFO: Getting hardware description...
[INFO] generating Kconfig for project
- ...
+
+ [INFO] menuconfig project
+ /home/osamu/z-turn/zturn-v2016.4/build/misc/config/Kconfig.syshw:30:warning: defaults for cho
+ /home/osamu/z-turn/zturn-v2016.4/build/misc/config/Kconfig:546:warning: config symbol defined
+ configuration written to /home/osamu/z-turn/zturn-v2016.4/project-spec/configs/config
&ref(petalinux-system-configuration.png,,66%);
とりあえず何も変更せずに Exit して設定を保存。
LANG:console
- [INFO] menuconfig project
- /home/osamu/z-turn/zturn-v2016.4/build/misc/config/Kconfig.syshw:30:warning: defaults for cho
- /home/osamu/z-turn/zturn-v2016.4/build/misc/config/Kconfig:546:warning: config symbol defined
- configuration written to /home/osamu/z-turn/zturn-v2016.4/project-spec/configs/config
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
@@ -286,12 +252,9 @@
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
- WARNING: Host distribution "Debian-9.0" has not been validated with this version of the
- build system; you may possibly experience unexpected failures. It is recommended that you
- use a tested distribution.
- Loading cache: 100% |########################################################| ETA: 00:00:00
+ Loading cache: 100% |##############################################################################################| ETA: 00:00:00
Loaded 2937 entries from dependency cache.
- Parsing recipes: 100% |######################################################| Time: 00:00:05
+ Parsing recipes: 100% |############################################################################################| Time: 00:00:05
Parsing of 2325 .bb files complete (2285 cached, 40 parsed). 2940 targets, 196 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
@@ -299,271 +262,188 @@
NOTE: PN dependencies saved to 'pn-depends.dot'
NOTE: Package dependencies saved to 'package-depends.dot'
NOTE: Task dependencies saved to 'task-depends.dot'
-
- Summary: There was 1 WARNING message shown.
Generate rootfs kconfig
[INFO] oldconfig rootfs
[INFO] generating petalinux-user-image.bb
$
-Debian はサポートしないと言われたけれど、続行してみます。
+* まずはカーネルをビルドしてみる [#q69e8291]
-*** カーネルをビルドしてみる [#q69e8291]
+ LANG:console
+ $ petalinux-build --help
+ petalinux-build (c) 2005-2013 Xilinx, Inc.
+
+ Builds the project or the specified components.
+
+ Usage:
+ petalinux-build [options]
+
+ Required:
+
+ Options:
+ -h, --help show function usage
+ -p, --project <PROJECT> path to PetaLinux SDK project.
+ Default is working project.
+ -c, --component <COMPONENT> Specify the component
+ it will build the specified component and its dependencies
+ E.g. -c rootfs
+ E.g. -c myapp
+ -x, --execute <tasks of bitbake> Specify a bitbake task of the component
+ To know the list tasks for a component:
+ E.g. -x do_listtasks
+ -f,--force Force run a specific task ignoring the stamps
+ Force run has to be for a component or its tasks
+ E.g. -c myapp -f
+ E.g. -c myapp -x compile -f
+ -v, --verbose Show compile messages verbose mode
+
+ EXAMPLES:
+
+ Build the project:
+ $ petalinux-build
+ the bootable images are in <PROJECT>/images/linux/.
+
+ Build kernel only:
+ $ petalinux-build -c kernel
+
+ Compile kernel forcefully:
+ $ petalinux-build -c kernel -x compile -f
+
+ Deploy kernel forcefully:
+ $ petalinux-build -c kernel -x deploy -f
+
+ Build kernel and update the bootable images:
+ $ petalinux-build -c kernel
+ $ petalinux-build -x package
+
+ Build rootfs only:
+ $ petalinux-build -c rootfs
+
+ Build myapp of rootfs only:
+ $ petalinux-build -c rootfs/myapp
+
+ Clean up u-boot and build again:
+ $ petalinux-build -c u-boot -x distclean
+ ## above command will remove the <PROJECT>/build/linux/u-boot/ directory.
+ $ petalinux-build -c u-boot
+
+ Clean up the project build and build again:
+ $ petalinux-build -x distclean
+ ## above command will remove the <PROJECT>/build/ directory.
+ $ petalinux-build
+
+ Clean up the project build and the generated bootable images:
+ $ petalinux-build -x mrproper
+ ## above command will remove <PROJECT>/images/ and <PROJECT>/build/ directories
+他にもいろいろビルドできるらしい。
+
LANG:console
- $ petalinux-build
- [INFO] building project
+ $ petalinux-build -c kernel
+ [INFO] building kernel
[INFO] sourcing bitbake
- INFO: bitbake petalinux-user-image
- WARNING: Host distribution "Debian-9.0" has not been validated with this version of the build
- system; you may possibly experience unexpected failures. It is recommended that you use a
- tested distribution.
- Loading cache: 100% |########################################################| ETA: 00:00:00
+ INFO: bitbake virtual/kernel
+ Loading cache: 100% |##############################################################################################| ETA: 00:00:00
Loaded 2938 entries from dependency cache.
- Parsing recipes: 100% |######################################################| Time: 00:00:05
+ Parsing recipes: 100% |############################################################################################| Time: 00:00:05
Parsing of 2325 .bb files complete (2291 cached, 34 parsed). 2940 targets, 196 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
NOTE: Checking sstate mirror object availability (for 597 objects)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
- No currently running tasks (803 of 1810)
- No real function for mknod: /home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib64/libpseudo.so: undefined symbol: mknod
- No real function for mknodat: /home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib64/libpseudo.so: undefined symbol: mknodat
- ...
- WARNING: petalinux-user-image-1.0-r0 do_rootfs: No not found in the base feeds (plnx_arm
- cortexa9t2hf-neon cortexa9t2hf-vfp cortexa9hf-neon cortexa9hf-vfp armv7at2hf-neon armv7ahf-neon
- armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp
- armv5hf-vfp noarch any all).
-
- WARNING: petalinux-user-image-1.0-r0 do_rootfs: real not found in the base feeds (plnx_arm
- cortexa9t2hf-neon cortexa9t2hf-vfp cortexa9hf-neon cortexa9hf-vfp armv7at2hf-neon armv7ahf-neon
- armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp
- armv5hf-vfp noarch any all).
- ...
- ERROR: petalinux-user-image-1.0-r0 do_rootfs: Unable to install packages. Command
- '/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/bin/smart --log-level=warning
- --data-dir=/home/osamu/z-turn/zturn-v2016.4/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-
- user-image/1.0-r0/rootfs/var/lib/smart install --attempt -y ' returned 1:
-
- No real function for mknod: /home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr
- /bin/../lib/pseudo/lib64/libpseudo.so: undefined symbol: mknod
- ...
-
- ERROR: petalinux-user-image-1.0-r0 do_rootfs: Function failed: do_rootfs
- ERROR: Logfile of failure stored in: /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_rootfs.17314
- ERROR: Task 9 (/home/osamu/z-turn/zturn-v2016.4/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb, do_rootfs) failed with exit code '1'
- NOTE: Tasks Summary: Attempted 1690 tasks of which 1326 didn't need to be rerun and 1 failed.
- No currently running tasks (1690 of 1810)
-
- Summary: 1 task failed:
- /home/osamu/z-turn/zturn-v2016.4/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb, do_rootfs
- Summary: There were 19 WARNING messages shown.
- Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
- ERROR: Failed to build project
- $ apt show libc6
- Package: libc6
- Version: 2.24-9
- ...
-
-No real function for mknod について:~
-https://forums.xilinx.com/t5/Embedded-Linux/Strange-messages-about-shared-libraries-in-Petalinux/td-p/729766 ~
-libc6 2.24 固有の問題で出るエラーで、メッセージは無視して良いと書いてある
-
-確かに、インストールされているのはバージョン 2.24 だ。。。
-
-petalinux が推奨する Ubuntu 16.04 では libc6 は 2.23 になっている。
-たぶん、Ubuntu が 2.24 はやばいと思ってまだ上げていないんだと思う。
-
- $ cd ~/z-turn/petalinux
- $ find | grep pseudo-1
- ./components/yocto/downloads/pseudo-1.7.5.tar.bz2
- $ cd components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo
- $ ls
- files/ pseudo.inc pseudo_1.6.7.bb pseudo_1.7.5.bb pseudo_git.bb
- $ ls files/
- 0001-configure-Prune-PIE-flags.patch fallback-group fallback-passwd handle-remove-xattr.patch
- moreretries.patch
-
-えーと、上記リンクで紹介されているパッチを当てる先が見つからない?
-
-https://vendor2.nginfotpdx.net/gitlab/ypp/poky/commit/9df3cdf42d8c1216682f497f0b166a43ef9f4184 ~
-もあるけど、どうも見方がよくわからない。
-
- LANG:console
- $ cd ~/z-turn/petalinux/components/yocto
- $ find . -type f -exec grep -l "No real function for" {} \;
- ./source/microblaze_lite/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/pseudo/lib64/libpseudo.so
- ./source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/pseudo/lib64/libpseudo.so
- ./source/microblaze_full/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/pseudo/lib64/libpseudo.so
- ./source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/pseudo/lib64/libpseudo.so
- $ cd ~/z-turn/petalinux
- $ find | grep pseudo-1
- ./components/yocto/downloads/pseudo-1.7.5.tar.bz2
- $ cd
- $ cd pseudo-1.7.5/
- $ grep -ls "No real function for" *
- pseudo_wrappers.c
- $ cat pseudo_wrappers.c
- ...
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- char *s = func->name;
- s += strlen(s) - 2;
- /* *at() don't have to exist */
- if (!strcmp(s, "at")) {
- return;
- }
- #else
- if (e != NULL) {
- pseudo_diag("No real function for %s: %s\n", func->name, e);
- }
- #endif
- ...
- $ cd ..
-
-ここを潰せばいいのは、わかる。
-
-雰囲気的には meta にパッチを置いておくと、.tar.bz2 を展開し、
-そのパッチを当ててからコンパイルしてくれる感じ?
-
- LANG:c
- $ jed ~/z-turn/petalinux/components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo/files/pseudo-glibc-rtld-next-workaround.patch
- We started seeing:
-
- No real function for mknod: /home/paul/poky_sdk/tmp/sysroots/x86_64-
- linux/usr/bin/../lib/pseudo/lib64/libpseudo.so: undefined symbol: mknod
- No real function for mknodat: /home/paul/poky_sdk/tmp/sysroots/x86_64-
- linux/usr/bin/../lib/pseudo/lib64/libpseudo.so: undefined symbol: mknodat
- ...
- Index: pseudo-1.7.5/pseudo_wrappers.c
- ===================================================================
- --- pseudo-1.7.5.orig/pseudo_wrappers.c
- +++ pseudo-1.7.5/pseudo_wrappers.c
- @@ -146,9 +146,9 @@ pseudo_init_one_wrapper(pseudo_function
- return;
- }
- #else
- - if (e != NULL) {
- + /*if (e != NULL) {
- pseudo_diag("No real function for %s: %s\n", func->name, e);
- - }
- + }*/
- #endif
- }
- }
- $ jed ~/z-turn/petalinux/components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
- ...
- file://pseudo-glibc-rtld-next-workaround.patch \
- ...
- $ rm -r build/tmp/work/x86_64-linux/pseudo-native/
- $ petalinux-build
- ...
- | gcc -isystem/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/include \
- | -O2 -pipe -pipe -std=gnu99 -Wall -W -Wextra -fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE \
- | -isystem/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe \
- | -DPSEUDO_PREFIX='"/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr"' \
- | -DPSEUDO_SUFFIX='""' -DPSEUDO_BINDIR='"bin"' -DPSEUDO_LIBDIR='"lib/pseudo/lib64"' \
- | -DPSEUDO_LOCALSTATEDIR='"var/pseudo"' -DPSEUDO_VERSION='"1.7.5"' -DUSE_MEMORY_DB \
- | -DPSEUDO_FORCE_ASYNC -DPSEUDO_PASSWD_FALLBACK='NULL' -DPSEUDO_XATTR_SUPPORT \
- | -O2 -g -L/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/lib \
- | -I/home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/include -o bin/pseudo \
- | pseudo.o pseudo_server.o pseudo_client.o pseudo_ipc.o pseudo_db.o pseudo_tables.o pseudo_util.o \
- | /home/osamu/z-turn/zturn-v2016.4/build/tmp/sysroots/x86_64-linux/usr/lib/libsqlite3.a -lpthread \
- | -ldl -lpthread
- | /usr/bin/ld: final link failed: Nonrepresentable section on output
- | collect2: error: ld returned 1 exit status
- | Makefile:110: recipe for target 'bin/pseudo' failed
- | make: *** [bin/pseudo] Error 1
+ Currently 1 running tasks (851 of 1810):
+ 0: linux-xlnx-4.6-xilinx+gitAUTOINC+2762bc9163-r0 do_compile (pid 17351)
+ # ここでかなり時間がかかる
+ # で、エラーが出た
+ ERROR: fsbl-0.2+xilinx+gitAUTOINC+ef07b552f4-r0 do_configure: Function failed: do_configure
+ (log file is located at /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-neon-
+ xilinx-linux-gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/temp/log.do_configure.13899)
+ ERROR: Logfile of failure stored in: /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-
+ neon-xilinx-linux-gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/temp/log.do_configure.13899
+ Log data follows:
+ | DEBUG: Executing python function sysroot_cleansstate
+ | DEBUG: Python function sysroot_cleansstate finished
+ | DEBUG: Executing shell function do_configure
+ | MISC_ARG is -yamlconf /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-neon-
+ xilinx-linux-gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/fsbl.yaml
+ | APP_ARG is -app "Zynq FSBL"
+ | cmd is: xsct /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-neon-xilinx-linux-
+ gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/app.tcl -ws /home/osamu/z-turn/zturn-v2016.4
+ /build/../components/plnx_workspace -pname fsbl -rp none -processor ps7_cortexa9_0 -hdf
+ /home/osamu/z-turn/zturn-v2016.4/build/tmp/deploy/images/plnx_arm/Xilinx-plnx_arm.hdf -arch 32
+ -app "Zynq FSBL" -yamlconf /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-
+ neon-xilinx-linux-gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/fsbl.yaml
+ | Starting SDK. This could take few seconds... Eclipse:
+ | An error has occurred. See the log file
+ | /home/osamu/z-turn/zturn-v2016.4/components/plnx_workspace/.metadata/.log.
+ | Eclipse:
+ | GTK+ Version Check
+ | XSCTHELPER INFO: Empty WorkSpace
+ | Starting SDK. This could take few seconds... Eclipse:
+ | An error has occurred. See the log file
+ | /home/osamu/z-turn/zturn-v2016.4/components/plnx_workspace/.metadata/.log.
+ | Eclipse:
+ | GTK+ Version Check
+ | timeout while establishing a connection with SDK
+ | while executing
+ | "error "timeout while establishing a connection with SDK""
+ | (procedure "getsdkchan" line 108)
+ | invoked from within
+ | "getsdkchan"
+ | (procedure "getprojects" line 19)
+ | invoked from within
+ | "getprojects -type hw"
+ | invoked from within
+ | "if { $params(ws) ne "" } {
+ | #Local Work Space available
+ | setws $params(ws)
+ | if { [catch {importprojects $params(ws)} result] } {
+ | puts "XSCTHELPER IN..."
+ | (file "/home/osamu/z-turn/zturn-v2016.4/build/tmp/work/cortexa9hf-neon-xilinx-linux-
+ gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-r0/app.tcl" line 111)
| WARNING: exit code 1 from a shell command.
- | ERROR: oe_runmake failed
- | ERROR: Function failed: do_compile (log file is located at /home/osamu/z-turn/zturn-v2016.4/build/tmp/work/x86_64-linux/pseudo-native/1.7.5-r0/temp/log.do_compile.25335)
- ERROR: Task 44 (virtual:native:/home/osamu/z-turn/petalinux/components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb, do_compile) failed with exit code '1'
- NOTE: Tasks Summary: Attempted 126 tasks of which 120 didn't need to be rerun and 1 failed.
+ | ERROR: Function failed: do_configure (log file is located at /home/osamu/z-turn/zturn-v2016.4
+ /build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/fsbl/0.2+xilinx+gitAUTOINC+ef07b552f4-
+ r0/temp/log.do_configure.13899)
+ ERROR: Task 592 (/home/osamu/z-turn/petalinux/components/yocto/source/arm/layers/meta-xilinx-
+ tools/recipes-fsbl/fsbl/fsbl_git.bb, do_configure) failed with exit code '1'
+ NOTE: Tasks Summary: Attempted 1797 tasks of which 1326 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
- virtual:native:/home/osamu/z-turn/petalinux/components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb, do_compile
- Summary: There was 1 WARNING message shown.
- Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
+ /home/osamu/z-turn/petalinux/components/yocto/source/arm/layers/meta-xilinx-tools/recipes-fsbl/fsbl/fsbl_git.bb, do_configure
+ Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build kernel
- $ cd build/tmp/work/x86_64-linux/pseudo-native/1.7.5-r0/pseudo-1.7.5
- $ grep -s mknod\( *
- pseudo_wrapfuncs.c:__xmknod(int ver, const char *path, mode_t mode, dev_t *dev) {
- pseudo_wrapfuncs.c: rc = wrap___xmknod(ver, path, mode, dev);
- pseudo_wrapfuncs.c:wrap___xmknod(int ver, const char *path, mode_t mode, dev_t *dev) {
- pseudo_wrapfuncs.c:mknod(const char *path, mode_t mode, dev_t dev) {
- pseudo_wrapfuncs.c: rc = wrap_mknod(path, mode, dev);
- pseudo_wrapfuncs.c:wrap_mknod(const char *path, mode_t mode, dev_t dev) {
- pseudo_wrapfuncs.h:/* int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev) */
- pseudo_wrapfuncs.h:static int wrap___xmknod(int ver, const char *path, mode_t mode, dev_t *dev);
- pseudo_wrapfuncs.h:/* int mknod(const char *path, mode_t mode, dev_t dev) */
- pseudo_wrapfuncs.h:static int wrap_mknod(const char *path, mode_t mode, dev_t dev);
- pseudo_wrapper_table.c: { /* int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); */
- pseudo_wrapper_table.c: { /* int mknod(const char *path, mode_t mode, dev_t dev); */
- $
-
-のようにして https://patchwork.openembedded.org/patch/123001/
-の内容を入れたところ、、、今度は
-リンクで失敗している?
-
-むしろ、pseudo-1.7.5/ports/unix/wrapfuncs.in
-から mknod と mknodat をなくしちゃえばいいとか、
-ないのかな?
-
- $ cd ~/pseudo-1.7.5
- $ cp ports/unix/wrapfuncs.in ports/unix/wrapfuncs.in_orig
- $ jed ports/unix/wrapfuncs.in
- - int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- - int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- + #int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- + #int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- $ diff -u ports/unix/wrapfuncs.in_orig ports/unix/wrapfuncs.in
+ $ less /home/osamu/z-turn/zturn-v2016.4/components/plnx_workspace/.metadata/.log
...
-
- $ jed ~/z-turn/petalinux/components/yocto/source/arm/layers/poky/meta/recipes-devtools/pseudo/files/pseudo-glibc-rtld-next-workaround.patch
- Does this work?
+ !MESSAGE Application error
+ !STACK 1
+ java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
+ /home/osamu/.Xilinx/SDK/2016.4/org.eclipse.osgi/317/0/.cp/libswt-pi-gtk-4527.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
+ no swt-pi-gtk in java.library.path
+ Can't load library: /home/osamu/.swt/lib/linux/x86_64/libswt-pi-gtk-4527.so
+ Can't load library: /home/osamu/.swt/lib/linux/x86_64/libswt-pi-gtk.so
+ /home/osamu/.swt/lib/linux/x86_64/libswt-pi-gtk-4527.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
- Index: pseudo-1.7.5/ports/unix/wrapfuncs.in
- ===================================================================
- --- pseudo-1.7.5.orig/ports/unix/wrapfuncs.in
- +++ pseudo-1.7.5/ports/unix/wrapfuncs.in
- @@ -43,8 +43,8 @@
- int mkdirat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
- int mkfifo(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
- int mkfifoat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
- -int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- -int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- +#int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- +#int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW */
- int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
- int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
- $ petalinux-build -c kernel
+ at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
...
- # やはりエラー
- $ less build/tmp/work/x86_64-linux/pseudo-native/1.7.5-r0/pseudo-1.7.5/ports/unix/wrapfuncs.in
- ...
- int mkfifo(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
- int mkfifoat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
- #int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- #int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */
- int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW */
- int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
- ...
- # 正しくパッチはあったっていた
- $
+ $ find /usr/lib -name "libgtk-x11-2.0*"
+ /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
+ /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
-すなおに Ubuntu にしろってことは、ある。
+エラーが出ました。
-** Linux ファイルシステムを準備 [#gf284759]
+libgtk-x11-2.0.so.0 が見つからないといっているように見えるけれど、
+/usr/lib/x86_64-linux-gnu/ に入っている。
-ここでは VirtualBox 内の Debian9 stretch に arm のエミュレータを入れて実行してみる。
+* デスクトップ環境を整える [#o18dcf9d]
-まず [[電気回路/z-turn/Linuxの設定]] の流れで Linux ルートファイルシステムを作る。
-カーネルが 4.6 なので jessie ではなく stretch を入れた。
-(stretch では less や、ifconfig のための net-tools を別途インストールする必要がありました。)
+軽量と名高い LXDE と、そこで使う日本語フォントを入れた。
LANG:console
- $ sudo chroot ~/z-turn/rootfs
+ $ sudo apt-get install --no-install-recommends lxde lxdm
+ $ sudo apt install fonts-takao-gothic fonts-takao-pgothic fonts-takao-mincho
+ $ sudo reboot
-これで、qemu 上での root 権限での実行に切り替わります。
+&ref(lxdm-screen.png,,33%);