Imx6ull mariadb SDK

I am trying to install mariadb in the kernel.

I am able to build the image bitbake -k console-tdx-image and this builds successfully. When the image is installed onto the module, mariadb has been installed.

When i then try and build the SDK with bitbake -k console-tdx-image -c populate_sdk i get errors

Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "colibri-imx6ull"
DISTRO               = "tdx-x11"
DISTRO_VERSION       = "2.6-snapshot-20201124"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-nxp     = "HEAD:762dd2b57266ed99831c6b7e91a51193d7169046"
meta-freescale       = "HEAD:07d4a6baa23ec3a1f013f8a070130598b56aec7c"
meta-freescale-3rdparty = "HEAD:545e8094a140231e78b9284c3a3d94fcc573ae98"
meta-toradex-tegra   = "HEAD:90828b47fa1a7055fe71896a76153d1786bf375a"
meta-toradex-bsp-common = "HEAD:e82be9ce7cbeff00b38fa09240996b5b3c7265f9"
meta-oe              
meta-filesystems     
meta-gnome           
meta-xfce            
meta-initramfs       
meta-networking      
meta-multimedia      
meta-python          = "HEAD:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93"
meta-lxde            = "HEAD:ef686d11201b780d7db650f94b3a850a0eb3a6f5"
meta-browser         = "HEAD:2c3c891f776e86faad1f759676cb2bfff32df4a8"
meta-qt5             = "HEAD:e6e464c9ed9266ce46452f953c1bdcb0e7b2d95f"
meta-qt5-extra       = "HEAD:48ab2dad10399951783f0e54aafb7a27ae46ac4e"
meta-rust            = "HEAD:dbf68d40b3898913142f84586bbc97b830797967"
meta-freescale-distro = "HEAD:4a244af3993ae662624c6f615464e6806cc719a2"
meta-toradex-demos   = "HEAD:03aa13b6a709470ba7c9367293f979e6f0bb939b"
meta-toradex-distro  = "HEAD:be3bebbc165727418f261d29bd75dd413527fd97"
meta-poky            = "HEAD:bf00cab7a55e2038e09a307378af5aec04c99380"
meta                 = "HEAD:e68991ceb5933f7d03b96697e8a0ba0829feb320"

Initialising tasks: 100% |############################################################################################| Time: 0:00:02
Sstate summary: Wanted 277 Found 277 Missed 0 Current 1186 (100% match, 100% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: console-tdx-image-3.0b4-r0 do_populate_sdk: Unable to install packages. Command '/home/adrian/ezcharge/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/console-tdx-image/3.0b4-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /home/adrian/ezcharge/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/console-tdx-image/3.0b4-r0/opkg.conf -t /home/adrian/ezcharge/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/console-tdx-image/3.0b4-r0/temp/ipktemp/ -o /home/adrian/ezcharge/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/console-tdx-image/3.0b4-r0/sdk/image/opt/tdx-x11/2.6.4/sysroots/armv7at2hf-neon-tdx-linux-gnueabi  --force_postinstall --prefer-arch-to-version   install alsa-utils alsa-utils-amixer alsa-utils-aplay avahi-autoipd backports bluez-alsa bmode-usb bzip2 can-utils connman connman-client connman-plugin-ethernet connman-plugin-loopback connman-plugin-wifi curl devmem2 dosfstools ethtool evtest gdb gdbserver grep hdparm hostapd i2c-tools iperf3 iproute2 joe ldd libftdi1-2 libgpiod-tools libjson-c-dev libjson-c4 libpng16-16 libsoc2 libusb-0.1-4 libusbgx-examples libusbgx2 libwebsockets13 linux-firmware-ath10k linux-firmware-ralink linux-firmware-rtl8188eu linux-firmware-rtl8192cu linux-firmware-sd8686 linux-firmware-sd8688 linux-firmware-sd8787 linux-firmware-sd8797 linux-firmware-sd8887 linux-firmware-sd8997 linuxptp lmbench lsof mariadb memtester minicom mmc-utils-cos mtd-utils mtd-utils-ubifs mwifiexap nbench-byte nfs-utils-client openssl opkg packagegroup-base-extended packagegroup-basic packagegroup-boot packagegroup-core-boot packagegroup-core-standalone-sdk-target packagegroup-core-x11 packagegroup-dotnet-deps ppp procps ptpd rng-tools rt-tests run-postinsts sqlite3 strace stress target-sdk-provides-dummy tdx-oak-sensors timestamp-service tinymembench u-boot-fw-utils udev-extra-rules udev-toradex-rules util-linux util-linux-fstrim util-linux-lsblk wireless-regdb-static x-window-xterm' returned 1:
Collected errors:
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - package libdbi-perl-1.641-r0.armv7at2hf-neon requires perl-module-dynaloader, but none of the providers can be installed
 * 
 * Solution 1:
 *   - do not ask to install a package providing target-sdk-provides-dummy

 * Solution 2:
 *   - do not ask to install a package providing mariadb 


ERROR: console-tdx-image-3.0b4-r0 do_populate_sdk: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: /home/adrian/ezcharge/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/console-tdx-image/3.0b4-r0/temp/log.do_populate_sdk.3486
ERROR: Task (/home/adrian/ezcharge/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/console-tdx-image.bb:do_populate_sdk) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4984 tasks of which 4983 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

My local.conf file has this

# What image type(s) are to be built?
CORE_IMAGE_EXTRA_INSTALL = "libwebsockets json-c json-c-dev sqlite3 libpng libftdi libusb-compat openssl mariadb"
IMAGE_INSTALL_append = " gdb gdbserver sqlite3 mariadb"

My bblayers.conf is

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"

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

BBLAYERS ?= " \
  ${TOPDIR}/../layers/meta-toradex-nxp \
  ${TOPDIR}/../layers/meta-freescale \
  ${TOPDIR}/../layers/meta-freescale-3rdparty \
  \
  ${TOPDIR}/../layers/meta-toradex-tegra \
  \
  ${TOPDIR}/../layers/meta-toradex-bsp-common \
  \
  ${TOPDIR}/../layers/meta-openembedded/meta-oe \
  ${TOPDIR}/../layers/meta-openembedded/meta-filesystems \
  ${TOPDIR}/../layers/meta-openembedded/meta-gnome \
  ${TOPDIR}/../layers/meta-openembedded/meta-xfce \
  ${TOPDIR}/../layers/meta-openembedded/meta-initramfs \
  ${TOPDIR}/../layers/meta-openembedded/meta-networking \
  ${TOPDIR}/../layers/meta-openembedded/meta-multimedia \
  ${TOPDIR}/../layers/meta-openembedded/meta-python \
  ${TOPDIR}/../layers/meta-lxde \
  ${TOPDIR}/../layers/meta-browser \
  ${TOPDIR}/../layers/meta-qt5 \
  ${TOPDIR}/../layers/meta-qt5-extra \
  ${TOPDIR}/../layers/meta-rust \
  ${TOPDIR}/../layers/meta-freescale-distro \
  ${TOPDIR}/../layers/meta-toradex-demos \
  \
  \
  ${TOPDIR}/../layers/meta-toradex-distro \
  ${TOPDIR}/../layers/meta-yocto/meta-poky \
  ${TOPDIR}/../layers/openembedded-core/meta \
"

The solution is

In the local.conf file i added to the IMAGE_INSTALL_append mariadb
Then built the image using

bitbake -k console-tdx-image

This then produced the image to be used on the module.

To build the SDK the local.conf needs to be changed (Note no mention of mariadb)

IMAGE_INSTALL_append = " libmysqlclient-dev"
SDKIMAGE_FEATURES = "dev-pkgs dbg-pkgs staticdev-pkgs"

Then built the SDK image using

bitbake -k console-tdx-image -c populate_sdk

Hi @adrian,

I’m glad to see that you managed to get it working.

I’m very surprised to see that you had to change your IMAGE_INSTALL_append in local.conf from

IMAGE_INSTALL_append = " gdb gdbserver sqlite3 mariadb"

to

 IMAGE_INSTALL_append = " libmysqlclient-dev"
 SDKIMAGE_FEATURES = "dev-pkgs dbg-pkgs staticdev-pkgs"

We had a similar issue as yours reported here MySQL or MariaDB, see the answer provided by @cleitonbueno.

Thanks for replying with the details you found to make it work!

Best regards,

André Curvello