This service is available only in Japanese-language.

Ubootソースのパッチ適用について

YoctoイメージのU-Bootソースを変更するために下記の手順でパッチおよびレシピを作成しました。
bitbakeを実行するとエラーとなりました。
パッチの作り方および、パッチを当てるレシピの作成方法について間違っている部分があればご指摘ください。

●U-Bootソースコピー
$ mkdir -p ../local_repos/uboot-imx
$ cp -a tmp/work/imx8mmevk-poky-linux/u-boot-imx/1_2019.04-r0/git/. ../local_repos/uboot-imx
$ cd ../local_repos/uboot-imx
$ git reset --hard
$ git clean -fdx

●U-Bootソース編集およびパッチ作成
U-boot Source edit and save

$ git diff > u_boot_Change.diff

●U-Bootにパッチを当てるレシピ作成
$ cd /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build_dir
$ bitbake-layers create-layer -p 9 ../local_repos/meta-uboot
$ bitbake-layers add-layer ../local_repos/meta-uboot
$ mkdir -p ../local_repos/meta-uboot/recipes-bsp/u-boot
$ cp ../local_repos/uboot-imx/u_boot_Change.diff ../local_repos/meta-uboot/recipes-bsp/u-boot
$ vi ../local_repos/meta-uboot/recipes-bsp/u-boot/uboot_git.bbappend
SRC_URI += "u_boot_Change.diff"

●bitbake実行
$ bitbake imx-image-full
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 4069 entries from dependency cache.
ERROR: No recipes available for:
/usr/local/tools-imx8mm/source/imx-yocto-bsp/local_repos/meta-uboot/recipes-bsp/u-boot/uboot_git.bbappend

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

u-boot-imx のソースを使用とのことですので、パッチを適用するbbappend ファイルのファイル名は
u-boot-imx_2019.04.bbappend またはu-boot-imx_%.bbappend となります。
なお、patchファイルを配置するディレクトリですが、
u-boot-imx-2019.04.bbappend を作成した際に、u-boot-imx_2019.04 というディレクトリを作成し
その中に置く場合は、ファイル検索PATHの設定は特に不要ですが、bbappendが置かれたディレクトリ内に
filesディレクトリを作成しその中に配置を行い
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" 
と、ファイルを配置した場所をbitbakeに明示する必要があります。

指摘していただいた内容で下記のように修正しました。

$ mv ../local_repos/meta-uboot/recipes-bsp/u-boot/uboot_git.bbappend ../local_repos/meta-uboot/recipes-bsp/u-boot/u-boot-imx_2019.04.bbappend
$ vi ../local_repos/meta-uboot/recipes-bsp/u-boot/u-boot-imx_2019.04.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "u_boot_Change.diff"
$ mkdir ../local_repos/meta-uboot/recipes-bsp/u-boot/files
$ mv ../local_repos/meta-uboot/recipes-bsp/u-boot/u_boot_Change.diff ../local_repos/meta-uboot/recipes-bsp/u-boot/files

bitbkeした結果が下記になります。
パッチファイルの作成方法に問題がありますか?

$ bitbake imx-image-full
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 4069 entries from dependency cache.
ERROR: /usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2019.04.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 3, function: <module>
0001:__anon_20__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_conf_machine_include_arm_feature_arm_thumb_inc(d)
0002:__anon_25__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_patch_bbclass(d)
*** 0003:__anon_705__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_base_bbclass(d)
0004:__anon_64__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_meta_freescale_classes_fsl_dynamic_packagearch_bbclass(d)
0005:__anon_1023__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_insane_bbclass(d)
0006:__anon_1263__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_insane_bbclass(d)
0007:__anon_252__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_package_bbclass(d)
File: '/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/poky/meta/classes/base.bbclass', lineno: 589, function: __anon_705__usr_local_tools_imx8mm_source_imx_yocto_bsp_sources_poky_meta_classes_base_bbclass
0585:
0586: needsrcrev = False
0587: srcuri = d.getVar('SRC_URI')
0588: for uri in srcuri.split():
*** 0589: (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3]
0590:
0591: # HTTP/FTP use the wget fetcher
0592: if scheme in ("http", "https", "ftp"):
0593: d.appendVarFlag('do_fetch', 'depends', ' wget-native:do_populate_sysroot')
File: '/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/poky/bitbake/lib/bb/fetch2/__init__.py', lineno: 355, function: decodeurl
0351: """
0352:
0353: m = re.compile('(?P<type>[^:]*)://((?P<user>[^/;]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
0354: if not m:
*** 0355: raise MalformedUrl(url)
0356:
0357: type = m.group('type')
0358: location = m.group('location')
0359: if not location:
Exception: bb.fetch2.MalformedUrl: The URL: 'u_boot_Change.diff' is invalid and cannot be interpreted

ERROR: Failed to parse recipe: /usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2019.04.bb

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

実際の指定は以下のようになります。
SRC_URI += " \
file://パッチファイル名 \
"

パッチファイルの指定方法を変更して、再度ビルドしました。
下記のようなエラーが発生し、ログファイルを確認しました。

8mmevk$ bitbake imx-image-full
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 4069 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:02
Parsing of 2878 .bb files complete (2877 cached, 1 parsed). 4069 targets, 247 skipped, 2 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "debian-10"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mmevk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "5.4-zeus"
TUNE_FEATURES = "aarch64 cortexa53 crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:0275e68b0576cdefc19718e4b1977044f9f43f48"
meta-oe
meta-multimedia
meta-python = "HEAD:aad5b3d070cd8c58828b0975cf861d8ebc90f460"
meta-freescale = "HEAD:0be39721cea6e04c589a419f4bb07fabd0da6704"
meta-freescale-3rdparty = "HEAD:aea3771baa77e74762358ceb673d407e36637e5f"
meta-freescale-distro = "HEAD:ca27d12e4964d1336e662bcc60184bbff526c857"
meta-bsp
meta-sdk
meta-ml = "HEAD:435f5e984856a943986491fddd061734a0b9eba5"
meta-browser = "HEAD:5f365ef0f842ba4651efe88787cf9c63bc8b6cb3"
meta-rust = "HEAD:5cda04c7c2158fc982502ca1e7893f71e4ca1729"
meta-gnome
meta-networking
meta-filesystems = "HEAD:aad5b3d070cd8c58828b0975cf861d8ebc90f460"
meta-qt5 = "HEAD:432ad2aa6c3a13253fefc909faba368851d21fb1"
meta-multimedia
meta-uboot = "<unknown>:<unknown>"

Initialising tasks: 100% |#######################################| Time: 0:00:07
Sstate summary: Wanted 16 Found 1 Missed 15 Current 3198 (6% match, 99% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: imx-image-full-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gtk_immodules_cache' failed, details in /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/temp/log.do_rootfs.13189
ERROR: Task (/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-sdk/recipes-fsl/images/imx-image-full.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8572 tasks of which 8543 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-sdk/recipes-fsl/images/imx-image-full.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
asdusr@yocto-dev:/usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx

ログファイルのラストのメッセージ
NOTE: > Executing update_gtk_immodules_cache intercept ...
NOTE: Exit code 1. Output:
+ [ True = False -a qemuwrapper-cross != nativesdk-qemuwrapper-cross ]
+ qemu-aarch64 -r 3.14 -E LD_LIBRARY_PATH=/usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs/usr/lib:/usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs/lib -L /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs/usr/libexec/gtk-query-immodules-2.0
/usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/intercept_scripts-1ab2ea10a0f6abcb805aa52df0174da6debd086194fe48666d89466e550b677a/update_gtk_immodules_cache: 15: /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/intercept_scripts-1ab2ea10a0f6abcb805aa52df0174da6debd086194fe48666d89466e550b677a/update_gtk_immodules_cache: cannot create /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs/usr/lib/gtk-3.0/3.0.0/immodules.cache: Directory nonexistent
chown: cannot access '/usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/rootfs/usr/lib/gtk-3.0/3.0.0/immodules.cache': No such file or directory

ERROR: The postinstall intercept hook 'update_gtk_immodules_cache' failed, details in /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/temp/log.do_rootfs
DEBUG: Python function do_rootfs finished

GTK-3.0のディレクトリが無いといわれており、実際に確認したところ、GTK-2.0のディレクトリはありましたが、GTK-3.0のディレクトリはありませんでした。

今回修正したのは、U-Bootなので全く関係がないと思います。
エラーの原因がわからないので、
再度、「$ DISTRO=fsl-imx-xwayland MACHINE=imx8mmevk source imx-setup-release.sh -b Build-xwayland-imx8mmevk

を実行して、追加したレシピをリセットして、再度ビルドしましたが、同じエラーが発生しました。
Yoctoプロジェクトをダウンロードしなおす必要がありますか?

$ bitbake imx-image-full
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 4067 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "debian-10"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mmevk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "5.4-zeus"
TUNE_FEATURES = "aarch64 cortexa53 crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:0275e68b0576cdefc19718e4b1977044f9f43f48"
meta-oe
meta-multimedia
meta-python = "HEAD:aad5b3d070cd8c58828b0975cf861d8ebc90f460"
meta-freescale = "HEAD:0be39721cea6e04c589a419f4bb07fabd0da6704"
meta-freescale-3rdparty = "HEAD:aea3771baa77e74762358ceb673d407e36637e5f"
meta-freescale-distro = "HEAD:ca27d12e4964d1336e662bcc60184bbff526c857"
meta-bsp
meta-sdk
meta-ml = "HEAD:435f5e984856a943986491fddd061734a0b9eba5"
meta-browser = "HEAD:5f365ef0f842ba4651efe88787cf9c63bc8b6cb3"
meta-rust = "HEAD:5cda04c7c2158fc982502ca1e7893f71e4ca1729"
meta-gnome
meta-networking
meta-filesystems = "HEAD:aad5b3d070cd8c58828b0975cf861d8ebc90f460"
meta-qt5 = "HEAD:432ad2aa6c3a13253fefc909faba368851d21fb1"

Initialising tasks: 100% |#######################################| Time: 0:00:06
Sstate summary: Wanted 8 Found 6 Missed 2 Current 3206 (75% match, 99% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: imx-image-full-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gtk_immodules_cache' failed, details in /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build-xwayland-imx8mmevk/tmp/work/imx8mmevk-poky-linux/imx-image-full/1.0-r0/temp/log.do_rootfs.17802
ERROR: Task (/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-sdk/recipes-fsl/images/imx-image-full.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8572 tasks of which 8571 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/usr/local/tools-imx8mm/source/imx-yocto-bsp/sources/meta-imx/meta-sdk/recipes-fsl/images/imx-image-full.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

当該現象は、rootfsイメージの作成段階で実施されるタスクが失敗しているためですが、
開発ホストの/bin/sh (シンボリックリンクと思われます)は、現在何に設定されていますか?
/bin/bash になっていない場合は、/bin/bash に変更して試してみてください。

このトピックで、U-Bootの変更を行いたいので、レシピを組み込みましたがその後から、ビルドエラーが発生し続けています。
U-Bootは別でビルドするようにしたので、Yoctoイメージを再度ダウンロードしました。

Yoctoで生成されるSDカードイメージから、U-BootとKernel、デバイスツリーのみ別でビルドしたものに変更することで対応したいと思います。
ルートファイルシステムのみYoctoで生成されるものを使用します。