From nobody Mon Nov 25 12:20:58 2024 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=1715154703; cv=none; d=zohomail.com; s=zohoarc; b=XUstfxVem6t5oDkJMuXuO3q/NfF8cKHFP+ZR7ErOZztZOF+AmEMyuJpj3QDyY3ll44rWjpqTVkSXYMd7k6GlAK/ZrXqkExgm3DA/nXcAA4rEunDdv3MDn3xVhEZFm5qYP1tg6xCF/EzIcNh+Aeb2YznrLEMIB8O8DNchdOTy8Js= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154703; 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=Abjyl/HEi16Q8U+vYHLBpHeQKrEN0ASuTTcw3BTIrws=; b=gFOfwQLk9/sCizT0LysR2dKlDjGuwDO2vdzoIiGAy5OSbvLwbht+tMaIlIIt6d74YzHbtoQVJRhpmuQxnPB89bKoVolyczus8d6NhFsS3FewbQ4WkIJsyjU8rHjiWswLzva0ahryGxAaaPcjt3xH0sN/qKpwO0CBMeDB36nsc28= 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 171515470352173.8856916183571; Wed, 8 May 2024 00:51:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5M-0006tA-Na; Wed, 08 May 2024 03:51:33 -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 1s4c55-0006nW-5E for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:15 -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 1s4c53-0003cu-DM for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:14 -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-300-gQSdojxwMRCMpZHnNJ48bQ-1; Wed, 08 May 2024 03:51:11 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a59eea00cafso103465966b.1 for ; Wed, 08 May 2024 00:51:11 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id cx10-20020a170906c80a00b00a59fac165dfsm888483ejb.204.2024.05.08.00.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154672; 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=Abjyl/HEi16Q8U+vYHLBpHeQKrEN0ASuTTcw3BTIrws=; b=dxig78WiDNUiFMZgFmTp2TbPg3yjZgYzyD9Goh3SxJZNJP3QrVkSOBqt6jYX+1AkPzIa9R RUXTQC0hWYBV9GNC1lPmSZT5i/1M/xG+b2X4xfyUAmpPK35g9WjoRsyhMZayjdcqaXFXLc jt9rpQlL9uaaCAfPzUT8ALcW5RNmgK0= X-MC-Unique: gQSdojxwMRCMpZHnNJ48bQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154668; x=1715759468; 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=Abjyl/HEi16Q8U+vYHLBpHeQKrEN0ASuTTcw3BTIrws=; b=i4LHHrOXFD4hxLgCFoWuf4gi4nJ7+Xy/ZEZ7mkaZJfwn2xeRzsHRQiSxDTFOMwkE0k 1K2X/zxGXYvCfBANbY7qHjuH3pAneN0/YjMXSJyzeCYoAwyJzVi2dtCaXenNlsa7pS6C BlWjMrpVl2bxEOh+a8JeD/5p8WSNne71adPOxWiN5ttxMyDv8sWV/dgWvPwZmUMiiVCJ lmKVhhNoftmRznXARRbwMDBAR4BVjD7CQoulUlTmG2RkA4N6VoHdK1eygCMGQhaJI7Jr z5kjQm6wyNDiUlvot12oS3abt5aAW/ht78617ERi9P4RhJv9z0U8YRt1T58zcxGg+EgP wZzQ== X-Gm-Message-State: AOJu0Yw5NOacxjVocnjQalh9eZSZtTaT/TcWDE0yWVSo26H2bZem/YKq eZhdKw9jldQW9g1Nh99hxaKcJ4WRGOhgphS9ZcF31q+SreCJpPwtkaBvtuFRMK3N207IfSgauBG loCGNsPxaKUIbEKys4wFEapfST733+nPXJR5mg3FdPpLv5KCWP+pbpCAwBxa76u3AXd5feBIES9 1iKHfxtZe9ZqMH4tMHWKPDjjl4EYd+wkzof6KV X-Received: by 2002:a17:906:2451:b0:a59:ba2b:5915 with SMTP id a640c23a62f3a-a59fb9c6954mr148715266b.50.1715154667949; Wed, 08 May 2024 00:51:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLXo3NdlxOiqqt2SvyAj045QXX5nq3uWC8Dr2WBtOnX8nBS8WQINZ/tdf8BfhwjzZYPq/EUQ== X-Received: by 2002:a17:906:2451:b0:a59:ba2b:5915 with SMTP id a640c23a62f3a-a59fb9c6954mr148713666b.50.1715154667465; Wed, 08 May 2024 00:51:07 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 1/6] meson: pick libfdt from common_ss when building target-specific files Date: Wed, 8 May 2024 09:51:00 +0200 Message-ID: <20240508075105.15510-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-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: 1715154705214100003 Content-Type: text/plain; charset="utf-8" Avoid having to list dependencies such as libfdt twice, both on common_ss and specific_ss. Instead, just take all the dependencies in common_ss and allow the target-specific libqemu-*.fa library to use them. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 14 +++++++++++--- hw/arm/meson.build | 2 +- hw/loongarch/meson.build | 2 +- hw/mips/meson.build | 2 +- hw/openrisc/meson.build | 4 ++-- hw/ppc/meson.build | 4 +--- hw/riscv/meson.build | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 43da4923721..7ca0ba4987f 100644 --- a/meson.build +++ b/meson.build @@ -3868,15 +3868,23 @@ foreach target : target_dirs =20 target_common =3D common_ss.apply(config_target, strict: false) objects =3D common_all.extract_objects(target_common.sources()) - deps =3D target_common.dependencies() + arch_deps +=3D target_common.dependencies() =20 target_specific =3D specific_ss.apply(config_target, strict: false) arch_srcs +=3D target_specific.sources() arch_deps +=3D target_specific.dependencies() =20 + # allow using headers from the dependencies but do not include the sourc= es, + # because this emulator only needs those in "objects". For external + # dependencies, the full dependency is included below in the executable. + lib_deps =3D [] + foreach dep : arch_deps + lib_deps +=3D dep.partial_dependency(compile_args: true, includes: tru= e) + endforeach + lib =3D static_library('qemu-' + target, sources: arch_srcs + genh, - dependencies: arch_deps, + dependencies: lib_deps, objects: objects, include_directories: target_inc, c_args: c_args, @@ -3924,7 +3932,7 @@ foreach target : target_dirs emulator =3D executable(exe_name, exe['sources'], install: true, c_args: c_args, - dependencies: arch_deps + deps + exe['dependencies'], + dependencies: arch_deps + exe['dependencies'], objects: lib.extract_all_objects(recursive: true), link_depends: [block_syms, qemu_syms], link_args: link_args, 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/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/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/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/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/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')) --=20 2.45.0 From nobody Mon Nov 25 12:20:59 2024 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=1715154729; cv=none; d=zohomail.com; s=zohoarc; b=c4HA6fv0w2UBMlmqCxr+tZP712Us38kwn1FV1SQD/ZtP7KXSrTHa7nM/fEAKr1IOBmOJveUR+3S6wzJVCUA7bWasomO3Magx+AZghbm8jLl9S+Z4u0vV8HNEvPdkciQ+jVOhIR1qHdZGzrI9NxU5oo0OfL/TSQw1VE0M7TDa9WM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154729; 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=aF6SQzXi+7Oush+66RT8SAXzChZcE8LPXmBbHUWcUJI=; b=GZOLpExhn9DEVR3xLEleqTUljWMoSp0AgxtbzZljalppvUggCGKbc9cLx2SEV5xMb9eUCI1DuoLvmaa/bfUSdCOosFrBY18DJt/rGT/j6REbpYjOys1PgXKJDjC5Q0OAPlsT/Z0RsRuiX1MSqE3v93ijRkvyfAuEjtPISqtNrNg= 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 1715154729508503.3007745755069; Wed, 8 May 2024 00:52:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5f-00071w-Et; Wed, 08 May 2024 03:51:55 -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 1s4c57-0006nn-DM for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:17 -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 1s4c55-0003dC-LU for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:17 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-V8TBXfEGPHi6a5tz_qCzgw-1; Wed, 08 May 2024 03:51:13 -0400 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-572a0c5ece9so2210010a12.2 for ; Wed, 08 May 2024 00:51:13 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id d25-20020aa7ce19000000b00572a7127cb0sm7308880edv.50.2024.05.08.00.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154674; 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=aF6SQzXi+7Oush+66RT8SAXzChZcE8LPXmBbHUWcUJI=; b=b5HttNku8EjwZOSBNaN7Ze+LIEa+qEJCsI8aVQQUWhBxOtbEEgiSiRI2hCa39quUF/AXdp 1s82V0/GrU6y5rBvAXPsZaVB2AHRLGywarmDvCjyJQScs+7sR76T0QqTpFF/Y783VpkNh3 sri+AjCmR1UsT8ipuSO377Jmc5H5/EY= X-MC-Unique: V8TBXfEGPHi6a5tz_qCzgw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154671; x=1715759471; 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=aF6SQzXi+7Oush+66RT8SAXzChZcE8LPXmBbHUWcUJI=; b=u6Y2izUvVCobd1c2qQn6Olj+4vJ52gZMDXwnMQ2xOrslGd4zqoWSi0ROF+k6bHbLa6 q+jGoGo1l7sf2FyTvWFUhE9Ba9HDxvGAvrAyIsUFAL0BpvKyLrOq6DHUtPSqpOV8OWYG Pxc8I5YXc88maPba+tIrxMnU7ohR4cBy0mnFAkqtzTGa6NAReT2ifjZyZLhxzKSTZGTn 8DoAZ2yMiFnccUNCRitjo7Y/QaksCbtD4QG0zeRt4UlLprX5UIDsV9mExovhe+4vXqn1 hJO3tl2AHF/r9uVKn/WzoogC6qkUIhbNCGZ15kKwlff8CL0xWhTgU0AkQD8i77y2ueNp t9aQ== X-Gm-Message-State: AOJu0Yxvlac6hpz8ckBr/xXyM1EpKL+Ff9m/7G69X4e8rI0opkxB326F jI5laqxNA3fbeBobqToIdrwV9OnPb7Z9Xr9gcPviV2nfGL18su71QRVWUxLsHjlGGWr16nqnMjX Tpq9VQ8F5qJB7sZJ/fl/MlrK7ymyxojzUNepBjLWaeV1j5LBCgfgaOKFEmQflcy86eNi2H4iDfY 8NwRukQnUje6s1CnMQ5MPouqvwDjVgakElJn6A X-Received: by 2002:a50:c058:0:b0:56e:2daf:1ee6 with SMTP id 4fb4d7f45d1cf-5731d9d453bmr1040436a12.16.1715154671595; Wed, 08 May 2024 00:51:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGV01I27rqhAqFQss75UdBEuV42V+CYWvqMC+VjX2bLX6QqiYcVrGE63vRD1q9xVDkJbGnwkA== X-Received: by 2002:a50:c058:0:b0:56e:2daf:1ee6 with SMTP id 4fb4d7f45d1cf-5731d9d453bmr1040426a12.16.1715154671247; Wed, 08 May 2024 00:51:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 2/6] meson: move libfdt together with other dependencies Date: Wed, 8 May 2024 09:51:01 +0200 Message-ID: <20240508075105.15510-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-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: 1715154731336100003 Content-Type: text/plain; charset="utf-8" Move the libfdt detection code together with other dependencies instead of keeping it with subprojects. This has the disadvantage of performing the detection even if no target requires libfdt; but it has the advantage that Kconfig will be able to observe the availability of the library. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 79 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/meson.build b/meson.build index 7ca0ba4987f..2e7e2b15406 100644 --- a/meson.build +++ b/meson.build @@ -1858,6 +1858,34 @@ if numa.found() and not cc.links(''' endif endif =20 +fdt =3D not_found +fdt_opt =3D get_option('fdt') +if fdt_opt =3D=3D 'enabled' and get_option('wrap_mode') =3D=3D 'nodownload' + fdt_opt =3D 'system' +endif +if fdt_opt in ['enabled', 'system'] or (fdt_opt =3D=3D 'auto' and have_sys= tem) + 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 'system' + fdt_opt =3D get_option('wrap_mode') =3D=3D 'nodownload' ? 'disabled' := 'internal' + fdt =3D not_found + else + error('system libfdt is too old (1.5.1 or newer required)') + endif +endif +if fdt_opt =3D=3D 'internal' + assert(not fdt.found()) + libfdt_proj =3D subproject('dtc', required: true, + default_options: ['tools=3Dfalse', 'yaml=3Ddis= abled', + 'python=3Ddisabled', 'default= _library=3Dstatic']) + fdt =3D libfdt_proj.get_variable('libfdt_dep') +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 +2227,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()) @@ -3025,14 +3054,16 @@ 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 + if 'TARGET_NEED_FDT' in config_target and not fdt.found() fdt_required +=3D target + 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']} @@ -3120,6 +3151,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 + error('fdt disabled but required by targets ' + ', '.join(fdt_required)) +endif + ############### # Subprojects # ############### @@ -3130,44 +3165,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') @@ -4419,7 +4416,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_opt =3D=3D 'internal' ? 'inter= nal' : fdt} summary_info +=3D {'libcap-ng support': libcap_ng} summary_info +=3D {'bpf support': libbpf} summary_info +=3D {'rbd support': rbd} --=20 2.45.0 From nobody Mon Nov 25 12:20:59 2024 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=1715154734; cv=none; d=zohomail.com; s=zohoarc; b=B/cZl2O0qjMWx2bbD6BEL/G3275HNL/KZVB6Z+9iCPuVHV7zCVofiWdvrNmwQhgy2l4t33H3d0dwxrhFLWJkamATdKJEcvilwOwskLhWy3a7Jdc74UIDG0to90aECy5YSvM72idnVV1ZYx/83QwF88a1ajn6E+umShUfJCdXR1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154734; 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=JLI2MH3fyDMFuWedIEfUPyOymOXv08hc0mnpF773TEI=; b=Sj9mUD7L/OUqXTrohYWi94IfvwxdoNV8FvRqVVTY7nhWJNbnq7jukLwxQgXVjeFgcs5qwUnbssptm37Eqae+Dz/6OYlDabKuafpUgf90YxkuzVTzIj7T449JxMpdvmHOPjIvrmpiRDaW4SsAjZPzvpmo7pEBGnOJNddtOjXqwRg= 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 1715154734601893.1468679364896; Wed, 8 May 2024 00:52:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5u-0007Qa-Sk; Wed, 08 May 2024 03:52:06 -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 1s4c59-0006oA-H4 for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:22 -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 1s4c57-0003dV-Ki for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:19 -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-687-G5lZtUiqPQG5-ngFXSMc8Q-1; Wed, 08 May 2024 03:51:15 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a59efa9f108so86894766b.2 for ; Wed, 08 May 2024 00:51:15 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id gf12-20020a170906e20c00b00a5884e0ad1asm7406037ejb.33.2024.05.08.00.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154676; 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=JLI2MH3fyDMFuWedIEfUPyOymOXv08hc0mnpF773TEI=; b=Dday36lisamrkpWkk1PGTRjqlhS9R04521sRn9zSQQxgmcPBQHd6fLr+5z1cnuKt/ojnT5 SUF7/cZgPEuoz1wB4Qduiqf4RhwyDR2HEB7vFJKMTqLXzC/PevYEAbGUelE/xXy5QObCF1 n9pAH7xDtCJ7k57KpSXOHuiw+GoFeJE= X-MC-Unique: G5lZtUiqPQG5-ngFXSMc8Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154674; x=1715759474; 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=JLI2MH3fyDMFuWedIEfUPyOymOXv08hc0mnpF773TEI=; b=qKYf+34C5y8P80wmWhC7/+BC/Lsv72ZKHiipEOrywlnxin9YDTYw8XGi4BKQWBLRnj xetObupjjUcnt041KNifgkJDKUMUbJPxH+Xbs2DX4K1mRqZm9d64ooRqEbk8PxN77Hr5 W3u18lKOdFfYPv3pMzn6VQasKNag5fLI5zHZclZbXCA7fa5FwsvjfUDOLlEKgAGCErOd T+LH3ZRg9d85P57xkCxY9PvJC7Mi8HNIfLVqiKiCgcIaaEZDIjTxHYS+1uq9fZc98V3Z DD7FtU0cuxeU4lmhqrgf2DsOwY6n4UajgokJz0h4YMAfXWhdMhXLShwLoMQTH/5AZeOV Qwsg== X-Gm-Message-State: AOJu0YzuDF2Whcf+aZKbaV7EDgrgGuwoLxHyplNqdUXpcfZCejwisMUf TQGCCd5ca1ZzyQi23msPWb/27ojpcAv1kGlrl2Z1MjutryEB9wxCb8UjHtAu1p9IPCbqMDicjTd FzgPQ9spBbGpX7QOUd/79EM+9AiDOCiMghLNvgdcxp+fOfLwXFHPnlBETIIxgulG9vGHXKFm02B YsPK47JuAGuIcVl6JgAYbgZcVJB9GGi/tYLvBn X-Received: by 2002:a17:906:358c:b0:a59:70f0:7706 with SMTP id a640c23a62f3a-a59fb9f443dmr97039766b.74.1715154673914; Wed, 08 May 2024 00:51:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGspPyvXIl4Yyz9bvn11PrHYyOLEuuqxomYodTOtxMiZmiC2Q6UxFBWhpp2HxaT0RlNH5n0pQ== X-Received: by 2002:a17:906:358c:b0:a59:70f0:7706 with SMTP id a640c23a62f3a-a59fb9f443dmr97038166b.74.1715154673499; Wed, 08 May 2024 00:51:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 3/6] kconfig: allow compiling out QEMU device tree code per target Date: Wed, 8 May 2024 09:51:02 +0200 Message-ID: <20240508075105.15510-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-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: 1715154735345100001 Content-Type: text/plain; charset="utf-8" Introduce a new Kconfig symbol, CONFIG_DEVICE_TREE, that specifies whether to include the common device tree code in system/device_tree.c and to link to libfdt. For now, include it unconditionally if libfdt is available. Signed-off-by: Paolo Bonzini --- meson.build | 1 + include/monitor/hmp.h | 1 + include/sysemu/device_tree.h | 1 - monitor/hmp-cmds.c | 17 +++++++++++++++++ system/device_tree-stub.c | 10 ++++++++++ system/device_tree.c | 14 -------------- Kconfig.host | 4 ++++ hw/core/Kconfig | 9 ++++++++- hw/core/meson.build | 2 +- system/meson.build | 4 +++- 10 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 system/device_tree-stub.c diff --git a/meson.build b/meson.build index 2e7e2b15406..d8f259d2610 100644 --- a/meson.build +++ b/meson.build @@ -2990,6 +2990,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/include/monitor/hmp.h b/include/monitor/hmp.h index f4cf8f6717d..954f3c83ad9 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -180,5 +180,6 @@ void hmp_ioport_write(Monitor *mon, const QDict *qdict); void hmp_boot_set(Monitor *mon, const QDict *qdict); void hmp_info_mtree(Monitor *mon, const QDict *qdict); void hmp_info_cryptodev(Monitor *mon, const QDict *qdict); +void hmp_dumpdtb(Monitor *mon, const QDict *qdict); =20 #endif diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h index 8eab3959341..eb601522f88 100644 --- a/include/sysemu/device_tree.h +++ b/include/sysemu/device_tree.h @@ -134,7 +134,6 @@ int qemu_fdt_add_path(void *fdt, const char *path); } while (0) =20 void qemu_fdt_dumpdtb(void *fdt, int size); -void hmp_dumpdtb(Monitor *mon, const QDict *qdict); =20 /** * qemu_fdt_setprop_sized_cells_from_array: diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 871898ac46b..ea79148ee85 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -22,6 +22,7 @@ #include "monitor/monitor-internal.h" #include "qapi/error.h" #include "qapi/qapi-commands-control.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" #include "qemu/cutils.h" @@ -443,3 +444,19 @@ void hmp_info_mtree(Monitor *mon, const QDict *qdict) =20 mtree_info(flatview, dispatch_tree, owner, disabled); } + +#if defined(CONFIG_FDT) +void hmp_dumpdtb(Monitor *mon, const QDict *qdict) +{ + const char *filename =3D qdict_get_str(qdict, "filename"); + Error *local_err =3D NULL; + + qmp_dumpdtb(filename, &local_err); + + if (hmp_handle_error(mon, local_err)) { + return; + } + + monitor_printf(mon, "dtb dumped to %s", filename); +} +#endif diff --git a/system/device_tree-stub.c b/system/device_tree-stub.c new file mode 100644 index 00000000000..bddda6fa37a --- /dev/null +++ b/system/device_tree-stub.c @@ -0,0 +1,10 @@ +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" + +#ifdef CONFIG_FDT +void qmp_dumpdtb(const char *filename, Error **errp) +{ + error_setg(errp, "This machine doesn't have a FDT"); +} +#endif diff --git a/system/device_tree.c b/system/device_tree.c index eb5166ca360..2e38259d34f 100644 --- a/system/device_tree.c +++ b/system/device_tree.c @@ -668,20 +668,6 @@ void qmp_dumpdtb(const char *filename, Error **errp) } } =20 -void hmp_dumpdtb(Monitor *mon, const QDict *qdict) -{ - const char *filename =3D qdict_get_str(qdict, "filename"); - Error *local_err =3D NULL; - - qmp_dumpdtb(filename, &local_err); - - if (hmp_handle_error(mon, local_err)) { - return; - } - - info_report("dtb dumped to %s", filename); -} - void qemu_fdt_randomize_seeds(void *fdt) { int noffset, poffset, len; diff --git a/Kconfig.host b/Kconfig.host index f6a2a131e6c..a0d4a52131e 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -23,6 +23,10 @@ config IVSHMEM config TPM bool =20 +config FDT + bool + select DEVICE_TREE + config VHOST_USER bool =20 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/system/meson.build b/system/meson.build index 25e21172505..a296270cb00 100644 --- a/system/meson.build +++ b/system/meson.build @@ -32,7 +32,9 @@ 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_tree.c')], + if_false: files('device_tree-stub.c')) if host_os =3D=3D 'linux' system_ss.add(files('async-teardown.c')) endif --=20 2.45.0 From nobody Mon Nov 25 12:20:59 2024 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=1715154730; cv=none; d=zohomail.com; s=zohoarc; b=Ab/oXCM5bsi1R+S8VW6U0q8t+Bgt2Fq+bK9/0Qdgy24k7fRPQ2REiLhKDNHI43/sLphzhKArd1kJvlV3+kjgDP4ANDtVEoIQjYA8rzQSra+5tzJw53buiNHO77vVfGLeEp95ynaIEhn+6TRlhxImShXZj0FHU8r61UGlyz7jAJ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154730; 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=/napxeXYVJfEIk7mLPLLFKGMsaq0EZv1d5O6ZzOMJfo=; b=S51pizE6me0AQj71jTEgfFFTk7n465zPcxUkIgTu4VZYJT3DgtGy+05Gv5kFTvnXWJ10L5vIYbs+VoNHMeL3MZbWNdLLoquyz/781rmLbojJkOmBbxPj7Flb7NzqnYRAvq0Ft+38T1MZTAaiyrV6oBdBq+R/kadd4IE+MKABfDU= 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 1715154730097364.8216393603534; Wed, 8 May 2024 00:52:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5R-0006uW-0G; Wed, 08 May 2024 03:51:37 -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 1s4c5C-0006oP-N6 for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:26 -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 1s4c5A-0003dl-GR for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:22 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-uip_iEpzMl6pUwsRVIiZpA-1; Wed, 08 May 2024 03:51:18 -0400 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5725fffb621so1532360a12.0 for ; Wed, 08 May 2024 00:51:18 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id t25-20020a056402241900b005725de35790sm7316323eda.61.2024.05.08.00.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154680; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/napxeXYVJfEIk7mLPLLFKGMsaq0EZv1d5O6ZzOMJfo=; b=bW3kZwktlzQdzlY9fRmZICAttQhYgPe4+EssSK0bKjXfmmA+6JzAwMuTL9Ni9gvFGsiAD1 v8URVZmnofuzPlyj48A4V4WwEP4mcNDVHPfgO9omsK2EFKT/3127sonjVbMrgx+J0EBsWq +Jl87JsswGn8igfKgVOOnfjtl3UZJDs= X-MC-Unique: uip_iEpzMl6pUwsRVIiZpA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154676; x=1715759476; 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=/napxeXYVJfEIk7mLPLLFKGMsaq0EZv1d5O6ZzOMJfo=; b=M5b+kyuiZpNVUBYltrOjVhv8TcHpoUkk7S62eW1+lpIlyYC57fiJZTxsE9Ll2DKZOB tM67rP1VEo9ochSM273zNRTjfc9PHxtxCMnJblAW5yo4+t5kjakX7+khkBUS5ijgNnRx 0gSAqdyqz397mXvaL7vjLATSMusJTRwdqoKuQr3CbfDfJMiqSEV/e8Uk/JfE5KPqTnRn rJ/olXPbl6px6B/lbbWeD1dnMwq/4R8BXJyKy7q0eDpxZPcThIXIr2XXthYmmgfLuAMU BmK5Vlz5XILlj9pnutNLs+dzqBbEN/zgGFZshttJeQuFaojN9fdJaZnNvJ6xGF44krzi GO9A== X-Gm-Message-State: AOJu0YzOKfx/yCZlyGpu1f6m8GYncpoSJAGhuqIMldRHX0tvtBxCPGE2 uOn3cMyOrGDzUhs+Ix/72OGXu/NAl2xRyjGulhzucVuJG230sLlUa1wg7eDRe6LfVfRVmHsDyRw DTyA7GFimNjKtBxLKRj9nBbBdj3p4LDlAYd35PZSKIZMEZ+O61mLfyeNiHOXF8wKm4xiEu+f71r 3Rp3u241dqmDFk+CGF+m9x0UGw1/3lEscjmTJc X-Received: by 2002:a50:d590:0:b0:56f:e75b:83aa with SMTP id 4fb4d7f45d1cf-5731d99b69cmr1376906a12.6.1715154676707; Wed, 08 May 2024 00:51:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4Ue/4E4tIPoaGrBBp0z14WUJUMr3MvpP9s6dIdbdnfBOe6UYzqNSsfHU+XsrkLw+0g4+bGg== X-Received: by 2002:a50:d590:0:b0:56f:e75b:83aa with SMTP id 4fb4d7f45d1cf-5731d99b69cmr1376891a12.6.1715154676370; Wed, 08 May 2024 00:51:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 4/6] kconfig: express dependency of individual boards on libfdt Date: Wed, 8 May 2024 09:51:03 +0200 Message-ID: <20240508075105.15510-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset=UTF-8 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: 1715154731369100004 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 then include the common code in the build via "select DEVICE_TREE", which will also as tell meson to link with libfdt. This allows building non-microvm x86 emulators without having libfdt available. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- Kconfig.host | 1 - hw/arm/Kconfig | 5 +++++ hw/i386/Kconfig | 3 ++- hw/loongarch/Kconfig | 3 ++- hw/mips/Kconfig | 3 ++- hw/openrisc/Kconfig | 2 ++ hw/ppc/Kconfig | 15 ++++++++------- hw/riscv/Kconfig | 4 ++++ hw/rx/Kconfig | 3 ++- hw/xtensa/Kconfig | 1 + target/arm/Kconfig | 2 ++ target/microblaze/Kconfig | 1 + target/openrisc/Kconfig | 1 + target/riscv/Kconfig | 2 ++ 14 files changed, 34 insertions(+), 12 deletions(-) diff --git a/Kconfig.host b/Kconfig.host index a0d4a52131e..17f405004b3 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -25,7 +25,6 @@ config TPM =20 config FDT bool - select DEVICE_TREE =20 config VHOST_USER bool 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/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/mips/Kconfig b/hw/mips/Kconfig index 9bccb363eb9..a7f26edebe8 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -80,9 +80,10 @@ config MIPS_CPS config MIPS_BOSTON bool default y - depends on MIPS64 && !TARGET_BIG_ENDIAN + depends on MIPS64 && !TARGET_BIG_ENDIAN && FDT imply PCI_DEVICES imply TEST_DEVICES + select DEVICE_TREE select FITLOADER select MIPS_CPS select PCI_EXPRESS_XILINX 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/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/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/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/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 Mon Nov 25 12:20:59 2024 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=1715154742; cv=none; d=zohomail.com; s=zohoarc; b=gMrGa8XFT3PlTu1NSsGYtdTzt5xRa2BRHWX3odc2/GDkzxyi+FHN9iEhJo/aGFGa5EWJwwGrvoovErAhJHh01rIXa/knS4eg7wiCm0VgpQscn/12L9tGvu6BbgaDRBGTMbbGOwNR0NfwglnxPA70gT/S8lctLemFWwAQI8N3QzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154742; 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=MIrdhYYSEjHQf62aM9cNEMsXn+yUWKJciAkldDNdnXg=; b=FYMTRxvnjoKCnWkofEK6RPN25rxY4X4FGeDOxtAZeQVoiKv1+4DwepNdV9GRQgMxaL7vnyjkEdVBx8OzYYsOf6nF/ZOHpd5Akj6OWZKNjXwp+vfa5AJx1KU6s7xAwGC3fwAnQ+j1Rc5al7qRVZ2C6NzHnwp6b6IRsLZc+uC6gfk= 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 1715154742903555.7923173753819; Wed, 8 May 2024 00:52:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5j-00072k-4P; Wed, 08 May 2024 03:51:57 -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 1s4c5H-0006r3-Il for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:28 -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 1s4c5E-0003eK-LX for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:27 -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-263-SLZYD8WWO7iI0q4No-MNNA-1; Wed, 08 May 2024 03:51:21 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a599b55056bso229311066b.0 for ; Wed, 08 May 2024 00:51:21 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id gc21-20020a170906c8d500b00a59a7bac0easm5175452ejb.164.2024.05.08.00.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154682; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MIrdhYYSEjHQf62aM9cNEMsXn+yUWKJciAkldDNdnXg=; b=Z852JXGeUIqxR7H3zXuCxbBBmqXClONRhpkOeZyy7AFB2I+JeMNx//cNsOIzo3XXE2P5en G7SHgkEY5v315PfPRBilxh8XuNbKJaHyo4dtEooDYCkhC2Yo2ooqR+tVakWHOIFFdckW4e +Df6cvfgNXHez22BjsByWgOteA3SH1U= X-MC-Unique: SLZYD8WWO7iI0q4No-MNNA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154679; x=1715759479; 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=MIrdhYYSEjHQf62aM9cNEMsXn+yUWKJciAkldDNdnXg=; b=Ncevx2p6wzZOqhPMSrXSwWT+hbq5/J1s2PsSX8/G9XCPIGmdRv6+j3lQvyh2I+Uoq7 YTO5Jhxo7AXSX0svT/v5yyLLvewSZb7Dosh4RbG7/Nv4amCQrAJl3XqbJAvbgibHWq/D 2S7ktUXdDv88+39qHpXH+dZMgbMiY/AMVTcMb2gr9VWyDvED0Xr1sjqZ2HMmQ3bgxlAe tj3toF/ZbdISEV6emzVY5+KHKSoUrJbFgcrzxW+E+d1KISwqZljxFjjnlukaCyi3F2oS JBAb2fL+wzQaioXHluZguMw13cNxlCCrcutWeaxjI4ILuPg+jv+RCV3HZdYSxT/905xN EmIA== X-Gm-Message-State: AOJu0Yy7AGb18mACxA/Gkn1OQCzMpS+CqTZw3k4qsdBfvPEdUNrZ9b4u 34KdwYhi3F89wGUVYuzDBvBvIZ86+7nSDXC8oiJlVZaN62ADcg6SlGqe09EhlPTMJ58Yo1mKn44 zl6QWj2K064j5l22z41PUWE8zSDcSjdBAMwRtSRiG7texL9Gc5XXv6TctYuFILcZ91Yr5T68gKZ i6UGFUD0Pd7U3ICrj7HZxCvpIwe9qAOs01ZHvs X-Received: by 2002:a17:906:3544:b0:a59:c319:f1de with SMTP id a640c23a62f3a-a59fb92142cmr99529466b.15.1715154679285; Wed, 08 May 2024 00:51:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9qtpm71ABB/KR77HCLxnkvEHENcI++3tppPDHb8nbif/m/fxSSMUMWvL2P/K/ZrzspD1Dog== X-Received: by 2002:a17:906:3544:b0:a59:c319:f1de with SMTP id a640c23a62f3a-a59fb92142cmr99528566b.15.1715154678891; Wed, 08 May 2024 00:51:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 5/6] hw/xtensa: require libfdt Date: Wed, 8 May 2024 09:51:04 +0200 Message-ID: <20240508075105.15510-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset=UTF-8 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: 1715154743358100001 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. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- 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 Mon Nov 25 12:20:59 2024 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=1715154737; cv=none; d=zohomail.com; s=zohoarc; b=WRmW1vMYdXkuorCZkqOrh8z9bOOJF9QsZxvSXnC6tNn35DERwQJuu8R5+HxxMyKHAPKlY/6RGhcxa0xWh0zvq29wsw//tTlt+T0FBOC8dWn90ZNp5VmauW3slNG8Ou2aJbx/v9ulhM9m6PxI9TUIr8dmcK3E5U5jfSlu4XJr6iw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715154737; 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=EHfp4hyic82q83vzDg4ggug031W0Z3Ar7QGHLKU1pSg=; b=Vapcd0QTu6b9RFb78MqdlorgBTDGaR40LYPD1uQJzgZGJPL8XUo5xVDyxsmWOB3mJq7u7IX3Wwi1zeGeyPCRBwC/l8xGMqlxrPl75uWe7g+Z4QoU+WWkG1zXx26G+Dcsp2/9QR5KvJxM1XcJCDhFLsI6WecKlnDZy+6dXqkaTpY= 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 1715154737691766.8787860767153; Wed, 8 May 2024 00:52:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4c5y-0007d4-3S; Wed, 08 May 2024 03:52:10 -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 1s4c5M-0006tg-IL for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:32 -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 1s4c5G-0003eX-JU for qemu-devel@nongnu.org; Wed, 08 May 2024 03:51:30 -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-138-ATWlCSg4OGqKgV_SG-9b8w-1; Wed, 08 May 2024 03:51:24 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a59aedbd9a9so266999266b.0 for ; Wed, 08 May 2024 00:51:24 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id kh24-20020a170906f81800b00a59bf40ba6dsm4256676ejb.7.2024.05.08.00.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715154686; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EHfp4hyic82q83vzDg4ggug031W0Z3Ar7QGHLKU1pSg=; b=NbxMFf75UqEuSCi4bBSf+Fdthl7UnNYZfSPfr8dwczYlL5lWtqNzzQKquWlMwuCF+ICL3n ZTxNoC7na4Wzp76jqvHN1GXm8QMV0bHtldUXNP2o4CvynzgmFHX8DGar16RzLxauhdFLb7 kDX3xYrV3ZasXlmwjY2JJJHGW+w2I94= X-MC-Unique: ATWlCSg4OGqKgV_SG-9b8w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715154682; x=1715759482; 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=EHfp4hyic82q83vzDg4ggug031W0Z3Ar7QGHLKU1pSg=; b=Lh5UhrKTYwrkAVYEp9Ok6ECqtLF/TCkyFI8jT9juSQ1FusGXjev1U6lxj3df4L8Fnb 2btWJGa6nxwKyYB6sdooRBQm2Tcsp4upsseEGFpH9jpF2N1omRoXgWYiMILgKjPtsKnj rSX3CJDvfS9IwvdyGUnwk5NGF2gk1e0ezTq0gfZZntHcrhEXkFg+vK3Lnt3XMtZIMCN5 exjvtEq+3IRtKoA9F3FH2AhXpeEG++bqu0JM/rQxnfjFZH4/9pDmP4P/9NemxB+MmaMI aPeWQ6ZByB0Q0MEFnuD3pPSf9PDgTzuqF599QrK5/7HDqU5XF8GNZXwdx/AlwL27blNs S1VQ== X-Gm-Message-State: AOJu0YwdkiZnw/Ttb+IMDkFqRwthU0oP0se+57jphEGuozUDyZUsTokD iT5W1DX2o91C1recNny8MmiYDEGrmHytbOBDNVHdz67S7LtRRBqyl9V3z/m/2VRXuxkDydGFJ8Y 3M1y22psa38mBcr7uxCm/Jo4x65iTd/myvQRUAKkN0RbZcY+lL5oK2qfoTP0bqVQPGvYZ6a1yH/ A1Q7Hwz7++0E79BgpIDkMRKjDXZGAzhyCth70/ X-Received: by 2002:a17:906:c795:b0:a59:8cd2:5b2c with SMTP id a640c23a62f3a-a59fb95d98dmr100844366b.39.1715154682176; Wed, 08 May 2024 00:51:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZcTnzPQRmpanHE3pOoAg/8fe+TT0COPQJMYqgPSPqm5bkgFP5U/Mz+tB7xe3Yrud9EChOsA== X-Received: by 2002:a17:906:c795:b0:a59:8cd2:5b2c with SMTP id a640c23a62f3a-a59fb95d98dmr100842866b.39.1715154681764; Wed, 08 May 2024 00:51:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH 6/6] configs: disable emulators that require it if libfdt is not found Date: Wed, 8 May 2024 09:51:05 +0200 Message-ID: <20240508075105.15510-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240508075105.15510-1-pbonzini@redhat.com> References: <20240508075105.15510-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset=UTF-8 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: 1715154739341100007 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. Those emulators will be skipped if libfdt is disabled, or if it is "auto" and not found and --disable-download is passed; unless the target is mentioned explicitly in --target-list, in which case the build will fail. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- 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 | 6 +++++- .gitlab-ci.d/buildtest.yml | 8 ++++---- 16 files changed, 19 insertions(+), 9 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 d8f259d2610..b8b3e7d73f5 100644 --- a/meson.build +++ b/meson.build @@ -3059,7 +3059,11 @@ foreach target : target_dirs config_target +=3D { 'TARGET_' + config_target['TARGET_ARCH'].to_upper()= : 'y' } =20 if 'TARGET_NEED_FDT' in config_target and not fdt.found() - fdt_required +=3D target + if default_targets + warning('Disabling ' + target + ' due to missing libfdt') + else + fdt_required +=3D target + endif continue 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