Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

[draft]moulin: redesign the product #133

Open
wants to merge 1 commit into
base: master
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ BBPATH =. "${LAYERDIR}:"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-xt-prod-extra"
BBFILE_PATTERN_meta-xt-prod-extra := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-xt-prod-extra = "6"
BBFILE_COLLECTIONS += "meta-xt-prod-aos-dom0"
BBFILE_PATTERN_meta-xt-prod-aos-dom0 = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-xt-prod-aos-dom0 = "6"

LAYERSERIES_COMPAT_meta-xt-prod-extra = "sumo thud zeus dunfell"
LAYERSERIES_COMPAT_meta-xt-prod-aos-dom0 = "rocko sumo thud zeus"
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,12 @@ DEPENDS += "u-boot-mkimage-native"

inherit deploy

require inc/xt_shared_env.inc

#Add Xen and additional packages to build
IMAGE_INSTALL_append = " \
xen-xencommons \
xen-xenstat \
xen-misc \
dom0 \
dom0-run-vcpu_pin \
dom0-run-set_root_dev \
domd \
domd-run \
domd-install-artifacts \
haveged \
"

XT_GUESTS_INSTALL ?= "doma domf"

python __anonymous () {
guests = d.getVar("XT_GUESTS_INSTALL", True).split()
if "domf" in guests :
d.appendVar("IMAGE_INSTALL", " domf domf-run domf-install-artifacts")
d.appendVar("IMAGE_INSTALL", " domf")
}

generate_uboot_image() {
Expand Down
56 changes: 56 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-bsp/optee/optee-os_git.bbappend__
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Prevent installing optee-os binaries into the image rootfs
ALLOW_EMPTY_${PN} = "1"

SRC_URI = " git://github.com/xen-troops/optee_os.git"
PV = "git${SRCPV}"

LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"

inherit python3native
DEPENDS_append = " python3-pycryptodome-native python3-pyelftools-native"
DEPENDS_remove = " python-pycrypto-native"

SRCREV = "${AUTOREV}"

OPTEEMACHINE = "rcar"

OPTEEFLAVOR_salvator-xs-m3n-xt = "salvator_m3n"

OPTEEFLAVOR_m3ulcb-xt = "salvator_m3"
OPTEEFLAVOR_salvator-x-m3-xt = "salvator_m3"

OPTEEFLAVOR_h3ulcb-xt = "salvator_h3"
OPTEEFLAVOR_h3ulcb-cb-xt = "salvator_h3"

OPTEEFLAVOR_salvator-x-h3-xt = "salvator_h3"
OPTEEFLAVOR_salvator-xs-h3-xt = "salvator_h3"

OPTEEFLAVOR_salvator-x-h3-4x2g-xt = "salvator_h3_4x2g"
OPTEEFLAVOR_salvator-xs-h3-4x2g-xt = "salvator_h3_4x2g"
OPTEEFLAVOR_h3ulcb-4x2g-xt = "salvator_h3_4x2g"
OPTEEFLAVOR_h3ulcb-4x2g-kf-xt = "salvator_h3_4x2g"
OPTEEFLAVOR_salvator-xs-m3-2x4g-xt = "salvator_m3_2x4g"

EXTRA_OEMAKE += "PLATFORM=rcar \
PLATFORM_FLAVOR=${OPTEEFLAVOR} \
CFG_ARM64_core=y \
CFG_VIRTUALIZATION=y \
CROSS_COMPILE_core=${HOST_PREFIX} \
CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \
ta-targets=ta_arm64 \
CFLAGS64=--sysroot=${STAGING_DIR_HOST} \
CFG_SYSTEM_PTA=y \
CFG_ASN1_PARSER=y \
CFG_CORE_MBEDTLS_MPI=y \
"

do_configure() {
}

do_compile() {
oe_runmake
}

do_deploy_append() {
install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee-raw.bin ${DEPLOYDIR}/tee_raw-${MACHINE}.bin
}
46 changes: 46 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus-cpp/dbus-cpp_5.0.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
SUMMARY = "A header-only dbus-binding leveraging C++-11."
HOMEPAGE = "https://launchpad.net/dbus-cpp"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
LICENSE = "GPLv2 | LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "dbus \
boost \
bzr-native \
libxml2 \
properties-cpp \
process-cpp \
"
SRC_URI = "bzr://bazaar.launchpad.net/~phablet-team/dbus-cpp/trunk \
file://set_distro.patch \
"
SRCREV = "105"

S = "${WORKDIR}/trunk"

inherit pkgconfig cmake

do_configure () {
:
}

do_compile_prepend () {
if [ -d ${WORKDIR}/build ]; then
cd ${WORKDIR}/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake ${S}
fi
}

FILES_${PN} += " \
${bindir} \
${libdir} \
${includedir} \
${datadir} \
"

FILES_${PN}-dev += " \
/usr/libexec/* \
"

INSANE_SKIP_${PN} += "dev-so libdir"
21 changes: 21 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus-cpp/files/set_distro.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/CMakeLists.txt 2017-11-24 17:22:06.588688332 +0200
+++ b/CMakeLists.txt 2017-11-24 17:21:51.364715576 +0200
@@ -34,6 +34,7 @@
# - other distros
# - errors
# we define the version to be 2.0.0
+ set(DISTRO_CODENAME "poky")
if (${DISTRO_CODENAME} STREQUAL "vivid")
set(DBUS_CPP_VERSION_MAJOR 4)
set(DBUS_CPP_VERSION_MINOR 3)
@@ -98,10 +98,5 @@
)

add_subdirectory(data)
-add_subdirectory(doc)
-add_subdirectory(examples)
add_subdirectory(include)
add_subdirectory(src)
-add_subdirectory(tests)
-
-enable_coverage_report(benchmark)
14 changes: 14 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus/dbus-cxx_0.10.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DESCRIPTION = "C++ bindings for dbus"
HOMEPAGE = "https://dbus-cxx.github.io/"
SECTION = "libs"
LICENSE = "GPLv3"
DEPENDS = "boost dbus libsigc++-2.0"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

S = "${WORKDIR}/git"

inherit autotools-brokensep pkgconfig

BBCLASSEXTEND = "native"
DEPENDS_virtclass-native = "dbus-native libsigc++-2.0-native"
10 changes: 10 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus/dbus/dbus.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=D-Bus User Message Bus
Documentation=man:dbus-daemon(1)
Requires=dbus.socket

[Service]
ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
Restart=always
RestartSec=1
9 changes: 9 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus/dbus/dbus.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=D-Bus User Message Bus Socket
Before=sockets.target

[Socket]
ListenStream=%t/bus

[Install]
WantedBy=default.target
5 changes: 5 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus/dbus/dbus_env.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Unit]
Wants=dbus.service

[Service]
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/bus
26 changes: 26 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-core/dbus/dbus_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"

SRC_URI_append = "file://dbus.service \
file://dbus.socket \
file://dbus_env.conf \
"

inherit systemd

do_install_append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -p -D ${WORKDIR}/dbus.service ${D}${systemd_user_unitdir}/dbus.service
install -p -D ${WORKDIR}/dbus.socket ${D}${systemd_user_unitdir}/dbus.socket
install -p -D ${WORKDIR}/dbus_env.conf ${D}${systemd_system_unitdir}/[email protected]/dbus_env.conf

# Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
# because it does not support systemd's user mode.
mkdir -p ${D}/etc/systemd/user/default.target.wants/
ln -sf ${systemd_user_unitdir}/dbus.socket ${D}/etc/systemd/user/default.target.wants/dbus.socket
fi
}

FILES_${PN} += " \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/dbus.*', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/[email protected]/dbus_env.conf', '', d)} \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/CMakeLists.txt 2015-07-21 11:46:58.000000000 +0300
+++ b/CMakeLists.txt 2017-12-04 17:41:00.095568511 +0200
@@ -69,8 +69,6 @@
${PROPERTIES_CPP_INCLUDE_DIRS}
)

-add_subdirectory(doc)
add_subdirectory(data)
add_subdirectory(include)
add_subdirectory(src)
-add_subdirectory(tests)

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SUMMARY = "A simple convenience library for handling processes in C++11."
HOMEPAGE = "https://launchpad.net/process-cpp"

LICENSE = "LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
DEPENDS = "boost \
bzr-native \
properties-cpp \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "bzr://bazaar.launchpad.net/~phablet-team/process-cpp/trunk \
file://remove_unused.patch \
"
SRCREV = "54"

S = "${WORKDIR}/trunk"

inherit pkgconfig cmake

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/CMakeLists.txt 2018-01-10 13:02:36.784475328 +0200
+++ b/CMakeLists.txt 2018-01-10 13:03:46.628481207 +0200
@@ -37,9 +37,7 @@
include/
)

-add_subdirectory(doc)
add_subdirectory(data)
add_subdirectory(include)
-add_subdirectory(tests)

# enable_coverage_report(posix_process_test linux_process_test)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SUMMARY = "A very simple convenience library for handling properties and signals in C++11."
HOMEPAGE = "https://launchpad.net/properties-cpp"

LICENSE = "LGPLV3"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "bzr://bazaar.launchpad.net/~phablet-team/properties-cpp/trunk \
file://remove_unused.patch \
"

SRCREV = "17"

S = "${WORKDIR}/trunk"
DEPENDS = "bzr-native"

inherit pkgconfig cmake

FILES_${PN} = " \
${includedir}/* \
${libdir}/pkgconfig/* \
"
ALLOW_EMPTY_${PN} = "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 37fe0928b3a02f128a677f371c5cabbc65d1aaad Mon Sep 17 00:00:00 2001
From: Ryosuke Sugai <[email protected]>
Date: Tue, 18 Dec 2018 18:58:53 +0900
Subject: [PATCH] lib/randutils.c: Fix args of getrandom()

Signed-off-by: Ryosuke Sugai <[email protected]>
---
lib/randutils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/randutils.c b/lib/randutils.c
index 09dd261..bd3cda1 100644
--- a/lib/randutils.c
+++ b/lib/randutils.c
@@ -36,6 +36,8 @@

#if !defined(HAVE_GETRANDOM) && defined(SYS_getrandom)
/* libc without function, but we have syscal */
+#define GRND_NONBLOCK 0x01
+#define GRND_RANOM 0x02
static int getrandom(void *buf, size_t buflen, unsigned int flags)
{
return (syscall(SYS_getrandom, buf, buflen, flags));
@@ -99,7 +101,7 @@ void random_get_bytes(void *buf, size_t nbytes)
unsigned char *cp = (unsigned char *)buf;

#ifdef HAVE_GETRANDOM
- while (getrandom(buf, nbytes, 0) < 0) {
+ while (getrandom(buf, nbytes, GRND_NONBLOCK) < 0) {
if (errno == EINTR)
continue;
break;
--
2.7.4

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_remove = " \
file://0001-lib-randutils.c-Fix-args-of-getrandom.patch \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DESCRIPTION = "pyelftools is a pure-Python library for parsing and analyzing ELF files and DWARF debugging information"
HOMEPAGE = "https://github.com/eliben/pyelftools"
SECTION = "devel/python"
LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5ce2a2b07fca326bc7c146d10105ccfc"

SRC_URI[md5sum] = "c5629b9a5d19c82107a946cce52eeec2"
SRC_URI[sha256sum] = "89c6da6f56280c37a5ff33468591ba9a124e17d71fe42de971818cbff46c1b24"

PYPI_PACKAGE = "pyelftools"

inherit pypi setuptools3

BBCLASSEXTEND = "native"
25 changes: 25 additions & 0 deletions meta-xt-prod-aos-dom0/recipes-devtools/bazaar/bzr_2.7.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SUMMARY = "Distributed version control system."
HOMEPAGE = "https://launchpad.net/bzr"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "https://launchpad.net/${PN}/2.7/${PV}/+download/${PN}-${PV}.tar.gz"
SRC_URI[md5sum] = "8e5020502efd54f5925a14a456b88b89"
SRC_URI[sha256sum] = "0d451227b705a0dd21d8408353fe7e44d3a5069e6c4c26e5f146f1314b8fdab3"

DEPENDS = "python-native"
PROVIDES += "bzr-native"

inherit native ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative distutils", "", d)}

do_configure[noexec] = "1"
do_compile[noexec] = "1"

export BUILD_SYS
export HOST_SYS
export STAGING_LIBDIR
export STAGING_INCDIR

do_install () {
python setup.py install
}
Loading