为DragonBoard 410c构建Yocto图像,如何构建Chromium

时间:2016-03-23 17:33:10

标签: linux chromium yocto

如何使用Sato和Chromium为DragonBoard 410c生成图像?

qcom-oe-manifest

中提及的Dragonboard-410c-OpenEmbedded-and-Yocto documentation开始

将Sato桌面和Chromium添加到此基本配置的正确/正确方法是什么?

我做了什么:

  • x11-base x11-sato添加到 IMAGE_FEATURES
  • chromium alsa-utils lsb添加到 CORE_IMAGE_BASE_INSTALL

my-image.bb

/oe-qcom-yocto/sources$ more ./meta-rpb/recipes-samples/images/my-image.bb

SUMMARY = "Basic console image"

IMAGE_FEATURES += "x11-base x11-sato splash package-management ssh-server-dropbear hwcodecs"

LICENSE = "MIT"

inherit core-image distro_features_check extrausers

# let's make sure we have a good image..
REQUIRED_DISTRO_FEATURES = "pam systemd"

CORE_IMAGE_BASE_INSTALL += " \
    chromium alsa-utils lsb \
    coreutils gptfdisk kernel-modules connman 96boards-tools \
"

EXTRA_USERS_PARAMS = "\
useradd -p '' linaro; \
"

然后运行bitbake -v

铬被跳过:与机器dragonboard-410c

不兼容
~/oe-qcom-yocto/build-jethro$  bitbake -v my-image


NOTE: Started PRServer with DBfile: /home/joel/oe-qcom-yocto/build-jethro/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 51063, PID: 1432
Loading cache: 100% |############################################################################################################################################################################| ETA:  00:00:00
Loaded 2948 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: selecting pigz-native to satisfy gzip-native due to PREFERRED_PROVIDERS
NOTE: selecting pseudo-native to satisfy virtual/fakeroot-native due to PREFERRED_PROVIDERS
NOTE: selecting linux-linaro-qcomlt to satisfy virtual/kernel due to PREFERRED_PROVIDERS
NOTE: selecting opkg-native to satisfy opkg-native due to PREFERRED_PROVIDERS
NOTE: selecting opkg-utils-native to satisfy virtual/update-alternatives-native due to PREFERRED_PROVIDERS
ERROR: Nothing RPROVIDES 'chromium' (but /home/joel/oe-qcom-yocto/build-jethro/conf/../../sources/meta-rpb/recipes-samples/images/my-image.bb RDEPENDS on or otherwise requires it)
ERROR: chromium was skipped: incompatible with machine dragonboard-410c (not in COMPATIBLE_MACHINE)
NOTE: Runtime target 'chromium' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['chromium']
NOTE: Target 'my-image' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['my-image', 'chromium']
ERROR: Required build target 'my-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['my-image', 'chromium']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

dragonboard-410c添加到COMPATIBLE_MACHINE - 新ERROR

...
NOTE: selecting gettext to satisfy virtual/gettext due to PREFERRED_PROVIDERS
ERROR: Nothing PROVIDES 'libav' (but /home/joel/oe-qcom-yocto/build-jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium_40.0.2214.91.bb DEPENDS on or otherwise requires it)
ERROR: libav was skipped: because it has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST
NOTE: Target 'libav' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libav']
NOTE: Runtime target 'chromium' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['chromium', 'libav']
NOTE: Target 'my-image' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['my-image', 'chromium', 'libav']
ERROR: Required build target 'my-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['my-image', 'chromium', 'libav']

更新

LICENSE_FLAGS_WHITELIST = "commercial"文件末尾添加了build_jethro/conf/local.conf并构建了我的图片

错误:Fetcher失败:无法在任何地方找到文件文件://include.gypi。

WARNING: Failed to fetch URL file://include.gypi, attempting MIRRORS if available
ERROR: Fetcher failure: Unable to find file file://include.gypi anywhere. The paths that were searched were:
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium-40.0.2214.91/rpb
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium/rpb
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/files/rpb
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium-40.0.2214.91/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/files/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium-40.0.2214.91/dragonboard-410c
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium/dragonboard-410c
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/files/dragonboard-410c
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium-40.0.2214.91/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/files/aarch64
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium-40.0.2214.91/
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium/
    /home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/files/
    /home/joel/oe-qcom-yocto/sources/downloads
ERROR: Function failed: Fetcher failure for URL: 'file://include.gypi'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/joel/oe-qcom-yocto/build_jethro/tmp-rpb-glibc/work/aarch64-oe-linux/chromium/40.0.2214.91-r0/temp/log.do_fetch.10845
ERROR: Task 197 (/home/joel/oe-qcom-yocto/build_jethro/conf/../../sources/meta-browser/recipes-browser/chromium/chromium_40.0.2214.91.bb, do_fetch) failed with exit code '1'
Chromium食谱中的include.gypi
joel@linux-Lenovo-G50-70:~/oe-qcom-yocto/sources$ grep -r "include.gypi" *
meta-browser/recipes-browser/chromium/chromium_40.0.2214.91.bb:        file://include.gypi \
meta-browser/recipes-browser/chromium/chromium_40.0.2214.91.bb: -I ${WORKDIR}/include.gypi \

添加了aarch64

根据LightenS的建议创建了meta-browser/recipes-browser/chromium/chromium/aarch64文件夹并添加了include.gypioe-defaults.gypi

include.gypi
meta-browser/recipes-browser/chromium/chromium/aarch64$ more include.gypi

{
  'variables': {
    'target_arch': 'arm64',
    'use_allocator': 0,
    'use_xkbcommon': 1,
     'v8_use_external_startup_data' : 0,
     'v8_use_snapshot' : 'false',
  }, 
}
OE-defaults.gypi
meta-browser/recipes-browser/chromium/chromium/aarch64$ more oe-defaults.gypi

{
  'variables': {
    'use_system_bzip2': 1,
    'disable_nacl': 1,
    'proprietary_codecs': 1,
    'v8_use_snapshot': 1,
    'ffmpeg_branding' : 'Chrome',
    'use_system_ffmpeg': 0,
    'linux_link_kerberos': 0,
    'use_kerberos': 0,
    'use_cups': 0,
    'use_gnome_keyring': 0,
    'linux_link_gnome_keyring': 0
  }, 
}

新问题

 [301/16647] CXX obj/breakpad/src/client/linux/minidump_writer/breakpad_client.linux_ptrace_dumper.o
| 
| [301/16647] CXX obj/breakpad/src/client/linux/minidump_writer/breakpad_client.linux_ptrace_dumper.o
| FAILED: aarch64-oe-linux-g++  --sysroot=/home/joel/oe-qcom-yocto/build_jethro/tmp-rpb-glibc/sysroots/dragonboard-410c -MMD -MF obj/breakpad/src/client/linux/dump_writer_common/breakpad_client.thread_info.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DUSE_XI2_MT=2 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DCLD2_DATA_SOURCE=static -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_LOAD_COMPLETION_HACKS=1 -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../breakpad/src -I../../breakpad/src/client -I../../breakpad/src/third_party/linux/include -I../.. -I../../breakpad -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -Wno-format -Wno-unused-result -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -Wno-error=unused-local-typedefs -O2 -pipe -g -feliminate-unused-debug-types -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -std=gnu++11 -Wno-narrowing -Wno-literal-suffix  -c ../../breakpad/src/client/linux/dump_writer_common/thread_info.cc -o obj/breakpad/src/client/linux/dump_writer_common/breakpad_client.thread_info.o
| In file included from ../../breakpad/src/client/linux/dump_writer_common/thread_info.cc:30:0:
| ../../breakpad/src/client/linux/dump_writer_common/thread_info.h:69:23: error: field 'regs' has incomplete type 'google_breakpad::user_pt_regs'
|    struct user_pt_regs regs;
|                        ^
| ../../breakpad/src/client/linux/dump_writer_common/thread_info.h:69:10: note: forward declaration of 'struct google_breakpad::user_pt_regs'
|    struct user_pt_regs regs;
|           ^
| ../../breakpad/src/client/linux/dump_writer_common/thread_info.h:70:28: error: field 'fpregs' has incomplete type 'google_breakpad::user_fpsimd_state'
|    struct user_fpsimd_state fpregs;
|                             ^
| ../../breakpad/src/client/linux/dump_writer_common/thread_info.h:70:10: note: forward declaration of 'struct google_breakpad::user_fpsimd_state'
|    struct user_fpsimd_state fpregs;
|

1 个答案:

答案 0 :(得分:3)

Openembedded-core中有一个Sato包你可以继承到HERE

如果你想建立Sato图像,这里有一个来自Openembedded-core HERE的列表

chromium.inc起,Chromium不支持您拥有的主板。哪个是Quad-core ARM® Cortex® A53,您可以尝试将计算机添加到列表中并进行编译。您的机器应为aarch64

COMPATIBLE_MACHINE = "(-)"
COMPATIBLE_MACHINE_x86 = "(.*)"
COMPATIBLE_MACHINE_x86-64 = "(.*)"
COMPATIBLE_MACHINE_armv6 = "(.*)"
COMPATIBLE_MACHINE_armv7a = "(.*)"
COMPATIBLE_MACHINE_aarch64 = "(.*)"

修改:Chromium需要编译以下内容;

DEPENDS = "xz-native pciutils pulseaudio cairo nss zlib-native libav cups ninja-native gconf libexif pango libdrm"

DEPENDS += "libgnome-keyring"

在这些依赖项中,libav需要为WHITELISTED。为此,我们需要转到conf/local.conf并添加LICENSE_FLAGS_WHITELIST = "commercial"

Click Here, and look for Section 12.5了解有关许可证的更多信息。

修改:提升者问题: 您需要将include.gypioe-defaults.gypi个文件添加到/meta-browser/recipes-browser/chromium/chromium/aarch64/

chromium/chromium/aarch64/include.gypi

{
  'variables': {
    'target_arch': 'arm64',
    'use_allocator': 0,
    'use_xkbcommon': 1,
     'v8_use_external_startup_data' : 0,
     'v8_use_snapshot' : 'false',
  }, 
}

chromium/chromium/oe-defaults.gypi

{
  'variables': {
    'use_system_bzip2': 1,
    'disable_nacl': 1,
    'proprietary_codecs': 1,
    'v8_use_snapshot': 1,
    'ffmpeg_branding' : 'Chrome',
    'use_system_ffmpeg': 0,
    'linux_link_kerberos': 0,
    'use_kerberos': 0,
    'use_cups': 0,
    'use_gnome_keyring': 0,
    'linux_link_gnome_keyring': 0
  }, 
}

编辑:Dragonboard的正确元浏览器应为:https://github.com/kuscsik/meta-browser-1。在里面,有董事会所需的所有文件。