yocto とてつもなく不便な開発環境の構築

Ubuntu 14.04 を落として入れる。
米: ?以外の動作実績がWeb上にない redhat機雷。

apt-get install ssh

おまじない。
これまた調べないとわけわからない手順が存在。

apt-get install cpio python3 gawk wget git-core diffstat unzip texinfo gcc-multilib \
    build-essential chrpath libsdl1.2-dev xterm curl

webに唯一のってる手順 コピペ

mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

PATH=${PATH}:~/bin
mkdir fsl-community-bsp
cd fsl-community-bsp
repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b morty
repo sync

./setup-environment によって勝手にpython3がhome binに入る
米: ubuntu のaptでpython3 入れないように。(しにます。)

MACHINE=imx6solosabresd  DISTRO=fslc-framebuffer source setup-environment build

ubuntu が悪さをしているので対応。

touch conf/sanity.conf

手順に明記されていない。謎コマンド。

bitbake core-image-minimal

やっぱコンパイルエラー。死ね。

In file included from /usr/include/x86_64-linux-gnu/sys/syscall.h:31:0,
from ../util-linux-2.28.1/schedutils/chrt.c:63:
../util-linux-2.28.1/schedutils/chrt.c: In function ‘sched_setattr’:
../util-linux-2.28.1/schedutils/chrt.c:88:17: error: ‘__NR_sched_setattr’ undeclared (first use in this function)
return syscall(SYS_sched_setattr, pid, attr, flags);
^

ERROR: Task (virtual:native:fsl-community-bsp/sources/poky/meta/recipes-core/util-linux/util-linux_2.28.1.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 577 tasks of which 570 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:

またfedora系が悪さをしたらしい。うざい。死ね。
なーにが楽にできるだ。めちゃめちゃ苦労する。間違いない。
開発環境なんてバイナリごとzipで固めておくべき。

locate meta/recipes-core/util-linux/util-linux.inc
vi ?

 SHARED_EXTRA_OECONF = "--disable-use-tty-group \
                        --disable-makeinstall-chown \
                        --enable-kill --enable-last --enable-mesg --enable-partx \
                        --enable-raw --enable-reset --disable-login \
                        --disable-vipw --disable-newgrp --disable-chfn-chsh \
                        --enable-write --enable-mount \
                        --enable-libuuid --enable-libblkid --enable-fsck \
                        --disable-minix --disable-bfs --without-udev \
                        usrsbin_execdir='${sbindir}' \
+                        --disable-schedutils \
 "
 
 EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}"
+EXTRA_OECONF_append_util-linux = " --disable-schedutils"

つかこのエラー出てるの2016年ですぜ。
直せよ。

んで、

bitbake core-image-minimal

おわんのかこれ。VMでやるのが間違えなのか

14:14:31 up 2:42, 4 users, load average: 4.63, 4.36, 3.59

どっかにvirtual diskごとtorrentであげておくか。
趣味なら良いかもしれんが。
ハードディスクバカ食いするのとCPUバカ食いするのはいかん


cd tmp/deploy/images
ls
SD Card image (include everything) core-image-minimal-imx6solosabresd.sdcard.gz

-rw-r--r-- 1 root root 24M 8月 20 16:43 core-image-minimal-imx6solosabresd.rootfs.sdcard
-rw-r--r-- 2 root root 9.0M 8月 20 16:31 core-image-minimal-imx6solosabresd.rootfs.sdcard.gz

たった24Mのイメージがほしいだけなのに、26Gも食らうあほ環境

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 977G 26G 902G 3% /