「Yocto」の版間の差分
表示
削除された内容 追加された内容
同期 |
Kusanaginoturugi (トーク | 投稿記録) アーカイブ タグ: 新規リダイレクト |
||
| (2人の利用者による、間の4版が非表示) | |||
| 1行目: | 1行目: | ||
#redirect [[ArchWiki:アーカイブ]] |
|||
[[Category: |
[[Category:アーカイブ]] |
||
[[en:Yocto]] |
|||
Yocto Project (YP) は組み込み環境の Linux 開発者用の人気のオープンソース合同プロジェクトです。YP の初期バージョンでは Arch Linux で動かすと問題が発生していましたが、新しいバージョンでは問題は少なくなっており、将来的には更に楽になる予定です。古いバージョンを動作させる方法は [http://wor.github.io/bash/2013/08/11/embedded-excursions-part-1.html こちら] に優れたガイドがあります。 |
|||
bitbake をスタンドアロンなツールとして使いたい場合、{{AUR|bitbake}} をインストールしてください。vim で bitbake レシピを編集する場合、{{AUR|bitbake-vim}} をインストールしてください。 |
|||
このガイドでは YP Core 1.8 (Fido) 以降について扱います。 |
|||
{{Note|Arch Linux における Yocto/Poky の動作はまだ確認されていません。}} |
|||
== インストール == |
|||
{{Pkg|git}}, {{Pkg|diffstat}}, {{Pkg|unzip}}, {{Pkg|texinfo}}, {{Pkg|python2}}, {{Pkg|chrpath}}, {{Pkg|wget}}, {{Pkg|xterm}}, {{Pkg|sdl}}, {{Pkg|socat}}, {{Pkg|cpio}} パッケージを[[インストール]]してください。 |
|||
{{Note|64ビット版の Arch Linux を使っている場合は、公式の [[multilib]] リポジトリから {{Pkg|gcc-multilib}} パッケージを[[インストール]]してください。以下の衝突が発生することがあります: |
|||
:: gcc-multilib and gcc are in conflict. Remove gcc? [y/N] y |
|||
:: gcc-libs-multilib and gcc-libs are in conflict. Remove gcc-libs? [y/N] y |
|||
{{ic|y}} を選択して衝突を解決してください (multilib バージョンが必要です)。 |
|||
}} |
|||
公式の git リポジトリを複製してください。以下の例では ''fido'' ブランチを使っています。 |
|||
$ <nowiki>git clone --branch fido git://git.yoctoproject.org/poky.git ~/poky</nowiki> |
|||
YP Core は {{Pkg|python2}} の使用が必須です。[[Python#Python_2|Python]] のページより: |
|||
$ mkdir -p ~/bin |
|||
$ ln -s /usr/bin/python2 ~/bin/python |
|||
$ ln -s /usr/bin/python2-config ~/bin/python-config |
|||
$ export PATH=~/bin:$PATH |
|||
== core-image-minimal のビルド == |
|||
いよいよ ''core-image-minimal'' ターゲットをビルドします。まず {{ic|poky}} ディレクトリに移動して environment スクリプトを source してください。そして ''bitbake'' でビルドしましょう: |
|||
$ cd ~/poky |
|||
$ source oe-init-build-env build-qemux86 |
|||
{{Tip| |
|||
{{ic|~/poky/build-qemux86/conf/local.conf}} で以下のことが行えます: |
|||
* ディレクトリを再利用するにはダウンロードディレクトリを変更してください。例: {{ic|<nowiki>DL_DIR ?= "~/poky-downloads"</nowiki>}}。 |
|||
* ビルド時には相当のディスク容量を使用します。{{ic|<nowiki>INHERIT += "rm_work"</nowiki>}} という行を追加することでディスク容量を節約できます。}} |
|||
{{hc|$ bitbake core-image-minimal|<nowiki> |
|||
WARNING: Host distribution "Arch-Linux" 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. |
|||
Parsing recipes: 100% |
|||
|########################################################################################################################################################################################################################################################################################| Time: 00:02:42 |
|||
Parsing of 884 .bb files complete (0 cached, 884 parsed). 1285 targets, 41 skipped, 0 masked, 0 errors. |
|||
NOTE: Resolving any missing task queue dependencies |
|||
Build Configuration: |
|||
BB_VERSION = "1.26.0" |
|||
BUILD_SYS = "x86_64-linux" |
|||
NATIVELSBSTRING = "Arch-Linux" |
|||
TARGET_SYS = "i586-poky-linux" |
|||
MACHINE = "qemux86" |
|||
DISTRO = "poky" |
|||
DISTRO_VERSION = "1.8" |
|||
TUNE_FEATURES = "m32 i586" |
|||
TARGET_FPU = "" |
|||
meta |
|||
meta-yocto |
|||
meta-yocto-bsp = "fido:08d32590411568e7bf11612ac695a6e9c6df6286" |
|||
NOTE: Preparing RunQueue |
|||
NOTE: Executing SetScene Tasks |
|||
NOTE: Executing RunQueue Tasks |
|||
WARNING: Failed to fetch URL http://downloads.sourceforge.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz, attempting MIRRORS if available |
|||
NOTE: Tasks Summary: Attempted 1989 tasks of which 9 didn't need to be rerun and all succeeded. |
|||
Summary: There were 2 WARNING messages shown. |
|||
</nowiki>}} |
|||
完了するまでしばらく時間がかかります。yocto に関する詳細は [http://www.yoctoproject.org/docs/1.8/yocto-project-qs/yocto-project-qs.html Quick Start Guide] を見て下さい。 |
|||
{{Note|The first warning about Arch Linux not been validated is expected. The second warning can happen when failing to download a resource, the build system will then attempt to get that resource from the next mirror.}} |
|||
== core-image-minimal の実行 == |
|||
[[QEMU]] でイメージを実行するには、以下のように ''runqemu'' コマンドで起動します: |
|||
{{hc|$ runqemu qemux86|2= |
|||
Continuing with the following parameters: |
|||
KERNEL: [/home/user/poky/build-qemux86/tmp/deploy/images/qemux86/bzImage-qemux86.bin] |
|||
ROOTFS: [/home/user/poky/build-qemux86/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150804095542.rootfs.ext4] |
|||
FSTYPE: [ext4] |
|||
Setting up tap interface under sudo |
|||
[sudo] password for user: |
|||
Acquiring lockfile for tap0... |
|||
Running qemu-system-i386... |
|||
/home/user/poky/build-qemux86/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 -kernel /home/user/poky/build-qemux86/tmp/deploy/images/qemux86/bzImage-qemux86.bin -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no -cpu qemu32 -hda /home/user/poky/build-qemux86/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150804095542.rootfs.ext4 -show-cursor -usb -usbdevice wacom-tablet -vga vmware -no-reboot -m 256 --append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/hda rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 " |
|||
Set 'tap0' nonpersistent |
|||
Releasing lockfile of preconfigured tap device 'tap0' |
|||
}} |
|||
{{Tip| If the kernel was recently updated, rebooting might help you avoid issues with ''tunctl''.}} |
|||
2024年9月8日 (日) 17:38時点における最新版
転送先: