summaryrefslogtreecommitdiffstats
path: root/recipes-platform/images/agl-ivi-demo-qt.bb
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-05-01 16:57:17 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-05-27 13:15:38 +0000
commitea7e39dc258c5e7d3a46ffb31b3321331ba9e900 (patch)
treed48c8892f498323b8b8389839e18017e9ea76b93 /recipes-platform/images/agl-ivi-demo-qt.bb
parent7069907215c5eaeacc874720b1198d3249cc4b57 (diff)
Replace agl-demo* features with preconfigured images
Changes: - Remove the agl-demo-preload and agl-demo-cluster-support setup features. - Make the agl-weston-remoting setup feature a dependency of the agl-demo feature. To accommodate this with respect to avoiding putting the remote-output display configuration into generated weston.ini files when not required, the logic for that has been moved from meta-agl-core's weston-ini-conf recipe, and extra weston-ini-conf-* packages with the remote output support enabled are now generated to be used in images when required. - Add *-preconfigured versions of the images useful in a full demo setup (i.e. with "green machine" for tradeshows). These images have the configuration tweaks that the build setup features enabled with conditional logic baked in. - Remove now unnecessary connman-conf bbappend, we now assume that the IVI and cluster IP addresses are assigned as 192.168.10.2 and 192.168.10.3 via DHCP in a full demo setup. Notes: - The cluster support in the *-preconfigured images assumes that the IVI board is at IP address 192.168.10.2, and both boards are in the 192.168.10.x subnet. Bug-AGL: SPEC-5138 Change-Id: Icc472c6b602fa8fa5570af6cb0acaef853cbfa0f Signed-off-by: Scott Murray <scott.murray@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29866 ci-image-build: Jenkins Job builder account Tested-by: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-platform/images/agl-ivi-demo-qt.bb')
-rw-r--r--recipes-platform/images/agl-ivi-demo-qt.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-platform/images/agl-ivi-demo-qt.bb b/recipes-platform/images/agl-ivi-demo-qt.bb
index 2f0e94276..79640791b 100644
--- a/recipes-platform/images/agl-ivi-demo-qt.bb
+++ b/recipes-platform/images/agl-ivi-demo-qt.bb
@@ -18,6 +18,6 @@ AGL_APPS_INSTALL += " \
IMAGE_INSTALL += " \
packagegroup-agl-demo-platform \
- ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "", "weston-terminal-conf", d)} \
+ weston-terminal-conf \
"
ht .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 Copyright (C) 2015-2020 IoT.bzh

 author: José Bollo <jose.bollo@iot.bzh>

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

#include <string.h>
#include <errno.h>
#include <assert.h>

#if SIMULATE_SECURITY_MANAGER
#include "simulation/security-manager.h"
#else
#include <security-manager.h>
#endif

#include "verbose.h"
#include "secmgr-wrap.h"

static app_inst_req *request = NULL;

static int retcode(enum lib_retcode rc)
{
	switch (rc) {
	case SECURITY_MANAGER_SUCCESS: return 0;
	case SECURITY_MANAGER_ERROR_INPUT_PARAM: errno = EINVAL; break;
	case SECURITY_MANAGER_ERROR_MEMORY: errno = ENOMEM; break;
	case SECURITY_MANAGER_ERROR_REQ_NOT_COMPLETE: errno = EBADMSG; break;
	case SECURITY_MANAGER_ERROR_AUTHENTICATION_FAILED: errno = EPERM; break;
	case SECURITY_MANAGER_ERROR_ACCESS_DENIED: errno = EACCES; break;
	default: errno = ECANCELED; break;
	}
	return -1;
}

int secmgr_init(const char *id)
{
	int rc;
	assert(request == NULL);
	rc = security_manager_app_inst_req_new(&request);
	if (rc != SECURITY_MANAGER_SUCCESS)
		ERROR("security_manager_app_inst_req_new failed");
	else {
		rc = security_manager_app_inst_req_set_pkg_id(request, id);
		if (rc != SECURITY_MANAGER_SUCCESS)
			ERROR("security_manager_app_inst_req_set_pkg_id failed");
		else {
			rc = security_manager_app_inst_req_set_app_id(request, id);
			if (rc != SECURITY_MANAGER_SUCCESS)
				ERROR("security_manager_app_inst_req_set_app_id failed");
		}
	}
	if (rc != SECURITY_MANAGER_SUCCESS)
		secmgr_cancel();
	return retcode(rc);
}

void secmgr_cancel()
{
	security_manager_app_inst_req_free(request);
	request = NULL;
}

int secmgr_install()
{
	int rc;
	assert(request != NULL);
	rc = security_manager_app_install(request);
	if (rc != SECURITY_MANAGER_SUCCESS)
		ERROR("security_manager_app_install failed");
	secmgr_cancel();
	return retcode(rc);
}

int secmgr_uninstall()
{
	int rc;
	assert(request != NULL);
	rc = security_manager_app_uninstall(request);
	if (rc != SECURITY_MANAGER_SUCCESS)
		ERROR("security_manager_app_uninstall failed");
	secmgr_cancel();
	return retcode(rc);
}

int secmgr_permit(const char *permission)
{
	int rc;
	assert(request != NULL);
	rc = security_manager_app_inst_req_add_privilege(request, permission);
	if (rc != SECURITY_MANAGER_SUCCESS)
		ERROR("security_manager_app_inst_add_privilege %s failed", permission);
	return retcode(rc);
}

static int addpath(const char *pathname, enum app_install_path_type type)
{
	int rc;
	assert(request != NULL);
	rc = security_manager_app_inst_req_add_path(request, pathname, type);
	if (rc != SECURITY_MANAGER_SUCCESS)
		ERROR("security_manager_app_inst_add_path %s failed", pathname);
	return retcode(rc);
}

int secmgr_path_public_read_only(const char *pathname)
{
	return addpath(pathname, SECURITY_MANAGER_PATH_PUBLIC_RO);
}

int secmgr_path_read_only(const char *pathname)
{
	return addpath(pathname, SECURITY_MANAGER_PATH_RO);
}

int secmgr_path_read_write(const char *pathname)
{
	return addpath(pathname, SECURITY_MANAGER_PATH_RW);
}

int secmgr_path_private(const char *pathname)
{
	return addpath(pathname, SECURITY_MANAGER_PATH_PRIVATE);
}

int secmgr_prepare_exec(const char *appid)
{
	return retcode(security_manager_prepare_app(appid));
}