-
Notifications
You must be signed in to change notification settings - Fork 2
Build RZ G1E
BSPのビルドについては基本的に上記の通り行えば良い。 以下、2017-05-29時点でのビルド例を示す。
- Ubuntu 14.04を適当なビルドマシンにインストール
- 必要なパッケージをインストール
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev xterm
# Firefoxのビルドにautoconf2.13が追加で必要
$ sudo apt-get install autoconf2.13
各リポジトリのcloneおよびcheckout
$ export WORK=${HOME}/Projects/rz-g1-bsp
$ mkdir -p $WORK/proprietary
$ cd $WORK
$ git clone git://git.yoctoproject.org/poky
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone git://git.linaro.org/openembedded/meta-linaro.git
$ git clone https://github.com/renesas-rz/meta-renesas
$ cd $WORK/poky
$ git checkout -b tmp yocto-1.6.1
$ git cherry-pick 17daa2ba6280304771c5fe52b94eb56f0c087490
$ git cherry-pick 8e0c54cd0e82ffe120f84f495101cd29e6fd06bf
$ cd $WORK/meta-openembedded
$ git checkout -b tmp dca466c074c9a35bc0133e7e0d65cca0731e2acf
$ cd $WORK/meta-linaro
$ git checkout -b tmp 8a0601723c06fdb75e62aa0f0cf15fc9d7d90167
$ cd $WORK/meta-renesas
$ git checkout -b tmp certified-linux-v1.0.0
一箇所、ツールチェーンのダウンロード先が変更されているので修正する。
$WORK/meta-linaro/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc:
-SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \
+SRC_URI = "https://releases.linaro.org/archive/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \
続いて、プロプライエタリドライバのセットアップ。 以下からそれぞれ$WORK/proprietaryにダウンロード。
- RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.zip
- RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.zip
上記の中身をソースツリー内にコピー。
$ cd $WORK/proprietary
$ unzip RZG_Series_Evaluation_Software_Package_for_Linux-20151202.tar.zip
$ unzip RZG_Series_Evaluation_Software_Package_of_Linux_Drivers-20151202.tar.zip
$ cd $WORK/meta-renesas/meta-rzg1
$ ./copy_gfx_software_skrzg1e.sh ../../proprietary
$ ./copy_mm_software_lcb.sh ../../proprietary
シェル環境のセットアップ・設定ファイルのコピー
$ cd $WORK
$ source poky/oe-init-build-env build-x11 (ビルドディレクトリをbuild-x11とする)
$ cp ../meta-renesas/meta-rzg1/templates/skrzg1e/bblayers.conf ./conf
$ cp ../meta-renesas/meta-rzg1/templates/skrzg1e/local-x11.conf ./conf/local.conf
ビルド
$ bitbake core-image-x11
シェル環境のセットアップ・設定ファイルのコピー
$ cd $WORK
$ source poky/oe-init-build-env build-wayland (ビルドディレクトリをbuild-waylandとする)
$ cp ../meta-renesas/meta-rzg1/templates/skrzg1e/bblayers.conf ./conf
$ cp ../meta-renesas/meta-rzg1/templates/skrzg1e/local-wayland.conf ./conf/local.conf
ビルド
$ bitbake core-image-weston
SDカードのデバイスファイルとマウント先を仮にそれぞれ/dev/sdb
および/mnt/sd
とする。
ext3パーティションの作成
$ sudo apt-get install gparted
$ sudo gparted /dev/sdb
(全領域をext3の1パーティションに割当)
SDカードにファイルをコピー(以下はX11の場合の例)
sudo mkdir -p /mnt/sd
sudo mount /dev/sdb1 /mnt/sd
sudo mkdir -p /mnt/sd/boot
sudo cp "${WORK}/build-x11/tmp/deploy/images/skrzg1e/uImage+dtb" /mnt/sd/boot/
sudo tar -xjf "${WORK}/build-wayland/tmp/deploy/images/skrzg1e/core-image-x11-skrzg1e.tar.bz2" -C /mnt/sd
sudo umount /mnt/sd
ブート設定を確認・変更するため、シリアルコンソールでアクセスできるようにする。 以下、GNU/Linuxでscreenを使用して接続する場合の例:
screenをインストール
$ sudo apt-get install screen
実機のCN13 DEBUGと書かれたMicroUSB端子とPCのUSB端子を接続し、screenを実行
$ sudo screen /dev/ttyUSB0 38400
問題が無ければ、実機の電源投入後にコンソールに出力が表示される。
なお、ブート設定やカーネルに手を入れるのでなければ、普段のデバッグはシリアルコンソールよりもsshの方が楽。
SDカードを実機に挿入して電源投入。シリアルコンソールでスペースキーを押しっぱなしにしておく。 ubootのコンソールに入るので、以下を実行:
> setenv bootcmd 'ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0'
> setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M'
> saveenv
リセットボタンで再起動。問題が無ければOSが起動する。
ICUのレシピを53.1に上げる。
$ cd ${WORK}/poky
$ git cherry-pick f9421caf32504d6716a8caa0c4de8c64e8b4f570
Firefox/B2Gのレシピをcloneする。 以下の例ではFirefoxとB2Gを同一イメージに入れるために、それぞれのブランチをマージして一つにまとめている。
$ cd ${WORK}
$ git clone https://github.com/webdino/meta-browser
$ git checkout -b firefox-and-b2g origin/gem-firefox-45.6.0esr
$ git merge origin/b2g
ビルドディレクトリ(${WORK}/build-x11)のconf/bblayers.confに以下を追加する。
BBLAYERS += "${TOPDIR}/../meta-browser"
ビルドディレクトリのconf/local.confに以下を追加する。
IMAGE_INSTALL_append = " firefox gaia gaia-tv "
IMAGE_INSTALL_append = " ttf-sazanami-gothic ttf-sazanami-mincho "
以上の設定でrootfsイメージを再ビルドする。
$ cd ${WORK}/build-x11
$ bitbake core-image-x11
2017-01-20時点ではまだB2Gは動作していないため、Firefoxについてのみ記載する。
Firefoxのレシピをcloneする。
$ cd ${WORK}
$ git clone -b gem-firefox-45.6.0esr https://github.com/webdino/meta-browser
次に、標準で提供されるGTK+-3.10ではWayland対応が十分ではないため、以下のレシピを使用してGTK+-3.18に更新する。まだいくつかバグは存在はするが、GTK+-3.10と比較すると大きく動作が改善する。
$ cd ${WORK}
$ git clone https://github.com/webdino/meta-gecko-embedded
ビルドディレクトリ(${WORK}/build-wayland)のconf/bblayers.confに以下を追加する。
BBLAYERS += " ${TOPDIR}/../meta-browser "
BBLAYERS += " ${TOPDIR}/../meta-gecko-embedded/meta-poky "
ビルドディレクトリのconf/local.confに以下を追加する。
IMAGE_INSTALL_append = " firefox "
IMAGE_INSTALL_append = " ttf-sazanami-gothic ttf-sazanami-mincho "
GPUアクセラレーションを有効化したい場合は、local.confに以下を追加する (現時点では強制的にフルスクリーンになる)。
PACKAGECONFIG_append_pn-firefox = " egl "
OpenMAXによるH.264再生のアクセラレーションを有効化したい場合は、local.confに以下を追加する。
PACKAGECONFIG_append_pn-firefox = " openmax "
以上の設定でrootfsイメージを再ビルドする。
$ cd ${WORK}/build-wayland
$ bitbake core-image-weston
FirefoxあるいはB2Gのみを更新したい場合は、必ずしもrootfsイメージを全て更新する必要は無く、 ipkパッケージのみを作成して実機にインストールする方法もある。
$ cd ${WORK}
$ bitbake firefox
$ cd tmp/deploy/ipk/cortexa7hf-vfp-neon
$ scp firefox_45.0esr-r0_cortexa7hf-vfp-neon.ipk root@[実機のIPアドレス]:~/
$ scp firefox-dbg_45.0esr-r0_cortexa7hf-vfp-neon.ipk root@[実機のIPアドレス]:~/
$ ssh root@[実機のIPアドレス]
# opkg install firefox*.ipk
以下の手順でインタフェースを日本語に変更できる
- bitbakeで
firefox-l10n-ja
をインストールする - 言語パックで Firefox のインターフェースを他の言語にするを参考に設定を変更する
BSPのリポジトリのセットアップを手動で行うのは面倒なので、clone〜checkoutについてはrepoコマンド用のmanifestを用意してみた。 ただしcherry-pickやプロプライエタリドライバのインストールはまだ自動化できていない。
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<default sync-j="2"/>
<remote fetch="git://git.yoctoproject.org" name="yocto"/>
<remote fetch="git://git.openembedded.org" name="oe"/>
<remote fetch="git://git.linaro.org/openembedded" name="linaro"/>
<remote fetch="https://github.com/renesas-rz" name="renesas-rz"/>
<project remote="yocto"
revision="c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
name="poky"
path="poky"/>
<project remote="oe"
revision="dca466c074c9a35bc0133e7e0d65cca0731e2acf"
name="meta-openembedded"
path="meta-openembedded"/>
<project remote="linaro"
revision="8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"
name="meta-linaro"
path="meta-linaro"/>
<project remote="renesas-rz"
revision="master"
name="meta-renesas"
path="meta-renesas"/>
</manifest>
上記を適当なgitリポジトリに入れて、以下を実行
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo -o ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir $WORK/repo-manifest
$ cd $WORK/repo-manifest
$ git init
$ vi default.xml (上記マニフェストファイルを用意)
$ git commit -a
$ cd $WORK
$ ~/bin/repo init -u file:///${WORK}/repo-manifest
- Gecko のビルド手順
- RZ/G2
- R-Car Gen3 Yocto2.1, Yocto2.4
- RZ/G1E Yocto 1.6.1, Yocto 2.0
- RasinboW G20D Q7 Yocto1.6.1, Yocto2.0
- Wandboard
- iMX6 SABRE
- Armadillo EVA 1500
- SD カード作成
- 追加レシピ (WPT等)
- Tips Pages
- 主な関連リポジトリ