mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-23 09:36:10 +00:00
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
94 lines
3.3 KiB
Diff
94 lines
3.3 KiB
Diff
From 4fff84cebc05a238a8fed3c66d7dcde18f9574fb Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Mon, 2 Nov 2020 08:04:14 +0100
|
|
Subject: [PATCH] =?UTF-8?q?libckteec:=20replace=20{=C2=A0}=20initializer?=
|
|
=?UTF-8?q?=20by=20{=C2=A00=20}?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Replace { } initializer by { 0 } to fix the following build failure with
|
|
gcc 4.8:
|
|
|
|
libckteec/src/pkcs11_processing.c: In function 'ck_create_object':
|
|
libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers]
|
|
struct serializer obj = { };
|
|
^
|
|
|
|
Fixes: http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962
|
|
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[Upstream status: https://github.com/OP-TEE/optee_client/pull/230]
|
|
---
|
|
libckteec/src/pkcs11_processing.c | 4 ++--
|
|
libckteec/src/serialize_ck.c | 4 ++--
|
|
libckteec/src/serializer.c | 4 ++--
|
|
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/libckteec/src/pkcs11_processing.c b/libckteec/src/pkcs11_processing.c
|
|
index 2eb191f5..8eebe769 100644
|
|
--- a/libckteec/src/pkcs11_processing.c
|
|
+++ b/libckteec/src/pkcs11_processing.c
|
|
@@ -19,7 +19,7 @@ CK_RV ck_create_object(CK_SESSION_HANDLE session, CK_ATTRIBUTE_PTR attribs,
|
|
CK_ULONG count, CK_OBJECT_HANDLE_PTR handle)
|
|
{
|
|
CK_RV rv = CKR_GENERAL_ERROR;
|
|
- struct serializer obj = { };
|
|
+ struct serializer obj = { 0 };
|
|
size_t ctrl_size = 0;
|
|
TEEC_SharedMemory *ctrl = NULL;
|
|
TEEC_SharedMemory *out_shm = NULL;
|
|
@@ -114,7 +114,7 @@ CK_RV ck_encdecrypt_init(CK_SESSION_HANDLE session,
|
|
{
|
|
CK_RV rv = CKR_GENERAL_ERROR;
|
|
TEEC_SharedMemory *ctrl = NULL;
|
|
- struct serializer obj = { };
|
|
+ struct serializer obj = { 0 };
|
|
uint32_t session_handle = session;
|
|
uint32_t key_handle = key;
|
|
size_t ctrl_size = 0;
|
|
diff --git a/libckteec/src/serialize_ck.c b/libckteec/src/serialize_ck.c
|
|
index 1fc26ddc..0e5df90a 100644
|
|
--- a/libckteec/src/serialize_ck.c
|
|
+++ b/libckteec/src/serialize_ck.c
|
|
@@ -39,7 +39,7 @@ static CK_RV serialize_indirect_attribute(struct serializer *obj,
|
|
CK_ATTRIBUTE_PTR attr = NULL;
|
|
CK_ULONG count = 0;
|
|
CK_RV rv = CKR_GENERAL_ERROR;
|
|
- struct serializer obj2 = { };
|
|
+ struct serializer obj2 = { 0 };
|
|
|
|
switch (attribute->type) {
|
|
/* These are serialized each separately */
|
|
@@ -263,7 +263,7 @@ static CK_RV serialize_mecha_aes_iv(struct serializer *obj,
|
|
CK_RV serialize_ck_mecha_params(struct serializer *obj,
|
|
CK_MECHANISM_PTR mechanism)
|
|
{
|
|
- CK_MECHANISM mecha = { };
|
|
+ CK_MECHANISM mecha = { 0 };
|
|
CK_RV rv = CKR_GENERAL_ERROR;
|
|
|
|
memset(obj, 0, sizeof(*obj));
|
|
diff --git a/libckteec/src/serializer.c b/libckteec/src/serializer.c
|
|
index 0e3df65c..d94932ba 100644
|
|
--- a/libckteec/src/serializer.c
|
|
+++ b/libckteec/src/serializer.c
|
|
@@ -14,7 +14,7 @@
|
|
|
|
CK_RV init_serial_object(struct serializer *obj)
|
|
{
|
|
- struct pkcs11_object_head head = { };
|
|
+ struct pkcs11_object_head head = { 0 };
|
|
|
|
memset(obj, 0, sizeof(*obj));
|
|
|
|
@@ -23,7 +23,7 @@ CK_RV init_serial_object(struct serializer *obj)
|
|
|
|
void finalize_serial_object(struct serializer *obj)
|
|
{
|
|
- struct pkcs11_object_head head = { };
|
|
+ struct pkcs11_object_head head = { 0 };
|
|
|
|
head.attrs_size = obj->size - sizeof(head);
|
|
head.attrs_count = obj->item_count;
|