phytec / meta-ampliphy

mirror of
https://git.phytec.de/meta-ampliphy
MIT License
8 stars 2 forks source link

Can't build bsp scarthgap #1

Closed ycnakajsph closed 2 months ago

ycnakajsph commented 4 months ago

Step to reproduce :

  1. repo init --repo-url=https://git.phytec.de/git/git-repo --repo-branch=stable -u git://git.phytec.de/phy2octo
  2. choose 12: 12: imx8mm
  3. choose 1: 1: BSP-Yocto-Ampliphy-i.MX8MM-master
  4. choose 2: 2: phygate-tauri-l-imx8mm-2:

That leads to a local.conf with:

MACHINE ?= "phygate-tauri-l-imx8mm-2"

DISTRO ?= "ampliphy-vanilla-master-u-boot-master"

I've added : ACCEPT_FSL_EULA = "1"

I'm working on ubuntu 22.04.

Here the error when building bitbake core-image-minimal

| /data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/git/tools/mkeficapsule.c:20:10: fatal error: gnutls/gnutls.h: No such file or directory
|    20 | #include <gnutls/gnutls.h>
|       |          ^~~~~~~~~~~~~~~~~
| compilation terminated.
| make[2]: *** [scripts/Makefile.host:95: tools/mkeficapsule] Error 1
| make[2]: *** Waiting for unfinished jobs....
|   gcc  -isystem/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/usr/include -O2 -pipe -L/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/usr/lib                         -L/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/lib                         -Wl,-rpath,/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread   -o tools/fdtgrep tools/libfdt/fdt.o tools/libfdt/fdt_ro.o tools/libfdt/fdt_wip.o tools/libfdt/fdt_sw.o tools/libfdt/fdt_rw.o tools/libfdt/fdt_strerror.o tools/libfdt/fdt_empty_tree.o tools/libfdt/fdt_addresses.o tools/libfdt/fdt_overlay.o tools/generated/boot/fdt_region.o tools/fdtgrep.o
| make[1]: *** [/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/git/Makefile:1892: tools] Error 2
| make[1]: Leaving directory '/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/build/imx8mm-phygate-tauri-l_defconfig'
| make: *** [Makefile:177: sub-make] Error 2
| make: Leaving directory '/data/projects/yocto-phytec-scarthgap/build/tmp-ampliphy/work/phygate_tauri_l_imx8mm_2-phytec-linux/u-boot/master/git'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/data/projects/yocto-phytec-scarthgap/sources/poky/../meta-fresh/recipes-bsp/u-boot/u-boot_master.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2497 tasks of which 2 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 1 task failed:
  /data/projects/yocto-phytec-scarthgap/sources/poky/../meta-fresh/recipes-bsp/u-boot/u-boot_master.bb:do_compile
Summary: There were 2 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
ymoog commented 4 months ago

This will remedy the issue:

In meta-fresh

diff --git a/recipes-bsp/u-boot/u-boot_master.bb b/recipes-bsp/u-boot/u-boot_master.bb
index c53de732..cd5efbcf 100644
--- a/recipes-bsp/u-boot/u-boot_master.bb
+++ b/recipes-bsp/u-boot/u-boot_master.bb
@@ -3,7 +3,7 @@ require recipes-bsp/u-boot/u-boot.inc

 inherit ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '1', 'imx-boot-container', '')}

-DEPENDS += "bc-native dtc-native python3-setuptools-native"
+DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native"

 GIT_URL = "git://source.denx.de/u-boot/u-boot.git;protocol=https"
 SRC_URI = "${GIT_URL};branch=${BRANCH}"

By default UEFI Capsules feature is enabled and this feature relies on gnutls.

Issue will be fixed in our Yocto layer as well.

ycnakajsph commented 4 months ago

Thanks that works ! Why did you introduced a new meta? What is meta-fresh supposed to be?

ymoog commented 4 months ago

Thanks that works !

Glad I could help!

meta-fresh is used for the master manifests (they have the keyword master suffixed). This manifest uses the newest/latest kernel and bootloader recipes and is what you selected:

choose 1: 1: BSP-Yocto-Ampliphy-i.MX8MM-master

Its sole purpose is to track the upstream revisions of Bootloader and Kernel and update our recipes to the latest upstream revisions. For example, automatically update U-Boot to the latest upstream revision.