Hello
I am having problems when trying to build a custom Yocto image for Apalis IMX6.
The custom image mostly uses Qt5 libs with different libraries. Here is the image files in recipes-images
SUMMARY = "DV Power Apalis iMX6 Console Image"
DESCRIPTION = "Minimal Qt5-enabled image with X11"
LICENSE = "MIT"
inherit core-image
export IMAGE_BASENAME = "DV-Power-Console-Image"
MACHINE_NAME ?= "${MACHINE}"
IMAGE_NAME = "${MACHINE_NAME}_${IMAGE_BASENAME}"
SYSTEMD_DEFAULT_TARGET = "graphical.target"
IMAGE_FEATURES += " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d), d)} \
"
IMAGE_LINGUAS = "en-us"
ROOTFS_PKGMANAGE_PKGS ?= '${@oe.utils.conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "${ROOTFS_PKGMANAGE}", d)}'
# Include only the essentials for a Qt5 X11 environment
IMAGE_INSTALL_QT5 = " \
packagegroup-qt5 \
qwt-qt5 \
liberation-fonts \
qtbase-plugins \
"
IMAGE_INSTALL += " \
${IMAGE_INSTALL_QT5} \
\
xdg-utils \
\
libgsf \
libxres \
makedevs \
mime-support \
xcursor-transparent-theme \
zeroconf \
packagegroup-boot \
packagegroup-basic \
udev-extra-rules \
${ROOTFS_PKGMANAGE_PKGS} \
timestamp-service \
xserver-common \
xserver-xorg-extension-dbe \
xserver-xorg-extension-extmod \
xauth \
xhost \
xset \
setxkbmap \
\
xrdb \
xorg-minimal-fonts xserver-xorg-utils \
unclutter \
\
libxdamage libxvmc libxinerama \
libxcursor \
\
bash \
make \
\
v4l-utils \
libpcre \
libpcreposix \
libxcomposite \
alsa-states \
\
source-han-sans-cn-fonts \
source-han-sans-kr-fonts \
source-han-sans-tw-fonts \
dvpower-network-conf \
libsocketcan \
\
xinit \
xeyes \
xclock \
xterm \
xdpyinfo \
\
udisks2 \
udev dosfstools \
exfat-utils \
e2fsprogs \
ntfs-3g \
dosfstools \
\
"
inherit populate_sdk_qt5
IMAGE_DEV_MANAGER = "udev"
IMAGE_INIT_MANAGER = "systemd"
IMAGE_INITSCRIPTS = " "
IMAGE_LOGIN_MANAGER = "busybox shadow"
# Filesystem support for USB auto-mount
IMAGE_INSTALL += "ntfs-3g exfat-utils dosfstools"
# Ensure /media directory exists in rootfs for auto-mount points
create_media_dir() {
mkdir -p "${IMAGE_ROOTFS}/media" || true
}
IMAGE_PREPROCESS_COMMAND += "create_media_dir; "
I have added the steps needed for adding a splash-screen with the Plymouth tool from this article, but when booting the Apalis board on my 7" touch screen it doesn’t show anything.
I also have a problem where when i add a USB stick I need to manually mount it instead of it mounting automatically. I use udev
and have a mount.sh
script in the yocto build that looks like this:
#!/bin/sh
#
# Called from udev
#
# Attempt to mount any added block devices and umount any removed devices
LOGFILE="/tmp/mount.sh.log"
exec >> "$LOGFILE" 2>&1
echo
echo "====== $(date) ======"
echo "Running with ACTION=$ACTION, DEVNAME=$DEVNAME, ID_FS_TYPE=$ID_FS_TYPE"
env | grep -E '^(ACTION|DEVNAME|ID_|MAJOR|MINOR)' || true
MOUNT="/bin/mount"
PMOUNT="/usr/bin/pmount"
UMOUNT="/bin/umount"
BLACKLIST="/etc/udev/mount.blacklist"
MOUNTBASE="/media"
# Check if blacklisted
if [ -f "$BLACKLIST" ]; then
while read -r line; do
case "$line" in
""|\#*) continue ;; # Skip comments and empty lines
esac
echo "$DEVNAME" | grep -q "^$line" && {
logger -t udev/mount.sh "$DEVNAME is blacklisted, ignoring"
exit 0
}
done < "$BLACKLIST"
fi
automount() {
name="$(basename "$DEVNAME")"
mount_point="$MOUNTBASE/$name"
[ ! -d "$mount_point" ] && mkdir -p "$mount_point"
case "$ID_FS_TYPE" in
vfat|fat)
OPTIONS="-o umask=007,sync,gid=$(getent group disk | cut -d: -f3)"
;;
ntfs)
MOUNT="/bin/ntfs-3g"
OPTIONS=""
;;
exfat)
MOUNT="/bin/mount.exfat-fuse"
OPTIONS=""
;;
*)
OPTIONS=""
;;
esac
if ! $MOUNT -t auto $OPTIONS "$DEVNAME" "$mount_point"; then
logger -t udev/mount.sh "Mount failed: $DEVNAME -> $mount_point"
rm_dir "$mount_point"
else
logger -t udev/mount.sh "Auto-mount successful: $DEVNAME -> $mount_point"
touch "/tmp/.automount-$(basename "$DEVNAME")"
fi
}
rm_dir() {
dir="$1"
[ -d "$dir" ] && [ "$(find "$dir" -type f | wc -l)" -eq 0 ] && rm -r "$dir"
}
# Detect CD-ROMs without ID_FS_TYPE
name="$(basename "$DEVNAME")"
[ -e /sys/block/$name/device/media ] && media_type=$(cat /sys/block/$name/device/media)
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && { [ -n "$ID_FS_TYPE" ] || [ "$media_type" = "cdrom" ]; }; then
if [ -x "$PMOUNT" ]; then
$PMOUNT "$DEVNAME" 2>/dev/null
elif [ -x "$MOUNT" ]; then
$MOUNT "$DEVNAME" 2>/dev/null
fi
grep -q "^$DEVNAME " /proc/mounts || automount
fi
if [ "$ACTION" = "remove" ] || { [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ]; }; then
for mnt in $(grep "$DEVNAME" /proc/mounts | awk '{print $2}'); do
$UMOUNT "$mnt"
done
name="$(basename "$DEVNAME")"
[ -e "/tmp/.automount-$name" ] && rm_dir "$MOUNTBASE/$name"
fi
When i mount the stick manually I don’t get no problems.
Generally we used a custom built Toradex image with thud and now I am trying to make it work with scarthgap. I replaced and modified the files that gave me conflicts and the libs installed correctly the only two problems so far that I have found are the splash screen and mount.
Help would be appreciated.
Thank you in advance,
Tarik