Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for stm32mp1-eval including running container-qt-evcs app #5

Open
wants to merge 14 commits into
base: thud
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions classes/fullmetalupdate_sota_stm32mp1-eval.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)


#see imx-base.inc - soft assignment not used when defining it here
IMAGE_BOOT_FILES_sota += "stm32mp1-bootfiles/* \
stm32mp157c-ev1.dtb \
zImage"

OSTREE_BOOTLOADER ?= "u-boot"

OSTREE_KERNEL_ARGS ?= "ostree_root=/dev/mmcblk0p5 rootwait rw console=ttySTM0,115200"

IMAGE_FSTYPES_remove_sota = "garagesign garagecheck"

SOTA_MAIN_DTB_stm32mp1-eval ?= "stm32mp157c-ev1.dtb"

INITRAMFS_FSTYPES = 'cpio.gz.u-boot'
2 changes: 2 additions & 0 deletions classes/fullmetalupdate_stm32mp1-disco.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# Released under the MIT license (see COPYING.MIT for the terms)

MACHINE_FEATURES = "gpu"
GCNANO_USERLAND_USE_VENDOR_DIR = "0"

6 changes: 6 additions & 0 deletions classes/fullmetalupdate_stm32mp1-eval.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)

MACHINE_FEATURES = "gpu"
GCNANO_USERLAND_USE_VENDOR_DIR = "0"

20 changes: 20 additions & 0 deletions conf/stm32mp1-eval/bblayers.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= ""
BBLAYERS ?= " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
${BSPDIR}/sources/poky/meta-yocto-bsp \
${BSPDIR}/sources/meta-fullmetalupdate \
${BSPDIR}/sources/meta-fullmetalupdate-extra \
${BSPDIR}/sources/meta-updater \
${BSPDIR}/sources/meta-st-stm32mp \
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-python \
${BSPDIR}/sources/meta-openembedded/meta-filesystems \
${BSPDIR}/sources/meta-openembedded/meta-networking \
${BSPDIR}/sources/meta-qt5 \
"
19 changes: 19 additions & 0 deletions conf/stm32mp1-eval/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-fullmetalupdate-extra"
BBFILE_PATTERN_meta-fullmetalupdate-extra = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-fullmetalupdate-extra = "6"

BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.%s' % (layer, ext) \
for layer in '${BBFILE_COLLECTIONS}'.split() for ext in ['bb', 'bbappend'])}"

BBFILES_DYNAMIC += " \
stm-st-stm32mp:${LAYERDIR}/dynamic-layers/stm-st-stm32mp-layer/*/*/*.bb \
stm-st-stm32mp:${LAYERDIR}/dynamic-layers/stm-st-stm32mp-layer/*/*/*.bbappend \
"
LAYERSERIES_COMPAT_meta-fullmetalupdate-extra = "thud"
27 changes: 27 additions & 0 deletions conf/stm32mp1-eval/local.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
MACHINE ??= 'stm32mp1-eval'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
HOSTTOOLS_NONFATAL += " ostree ostree-push sshpass"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
ACCEPT_EULA_stm32mp1-eval = "1"

TMPDIR = "${TOPDIR}/tmp/${DISTRO}"

HAWKBIT_CONFIG_FILE ?= "/home/docker/config.cfg"
OSTREE_BRANCHNAME ?= "fullmetalupdate-os"
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
From cb0e97621b9cc2bfe9e3ef45790c5027e557ce87 Mon Sep 17 00:00:00 2001
From: Pawel Gorka <[email protected]>
Date: Wed, 28 Aug 2019 09:45:01 +0000
Subject: [PATCH] stm32mp15_trusted_defconfig set env patch generated with devtool

---
configs/stm32mp15_trusted_defconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index e41506b..635d218 100644
index e41506b..f143104 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -10,7 +10,7 @@ CONFIG_SYS_PROMPT="STM32MP> "
@@ -9,8 +9,7 @@ CONFIG_SYS_PROMPT="STM32MP> "
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_IMPORTENV=y
+CONFIG_CMD_EXPORTENV=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_ADC=y
CONFIG_CMD_ADC=y
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)
FILESEXTRAPATHS_prepend_fullmetalupdate-os := "${THISDIR}/${MACHINE}:"
FILESEXTRAPATHS_prepend_fullmetalupdate-os := "${THISDIR}/stm32mp1:"

do_install_append_fullmetalupdate-os() {
install -d ${D}/${APP_DIRECTORY}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)
SRC_URI_append = " \
file://wired.network \
"

FILES_${PN} += " \
${nonarch_base_libdir}/systemd/network \
"

PACKAGECONFIG_append = " networkd"

do_install_append() {
# The network files need to be in /usr/lib/systemd, not ${systemd_unitdir}...
install -d ${D}${prefix}/lib/systemd/network/
install -d ${D}/etc/systemd/network/
install -m 0644 ${WORKDIR}/wired.network ${D}/etc/systemd/network/

rm ${D}${sysconfdir}/systemd/system/getty.target.wants/[email protected]
}
include systemd_stm32mp1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)

include systemd_stm32mp1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)
SRC_URI_append = " \
file://wired.network \
"

FILES_${PN} += " \
${nonarch_base_libdir}/systemd/network \
"

PACKAGECONFIG_append = " networkd"

do_install_append() {
# The network files need to be in /usr/lib/systemd, not ${systemd_unitdir}...
install -d ${D}${prefix}/lib/systemd/network/
install -d ${D}/etc/systemd/network/
install -m 0644 ${WORKDIR}/wired.network ${D}/etc/systemd/network/

rm ${D}${sysconfdir}/systemd/system/getty.target.wants/[email protected]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/arch/arm/configs/fragment-02-multiv7_addons.config b/arch/arm/configs/fragment-02-multiv7_addons.config
index 7b489e4..cabb3b3 100644
--- a/arch/arm/configs/fragment-02-multiv7_addons.config
+++ b/arch/arm/configs/fragment-02-multiv7_addons.config
@@ -161,7 +161,9 @@ CONFIG_SERIAL_NONSTANDARD=y
#
# Touchscreen drivers
#
-CONFIG_TOUCHSCREEN_EDT_FT5X06=m
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_EDT_FT5X06=y
CONFIG_TOUCHSCREEN_GOODIX=m

#
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# Released under the MIT license (see COPYING.MIT for the terms)
FILESEXTRAPATHS_prepend := "${THISDIR}/${MACHINE}:${THISDIR}/files/:"

SRC_URI_append = " \
file://0099-ARM-stm32mp1-r0-rc4-AddEVDEVsupport-DEFCONFIG.patch \
file://0100-QRM-stm32mp1-r0-rc4-AddFBDEVEMUL-DEFCONFIG.patch \
"

STM32MP_SOURCE_SELECTION = 'github'
SRC_URI_append_stm32mp1-disco = " file://0099-ARM-stm32mp1-r0-rc4-AddEVDEVsupport-DEFCONFIG.patch \
file://0100-QRM-stm32mp1-r0-rc4-AddFBDEVEMUL-DEFCONFIG.patch \
"
SRC_URI_append_stm32mp1-eval = " file://0101-ARM-stm32mp1-r0-rc4-AddGOODIXsupport-DEFCONFIG.patch "

STM32MP_SOURCE_SELECTION = 'github'
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ IMAGE_INSTALL = " \
# Container start up file
CONTAINER_STARTUP= "${THISDIR}/files/entry.sh"
# Runc container configuration
RUNC_CONFIG = "${THISDIR}/${MACHINE}/hello-world-config.json"
RUNC_CONFIG = "${THISDIR}/files/hello-world-config.json"
# systemd container configuration
SYSTEMD_CONFIG = "${THISDIR}/files/container-hello-world.service"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)

ENABLE_FLASHLAYOUT_CONFIG = "0"
ENABLE_PARTITIONS_IMAGE = "0"
include container-hello-world_stm32mp1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)
include container-hello-world_stm32mp1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)

ENABLE_FLASHLAYOUT_CONFIG = "0"
ENABLE_PARTITIONS_IMAGE = "0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ include ${PN}_${MACHINE}.inc

IMAGE_INSTALL = " \
evcs \
evcs-tools \
qtlocation \
qtvirtualkeyboard \
qtmultimedia \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (C) 2019 Witekio
# Released under the MIT license (see COPYING.MIT for the terms)

ENABLE_FLASHLAYOUT_CONFIG = "0"
ENABLE_PARTITIONS_IMAGE = "0"
GCNANO_USERLAND_USE_VENDOR_DIR = "0"
25 changes: 11 additions & 14 deletions recipes-containers/container-qt-evcs/evcs_1.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ DESCRIPTION = "QT Electric Vehicle Charging Station"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"


S = "${WORKDIR}/git"
SRC_URI = " \
SRC_URI_stm32mp1-eval = " \
git://github.com/pjgorka88/evcs-demo.git;branch=stm32mp1-eval;tag=v${PV}-stm32mp1-eval \
"

SRC_URI_stm32mp1-disco = " \
git://github.com/Witekio/evcs-demo.git;branch=fullmetalupdate-demo;tag=v${PV}-step1 \
"

Expand All @@ -22,21 +25,15 @@ do_install() {
cp ${S}/*.qml ${D}${datadir}/${P}
cp -R --no-dereference --preserve=mode,links ${S}/Assets ${D}${datadir}/${P}
cp -R --no-dereference --preserve=mode,links ${S}/Translation ${D}${datadir}/${P}

install -d ${D}${base_bindir}
echo "#!/bin/sh" > ${D}${bindir}/DemoQtWS
echo "export QML2_IMPORT_PATH=${datadir}/${P}" >> ${D}${base_bindir}/DemoQtWS
echo "export QML2_IMPORT_PATH=${datadir}/${P}" >> ${D}${base_bindir}/DemoQtWS

echo "export QT_QPA_EGLFS_HEIGHT=768" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_EGLFS_WIDTH=1024" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_EGLFS_PHYSICAL_HEIGHT=150" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_EGLFS_PHYSICAL_WIDTH=205" >> ${D}${base_bindir}/DemoQtWS

cp ${THISDIR}/${MACHINE}/config.json ${D}${datadir}/${P}/config.json
echo "#!/bin/sh" > ${D}${base_bindir}/DemoQtWS
echo "export QML2_IMPORT_PATH=${datadir}/${P}" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_EGLFS_KMS_CONFIG=${datadir}/${P}/config.json" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_EGLFS_ALWAYS_SET_MODE=1" >> ${D}${base_bindir}/DemoQtWS
echo "export QT_QPA_PLATFORM=eglfs" >> ${D}${base_bindir}/DemoQtWS

echo "export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS='/dev/input/event0'" >> ${D}${base_bindir}/DemoQtWS


echo "${datadir}/${P}/DemoQtWS" >> ${D}${base_bindir}/DemoQtWS
chmod +x ${D}${base_bindir}/DemoQtWS
}
Expand Down
20 changes: 20 additions & 0 deletions recipes-containers/container-qt-evcs/stm32mp1-disco/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"device": "/dev/dri/card0",
"hwcursor": false,
"pbuffers": false,
"outputs": [
{
"_comment": "NOTE: Should be checked/removed/configured...",
"name": "DSI1",
"mode": "preferred",
"physicalWidth" : 150,
"physicalHeight" : 205,
"touchDevice": "/dev/input/event0"
},
{
"_comment": "NOTE: Should be configred properly...",
"name": "HDMI1",
"mode": "preferred"
}
]
}
13 changes: 13 additions & 0 deletions recipes-containers/container-qt-evcs/stm32mp1-eval/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"device": "/dev/dri/card0",
"hwcursor": false,
"pbuffers": false,
"outputs": [
{ "name": "DSI1",
"mode": "preferred",
"physicalWidth" : 68,
"physicalHeight" : 122,
"touchDevice": "/dev/input/event1"
}
]
}
Loading