From nobody Tue Feb 10 20:48:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1715066476; cv=none; d=zohomail.com; s=zohoarc; b=Do2Lkg0QFKTZGn5Xw988LDXhKUnBl/dNEpRUwqZaYWkgnYMNIf5b5gSaPSOF3sRDfE6feJucg77AQhZQGHHJClL3l3NqAmOtOVlXmPsx9a+FIPa/s9c/xMxdzAFYc93z30qi1pLWYA/hrHS1h3ohgnTmeEqK312EMRL0xrA/kwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715066476; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=84v/4qsjERWpXvEfekpOOvFOg4h6lGBG7/Q0iXd2pZ0=; b=Xxwq2pBSHPsxSV59kWfu2RF04LTg7RkJlYV+Y3pq0iHgNzns3UwlMwkNF1seRPDrpQTRYALukbNnoSmLxTwrTqAZqTNnL7t9Y66XMhqkzPZ6jR1il5fXT29/9o6D1Cg+r9y678HUIOFOJgMK6ks8d/FEoprVy5i688TYexEEzVM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1715066476139781.4202236420675; Tue, 7 May 2024 00:21:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4F7K-0007fD-FT; Tue, 07 May 2024 03:20:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7I-0007eL-Qh for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7H-0004BD-1l for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:00 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-657-7utFJ_5wPKu1xwyrMPCK2w-1; Tue, 07 May 2024 03:19:56 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a59eea00cafso21231866b.1 for ; Tue, 07 May 2024 00:19:56 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id h12-20020a170906718c00b00a59a6026ee1sm4068876ejk.14.2024.05.07.00.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715066398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=84v/4qsjERWpXvEfekpOOvFOg4h6lGBG7/Q0iXd2pZ0=; b=OAZbY42KFVHuTWFAj5jgdkG2aDCVFt/sRiYVH2sshVe5HLAKz2BjyAWJtrFot3rZVd+LXA 1nXEEs+xDF6IPvCVWbLXgqA6iwtZB7cAD9Bik9e8Nije3OmEIMiNn3b2dFNcX+9wU08wrF 5GYkNuezutoq0GtgKD0K4FEKgdYQP6o= X-MC-Unique: 7utFJ_5wPKu1xwyrMPCK2w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715066394; x=1715671194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=84v/4qsjERWpXvEfekpOOvFOg4h6lGBG7/Q0iXd2pZ0=; b=lNywd/nlDr6t0t8rhnftTVFP5KxRbrs6TfvpCUoieXW95WKYkzNkCKutFUr25D0c/t XsR6M01J2ZuVW5KTbGmesfmWKZxgzoLpBJBkozLVzLVDRUuXxd7EdxuCiLrCzABu7hAQ sx5EuDQPEaLVssWs+SnENWKRbyJXVSsX/AUHlfIA47a6utd0u89Q1F92CuYLEw0m+g0u DDwwv1jeACX3hH1ZVRl6ohQcoRp7v+390Vljf7Qg3UwpuOSnbBruVo/x0OB9SizbgQ2C KJ1GrirC1Ta1EpH3DUY2gqYhciIMswlDpBvqj2Tn7V2AzUV1Msl9c4AwR4iCK5Hlw1HM ZGSQ== X-Gm-Message-State: AOJu0Yy5E4ddAWX4xp+f+sWfSbJG+O92CaIWvrk7q0sawUCNm9OjSVIA HBUHqW8oamDVugfH8yGaBUB8hqnkx+C7BCe80rAS7+RaKTSasSXncctRJ9PThIT3jtlKfKZE0Ny GkG1JgVFrH/l9mAwn3jt8FL7l+6QREbd1LGmGr+sHvBKM+3OWs6jZOmGwUobDiGtHocSy0z+ADF TnFwxvUbUI4aTA8meznNvCeeBhlyGEqzV0wPF3 X-Received: by 2002:a17:906:c00a:b0:a55:6602:e3a9 with SMTP id e10-20020a170906c00a00b00a556602e3a9mr10431821ejz.1.1715066394264; Tue, 07 May 2024 00:19:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKRJWsSUBlg48vt91ws4tRQj8/goatk1U6Q1s+dCr8mB+FryijYhxcD4K9jTGI8iag5G4+/Q== X-Received: by 2002:a17:906:c00a:b0:a55:6602:e3a9 with SMTP id e10-20020a170906c00a00b00a556602e3a9mr10431801ejz.1.1715066393819; Tue, 07 May 2024 00:19:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 1/4] meson: remove system/internal distinction for libfdt Date: Tue, 7 May 2024 09:19:45 +0200 Message-ID: <20240507071948.105022-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240507071948.105022-1-pbonzini@redhat.com> References: <20240507071948.105022-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.581, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1715066477635100007 Content-Type: text/plain; charset="utf-8" Treat libfdt like slirp and the other dependencies that use --enable-downlo= ad; remove the ability to force usage of the subproject. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 69 +++++++++++++++-------------------- meson_options.txt | 6 +-- scripts/meson-buildoptions.sh | 4 +- 3 files changed, 34 insertions(+), 45 deletions(-) diff --git a/meson.build b/meson.build index 43da4923721..530f92c0a9c 100644 --- a/meson.build +++ b/meson.build @@ -1858,6 +1858,30 @@ if numa.found() and not cc.links(''' endif endif =20 +fdt =3D not_found +if get_option('fdt').disable_auto_if(not have_system).allowed() + fdt =3D cc.find_library('fdt', required: false) + if fdt.found() + if not cc.links(''' + #include + #include + int main(void) { fdt_find_max_phandle(NULL, NULL); return 0; }''', + dependencies: fdt) + libfdt_proj =3D subproject('dtc', required: get_option('fdt'), + default_options: ['tools=3Dfalse', 'yaml= =3Ddisabled', + 'python=3Ddisabled', 'def= ault_library=3Dstatic']) + fdt =3D libfdt_proj.get_variable('libfdt_dep') + endif + if not fdt.found() + if get_option('fdt').enabled() + error('libfdt found but too old (1.5.1 or newer required)') + else + warning('libfdt found but too old (1.5.1 or newer required)') + endif + endif + endif +endif + rdma =3D not_found if not get_option('rdma').auto() or have_system libumad =3D cc.find_library('ibumad', required: get_option('rdma')) @@ -2199,6 +2223,7 @@ config_host_data.set('CONFIG_BSD', host_os in bsd_ose= s) config_host_data.set('CONFIG_CAPSTONE', capstone.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_DARWIN', host_os =3D=3D 'darwin') +config_host_data.set('CONFIG_FDT', fdt.found()) config_host_data.set('CONFIG_FUZZ', get_option('fuzzing')) config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) @@ -3120,6 +3145,10 @@ genh +=3D custom_target('config-poison.h', command: [find_program('scripts/make-config-poison.s= h'), target_configs_h]) =20 +if fdt_required.length() > 0 and not fdt.found() + error('fdt disabled but required by targets ' + ', '.join(fdt_required)) +endif + ############### # Subprojects # ############### @@ -3130,44 +3159,6 @@ if have_system and vfio_user_server_allowed libvfio_user_dep =3D libvfio_user_proj.get_variable('libvfio_user_dep') endif =20 -fdt =3D not_found -fdt_opt =3D get_option('fdt') -if fdt_required.length() > 0 or fdt_opt =3D=3D 'enabled' - if fdt_opt =3D=3D 'disabled' - error('fdt disabled but required by targets ' + ', '.join(fdt_required= )) - endif - - if fdt_opt in ['enabled', 'auto', 'system'] - if get_option('wrap_mode') =3D=3D 'nodownload' - fdt_opt =3D 'system' - endif - fdt =3D cc.find_library('fdt', required: fdt_opt =3D=3D 'system') - if fdt.found() and cc.links(''' - #include - #include - int main(void) { fdt_find_max_phandle(NULL, NULL); return 0; }''', - dependencies: fdt) - fdt_opt =3D 'system' - elif fdt_opt =3D=3D 'system' - error('system libfdt requested, but it is too old (1.5.1 or newer r= equired)') - else - fdt_opt =3D 'internal' - fdt =3D not_found - endif - endif - if not fdt.found() - assert(fdt_opt =3D=3D 'internal') - libfdt_proj =3D subproject('dtc', required: true, - default_options: ['tools=3Dfalse', 'yaml=3Dd= isabled', - 'python=3Ddisabled', 'defau= lt_library=3Dstatic']) - fdt =3D libfdt_proj.get_variable('libfdt_dep') - endif -else - fdt_opt =3D 'disabled' -endif - -config_host_data.set('CONFIG_FDT', fdt.found()) - vhost_user =3D not_found if host_os =3D=3D 'linux' and have_vhost_user libvhost_user =3D subproject('libvhost-user') @@ -4411,7 +4402,7 @@ summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} summary_info +=3D {'ATTR/XATTR support': libattr} summary_info +=3D {'RDMA support': rdma} -summary_info +=3D {'fdt support': fdt_opt =3D=3D 'disabled' ? false = : fdt_opt} +summary_info +=3D {'fdt support': fdt} summary_info +=3D {'libcap-ng support': libcap_ng} summary_info +=3D {'bpf support': libbpf} summary_info +=3D {'rbd support': rbd} diff --git a/meson_options.txt b/meson_options.txt index adc77bae0cd..90902c19d1c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -308,9 +308,9 @@ option('vduse_blk_export', type: 'feature', value: 'aut= o', =20 option('capstone', type: 'feature', value: 'auto', description: 'Whether and how to find the capstone library') -option('fdt', type: 'combo', value: 'auto', - choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], - description: 'Whether and how to find the libfdt library') +option('fdt', type: 'feature', value: 'auto', + deprecated: { 'system': 'enabled' }, + description: 'device tree support') =20 option('selinux', type: 'feature', value: 'auto', description: 'SELinux support in qemu-nbd') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 0a29d35fdb6..d816b35a2f4 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -33,8 +33,6 @@ meson_options_help() { printf "%s\n" ' --enable-debug-stack-usage' printf "%s\n" ' measure coroutine stack usage' printf "%s\n" ' --enable-debug-tcg TCG debugging' - printf "%s\n" ' --enable-fdt[=3DCHOICE] Whether and how to find the = libfdt library' - printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' printf "%s\n" ' --enable-gcov Enable coverage tracking.' printf "%s\n" ' --enable-lto Use link time optimization' @@ -113,6 +111,7 @@ meson_options_help() { printf "%s\n" ' dmg dmg image format support' printf "%s\n" ' docs Documentations build support' printf "%s\n" ' dsound DirectSound sound support' + printf "%s\n" ' fdt device tree support' printf "%s\n" ' fuse FUSE block device export' printf "%s\n" ' fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE ex= ports' printf "%s\n" ' gcrypt libgcrypt cryptography support' @@ -310,7 +309,6 @@ _meson_option_parse() { --disable-dsound) printf "%s" -Ddsound=3Ddisabled ;; --enable-fdt) printf "%s" -Dfdt=3Denabled ;; --disable-fdt) printf "%s" -Dfdt=3Ddisabled ;; - --enable-fdt=3D*) quote_sh "-Dfdt=3D$2" ;; --enable-fuse) printf "%s" -Dfuse=3Denabled ;; --disable-fuse) printf "%s" -Dfuse=3Ddisabled ;; --enable-fuse-lseek) printf "%s" -Dfuse_lseek=3Denabled ;; --=20 2.45.0 From nobody Tue Feb 10 20:48:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1715066477; cv=none; d=zohomail.com; s=zohoarc; b=e8NJBz7BhGirRc5fpecj2jRvDkD65pO2jVNxg7X1gw+5jJ1TZZLfhPMzg1DIsKAzRPW8KEkleYUrFDQEExPL1YxT3BoPP0OYvTAIP7Whd8Ui0DF2XeM4TPtxbM4TRbXibKRpp2FJ61kANt7g0xCwPShDHwQsRwxwm/6kyXUAHzo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715066477; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=d6uNgPV+Xc59StsW5rnTX10dlVLFM5J/r5XHX8X8xDQ=; b=RKYsQOfj/X5/2p+Qz+PBcBB9YS/dlV1TJ70qRmZ46otUZJnBimN+8wnXjX3J+BL7vh39eXeuKhwjaOpenmCOZggLORmNGRUjS1Jgx8fv1l7Yt5eKuDtCpyTx4cijbzxNKobm//u432zXAJiYtnpGdOabMGJB29a4EfHD8qtLhZg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1715066477313864.2548478533139; Tue, 7 May 2024 00:21:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4F7P-0007gL-7Z; Tue, 07 May 2024 03:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7M-0007fk-UR for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7J-0004Ol-IJ for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:03 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-zBExPBzqOh65MUSNX-JRpw-1; Tue, 07 May 2024 03:19:59 -0400 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a59ab39c8b6so180372366b.2 for ; Tue, 07 May 2024 00:19:59 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id p14-20020a170906604e00b00a58a3238522sm6064435ejj.207.2024.05.07.00.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715066400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d6uNgPV+Xc59StsW5rnTX10dlVLFM5J/r5XHX8X8xDQ=; b=eCyDByQB5FRvf+KHSDz/GJE1RN8TGaaoPucSp9J5IbXMWhe0qlelitnbzX6QF8wHL0mkUW nEtMxzLJl55nikgZm/tUk9q43OiToRxsgh93WAMDmkGtY09QXTlF5B6RlUznCiJwfBk9HO 9oG87JNcsMgULsz41TFacrIvOpZR290= X-MC-Unique: zBExPBzqOh65MUSNX-JRpw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715066397; x=1715671197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d6uNgPV+Xc59StsW5rnTX10dlVLFM5J/r5XHX8X8xDQ=; b=u3yMlEqys7dJq3dk561l5d5LTl3pP4LGfVu1Cq0NHrxgQblimhMR3RWvAyhuzfP1nX SLXD4pGpjVUbrtIe2sgzVxPZ2PnCETg8sf2Kat88m7CkMlUCa+cgD8KCwj56MA1pc3nP aj5rl3BH6E+kUutXbtkCjvB9U5PHiIYsZarNMq9LUAJ9hT4IoKqskkbmYKszCyYJq/W/ 1QUqEPi1WTbffj9Vhpp7RRabqgTMP80ejxOjlzU1rDWYBCaWi5ahEYlD58D3i3Ifu5hN ny6ehK7qVXRDfXCiyHqJSCs+ZpbxrZWWrOrCrhAN7smc6eRNLQbKQtwGp7VMnxLVFX0z RKRQ== X-Gm-Message-State: AOJu0YzgRvzbVeLTStbGqhaobLC3v2mdxXHZQenl/kP2//oN/HdY/S2x ct7J2qZK8Wn4BlF+RmUOkriAOchKoQEo/HOjZ2dcJx+5QAxukSMnv+i7D+VKMpUWiAPgQNH6A0N ZEW5Ca840cO3A747EZ+kfNBHJnlMLrimEw54UVEQkmgDedNlKyNq+lLp9aYmCANkNV8iJDNB489 8iDL7NgL3+oqw8QOCdnrpEaqw/kmWp+h+qAA90 X-Received: by 2002:a17:907:ca01:b0:a59:8cd2:5b2c with SMTP id uk1-20020a170907ca0100b00a598cd25b2cmr6101611ejc.39.1715066396848; Tue, 07 May 2024 00:19:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXQhun8j2jl9fwMP078ZCx75dFsxiNYpk+N7TINUWm0A2q0qD67XTnZoDCRVdUjcWQ1lD7aQ== X-Received: by 2002:a17:907:ca01:b0:a59:8cd2:5b2c with SMTP id uk1-20020a170907ca0100b00a598cd25b2cmr6101597ejc.39.1715066396399; Tue, 07 May 2024 00:19:56 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 2/4] kconfig: express dependency of individual boards on libfdt Date: Tue, 7 May 2024 09:19:46 +0200 Message-ID: <20240507071948.105022-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240507071948.105022-1-pbonzini@redhat.com> References: <20240507071948.105022-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.581, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1715066477652100008 Content-Type: text/plain; charset="utf-8" Now that boards are enabled by default and the "CONFIG_FOO=3Dy" entries are gone from configs/devices/, there cannot be any more a conflicts between the default contents of configs/devices/ and a failed "depends on" clause. With this change, each individual board or target can express whether it needs FDT. It can also include it in the build via "select DEVICE_TREE", instead of having each hw/*/meson.build file do it by hand, and this will bring in more components such as CONFIG_GUEST_LOADER. This allows building non-microvm x86 emulators without having libfdt available. Signed-off-by: Paolo Bonzini --- meson.build | 1 + Kconfig.host | 3 +++ hw/arm/Kconfig | 5 +++++ hw/arm/meson.build | 2 +- hw/core/Kconfig | 9 ++++++++- hw/core/meson.build | 2 +- hw/i386/Kconfig | 3 ++- hw/loongarch/Kconfig | 3 ++- hw/loongarch/meson.build | 2 +- hw/mips/Kconfig | 1 + hw/mips/meson.build | 2 +- hw/openrisc/Kconfig | 2 ++ hw/openrisc/meson.build | 4 ++-- hw/ppc/Kconfig | 15 ++++++++------- hw/ppc/meson.build | 4 +--- hw/riscv/Kconfig | 4 ++++ hw/riscv/meson.build | 2 +- hw/rx/Kconfig | 3 ++- hw/xtensa/Kconfig | 1 + system/meson.build | 2 +- target/arm/Kconfig | 2 ++ target/microblaze/Kconfig | 1 + target/openrisc/Kconfig | 1 + target/riscv/Kconfig | 2 ++ 24 files changed, 54 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index 530f92c0a9c..3ae95215083 100644 --- a/meson.build +++ b/meson.build @@ -2986,6 +2986,7 @@ host_kconfig =3D \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ (opengl.found() ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ + (fdt.found() ? ['CONFIG_FDT=3Dy'] : []) + \ (have_vhost_user ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=3Dy'] : []) + \ diff --git a/Kconfig.host b/Kconfig.host index f6a2a131e6c..17f405004b3 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -23,6 +23,9 @@ config IVSHMEM config TPM bool =20 +config FDT + bool + config VHOST_USER bool =20 diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 98c264ed219..8b97683a45e 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -15,6 +15,7 @@ config ARM_VIRT select ACPI select ARM_SMMUV3 select GPIO_KEY + select DEVICE_TREE select FW_CFG_DMA select PCI_EXPRESS select PCI_EXPRESS_GENERIC_BRIDGE @@ -265,6 +266,7 @@ config SBSA_REF default y depends on TCG && AARCH64 imply PCI_DEVICES + select DEVICE_TREE select AHCI select ARM_SMMUV3 select GPIO_KEY @@ -347,6 +349,7 @@ config VEXPRESS bool default y depends on TCG && ARM + select DEVICE_TREE select A9MPCORE select A15MPCORE select ARM_MPTIMER @@ -492,6 +495,7 @@ config XLNX_ZYNQMP_ARM select CPU_CLUSTER select DDC select DPCD + select DEVICE_TREE select SDHCI select SSI select SSI_M25P80 @@ -509,6 +513,7 @@ config XLNX_VERSAL depends on TCG && AARCH64 select ARM_GIC select CPU_CLUSTER + select DEVICE_TREE select PL011 select CADENCE select VIRTIO_MMIO diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 6808135c1f7..aefde0c69a3 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -1,5 +1,5 @@ arm_ss =3D ss.source_set() -arm_ss.add(files('boot.c'), fdt) +arm_ss.add(files('boot.c')) arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c')) arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c')) arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) diff --git a/hw/core/Kconfig b/hw/core/Kconfig index 9397503656d..24411f59306 100644 --- a/hw/core/Kconfig +++ b/hw/core/Kconfig @@ -4,8 +4,14 @@ config EMPTY_SLOT config PTIMER bool =20 +config DEVICE_TREE + bool + # fail the build if libfdt not found + depends on FDT + config FITLOADER bool + depends on DEVICE_TREE =20 config GENERIC_LOADER bool @@ -14,13 +20,14 @@ config GENERIC_LOADER config GUEST_LOADER bool default y - depends on TCG + depends on TCG && DEVICE_TREE =20 config OR_IRQ bool =20 config PLATFORM_BUS bool + depends on DEVICE_TREE =20 config REGISTER bool diff --git a/hw/core/meson.build b/hw/core/meson.build index f20d4143f7a..a3d9bab9f42 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -16,7 +16,7 @@ common_ss.add(files('cpu-common.c')) common_ss.add(files('machine-smp.c')) system_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c')) system_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loade= r.c')) -system_ss.add(when: ['CONFIG_GUEST_LOADER', fdt], if_true: files('guest-lo= ader.c')) +system_ss.add(when: 'CONFIG_GUEST_LOADER', if_true: files('guest-loader.c'= )) system_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c')) system_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c'= )) system_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c')) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 4362164962c..5af47f4bf2f 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -115,7 +115,8 @@ config Q35 config MICROVM bool default y - depends on I386 + depends on I386 && FDT + select DEVICE_TREE select SERIAL_ISA # for serial_hds_isa_init() select ISA_BUS select APIC diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig index 78640505630..830cfef72db 100644 --- a/hw/loongarch/Kconfig +++ b/hw/loongarch/Kconfig @@ -1,7 +1,8 @@ config LOONGARCH_VIRT bool default y - depends on LOONGARCH64 + depends on LOONGARCH64 && FDT + select DEVICE_TREE select PCI select PCI_EXPRESS_GENERIC_BRIDGE imply VIRTIO_VGA diff --git a/hw/loongarch/meson.build b/hw/loongarch/meson.build index d306d82c2ee..bce7ebac97e 100644 --- a/hw/loongarch/meson.build +++ b/hw/loongarch/meson.build @@ -3,7 +3,7 @@ loongarch_ss.add(files( 'fw_cfg.c', 'boot.c', )) -loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: [files('virt.c'),= fdt]) +loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('virt.c')) loongarch_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-build.c')) =20 hw_arch +=3D {'loongarch': loongarch_ss} diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index 9bccb363eb9..e540e10e094 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -83,6 +83,7 @@ config MIPS_BOSTON depends on MIPS64 && !TARGET_BIG_ENDIAN imply PCI_DEVICES imply TEST_DEVICES + select DEVICE_TREE select FITLOADER select MIPS_CPS select PCI_EXPRESS_XILINX diff --git a/hw/mips/meson.build b/hw/mips/meson.build index f06d88f3430..ca37c42d900 100644 --- a/hw/mips/meson.build +++ b/hw/mips/meson.build @@ -9,7 +9,7 @@ if 'CONFIG_TCG' in config_all_accel mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c')) mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c')) mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c')) -mips_ss.add(when: 'CONFIG_MIPS_BOSTON', if_true: [files('boston.c'), fdt]) +mips_ss.add(when: 'CONFIG_MIPS_BOSTON', if_true: files('boston.c')) endif =20 hw_arch +=3D {'mips': mips_ss} diff --git a/hw/openrisc/Kconfig b/hw/openrisc/Kconfig index 9c9015e0a5d..76b953c62c2 100644 --- a/hw/openrisc/Kconfig +++ b/hw/openrisc/Kconfig @@ -2,6 +2,7 @@ config OR1K_SIM bool default y depends on OPENRISC + select DEVICE_TREE select SERIAL select OPENCORES_ETH select OMPIC @@ -14,6 +15,7 @@ config OR1K_VIRT imply PCI_DEVICES imply VIRTIO_VGA imply TEST_DEVICES + select DEVICE_TREE select PCI select PCI_EXPRESS_GENERIC_BRIDGE select GOLDFISH_RTC diff --git a/hw/openrisc/meson.build b/hw/openrisc/meson.build index 2dbc6365bb7..82f1f0ef1cc 100644 --- a/hw/openrisc/meson.build +++ b/hw/openrisc/meson.build @@ -1,7 +1,7 @@ openrisc_ss =3D ss.source_set() openrisc_ss.add(files('cputimer.c')) openrisc_ss.add(files('boot.c')) -openrisc_ss.add(when: 'CONFIG_OR1K_SIM', if_true: [files('openrisc_sim.c')= , fdt]) -openrisc_ss.add(when: 'CONFIG_OR1K_VIRT', if_true: [files('virt.c'), fdt]) +openrisc_ss.add(when: 'CONFIG_OR1K_SIM', if_true: files('openrisc_sim.c')) +openrisc_ss.add(when: 'CONFIG_OR1K_VIRT', if_true: files('virt.c')) =20 hw_arch +=3D {'openrisc': openrisc_ss} diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 78f83e78ce5..347212f4dba 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -1,7 +1,7 @@ config PSERIES bool default y - depends on PPC64 + depends on PPC64 && FDT imply USB_OHCI_PCI imply PCI_DEVICES imply TEST_DEVICES @@ -26,7 +26,7 @@ config SPAPR_RNG config POWERNV bool default y - depends on PPC64 + depends on PPC64 && FDT imply PCI_DEVICES imply TEST_DEVICES select ISA_IPMI_BT @@ -52,7 +52,7 @@ config PPC405 config PPC440 bool default y - depends on PPC + depends on PPC && FDT imply PCI_DEVICES imply TEST_DEVICES imply E1000_PCI @@ -71,7 +71,7 @@ config PPC4XX config SAM460EX bool default y - depends on PPC + depends on PPC && FDT select PFLASH_CFI01 select IDE_SII3112 select M41T80 @@ -168,19 +168,19 @@ config E500 config E500PLAT bool default y - depends on PPC + depends on PPC && FDT select E500 =20 config MPC8544DS bool default y - depends on PPC + depends on PPC && FDT select E500 =20 config VIRTEX bool default y - depends on PPC + depends on PPC && FDT select PPC4XX select PFLASH_CFI01 select SERIAL @@ -193,6 +193,7 @@ config FW_CFG_PPC bool =20 config FDT_PPC + select DEVICE_TREE bool =20 config VOF diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build index d096636ee7f..3ebbf329bcc 100644 --- a/hw/ppc/meson.build +++ b/hw/ppc/meson.build @@ -3,9 +3,7 @@ ppc_ss.add(files( 'ppc.c', 'ppc_booke.c', )) -ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: [files( - 'fdt.c', -), fdt]) +ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: files('fdt.c')) ppc_ss.add(when: 'CONFIG_FW_CFG_PPC', if_true: files('fw_cfg.c')) =20 # IBM pSeries (sPAPR) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 5f5f9e31bb0..a2030e3a6ff 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig @@ -12,6 +12,7 @@ config MICROCHIP_PFSOC depends on RISCV64 select CADENCE_SDHCI select CPU_CLUSTER + select DEVICE_TREE select MCHP_PFSOC_DMC select MCHP_PFSOC_IOSCB select MCHP_PFSOC_MMUART @@ -37,6 +38,7 @@ config RISCV_VIRT imply VIRTIO_VGA imply TEST_DEVICES imply TPM_TIS_SYSBUS + select DEVICE_TREE select RISCV_NUMA select GOLDFISH_RTC select PCI @@ -82,6 +84,7 @@ config SIFIVE_U depends on RISCV32 || RISCV64 select CADENCE select CPU_CLUSTER + select DEVICE_TREE select RISCV_ACLINT select SIFIVE_GPIO select SIFIVE_PDMA @@ -99,6 +102,7 @@ config SPIKE bool default y depends on RISCV32 || RISCV64 + select DEVICE_TREE select RISCV_NUMA select HTIF select RISCV_ACLINT diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index 2f7ee81be3c..f872674093a 100644 --- a/hw/riscv/meson.build +++ b/hw/riscv/meson.build @@ -1,5 +1,5 @@ riscv_ss =3D ss.source_set() -riscv_ss.add(files('boot.c'), fdt) +riscv_ss.add(files('boot.c')) riscv_ss.add(when: 'CONFIG_RISCV_NUMA', if_true: files('numa.c')) riscv_ss.add(files('riscv_hart.c')) riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c')) diff --git a/hw/rx/Kconfig b/hw/rx/Kconfig index b2fa2b7eec3..aa9242d1ef6 100644 --- a/hw/rx/Kconfig +++ b/hw/rx/Kconfig @@ -8,5 +8,6 @@ config RX62N_MCU config RX_GDBSIM bool default y - depends on RX + depends on RX && FDT + select DEVICE_TREE select RX62N_MCU diff --git a/hw/xtensa/Kconfig b/hw/xtensa/Kconfig index 443b415c2ba..8ea283a7a3b 100644 --- a/hw/xtensa/Kconfig +++ b/hw/xtensa/Kconfig @@ -15,6 +15,7 @@ config XTENSA_XTFPGA bool default y depends on XTENSA + imply DEVICE_TREE select OPENCORES_ETH select PFLASH_CFI01 select SERIAL diff --git a/system/meson.build b/system/meson.build index 25e21172505..d67328538d0 100644 --- a/system/meson.build +++ b/system/meson.build @@ -32,7 +32,7 @@ if have_tpm endif =20 system_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) -system_ss.add(when: fdt, if_true: files('device_tree.c')) +system_ss.add(when: 'CONFIG_DEVICE_TREE', if_true: [fdt, files('device_tre= e.c')]) if host_os =3D=3D 'linux' system_ss.add(files('async-teardown.c')) endif diff --git a/target/arm/Kconfig b/target/arm/Kconfig index 5847c5a74a7..7f8a2217ae1 100644 --- a/target/arm/Kconfig +++ b/target/arm/Kconfig @@ -6,6 +6,8 @@ config ARM # translate.c v7m helpers under ARM_V7M. select ARM_V7M if TCG =20 + select DEVICE_TREE # needed by boot.c + config AARCH64 bool select ARM diff --git a/target/microblaze/Kconfig b/target/microblaze/Kconfig index a5410d9218d..e91d58d88f2 100644 --- a/target/microblaze/Kconfig +++ b/target/microblaze/Kconfig @@ -1,2 +1,3 @@ config MICROBLAZE bool + select DEVICE_TREE # needed by boot.c diff --git a/target/openrisc/Kconfig b/target/openrisc/Kconfig index e0da4ac1dfc..cd66c2e3b6c 100644 --- a/target/openrisc/Kconfig +++ b/target/openrisc/Kconfig @@ -1,2 +1,3 @@ config OPENRISC bool + select DEVICE_TREE # needed by boot.c diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig index adb7de3f37d..5f30df22f2f 100644 --- a/target/riscv/Kconfig +++ b/target/riscv/Kconfig @@ -1,7 +1,9 @@ config RISCV32 bool select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + select DEVICE_TREE # needed by boot.c =20 config RISCV64 bool select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + select DEVICE_TREE # needed by boot.c --=20 2.45.0 From nobody Tue Feb 10 20:48:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1715066474; cv=none; d=zohomail.com; s=zohoarc; b=l6aY0BW+qKwMI2+DyZJaMo4k3d/Em1op6PuwgfWNaLBVudGAe7/fWoVnH2kcZ6IkqseOkcC5JNj0b2QbpHyuqFk6oDctdEgTQB+geDeM3i/7MGiUb8rMkaixxGP2HnnTq6UxPRa4ZGVi4oGBjkRi76uTIZSquDDv0/ZJwpeinJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715066474; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GZeSHTEIZaZ87Q0+qmszQgyShcSW78CNFvo2DL7feAs=; b=YNnsoBDKVKTOxQD8x3DHbZNPlOY0J95r6mXLIm7FBISPZC6Lh7gUz0xYB79SMbNu8uF2lmxh3KjcVOPqPUxje7lr70I7x13ovIrikQ1sojlMm7QjLuag9HpAGd7fuAf1U1rEW2VHhHrAhYmPeGv+3qEcGHYQs3TMOM+x98fXDCU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1715066474490103.37342013871273; Tue, 7 May 2024 00:21:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4F7U-0007hg-2m; Tue, 07 May 2024 03:20:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7R-0007gi-Ph for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7N-0004a8-9v for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:09 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-QGGvBxpFNUeqRQCG5MYnSw-1; Tue, 07 May 2024 03:20:01 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a51fdbd06c8so197536566b.3 for ; Tue, 07 May 2024 00:20:01 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id la6-20020a170906ad8600b00a59aa18c685sm3806434ejb.173.2024.05.07.00.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715066404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GZeSHTEIZaZ87Q0+qmszQgyShcSW78CNFvo2DL7feAs=; b=O4bLUTitn4UzvVs9su3+yYdrS+9GROLAaA2WXisgKuHu9iwAkFV+0y/RVgOPRfDuyq1F8s RXHhg/KI/zaGvGoefIJDLbk74h/gYSUpzvnsP16zc6CFH1lF4ouE0xD9/kSVH6ay+VD6Y6 12+lRYmKK0GrndcLSL4GRaWSG2bg60k= X-MC-Unique: QGGvBxpFNUeqRQCG5MYnSw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715066400; x=1715671200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GZeSHTEIZaZ87Q0+qmszQgyShcSW78CNFvo2DL7feAs=; b=BiS/qdCH+cC8DHPR4QwPI8+kImfP7c/6Br0pAXFxkqU7fYCXLLvk7AC+uURW55k2Xr 6EEAjvWq55vFy99y8ksXbH3D0+ACYAMJzweL4mhLCiYuRIdz2di3UW2evFqtH5Gl6BDP UDDZylUXHwKu9PHPJjNPg5B1wv7Oo/AAW1jNQ1v1zpSY2T2I2ymjjyXVEwcYHPlKiS8B E7HGSJ0iCLh5S+4Ujk0C6n5TYN0VZ27fmw7SjNuTFtP4ICzmDPlwbqZEyTnWJ8eWIuVA oLpvxP9t4qYq85ES1VxcZwDTGkJKDxQmf/p3XLBX2lYU1fnVc2m70DyuL9x7N7eyTFnt XD9g== X-Gm-Message-State: AOJu0YwZOIUdkUHgSr8h0NXdqbDxYdcVdsNiA3PZKDsB17uR3HhEk2Vj AXngzOzwtRGNoPUcALLHBdcqcl/tIbN0MfNvhrMKQpa7HD4GzQZGY8GhqZWu8BN835xND9eq082 qUsuG09C9RAcreI9j7AHoAh3orfiA66OmOjFZtJ5z8xgdLq21AduXhJzTD9mw5xquOI1GN03Hv1 Tx+qR80t6osihBYqQkfOIvgLaIqjoC1RqKhD4F X-Received: by 2002:a17:907:995a:b0:a55:a895:46ae with SMTP id kl26-20020a170907995a00b00a55a89546aemr7619845ejc.63.1715066400253; Tue, 07 May 2024 00:20:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfgcQ2QzRZyabGjXNYriQB4I1ZKzQuKLU8xfAOA7j+Ydtm5U2PfrWrCTTgzmffW90AFQAKmw== X-Received: by 2002:a17:907:995a:b0:a55:a895:46ae with SMTP id kl26-20020a170907995a00b00a55a89546aemr7619831ejc.63.1715066399893; Tue, 07 May 2024 00:19:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 3/4] hw/xtensa: require libfdt Date: Tue, 7 May 2024 09:19:47 +0200 Message-ID: <20240507071948.105022-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240507071948.105022-1-pbonzini@redhat.com> References: <20240507071948.105022-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.581, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1715066475618100003 Content-Type: text/plain; charset="utf-8" All other boards require libfdt if it can be used (including for example i386/x86_64), so change the "imply" to "select" and always allow -dtb in qemu-system-xtensa. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/xtensa/xtfpga.c | 9 --------- hw/xtensa/Kconfig | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index f49e6591dc2..955e8867a36 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -356,7 +356,6 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, M= achineState *machine) cur_tagptr =3D put_tag(cur_tagptr, BP_TAG_COMMAND_LINE, strlen(kernel_cmdline) + 1, kernel_cmdlin= e); } -#ifdef CONFIG_FDT if (dtb_filename) { int fdt_size; void *fdt =3D load_device_tree(dtb_filename, &fdt_size); @@ -373,14 +372,6 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, = MachineState *machine) cur_lowmem =3D QEMU_ALIGN_UP(cur_lowmem + fdt_size, 4 * KiB); g_free(fdt); } -#else - if (dtb_filename) { - error_report("could not load DTB '%s': " - "FDT support is not configured in QEMU", - dtb_filename); - exit(EXIT_FAILURE); - } -#endif if (initrd_filename) { BpMemInfo initrd_location =3D { 0 }; int initrd_size =3D load_ramdisk(initrd_filename, cur_lowmem, diff --git a/hw/xtensa/Kconfig b/hw/xtensa/Kconfig index 8ea283a7a3b..fc5c785cfac 100644 --- a/hw/xtensa/Kconfig +++ b/hw/xtensa/Kconfig @@ -14,8 +14,8 @@ config XTENSA_VIRT config XTENSA_XTFPGA bool default y - depends on XTENSA - imply DEVICE_TREE + depends on XTENSA && FDT + select DEVICE_TREE select OPENCORES_ETH select PFLASH_CFI01 select SERIAL --=20 2.45.0 From nobody Tue Feb 10 20:48:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1715066453; cv=none; d=zohomail.com; s=zohoarc; b=Pf84vUZGCifhdz3mvdbtjMUiiebxvdeLzggokzseosCNq6jXwMlPIJCk7wx6SnsreDqDyaEobUejTMulvrPeOmp/AnrX8h9YdbEy8yNuIyIJRtYDAnOsO7mTm7IJQkvEUarHFC2qyC/tmAqIVK/6IjnJ/zT2RXZh3wbMfdr9Djc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715066453; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tyNCn6KfhclgXn49ilb7iSwuej0wWE0rdShomgLaqNo=; b=j1pmTZkKzYMHbparEdQlTCgCa6OIjWC+xGp6XxpUK5fDWxxiOIibTQqgagd7gbi1vXcWJF/bct3yQ7RSfMlsukgtp9zt0WNLMyzd3SFEY/Q2pxOZjj9V9qXhVyXnPBr/8+r4oo2ZTdJW8TqkVWXGzwZ8jqCvqMstOj7ptlId4Do= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1715066453605891.2150429732849; Tue, 7 May 2024 00:20:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4F7W-0007iC-CL; Tue, 07 May 2024 03:20:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7S-0007gx-Ne for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4F7P-0004iU-IG for qemu-devel@nongnu.org; Tue, 07 May 2024 03:20:09 -0400 Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-b6E0bbZ4OfaOEaSim6aGLg-1; Tue, 07 May 2024 03:20:05 -0400 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-51f843d9194so2495513e87.2 for ; Tue, 07 May 2024 00:20:05 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id fj20-20020a0564022b9400b00572336c900asm6013682edb.74.2024.05.07.00.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715066407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tyNCn6KfhclgXn49ilb7iSwuej0wWE0rdShomgLaqNo=; b=C5bpftMkmRvcEFH30ANdja4FZFG6Vz5X9jksD7CKaG0gD7Be1FSEpCUYWMOYJylL0Qcvsx ySLJtbYjkKhhuGcfQPFlFsqaJi6tY9Db9VjHgT2Zp110fyx2GpVe+HK+IImN9QpZwmZ/uy EjxIFC0QmSCiuxXMwQ371gy/1IO60ps= X-MC-Unique: b6E0bbZ4OfaOEaSim6aGLg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715066403; x=1715671203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tyNCn6KfhclgXn49ilb7iSwuej0wWE0rdShomgLaqNo=; b=Dien2EaSu4T1BxO1VtQ2Esb4xS8iUmj2g6zmQ7y4fB+QZR77AHSxKsiy6CxdFDzQqN +y48kOofSpyq3T2eXD2jPQD+b1O7S0UnYebkzjSDbf230mCMmw6olR5SSldSMV9NRRY2 4Kzg5NHOct/I+uYbhT3c9WGz1rOnYqXHVZhKfdFSwONXgu68gUuELTjZS4Gl+cbwn5Wv 9+toDvbJmmYQWTBdIhZolCOg4Sqdxs9vw2+t44T3nG8bnicKAD9cwRQy2SA2fjUIZ0PB j9bMJgZea3DfdEO9RFdBfaJrE18n0VvA7IVJMe1Lw9ENGw27govIFP/dMQby4ztLlX4+ x3Dg== X-Gm-Message-State: AOJu0YxsD+h90k/4dzmeL0zZMSOkgmJk2KjML2luafkVQnBOSAIz6+sG kIjswPC/g4RvPKer/RydNTlAENAM2nfMmrt6MJSuCYZcC6qWT+PtmpWYz53WZ2bM+2aQB0ME2YS ilLyqM8yLQhG47F3Gl1GrDbnL2ZVAI0A2PCiz76ON2gnx4yDQXZ9nRehoO5svlm6RyP8W12u5CK VyPH3vaSiLKmkUDfqPmlFFAGqPB/KU7TRZJZOs X-Received: by 2002:ac2:596f:0:b0:518:dae6:d0ec with SMTP id h15-20020ac2596f000000b00518dae6d0ecmr8289269lfp.4.1715066402963; Tue, 07 May 2024 00:20:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGO/a81xOdbWPhVKH/89rEqunJmLYFrggp4MZDjwlnY+zRmwxeguO8jgKW8mIwaDBZxX6Azw== X-Received: by 2002:ac2:596f:0:b0:518:dae6:d0ec with SMTP id h15-20020ac2596f000000b00518dae6d0ecmr8289250lfp.4.1715066402364; Tue, 07 May 2024 00:20:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 4/4] configs: disable emulators that require it if libfdt is not found Date: Tue, 7 May 2024 09:19:48 +0200 Message-ID: <20240507071948.105022-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240507071948.105022-1-pbonzini@redhat.com> References: <20240507071948.105022-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.581, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1715066455523100003 Content-Type: text/plain; charset="utf-8" Since boards can express their dependency on libfdt and system/device_tree.c, only leave TARGET_NEED_FDT if the target has a hard dependency. By default, unless --enable-libfdt is passed (in which case the dependency is mandatory, as usual for --enable-* options) or the target is mention in --target-list, those emulators will be skipped if libfdt is not present. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + configs/targets/i386-softmmu.mak | 1 - configs/targets/loongarch64-softmmu.mak | 1 + configs/targets/microblaze-softmmu.mak | 1 + configs/targets/microblazeel-softmmu.mak | 1 + configs/targets/mips64el-softmmu.mak | 1 - configs/targets/or1k-softmmu.mak | 1 + configs/targets/ppc-softmmu.mak | 1 - configs/targets/ppc64-softmmu.mak | 1 + configs/targets/riscv32-softmmu.mak | 1 + configs/targets/riscv64-softmmu.mak | 1 + configs/targets/rx-softmmu.mak | 1 + configs/targets/x86_64-softmmu.mak | 1 - meson.build | 14 ++++++++++---- .gitlab-ci.d/buildtest.yml | 7 ++++--- 16 files changed, 24 insertions(+), 11 deletions(-) diff --git a/configs/targets/aarch64-softmmu.mak b/configs/targets/aarch64-= softmmu.mak index 83c22391a69..84cb32dc2f4 100644 --- a/configs/targets/aarch64-softmmu.mak +++ b/configs/targets/aarch64-softmmu.mak @@ -3,4 +3,5 @@ TARGET_BASE_ARCH=3Darm TARGET_SUPPORTS_MTTCG=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-x= ml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sy= sregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-prof= ile-mve.xml gdb-xml/aarch64-pauth.xml +# needed by boot.c TARGET_NEED_FDT=3Dy diff --git a/configs/targets/arm-softmmu.mak b/configs/targets/arm-softmmu.= mak index 92c8349b964..bf390b7a8de 100644 --- a/configs/targets/arm-softmmu.mak +++ b/configs/targets/arm-softmmu.mak @@ -1,4 +1,5 @@ TARGET_ARCH=3Darm TARGET_SUPPORTS_MTTCG=3Dy TARGET_XML_FILES=3D gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-v= fp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-prof= ile.xml gdb-xml/arm-m-profile-mve.xml +# needed by boot.c TARGET_NEED_FDT=3Dy diff --git a/configs/targets/i386-softmmu.mak b/configs/targets/i386-softmm= u.mak index d61b5076134..2ac69d5ba37 100644 --- a/configs/targets/i386-softmmu.mak +++ b/configs/targets/i386-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=3Di386 TARGET_SUPPORTS_MTTCG=3Dy -TARGET_NEED_FDT=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D gdb-xml/i386-32bit.xml diff --git a/configs/targets/loongarch64-softmmu.mak b/configs/targets/loon= garch64-softmmu.mak index f23780fdd89..84beb19b90a 100644 --- a/configs/targets/loongarch64-softmmu.mak +++ b/configs/targets/loongarch64-softmmu.mak @@ -2,4 +2,5 @@ TARGET_ARCH=3Dloongarch64 TARGET_BASE_ARCH=3Dloongarch TARGET_SUPPORTS_MTTCG=3Dy TARGET_XML_FILES=3D gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.= xml gdb-xml/loongarch-fpu.xml +# all boards require libfdt TARGET_NEED_FDT=3Dy diff --git a/configs/targets/microblaze-softmmu.mak b/configs/targets/micro= blaze-softmmu.mak index e84c0cc7283..eea266d4f3d 100644 --- a/configs/targets/microblaze-softmmu.mak +++ b/configs/targets/microblaze-softmmu.mak @@ -1,5 +1,6 @@ TARGET_ARCH=3Dmicroblaze TARGET_BIG_ENDIAN=3Dy TARGET_SUPPORTS_MTTCG=3Dy +# needed by boot.c TARGET_NEED_FDT=3Dy TARGET_XML_FILES=3Dgdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-pr= otect.xml diff --git a/configs/targets/microblazeel-softmmu.mak b/configs/targets/mic= roblazeel-softmmu.mak index 9b688036bd3..77b968acad3 100644 --- a/configs/targets/microblazeel-softmmu.mak +++ b/configs/targets/microblazeel-softmmu.mak @@ -1,4 +1,5 @@ TARGET_ARCH=3Dmicroblaze TARGET_SUPPORTS_MTTCG=3Dy +# needed by boot.c TARGET_NEED_FDT=3Dy TARGET_XML_FILES=3Dgdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-pr= otect.xml diff --git a/configs/targets/mips64el-softmmu.mak b/configs/targets/mips64e= l-softmmu.mak index 8d9ab3ddc4b..3864daa7364 100644 --- a/configs/targets/mips64el-softmmu.mak +++ b/configs/targets/mips64el-softmmu.mak @@ -1,3 +1,2 @@ TARGET_ARCH=3Dmips64 TARGET_BASE_ARCH=3Dmips -TARGET_NEED_FDT=3Dy diff --git a/configs/targets/or1k-softmmu.mak b/configs/targets/or1k-softmm= u.mak index 432f855a30a..0341cb2a6b3 100644 --- a/configs/targets/or1k-softmmu.mak +++ b/configs/targets/or1k-softmmu.mak @@ -1,4 +1,5 @@ TARGET_ARCH=3Dopenrisc TARGET_SUPPORTS_MTTCG=3Dy TARGET_BIG_ENDIAN=3Dy +# needed by boot.c and all boards TARGET_NEED_FDT=3Dy diff --git a/configs/targets/ppc-softmmu.mak b/configs/targets/ppc-softmmu.= mak index f3ea9c98f75..53120dab41d 100644 --- a/configs/targets/ppc-softmmu.mak +++ b/configs/targets/ppc-softmmu.mak @@ -2,4 +2,3 @@ TARGET_ARCH=3Dppc TARGET_BIG_ENDIAN=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D gdb-xml/power-core.xml gdb-xml/power-fpu.xml gdb-xml/p= ower-altivec.xml gdb-xml/power-spe.xml -TARGET_NEED_FDT=3Dy diff --git a/configs/targets/ppc64-softmmu.mak b/configs/targets/ppc64-soft= mmu.mak index 1db8d8381d0..40881d93968 100644 --- a/configs/targets/ppc64-softmmu.mak +++ b/configs/targets/ppc64-softmmu.mak @@ -4,4 +4,5 @@ TARGET_BIG_ENDIAN=3Dy TARGET_SUPPORTS_MTTCG=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml= /power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml +# all boards require libfdt TARGET_NEED_FDT=3Dy diff --git a/configs/targets/riscv32-softmmu.mak b/configs/targets/riscv32-= softmmu.mak index d8b71cddcd4..338182d5b89 100644 --- a/configs/targets/riscv32-softmmu.mak +++ b/configs/targets/riscv32-softmmu.mak @@ -2,4 +2,5 @@ TARGET_ARCH=3Driscv32 TARGET_BASE_ARCH=3Driscv TARGET_SUPPORTS_MTTCG=3Dy TARGET_XML_FILES=3D gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xm= l gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-virtual.xml +# needed by boot.c TARGET_NEED_FDT=3Dy diff --git a/configs/targets/riscv64-softmmu.mak b/configs/targets/riscv64-= softmmu.mak index 7c0e7eeb429..f688ffa7bce 100644 --- a/configs/targets/riscv64-softmmu.mak +++ b/configs/targets/riscv64-softmmu.mak @@ -2,4 +2,5 @@ TARGET_ARCH=3Driscv64 TARGET_BASE_ARCH=3Driscv TARGET_SUPPORTS_MTTCG=3Dy TARGET_XML_FILES=3D gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xm= l gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-virtual.xml +# needed by boot.c TARGET_NEED_FDT=3Dy diff --git a/configs/targets/rx-softmmu.mak b/configs/targets/rx-softmmu.mak index 0c458b2d07c..706bbe6062c 100644 --- a/configs/targets/rx-softmmu.mak +++ b/configs/targets/rx-softmmu.mak @@ -1,3 +1,4 @@ TARGET_ARCH=3Drx TARGET_XML_FILES=3D gdb-xml/rx-core.xml +# all boards require libfdt TARGET_NEED_FDT=3Dy diff --git a/configs/targets/x86_64-softmmu.mak b/configs/targets/x86_64-so= ftmmu.mak index c5f882e5ba1..e12ac3dc59b 100644 --- a/configs/targets/x86_64-softmmu.mak +++ b/configs/targets/x86_64-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=3Dx86_64 TARGET_BASE_ARCH=3Di386 TARGET_SUPPORTS_MTTCG=3Dy -TARGET_NEED_FDT=3Dy TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D gdb-xml/i386-64bit.xml diff --git a/meson.build b/meson.build index 3ae95215083..365213e21f2 100644 --- a/meson.build +++ b/meson.build @@ -3051,14 +3051,20 @@ foreach target : target_dirs error('No accelerator available for target @0@'.format(target)) endif =20 - actual_target_dirs +=3D target config_target +=3D keyval.load('configs/targets' / target + '.mak') config_target +=3D { 'TARGET_' + config_target['TARGET_ARCH'].to_upper()= : 'y' } =20 - if 'TARGET_NEED_FDT' in config_target - fdt_required +=3D target + if 'TARGET_NEED_FDT' in config_target and not fdt.found() + if default_targets + warning('Disabling ' + target + 'due to missing libfdt') + else + fdt_required +=3D target + endif + continue endif =20 + actual_target_dirs +=3D target + # Add default keys if 'TARGET_BASE_ARCH' not in config_target config_target +=3D {'TARGET_BASE_ARCH': config_target['TARGET_ARCH']} @@ -3146,7 +3152,7 @@ genh +=3D custom_target('config-poison.h', command: [find_program('scripts/make-config-poison.s= h'), target_configs_h]) =20 -if fdt_required.length() > 0 and not fdt.found() +if fdt_required.length() > 0 error('fdt disabled but required by targets ' + ', '.join(fdt_required)) endif =20 diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index e9402a68a79..92ca396c195 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -648,8 +648,8 @@ build-tci: - make check-tcg =20 # Check our reduced build configurations -# requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblaze= el, -# mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64 +# requires libfdt: aarch64, arm, loongarch64, microblaze, microblazeel, +# or1k, ppc64, riscv32, riscv64, rx # does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86= _64 build-without-defaults: extends: .native_build_job_template @@ -665,7 +665,8 @@ build-without-defaults: --disable-qom-cast-debug --disable-strip TARGETS: alpha-softmmu avr-softmmu cris-softmmu hppa-softmmu m68k-soft= mmu - mips-softmmu mips64-softmmu mipsel-softmmu sparc-softmmu + mips-softmmu mips64-softmmu mipsel-softmmu mips64el-softmmu + ppc-softmmu sparc-softmmu sparc64-softmmu tricore-softmmu xtensa-softmmu xtensaeb-softmmu hexagon-linux-user i386-linux-user s390x-linux-user MAKE_CHECK_ARGS: check --=20 2.45.0