编译Fydetab duo使用的openfyde相关问题

今天在参考论坛内的教程进行openfyde编译,有两个问题想问:

  1. 根据当前公开的内容,是否只能编译r120版本?mainfest项目下只更新到r120,没有r126
  2. 编译r120时,不只时archero、ai-dev缺失,tablet这个内容似乎也是缺失的,tablet是什么作用呢?

另外,实际编译时出现:

The Meson build system
Version: 0.64.1
Source dir: /build/fydetab_duo-openfyde/tmp/portage/chromeos-base/crosid-0.0.1-r210/work/crosid-0.0.1/platform2/chromeos-config/crosid
Build dir: /build/fydetab_duo-openfyde/tmp/portage/chromeos-base/crosid-0.0.1-r210/work/crosid-0.0.1-build
Build type: cross build
Project name: crosid
Project version: undefined

meson.build:5:0: ERROR: Executables created by c compiler aarch64-cros-linux-gnu-clang are not runnable.

是什么问题?是因为交叉编译么?

换22.04吧哈哈哈

换22.04之后能往下,但是有这么个错误:
看上去是编译chorme出问题?可是我openfyde用的不是chromium么?

* ERROR: chromeos-base/chromeos-chrome-120.0.6099.220_rc-r1::openfyde-patches failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *                ebuild.sh, line  125:  Called pre_src_prepare
 *              environment, line 4363:  Called cros_stack_hooks 'pre_src_prepare'
 *           profile.bashrc, line   71:  Called cros_pre_src_prepare_patches
 *   chromeos-chrome.bashrc, line   82:  Called die
 * The specific snippet of code:
 *       patch -p1 -f -s -g0 --no-backup-if-mismatch -r - < "${p}" || { unpatches_openfyde; die; }
 * 
 * Build log: /build/fydetab_duo-openfyde/tmp/portage/logs/chromeos-base:chromeos-chrome-120.0.6099.220_rc-r1:20250105-154426.log
 * Stable log symlink: /build/fydetab_duo-openfyde/tmp/portage/chromeos-base/chromeos-chrome-120.0.6099.220_rc-r1/temp/build.log
 * CWD: /mnt/host/source/openfyde/chromium/src
 * S:   /build/fydetab_duo-openfyde/tmp/portage/chromeos-base/chromeos-chrome-120.0.6099.220_rc-r1/work/chromeos-chrome-120.0.6099.220_rc

15:45:27: ERROR: return code: 1; command: sudo --preserve-env 'PKGDIR=/build/fydetab_duo-openfyde/packages' 'PORTAGE_BINHOST=gs://chromeos-prebuilt/board/arm64-generic/postsubmit-R120-15661.0.0-57674-8765886588152093073/packages gs://chromeos-prebuilt/board/arm64-generic/postsubmit-R120-15661.0.0-57683-8765861346166153201/packages gs://chromeos-prebuilt/board/arm64-generic/postsubmit-R120-15661.0.0-57685-8765858310845818193/packages gs://chromeos-prebuilt/board/arm64-generic/postsubmit-R120-15661.0.0-57688-8765852768937295169/packages gs://chromeos-prebuilt/board/arm64-generic/cq-R120-15659.0.0-57605-8766045517417959905/packages' 'CROS_METRICS_DIR=/tmp/tmpt__zio_i' 'CROS_CACHEDIR=/mnt/host/source/.cache' -- /mnt/host/source/chromite/bin/parallel_emerge '--sysroot=/build/fydetab_duo-openfyde' '--root=/build/fydetab_duo-openfyde' -uDNv '--backtrack=10' --newrepo --with-test-deps y --getbinpkg --with-bdeps y --usepkg '--jobs=4' '--useoldpkg-atoms=dev-embedded/hps-sdk dev-lang/rust dev-lang/go sys-libs/glibc sys-devel/gcc' '--rebuild-exclude=dev-embedded/hps-sdk dev-lang/rust dev-lang/go sys-libs/glibc sys-devel/gcc' virtual/target-os virtual/target-os-dev virtual/target-os-factory virtual/target-os-factory-shim virtual/target-os-test
Merging board packages failed
Failed Packages: chromeos-base/chromeos-chrome-120.0.6099.220_rc-r1

repo sync的时候有提示update successfully吗?

是的,出错后我有再repo sync和gclient sync过,都显示成功,代码已最新。
我编译个别的board对比下试试看好了。。。

把parent.use 里的chrome删掉,还是会因为编译chrome失败而失败 :joy:,放弃了

另外,尝试编译orangepi5-openfye出现一模一样的问题,也是chrome无法编译,是我的配置有什么问题么?

我自己捣鼓来,捣鼓去。。。是这里补丁的问题:
/mnt/host/source/src/overlays/baseboard-inaugural/chromium-patches/
这些补丁似乎内容有问题,在chromium/src目录下匹配不到文件,patch失败,因此就不能编译。
我也不知道这个应该怎么改,直接补丁全部删掉,能启动chrome的编译

你的command history 分享一下看看有没有什么问题呢?

更新,编译阶段失败:flushed:看来补丁不打不行…但是为啥我打补丁会失败呢…

我的操作步骤如下:

  • 安装必要软件: sudo apt-get install git gitk git-gui curl xz-utils python3-virtualenv python3-oauth2client lvm2 thin-provisioning-tools repo

  • 安装depot_tools:

  • 设置环境变量: export PATH=/mnt/hdd1/chromeos/openfyde/depot_tools:$PATH

  • Api Key准备后放到~/.googleapikeys

  • 创建目录: mkdir -p r120/openfyde

  • 配置Git

  • 克隆源代码

    repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git -b release-R120-15662.B
    
    git clone https://github.com/openFyde/manifest.git openfyde/manifest -b r120-dev
    ln -snfr openfyde/manifest .repo/local_manifests
    repo sync -j8
    cd openfyde/chromium
    gclient sync
    
  • 回到r120这一层目录,运行cros_sdk

  • 进入chroot后,修改:

    • /mnt/host/source/src/overlays/overlay-fydetab_duo-openfyde/metadata/layout.conf: 将第一行的archerotabletai-dev删除
    • /mnt/host/source/openfyde/overlays/overlay-fydetab_duo-openfyde/profiles/base/parent: 将其中第二行的archero:base删除
  • 运行setup_board --board=fydetab_duo-openfyde

  • 安装capnproto: sudo emerge capnproto

  • 修改/mnt/host/source/chromite/lib/dlc_allowlist.py: 第14行修改为DLC_FACTORY_INSTALL = (r"termina-dlc", r"sample-dlc",), 即加入r"termina-dlc"

  • 继续运行cros build-packages --jobs=4 '--board=fydetab_duo-openfyde' --no-withautotest --autosetgov --no-use-any-chrome

确实没看出啥问题…有空我试试

hhhhh, 照着你的教程,应该步骤跟你一致的吧。。。我删除目录。。。从头再来试试 :joy:

Emmmm,之前可能还是网络有问题?删除目录,从头再来,chorme能进入编译。但是运行到最后有新的问题,这次把完整日志拷下来了。
chromeos-base_chromeos-chrome-120.0.6099.220_rc-r1_20250107-173752.7z (1.1 MB)

bad_alloc, 这个问题是可以通过 sysctl里面 提高单个progess可以alloc的memory的值解决,忘记叫啥了

噢,感谢提供思路!我晚上查查看!

vm.max_map_count → 524288 或者更大

我想起来了 :joy: 之前也遇到了。