2017/9/25

try : yocto for raspberry pi 3

先是參考 這一篇

clone git.yoctoproject.org/poky。
clone git,openembedded,org/meta-openembedded
clone github.com/meta-qt5/meta-qt5
clone git.yoctoproject.org/meta-raspberrypi
clone github.com/jumpnow/meta-rpi

作者的 meta-rpi 有提供 conf 下的 local.conf 和 bblayers.conf。
copy 過來,修改一下 bblayers.conf 裡的 path..

bitbake qt5-basic-image 出現 error:
Please use a locale setting which supports utf-8.
Python can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.

進入 python, 用 sys.getfilesystemencoding() 看,過然,是 ANSI....
所以 follow 這一篇:
$sudo apt-get install locales
$sudo dpkg-reconfigure locales 
$sudo locale-gen en_US.UTF-8
Generating locales
 en_US.UTF-8... done
Generation complete.
$sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
$export LANG=en_US.UTF-8

然後 build 出現 error:
ERROR: bcm2835-bootfiles-20170530-r60 do_fetch: Fetcher failure for URL: 
'https://codeload.github.com/raspberrypi/firmware/tar.gz/0f315f88ac91f9be93544bfd757f8d55ca4cf099'. Checksum mismatch!
File: '/home/charles-chang/rpi-yocto/build/downloads/0f315f88ac91f9be93544bfd757f8d55ca4cf099' 
has md5 checksum c8bf818d14ee260c6d318a8ab037b1b8 when 2fe42603602158796625989c73e5088b was expected
File: '/home/charles-chang/rpi-yocto/build/downloads/0f315f88ac91f9be93544bfd757f8d55ca4cf099' 
has sha256 checksum bfeb5471762bef90fb8accb135e9cf4bb08c4a7556df42f31987bd4184f52d10 
when 79dcd9f47fbae16e9ec80f96a48e4e04c0ee2076ddbb7f73429510d812a8ef89 was expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use 
these lines within the recipe:
SRC_URI[md5sum] = "c8bf818d14ee260c6d318a8ab037b1b8"
SRC_URI[sha256sum] = "bfeb5471762bef90fb8accb135e9cf4bb08c4a7556df42f31987bd4184f52d10"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or 
otherwise unexpectedly modified.

ERROR: bcm2835-bootfiles-20170530-r60 do_fetch: Fetcher failure for URL: 
'https://codeload.github.com/raspberrypi/firmware/tar.gz/0f315f88ac91f9be93544bfd757f8d55ca4cf099'. Unable to fetch URL from any source.
ERROR: bcm2835-bootfiles-20170530-r60 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/charles-chang/rpi-yocto/build/tmp/work/raspberrypi2-poky-linux-gnueabi/bcm2835-bootfiles/20170530-r60/temp/log.do_fetch.10803
ERROR: Task (/home/charles-chang/rpi-yocto/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb:do_fetch) failed with exit code '1'
這個是 meta-rpi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend 裡的:
RPIFW_DATE = "20170530"
SRCREV = "0f315f88ac91f9be93544bfd757f8d55ca4cf099"
SRC_URI[md5sum] = "2fe42603602158796625989c73e5088b"
SRC_URI[sha256sum] = "79dcd9f47fbae16e9ec80f96a48e4e04c0ee2076ddbb7f73429510d812a8ef89"

RPIFW_SRC_URI = "https://codeload.github.com/raspberrypi/firmware/tar.gz/${SRCREV}"
RPIFW_S = "${WORKDIR}/firmware-${SRCREV}"

PR = "r60"

do_unpack() {
    tar -C ${WORKDIR} -xzf ${DL_DIR}/${SRCREV}
}
所以到 github.com/raspberrypi/firmware/,按下release" 會到每次 release 的 tarball 頁面。
裡面沒有20170530..

最接近的是https://github.com/raspberrypi/firmware/archive/1.20170515.tar.gz 他的linkname 也不是直接 ${SRCREV}, 而是 1.${RREPFW_DATE}。
反而比較像 meta-raspberrypi/recipes-bsp/bootfiles/../common/firmware.inc:
RPIFW_DATE ?= "20170405"
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/1.${RPIFW_DATE}.tar.gz"
RPIFW_S ?= "${WORKDIR}/firmware-1.${RPIFW_DATE}"

SRC_URI = "${RPIFW_SRC_URI}"
SRC_URI[md5sum] = "ea82d14a7cd8cfae9b78e00d4e56bc71"
SRC_URI[sha256sum] = "2f4e5bddbac1372590db203002c35cbba3fb9d6172a93c314ee27bf05ae13bff"

PV = "${RPIFW_DATE}"

是 bbappend,所以刪掉這個bootfile.bbappend,重新build 一次...
faile 在其他地方:
| arm-poky-linux-gnueabi-strip omxplayer.bin
| make: *** [omxplayer.1] Error 52
| ERROR: Function failed: do_compile (log file is located at 
/home/charles-chang/rpi-yocto/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/omxplayer/git-r4/temp/log.do_compile.16373)
ERROR: Task (/home/charles-chang/rpi-yocto/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3371 tasks of which 1026 didn't need to be rerun and 1 failed.
看log,看不出fail 在那裡。
bitbake omxplayer
OK
再 bitbake qt5-basic-image
OK

沒有留言:

張貼留言