From nobody Sat Nov 30 04:36:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1614759986; cv=pass; d=zohomail.com; s=zohoarc; b=gQ8crv0gYpfgjbjK3IXTLO3QCGZY/W8VJPJvpbfPcOdQLe/R4gGakyfagjCxA6I2ZtgIMBPYTWTSAbS4SDqX+Tkzc5N/S54TWybgD5P4ZmV1faQmQ8jRCJgnndxV5+62zaua4w2JpvNodulL8TiSQNTffjIfQUcWN3kHzY01YaU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614759986; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UveaccZp06KTjCJudT2M/QZr/Z5EGmNpCdWGdUyGE0A=; b=hQFdGC0RPVESVJaI1PrTqQN0B92Zl/s+lehhDw/sXxx+tvIn/yvSiKg/utJZrqY7HYdaPwIOl1+8WlKjrXimoA3iczh8BVE3wRvvP5YTumW/eCmgTro8zyf1Tcb3DMyRV9xnS7TvPv/KtiTJfaIdptKRDmZmjaE04B6A1hVvOBg= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1614759986526284.13394145204484; Wed, 3 Mar 2021 00:26:26 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.92737.174780 (Exim 4.92) (envelope-from ) id 1lHMpd-0007sH-6Q; Wed, 03 Mar 2021 08:26:09 +0000 Received: by outflank-mailman (output) from mailman id 92737.174780; Wed, 03 Mar 2021 08:26:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lHMpd-0007sA-2g; Wed, 03 Mar 2021 08:26:09 +0000 Received: by outflank-mailman (input) for mailman id 92737; Wed, 03 Mar 2021 08:26:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lHMpc-0007mZ-49 for xen-devel@lists.xenproject.org; Wed, 03 Mar 2021 08:26:08 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 63453bbd-cf41-463f-809b-e2fff7be1adf; Wed, 03 Mar 2021 08:26:04 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 63453bbd-cf41-463f-809b-e2fff7be1adf DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1614759964; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=oHuHX38srv3wzfUid8WUr7eIG/2a8lp5JbRPysRJmKY=; b=UcVpDvQnH9SkD80JsefmKa2QSB6GNCSyRotJXE4x8wMGPW0COREYL6Xr oZnRMXwzegtqGj4Z71/vRY26binA1eV46RwdHCx7ziYz1QNTsShs7+BOb psnzEf5SLNHD6ix4MowLUCGLmJw0jNPpDN02DQ5nAliRW9WKLw0LQuCpp o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: 8GlVVeZhJ/4VaCyz1PY+9c+Muf6qqennJIp7nK17P0EU8rdZuZ3CXCOyX4tyXOYfW79DGWhnBo T61VDnclTe3W/nU3uKoSF3VeuT/Rz5lU10uR4dlcppgmTpI2rQNErvdZuUdAjm02gf0jP1SpKg 3WQuPorYtGmrq1Rd3JnZXtfU9q0ed22HmKplQUKdAtI5xkfkc+e13z5uisfXrPcnLmsYdMNHi7 c6EXJcTRHVXv2YFfQtUYsDuYDQNzKwJvYSKEoHyRVUyDNC6oxwuGiQuxNsZxaILtFaPc/H8OFe 6X8= X-SBRS: 5.2 X-MesageID: 38600577 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,219,1610427600"; d="scan'208";a="38600577" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1hmgoqKnc5o4rL/H/UqcdYV2dYhf5csWLLW0XETiywdIrbDIrQZ9mNa1CkIn9EEM+/rdo7zBwltKgv9xKJG0xraIVorI5V+d8rnSyxQzgQKuf3od0S8oY9hdBcAPX65sE0CrsBRoo3Z8+lngPvkAzxmgVC9/EQZ25Gi6bt4zgGbDxr6aPrdRmZQpuV/ZxVMC3eCV8Cfr55NmKXzFe+SV0ZTOS/FE+5WhFWhIxknNRHZz7Y3+FSlbNGI1AcMQrwd/EmEjvP/vk/Lu8GOC2lSQafRJ4DMYo7nS7kCzEVXFX1BEQFNUApwFMUevyF4p9Z12pYfGmvO2uFed8LNc3bp3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UveaccZp06KTjCJudT2M/QZr/Z5EGmNpCdWGdUyGE0A=; b=G2lN/EzMz6hquI52tWZNhjbWYPh0G8jC0sRmVZm7G0ayNEScI5Bqu3GTH2Enx0qOe24+SVoyvPLL2/J1mApFXXEEz0XZNsfStpQhnjz0jeHN2/pUgGqD8Y6U5VBkGHAuZSIzbeIqO6mjW1WtOofWUexXkYApVB895owDgvLYhHjZq+KZSoF/jIwRe+PLf9a5iSO17SinzJbH6IuIzEKcfkZs2wX/CGIN44l00rCZQNXc1gkkyHhBo1q8bTNQOeGw9CQ1inMTks9wMMWty/vJ4vcPPALCWt3By5xOy5LU8r2a7YNW9Tx92zNPwAxSE7D10EnlhBpGXuxTcecbJensLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UveaccZp06KTjCJudT2M/QZr/Z5EGmNpCdWGdUyGE0A=; b=a4a7iZPgnNUDwBQsq/VXE2g0coUY+cccQqCjIS6TrPnOlUjZH/OZLQwA1QUhGGltMTkuopnNFlmpwUbkgcs5K4SOyf9x2uNzWtB1DUByJfqsXPatF/3oDKUqmFf3j6ejD98tDLOpxJNm9U5RXOmK6N7p3ZfGcaYn0kgbh7GytmI= From: Roger Pau Monne To: CC: Roger Pau Monne , Ian Jackson , Wei Liu , Jan Beulich , Andrew Cooper Subject: [PATCH v2 for-4.15 1/2] firmware: provide a stand alone set of headers Date: Wed, 3 Mar 2021 09:25:13 +0100 Message-ID: <20210303082514.8859-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210303082514.8859-1-roger.pau@citrix.com> References: <20210303082514.8859-1-roger.pau@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MR2P264CA0058.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:31::22) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4aea52e6-7327-45ec-7fd2-08d8de1dea0d X-MS-TrafficTypeDiagnostic: DM5PR03MB2971: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UB93V/KFoq6gsAW/VDg3YO1kMAjOMxAiaUqen6EiCaIhJb4+cSR+pxXvAN1voe9TuxPCw19rniq9JZKOK0/EfLAVKB4J3HjiTv4shjU/WftUzvGn4VaX+PYXwkbHp3cD/r9u7xVpuheAImlHDvbQ+ph77XmE9+lZ/ZSZb64+BH4nC1C4wZgRGCoWyIoLDYM4pw8Wu2dF1kuAP/G6c3/zfniGB0Cpjs4ONq00xWy9Z9VjrqtbF6h1yEJT405QUKjAjffto+momSeJ213jLJnLln6pNkTJivVZasBGbMA/IXs7rnN3lEcOD9mTwrmIvq2/LH84X/xrdznhAq1/21hxZv2c4GcyfGYaU5VEQv+OEZTYs3bgX+sK3w9Lki+LxDWXKwoigQApHy4aAGSBPNyggAvgYFXeEipSglAto04htG9GB9/KlMWfOzVdJxksAXQCr+qQ+Arfp57yCuRSCgbSzZJAobrFT7massUfghl0n9aiB7913rP3EiMW2wglzUsntHOMHVedld+OiNYCx8hq5MFxbh01UgBJ2IgUoRKqQhjNnM15NOi99ztlyqGmExOWkCBQzdyRLiCLxA41alk+XMMAmlIONqqCTXKmwh1kEk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(366004)(346002)(39840400004)(396003)(136003)(83380400001)(316002)(16526019)(186003)(6486002)(4326008)(6916009)(966005)(107886003)(1076003)(54906003)(26005)(66946007)(36756003)(478600001)(86362001)(6666004)(956004)(8676002)(8936002)(2906002)(66556008)(2616005)(66476007)(6496006)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?NCtMZE1oODJOVjlUVTJqL29mVFB6T01RVDNlTmt4YUJuMjJScUswYkFYN2xO?= =?utf-8?B?ZmNzTFFLaVJWOU9TeWt4OHdDdFdHeU42MXhCTlRWSGUzOTA5bTZYYkM0d3Qr?= =?utf-8?B?bXR6bkZYR3FXN3NuNlBVYkUxVTZNL2lEaDJKeE9MNzZQcTJJMWJ1ZituRDU4?= =?utf-8?B?OVlaMWZvM0x3dG5venR1cCttYTBrR0lwcG54NXVuT3Z4bHU4NUs3WjdSM3hT?= =?utf-8?B?TlNxVVc1ZVRXbXBRRDlNQ3BMR0g0U3VtT051ZWtJd1l0cld5QytEUmM5Mkph?= =?utf-8?B?WUxvRFE0d1NMNSsxSWk5b3hwclhFM3NmVnFuSFg2a05tSjIwMUdoZUNvczdp?= =?utf-8?B?bnAxdTQ3ZlpGek9BSHEzWWR5bU5UZUJPdXk1R0dCdjR4N1pZY2l0ay9DUEZL?= =?utf-8?B?NUthWVJKNGRkL1dKdFN4eFVubDNlWTIrck1kZDJlU1FrOW1Ib3BnazcwREE2?= =?utf-8?B?TTlCN2VTMVZoekY2dmFkOGRMdEdjdk5oSWRoek5BcThpTmRBQlIrR1REREJz?= =?utf-8?B?Z3g3Qk1KN2dWcEtodS9tNGVLODFOUXU5Y2dIRTlENUQ5U3FLbXc2ZXhNSXlv?= =?utf-8?B?cDBZZmZzeEhnWUdJd21HOForSEJZd2NmMEdaL0tzZmdvYjkvR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grRkZpYnNDNlBZaW10T3RnSjB0aHNy?= =?utf-8?B?L0NjWTgreHZWM1JMSDR3Y3JaUjFwNzJXc1V6dlM0N2VPbWNpVjVjdFdVclVR?= =?utf-8?B?c3lxbVFjc1hmZUlUbnprL1o3cm5JcWsrRE5jSGovdVF3a05wc1VCSU1DRmFy?= =?utf-8?B?Zzd2MHdOdjk2ZndqVFUydVdLTklzYTkrb0tpMTJ2eURFSDYxamVVVFJZVnpw?= =?utf-8?Q?uNlXCJ4pSvO1o6zOVbvDDd11iuJLeclc3+j35K7?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4aea52e6-7327-45ec-7fd2-08d8de1dea0d X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2021 08:25:33.6450 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: prbkIVCP0t5ZJeTmdpnNNylF3BSxr6fvM915FCYu7Eq470SdXNU1BoHWflUH8mjKCinxkYKwexV+Zp+wv3RMlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2971 X-OriginatorOrg: citrix.com X-ZohoMail-DKIM: pass (identity @citrix.com) The current build of the firmware relies on having 32bit compatible headers installed in order to build some of the 32bit firmware. Usually this can be solved by using the -ffreestanding compiler option which drops the usage of the system headers in favor of a private set of freestanding headers provided by the compiler itself that are not tied to libc. However such option is broken at least in the gcc compiler provided in Alpine Linux, as the system include path (ie: /usr/include) takes precedence over the gcc private include path: #include <...> search starts here: /usr/include /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/include And the headers in /usr/include are exclusively 64bit. Since -ffreestanding is currently broken on at least that distro, and for resilience against future compilers also having the option broken provide a set of stand alone 32bit headers required for the firmware build. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich Release-Acked-by: Ian Jackson --- Using -ffreestanding alone seems fragile, as it's broken on some distros. Compensate for this by providing our own set of stand alone headers for the firmware bits. Having the include paths wrongly sorted can easily make the system headers being picked up instead of the gcc ones, and then building can randomly fail because the system headers could be amd64 only (like the musl ones). I've also seen clang-9 on Debian with the following include paths: #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/llvm-9/lib/clang/9.0.1/include /usr/include/x86_64-linux-gnu /usr/include Which also seems slightly dangerous as local comes before the compiler private path. IMO using -ffreestanding and our own set of stand alone headers is more resilient. Regarding the release risks, the main one would be breaking the build (as it's currently broken on Alpine). I think there's a very low risk of this change successfully producing a binary image that's broken, and hence with enough build testing it should be safe to merge. --- Changes since v2: - Add a __P64__ check to stdint.h. - Reword the comment in Rules.mk. --- tools/firmware/Rules.mk | 13 +++++++ tools/firmware/include/stdarg.h | 10 +++++ tools/firmware/include/stdbool.h | 9 +++++ tools/firmware/include/stddef.h | 10 +++++ tools/firmware/include/stdint.h | 39 +++++++++++++++++++ tools/firmware/rombios/32bit/rombios_compat.h | 4 +- 6 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 tools/firmware/include/stdarg.h create mode 100644 tools/firmware/include/stdbool.h create mode 100644 tools/firmware/include/stddef.h create mode 100644 tools/firmware/include/stdint.h diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index dc372a86d8..9f78a7dec9 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -17,3 +17,16 @@ $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) =20 # Extra CFLAGS suitable for an embedded type of environment. CFLAGS +=3D -ffreestanding -msoft-float + +# Use our own set of stand alone headers to build firmware. +# +# Ideally using -ffreestanding should be enough, but that relies on the +# compiler having the right order for include paths (ie: compiler private +# headers before system ones) or the libc headers having proper arch-agnos= tic +# freestanding support. This is not the case in Alpine at least which sear= ches +# system headers before compiler ones and has arch-specific libc headers. = This +# has been reported upstream: +# https://gitlab.alpinelinux.org/alpine/aports/-/issues/12477 +# In the meantime (and for resilience against broken systems) use our own = set +# of headers that provide what's needed for the firmware build. +CFLAGS +=3D -nostdinc -I$(XEN_ROOT)/tools/firmware/include diff --git a/tools/firmware/include/stdarg.h b/tools/firmware/include/stdar= g.h new file mode 100644 index 0000000000..c5e3761cd2 --- /dev/null +++ b/tools/firmware/include/stdarg.h @@ -0,0 +1,10 @@ +#ifndef _STDARG_H_ +#define _STDARG_H_ + +typedef __builtin_va_list va_list; +#define va_copy(dest, src) __builtin_va_copy(dest, src) +#define va_start(ap, last) __builtin_va_start(ap, last) +#define va_end(ap) __builtin_va_end(ap) +#define va_arg __builtin_va_arg + +#endif diff --git a/tools/firmware/include/stdbool.h b/tools/firmware/include/stdb= ool.h new file mode 100644 index 0000000000..0cf76b106c --- /dev/null +++ b/tools/firmware/include/stdbool.h @@ -0,0 +1,9 @@ +#ifndef _STDBOOL_H_ +#define _STDBOOL_H_ + +#define bool _Bool +#define true 1 +#define false 0 +#define __bool_true_false_are_defined 1 + +#endif diff --git a/tools/firmware/include/stddef.h b/tools/firmware/include/stdde= f.h new file mode 100644 index 0000000000..c7f974608a --- /dev/null +++ b/tools/firmware/include/stddef.h @@ -0,0 +1,10 @@ +#ifndef _STDDEF_H_ +#define _STDDEF_H_ + +typedef __SIZE_TYPE__ size_t; + +#define NULL ((void*)0) + +#define offsetof(t, m) __builtin_offsetof(t, m) + +#endif diff --git a/tools/firmware/include/stdint.h b/tools/firmware/include/stdin= t.h new file mode 100644 index 0000000000..16a0b6de19 --- /dev/null +++ b/tools/firmware/include/stdint.h @@ -0,0 +1,39 @@ +#ifndef _STDINT_H_ +#define _STDINT_H_ + +#if defined(__LP64__) || defined(__P64__) +#error "32bit only header" +#endif + +typedef unsigned char uint8_t; +typedef signed char int8_t; + +typedef unsigned short uint16_t; +typedef signed short int16_t; + +typedef unsigned int uint32_t; +typedef signed int int32_t; + +typedef unsigned long long uint64_t; +typedef signed long long int64_t; + +#define INT8_MIN (-0x7f-1) +#define INT16_MIN (-0x7fff-1) +#define INT32_MIN (-0x7fffffff-1) +#define INT64_MIN (-0x7fffffffffffffffll-1) + +#define INT8_MAX 0x7f +#define INT16_MAX 0x7fff +#define INT32_MAX 0x7fffffff +#define INT64_MAX 0x7fffffffffffffffll + +#define UINT8_MAX 0xff +#define UINT16_MAX 0xffff +#define UINT32_MAX 0xffffffffu +#define UINT64_MAX 0xffffffffffffffffull + +typedef uint32_t uintptr_t; + +#define UINTPTR_MAX UINT32_MAX + +#endif diff --git a/tools/firmware/rombios/32bit/rombios_compat.h b/tools/firmware= /rombios/32bit/rombios_compat.h index 3fe7d67721..8ba4c17ffd 100644 --- a/tools/firmware/rombios/32bit/rombios_compat.h +++ b/tools/firmware/rombios/32bit/rombios_compat.h @@ -8,9 +8,7 @@ =20 #define ADDR_FROM_SEG_OFF(seg, off) (void *)((((uint32_t)(seg)) << 4) + (= off)) =20 -typedef unsigned char uint8_t; -typedef unsigned short int uint16_t; -typedef unsigned int uint32_t; +#include =20 typedef uint8_t Bit8u; typedef uint16_t Bit16u; --=20 2.30.1 From nobody Sat Nov 30 04:36:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1614759980; cv=pass; d=zohomail.com; s=zohoarc; b=D+kM5qwxGc/w6OtN4HdJtC5XLJXUoyX3549ngVqbEvoJQYMB+x0K9PE57UfXlHRZSDc123zLE76vMP8HEqZYzGG4KTgkfx7zzXw0kSby2IJ5Fc6mnflzbbHeqI4ncxahpP54eNw364jbkuTXk5AY/HZ226J8th/QCpthKWDGF5U= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614759980; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cydJsAIez600M/vb94JozzdggeHZXjVoZDJiSVI8vdk=; b=GWUYRnmY2Nsqw1bMgK+2ohdoz44b6hALDzC5bSeLlRcJqcUguRrnaozvN5ilDRHLZQFLFoqegeMup4CyvgSf/hyAsrNVxwxNipx4JGRwuL7ld1b+7Yl4HVCMZMkY2H+uzkc+jE9rsbBdM4b+zk4nYWi8dc1eNZ/WR/UAhkdPMG4= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 161475998067352.15627635510191; Wed, 3 Mar 2021 00:26:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.92735.174756 (Exim 4.92) (envelope-from ) id 1lHMpT-0007ml-Gz; Wed, 03 Mar 2021 08:25:59 +0000 Received: by outflank-mailman (output) from mailman id 92735.174756; Wed, 03 Mar 2021 08:25:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lHMpT-0007me-Dp; Wed, 03 Mar 2021 08:25:59 +0000 Received: by outflank-mailman (input) for mailman id 92735; Wed, 03 Mar 2021 08:25:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lHMpS-0007mZ-8d for xen-devel@lists.xenproject.org; Wed, 03 Mar 2021 08:25:58 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1e8b35b7-cbda-4c28-8aea-f25211b8e4a6; Wed, 03 Mar 2021 08:25:56 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1e8b35b7-cbda-4c28-8aea-f25211b8e4a6 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1614759956; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=hcHZxn/yloaKbz4HuwpCWh+4xZp5v7qk/JNM42WjKUM=; b=A+A7KVXTah75pfvdVrR8+UEMouN6ZAZfeH3Z8ddOKKPz+jgynurD2+32 xg+PInDXURWf/bhcCDOAix0ZM8Iq2NBTyq7+m+E5RfsiJan4RDce96kQb j3Y2V1JlGWnAeiKhrwduSQbzT3HQjCMzuyo1Bq83/Hs//g4rjT8rrbzcu I=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: uuDwz1FAh/1liOX7d3IO6wd6A601A9bFGNqAWHQumTENTR3oijsFFN3IjwFUQDqexZunHBCc+3 aXYtyba1A86TVLfu1e3RTbL5s5X0wazbqHAedmj+VtSJ3Q6vhtBCCTpgIF3ROBrdTO7vTr05yK DcTGz9sypdBWVksQwLTXaoeL+EtNJw6X6VNRCr/nYW1+VNN4/yvYH8CML8V8T1pNhjxp8KtGQY 45S70QbX0S0p3WL4W76y1ThBYgVKrPQo6LQ+YhykN5A70l2cCeyaPSDu38p79EXcSaL8WjF7U/ AXU= X-SBRS: 5.2 X-MesageID: 38330489 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,219,1610427600"; d="scan'208";a="38330489" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wslo/jYulT38fjCMMRYcjaQZOXzGADBtOzZ2slI1zBGNpEEgK/n5wdEntKPnKjG9B7QmArM0jIGi9J2XpGs1ce+coAc/ugg1utrlgPo0mednjyC2x88jOh3TPCJbctRXTqxS4+0946lC5hL8aH2kn0Dl8wbgsYjtCzh9p7lygEBYrnAFuruJydhfvjZBiop7JGAFqV4CnBZEuSfYJRrHmwFmF5kyx1osj5POWCOXqPUiF1c5ieEO3tT9bI+hv3WfbZLOztTixFVz949lhr07rLLxiWMqyI/h0GIBuZCBCWnxI1WTmTNpBsff87R7YBQQkzniVmijs/+HHylIRl2fZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cydJsAIez600M/vb94JozzdggeHZXjVoZDJiSVI8vdk=; b=PV8ve0gKJVXuIlXMjXjO2WRoD0Pb3w3j5oOe5LtHkJ11aQkFtMkM6D98FnJVgpKkVv+Y16YXYI6MOhfbZSF1p4LGcr9Z/KPptC5t3PSLKmJnT7l/NPkHbV5Gm0NAW8YnkfD/DUtGKJcJ6IEYPej6s3UIdJnlfh65kGBcV7j2qFt02eOden8Q90BcsEdmLXQhycSrgUIZeAxUigpRPfUljvt+yZEB4VG5EKjDw6cEpgVDQu74wwqPfUeFTs4XqH6jzciLnTqvlm8QXgClmE/GqdptagLzdblRT7arNXOUQgJKlpN0H5a/9BxW7IM1E5oLE0f0CYGGTJGOBQau2cA3+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cydJsAIez600M/vb94JozzdggeHZXjVoZDJiSVI8vdk=; b=PnOZaKCvkWYceAxyGtSN5B/MlnWQx7tpjJKsIZfiP1C+rokJtIcuARsyWfRWBgGZHS84fqJf4XM0GVXT5D0wZQQFVtT6wEcnwdQb7fjH26lZO7w8tA17NwCI/B5EiTz0BTwzc3ma//eMk+UyBWeJ4mWl2xOXZGumi9FE7C74BJU= From: Roger Pau Monne To: CC: Roger Pau Monne , Doug Goldstein , Ian Jackson , Stefano Stabellini Subject: [PATCH v2 for-4.15 2/2] automation: enable rombios build on Alpine Date: Wed, 3 Mar 2021 09:25:14 +0100 Message-ID: <20210303082514.8859-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210303082514.8859-1-roger.pau@citrix.com> References: <20210303082514.8859-1-roger.pau@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MR2P264CA0105.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:33::21) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4af0a248-ee6c-41ec-0bf4-08d8de1dedcb X-MS-TrafficTypeDiagnostic: DM5PR03MB2971: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nLQlb27M+mENG/MRuNEDHtPzNx/lMn9A4ZWtgHK1XaeB/gWUTcEk4dnNe5a1AteUaKlaDUl4nrs5p2Hu0xpDN4fraSKqixRatBQMJLIcvCYST5jWxPjsm8URQgKahlcusB0AUlIZarneM7Qs0szMk1M+2MaL2IpRCoh9pMv+Uyk0zrsXnyGQW9s1pF+ETbujtWZOTNt7dC38vArSIIs0pOZoiKuI61UKLn4N+BIBHCgGWWk4lA7abu2ZOgXEEjlawssu/IT6/xKDa+QjpQAyVtAvro6RyrLaEU9DYEAkfj7xB7/K86F/O5E01RPsyoOKH8dvN0EhV4hUiVbiKKhjo3GO42f3hthMhThA+P2QdDp08izbXH0TRh26aoqA6Mw3daJK50jqVJ/IhUcmFilw2FVcFGc8g0TECYrkVoPkV0bDgyksBqHr0IxwNRsrOw8rXznE8+OIzPJ/EeTxi1GpTZkc2df3Drz/rRRtCN+onJsoAqjT93VSKZuC9BjkRBvnMZO0xF11nY6drUwYmxYzPw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(366004)(346002)(39840400004)(396003)(136003)(83380400001)(316002)(16526019)(186003)(6486002)(4326008)(6916009)(1076003)(54906003)(26005)(66946007)(36756003)(478600001)(86362001)(4744005)(6666004)(956004)(8676002)(8936002)(2906002)(66556008)(2616005)(66476007)(6496006)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?S29aM0x5QWx0WHVRMzJWNEk1UnBYR1hHeUQvdkFZQ1QrVU5ZNTlqSmVkMFFo?= =?utf-8?B?djNLK1o3S0dRZDN0K3NtL25RWEZLczdYL0hJV0tLRkJ1ZE1ZRnVFeXUwRnE4?= =?utf-8?B?bkF6Ykd6WG4vMTYwWnUzOG9NK2lJVzVlaUdtaS8rdlNhY1FyZ1hIQkg2cVMr?= =?utf-8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a0JKbEN4VlRwcnN5dWZu?= =?utf-8?B?Z1dBQkJaSHBzTC9kOThhOTdjdnFxRndiTDJ4a1ZGN25RL0EySHV3aldGOGNn?= =?utf-8?B?a0wvRVZsbTF4UHh0N01pY09uOTB5ZHlpUGFvTWlPdkhhNE40NUZNY1FlUkF6?= =?utf-8?B?SnRkM0FGeHM3eVV0cmR6cW5yNE53WGNmbWp2ZlZtbnU2dG51TStET0xmQ3c0?= =?utf-8?B?U2RuMDNpOE0ySkNEQWpGTm1vb0VvTjlvWnlNY2RSaFlOS2tBb0Z0TW9jdmF3?= =?utf-8?B?UGZodmVVZmY2SnFBb2lyOEZQNmZxRUJoSXpsRDhUNW5tZDZCNGROK1daYzVR?= =?utf-8?B?YkZMNWRRbmhUV2dsUTJVc2Z1VWZxZVNQNko2aU9SVStJVlNTbklrb01oUm14?= =?utf-8?B?SEljbndLWU5xekJlRkhib2d5YnlhV0UwWkFGWEIraU80SW1JSVUxTkhreU54?= =?utf-8?B?ai83dnBOTDFLbEV4RFAzdEpWcndlTnp6TGovZ3ZHam4xVmxhNjY0OS9OaTQx?= =?utf-8?B?NFlKbW5XOFVjUVpueGlPYlk1QjAvbFFDdTQ3R3NXWFEwQUxuTGJydWI4SGQx?= =?utf-8?B?cHozVDdRQTZuMDJhaUNmS2pLU0l4QzgrOElvQmxxMnZSM1lyM0hDdEFha1Bq?= =?utf-8?B?aStVWlZRUWpxTFZ1UFJRRzdnWS9uNjhEbEJDaTdVOXMrWVI0dlJ3bkR3UlA5?= =?utf-8?Q?UUfb+UTRKeE9RwAL0d6LQE4xYL9i6at8c2Lo18S?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4af0a248-ee6c-41ec-0bf4-08d8de1dedcb X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2021 08:25:39.8865 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9kP0Ep7J5+sFpHypHBp1gzAkJWI1UOz+hrsCA9NfhZwctBF+rGz5wUkkuhltRqLUJZbkAlCiWALCD8BNSrx9wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2971 X-OriginatorOrg: citrix.com X-ZohoMail-DKIM: pass (identity @citrix.com) It's now safe to enable the build of rombios on Alpine systems, as hvmloader already builds fine there. Signed-off-by: Roger Pau Monn=C3=A9 --- automation/scripts/build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index d8990c3bf4..87e44bb940 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -31,9 +31,8 @@ fi if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then # disable --disable-werror for QEMUU when building with MUSL cfgargs+=3D("--with-extra-qemuu-configure-args=3D\"--disable-werror\"") - # hvmloader doesn't build on MUSL systems - cfgargs+=3D("--disable-seabios") - cfgargs+=3D("--disable-rombios") + # SeaBIOS doesn't build on MUSL systems + cfgargs+=3D("--with-system-seabios=3D/bin/false") fi =20 # Qemu requires Python 3.5 or later --=20 2.30.1