「Raspberry Pi活用/Yocto設定」の版間の差分

ナビゲーションに移動 検索に移動
 
(同じ利用者による、間の44版が非表示)
== ビルド参考 ==
 
* https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html
tools-debug
* https://wiki.yoctoproject.org/wiki/Releases
 
= Yocto環境取得 =
 
<nowiki>
//~/yocto$ git clone -b kirkstonescarthgap githttps://git.yoctoproject.org/poky
//~/yocto$ .source poky/oe-init-build-env
//~/yocto$ bitbake-layers layerindex-fetch meta-raspberrypi
~/yocto$ git clone git://git.yoctoproject.org/poky
~/yocto$ cd poky
~/yocto/poky$ git checkout kirkstone
//~/yocto/poky$ git checkout scarthgap
~/yocto/poky$ cd ..
~/yocto$ git clone git://git.yoctoproject.org/meta-raspberrypi
~/yocto$ cd meta-raspberrypi
~/yocto/meta-raspberrypi$ git checkout kirkstone
~/yocto/meta-raspberrypi$ cd ..
~/yocto$ . poky/oe-init-build-env
~/yocto/build$ bitbake-layers add-layer ../meta-raspberrypi
</nowiki>
 
== gitで通信できる場合 ==
~/yocto/build/conf/local.conf
 
<nowiki>
~/yocto/build$ bitbake-layers layerindex-fetch -b scarthgap meta-raspberrypi
MACHINE ?= "raspberrypi4-64"
</nowiki>
 
== gitで通信できない場合 ==
 
<nowiki>
~/yocto/poky$ git clone -b scarthgap https://git.yoctoproject.org/meta-raspberrypi
~/yocto/build$ bitbake core-image-minimal
~/yocto/poky$ bitbake-layers add-layer meta-raspberrypi
</nowiki>
 
== layerの確認 ==
~/yocto/build$ bitbake core-image-sato -c clean
 
~/yocto/build$ bitbake core-image-sato
<nowiki>
~/yocto/build$ bitbake core-image-sato -c listtasks
bitbake-layers show-layers
</nowiki>
 
= 設定変更 =
 
~/yocto/build/conf/local.conf
 
<nowiki>
$MACHINE sudo?= bmaptool copy core-image-minimal-"raspberrypi4-64.wic.bz2 /dev/SDX"
//$ sudo bmaptool copy core-image-sato-raspberrypi4-64.wic.bz2 /dev/SDX
</nowiki>
 
<nowiki>
DL_DIR ?= "${TOPDIR}/downloads"
bitbake-layers show-layers
</nowiki>
 
https://meta-raspberrypi.readthedocs.io/en/latest/ipcompliance.html
=== 部分ビルド ===
 
= ビルド =
 
core-image-base
 
== 最小構成 ==
 
<nowiki>
~/yocto/build$ bitbake core-image-minimal
$ bitback myapp
$ bitback -c cleansstate myapp
</nowiki>
 
== X環境 ==
<nowki>
 
build/tmp/work/x86-64-linux/openssl-native/1.0.2o-r0/temp$ ./run.do_compile
<nowiki>
~/yocto/build$ bitbake core-image-sato
</nowiki>
 
= SDカードへの書き込み =
=== qemu ===
 
<nowiki>
$ sudo bmaptool copy --bmap core-image-minimal-raspberrypi4-64.rootfs.wic.bmap core-image-minimal-raspberrypi4-64.rootfs.wic.bz2 /dev/SDX
$ runqemu qemu86-64 nographic
</nowiki>
 
= QEMUを使用する場合 =
== SDK ==
 
~/yocto/build/conf/local.conf
 
<nowiki>
MACHINE ?= "qemuarm64"
~/yocto/build$ bitbake core-image-sato -c populate_sdk
//~/yocto/build$ bitbake meta-toolchain
</nowiki>
 
<nowiki>
$ bitbake core-image-base
~/yocto/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-sato-cortexa72-raspberrypi4-64-toolchain-4.0.17.sh
$ runqemu qemuarm64 nographic
</nowiki>
 
= SDK =
 
== ビルド ==
 
<nowiki>
~/yocto/build$ bitbake -c populate_sdk core-image-base
$ . /opt/poky/4.0.17/environment-setup-cortexa72-poky-linux
</nowiki>
 
== インストール ==
 
<nowiki>
~/yocto/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-base-cortexa57-qemuarm64-toolchain-5.0.4.sh
</nowiki>
 
== 環境設定 ==
 
<nowiki>
$ source /opt/poky/5.0.4/environment-setup-cortexa57-poky-linux
</nowiki>
 
== 使用方法 ==
 
<nowiki>
</nowiki>
 
== 自作アプリの追加 ==
 
== デバッグ ==
 
<nowiki>
</nowiki>
 
=== USBブゲッ上でのみデバッグ ===
 
local.conf
 
<nowiki>
EXTRA_IMAGE_FEATURES:append = " tools-debug"
IMAGE_INSTALL:append = " packagename-dbg"
EXTRA_IMAGE_FEATURES:append = " dbg-pkgs"
 
DEBUG_BUILD = "1"
</nowiki>
 
= USBブート =
 
local.conf
</nowiki>
 
== NFSルート ==

ナビゲーション メニュー