JeffyCN / meta-rockchip

Yocto BSP layer for the Rockchip SOC boards
Other
120 stars 93 forks source link

bitbake core-image-minimal fails because of libgpoid #21

Closed bojidartonchev closed 2 years ago

bojidartonchev commented 2 years ago

Hello,

First I want to mention that I am extremely new to Yocto and this is my first project, so probably the issue is something on my end.

I am trying to build a Yocto image for ASUS TinkerBoard 2, using the dunfell branch. I have included the meta-flutter layer, so I tried with both dunfell and flutter branch of meta-rockchip. The error is the same.

| checking linux/gpio.h usability... no
| checking linux/gpio.h presence... no
| checking for linux/gpio.h... no
| configure: error: linux/gpio.h header not found (needed to build the library)
| NOTE: The following config.log files may provide further information.
| NOTE: /mnt/data/Projects/smib/build/tmp/work/aarch64-poky-linux/libgpiod/1.4.3-r0/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/mnt/data/Projects/smib/build/tmp/work/aarch64-poky-linux/libgpiod/1.4.3-r0/temp/run.do_configure.1239664' failed with exit code 1
ERROR: Task (/mnt/data/Projects/smib/meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.4.3.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2689 tasks of which 2346 didn't need to be rerun and 1 failed.

This is the content of my local.conf

MACHINE ??= "rockchip-rk3399-sapphire-excavator"
IMAGE_FSTYPES = "tar.xz ext3"
CORE_IMAGE_EXTRA_INSTALL_append = " kernel-modules kribo-app-release flutter-pi-release flutter-engine-release flutter-drm-gbm-backend flutter-linux-plugins-release init"
DISTRO_FEATURES += " systemd opengl x11"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
GLIBC_GENERATE_LOCALES = "en_US.UTF-8"
IMAGE_LINGUAS = "en-us"
FLUTTER_RUNTIME_pn-flutter-drm-gbm-backend = "release"
LICENSE_FLAGS_WHITELIST = "commercial"
CLANGSDK = "1"

This is the content of my bblayers.conf

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /mnt/data/Projects/smib/meta \
  /mnt/data/Projects/smib/meta-poky \
  /mnt/data/Projects/smib/meta-yocto-bsp \
  /mnt/data/Projects/smib/meta-rockchip \
  /mnt/data/Projects/smib/meta-openembedded/meta-oe \
  /mnt/data/Projects/smib/meta-openembedded/meta-multimedia \
  /mnt/data/Projects/smib/meta-openembedded/meta-networking \
  /mnt/data/Projects/smib/meta-openembedded/meta-python \
  /mnt/data/Projects/smib/meta-flutter \
  /mnt/data/Projects/smib/meta-clang \
  "

Previously I was able to successfully build an image for RaspberryPi 4, using meta-raspberrypi instead of meta-rockchip. Any help would be appreciated.

Best regards.

JeffyCN commented 2 years ago

log said the linux/gpio.h is missing.

3399 is using BSP 4.4 kernel, which haven't expose gpio.h to userspace yet.

so that libgpiod doesn't work with kernel 4.4, if you truely need it, you might need to modify it to use gpio.h from somewhere else