From patchwork Fri Sep 18 20:47:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 304974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC499C43464 for ; Fri, 18 Sep 2020 21:23:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EDA022208 for ; Fri, 18 Sep 2020 21:23:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RwkCACPd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EDA022208 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNr6-0005YB-HH for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 17:23:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNIv-00034b-19 for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNIs-0006RY-Ne for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462102; 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=7fg4TsMMjf7HRn66+a8X8Q8KFOO8EknVqk/C/btKAjw=; b=RwkCACPdvTduOiz4kgNXl+cK6ZDqvaKzX1Q2rkLn8P6qOhBScURhv/QcSq/K7nj+wmeeYZ +rceAN/4ScD4rtmh8I89MU06t1bL0/ZPc3o3Er0dq4Va2zLe5UbkB//xVD0NIEfBasXT+5 yqphJLVx2y7rNfguEfzDcvn5b/V7/RU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-306-QykwkBsFNUmYTrRFby1aFA-1; Fri, 18 Sep 2020 16:48:13 -0400 X-MC-Unique: QykwkBsFNUmYTrRFby1aFA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E761510A7AE2; Fri, 18 Sep 2020 20:48:12 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6276E61177; Fri, 18 Sep 2020 20:48:10 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 1/6] meson: convert pc-bios/s390-ccw Date: Sat, 19 Sep 2020 00:47:54 +0400 Message-Id: <20200918204759.225810-2-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 00:20:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Use a fake subproject: this is a simple workaround to avoid the incompatible flags (such as gprof) that are set globally for the rest of QEMU. Signed-off-by: Marc-André Lureau --- configure | 2 - pc-bios/meson.build | 4 + pc-bios/s390-ccw/Makefile | 62 ------------ pc-bios/s390-ccw/meson.build | 177 +++++++++++++++++++++++++++++++++++ pc-bios/s390-ccw/netboot.mak | 62 ------------ subprojects/s390-ccw | 1 + 6 files changed, 182 insertions(+), 126 deletions(-) delete mode 100644 pc-bios/s390-ccw/Makefile create mode 100644 pc-bios/s390-ccw/meson.build delete mode 100644 pc-bios/s390-ccw/netboot.mak create mode 120000 subprojects/s390-ccw diff --git a/configure b/configure index 7564479008..3a8733c9be 100755 --- a/configure +++ b/configure @@ -6462,7 +6462,6 @@ fi if test "$cpu" = "s390x" ; then write_c_skeleton if compile_prog "-march=z900" ""; then - roms="$roms s390-ccw" # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. if test -e "${source_path}/.git" ; then @@ -7863,7 +7862,6 @@ LINKS="Makefile" LINKS="$LINKS tests/tcg/lm32/Makefile" LINKS="$LINKS tests/tcg/Makefile.target" LINKS="$LINKS pc-bios/optionrom/Makefile" -LINKS="$LINKS pc-bios/s390-ccw/Makefile" LINKS="$LINKS roms/seabios/Makefile" LINKS="$LINKS pc-bios/qemu-icon.bmp" LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit diff --git a/pc-bios/meson.build b/pc-bios/meson.build index a0d21be432..e5139b3ef5 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -91,3 +91,7 @@ endif subdir('descriptors') subdir('keymaps') + +if host_machine.cpu_family() == 's390x' and cc.has_argument('-march=z900') + subproject('s390-ccw') +endif diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile deleted file mode 100644 index 3eb785048a..0000000000 --- a/pc-bios/s390-ccw/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -all: build-all -# Dummy command so that make thinks it has done something - @true - -include ../../config-host.mak -CFLAGS = -O2 -g - -quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) -cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null > /dev/null \ - 2>&1 && echo OK), $1, $2) - -VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.sh %.rc Kconfig% %.json.in -set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1))) -$(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) - -# Flags for dependency generation -QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d - -%.o: %.c - $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ - -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -%.o: %.S - $(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ - -c -o $@ $<,"CCAS","$(TARGET_DIR)$@") - -.PHONY : all clean build-all - -OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ - virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o - -QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS)) -QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float -QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing -QEMU_CFLAGS += -fno-asynchronous-unwind-tables -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -LDFLAGS += -Wl,-pie -nostdlib - -build-all: s390-ccw.img s390-netboot.img - -s390-ccw.elf: $(OBJECTS) - $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@") - -STRIP ?= strip - -s390-ccw.img: s390-ccw.elf - $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") - -$(OBJECTS): Makefile - -ifneq ($(wildcard $(SRC_PATH)/roms/SLOF/lib/libnet),) -include $(SRC_PATH)/pc-bios/s390-ccw/netboot.mak -else -s390-netboot.img: - @echo "s390-netboot.img not built since roms/SLOF/ is not available." -endif - -ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) --include $(ALL_OBJS:%.o=%.d) - -clean: - rm -f *.o *.d *.img *.elf *~ *.a diff --git a/pc-bios/s390-ccw/meson.build b/pc-bios/s390-ccw/meson.build new file mode 100644 index 0000000000..0de5400287 --- /dev/null +++ b/pc-bios/s390-ccw/meson.build @@ -0,0 +1,177 @@ +project('s390-ccw') + +strip = find_program('strip') +cc = meson.get_compiler('c') +link_args = ['-Wl,-pie', '-nostdlib'] + +# FIXME: find a better way to check/enable slof +slof = '../../roms/SLOF' +has_slof = cc.has_header('libnet/tftp.h', args: '-I' + meson.current_source_dir() / slof / 'lib') + +s390_cargs = [ + '-ffreestanding', + '-fno-delete-null-pointer-checks', + '-msoft-float', + '-march=z900', + '-fPIE', + '-fno-strict-aliasing', + '-fno-asynchronous-unwind-tables', + cc.get_supported_arguments('-fno-stack-protector') +] + +s390_incs = [] + +s390_srcs = [ + 'bootmap.c', + 'cio.c', + 'dasd-ipl.c', + 'jump2ipl.c', + 'libc.c', + 'main.c', + 'menu.c', + 'sclp.c', + 'start.S', + 'virtio-blkdev.c', + 'virtio-scsi.c', + 'virtio.c', +] + +if has_slof + s390_srcs += [ + 'netmain.c', + 'virtio-net.c', + ] + s390_incs += include_directories(slof / 'lib/libnet') + s390_incs += include_directories(slof / 'lib/libc/include') + s390_cargs += '-nostdinc' +endif + +s390_lib = static_library( + 's390', s390_srcs, + c_args: s390_cargs, + include_directories: s390_incs, +) + +s390_ccw_elf = executable( + 's390-ccw.elf', + link_args: link_args, + objects: s390_lib.extract_objects([ + 'bootmap.c', + 'cio.c', + 'dasd-ipl.c', + 'jump2ipl.c', + 'libc.c', + 'main.c', + 'menu.c', + 'sclp.c', + 'start.S', + 'virtio-blkdev.c', + 'virtio-scsi.c', + 'virtio.c', + ]), +) + +custom_target( + 's390-ccw.img', + output: 's390-ccw.img', + input: s390_ccw_elf, + command: [strip, '--strip-unneeded', '@INPUT@', '-o', '@OUTPUT@'], + build_by_default: true, +) + +if has_slof + slof_ctype = slof / 'lib/libc/ctype' + slof_str = slof / 'lib/libc/string' + slof_stdlib = slof / 'lib/libc/stdlib' + slof_stdio = slof / 'lib/libc/stdio' + + s390_libc = static_library( + 's390-libc', files( + slof_ctype / 'isdigit.c', + slof_ctype / 'isxdigit.c', + slof_ctype / 'toupper.c', + slof_str / 'strcat.c', + slof_str / 'strchr.c', + slof_str / 'strrchr.c', + slof_str / 'strcpy.c', + slof_str / 'strlen.c', + slof_str / 'strncpy.c', + slof_str / 'strcmp.c', + slof_str / 'strncmp.c', + slof_str / 'strcasecmp.c', + slof_str / 'strncasecmp.c', + slof_str / 'strstr.c', + slof_str / 'memset.c', + slof_str / 'memcpy.c', + slof_str / 'memmove.c', + slof_str / 'memcmp.c', + slof_stdlib / 'atoi.c', + slof_stdlib / 'atol.c', + slof_stdlib / 'strtoul.c', + slof_stdlib / 'strtol.c', + slof_stdlib / 'rand.c', + slof_stdlib / 'malloc.c', + slof_stdlib / 'free.c', + slof_stdio / 'sprintf.c', + slof_stdio / 'snprintf.c', + slof_stdio / 'vfprintf.c', + slof_stdio / 'vsnprintf.c', + slof_stdio / 'vsprintf.c', + slof_stdio / 'fprintf.c', + slof_stdio / 'printf.c', + slof_stdio / 'putc.c', + slof_stdio / 'puts.c', + slof_stdio / 'putchar.c', + slof_stdio / 'stdchnls.c', + slof_stdio / 'fileno.c', + slof / 'slof/sbrk.c', + ), + c_args: s390_cargs, + include_directories: s390_incs, + ) + + slof_libnet = slof / 'lib/libnet' + s390_libnet = static_library( + 's390-libnet', files( + slof_libnet / 'args.c', + slof_libnet / 'dhcp.c', + slof_libnet / 'dns.c', + slof_libnet / 'icmpv6.c', + slof_libnet / 'ipv6.c', + slof_libnet / 'tcp.c', + slof_libnet / 'udp.c', + slof_libnet / 'bootp.c', + slof_libnet / 'dhcpv6.c', + slof_libnet / 'ethernet.c', + slof_libnet / 'ipv4.c', + slof_libnet / 'ndp.c', + slof_libnet / 'tftp.c', + slof_libnet / 'pxelinux.c', + ), + c_args: [s390_cargs, '-DDHCPARCH=0x1F'], + include_directories: s390_incs, + ) + + s390_netboot_elf = executable( + 's390-netboot.elf', + link_with: [s390_libc, s390_libnet], + link_args: [link_args, '-Ttext=0x7800000'], + objects: s390_lib.extract_objects([ + 'cio.c', + 'jump2ipl.c', + 'netmain.c', + 'sclp.c', + 'start.S', + 'virtio-net.c', + 'virtio.c', + ]), + ) + + custom_target( + 's390-netboot.img', + output: 's390-netboot.img', + input: s390_netboot_elf, + command: [strip, '--strip-unneeded', '@INPUT@', '-o', '@OUTPUT@'], + build_by_default: true, + ) +endif diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak deleted file mode 100644 index 577c023afe..0000000000 --- a/pc-bios/s390-ccw/netboot.mak +++ /dev/null @@ -1,62 +0,0 @@ - -SLOF_DIR := $(SRC_PATH)/roms/SLOF - -NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o - -LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include -LIBNET_INC := -I$(SLOF_DIR)/lib/libnet - -NETLDFLAGS := $(LDFLAGS) -Ttext=0x7800000 - -$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) - -s390-netboot.elf: $(NETOBJS) libnet.a libc.a - $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") - -s390-netboot.img: s390-netboot.elf - $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") - -# libc files: - -LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ - -MMD -MP -MT $@ -MF $(@:%.o=%.d) - -CTYPE_OBJS = isdigit.o isxdigit.o toupper.o -%.o : $(SLOF_DIR)/lib/libc/ctype/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \ - strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \ - memset.o memcpy.o memmove.o memcmp.o -%.o : $(SLOF_DIR)/lib/libc/string/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o -%.o : $(SLOF_DIR)/lib/libc/stdlib/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ - printf.o putc.o puts.o putchar.o stdchnls.o fileno.o -%.o : $(SLOF_DIR)/lib/libc/stdio/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -sbrk.o: $(SLOF_DIR)/slof/sbrk.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o - -libc.a: $(LIBCOBJS) - $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") - -# libnet files: - -LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ - dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o -LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ - -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) - -%.o : $(SLOF_DIR)/lib/libnet/%.c - $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -libnet.a: $(LIBNETOBJS) - $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") diff --git a/subprojects/s390-ccw b/subprojects/s390-ccw new file mode 120000 index 0000000000..8a3120224b --- /dev/null +++ b/subprojects/s390-ccw @@ -0,0 +1 @@ +../pc-bios/s390-ccw \ No newline at end of file From patchwork Fri Sep 18 20:47:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 304976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 368D7C43464 for ; Fri, 18 Sep 2020 21:18:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A16322208 for ; Fri, 18 Sep 2020 21:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IaYoB7qZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A16322208 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNld-0001e8-FL for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 17:18:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNIw-00036O-Cb for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNIu-0006SF-Qb for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462104; 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=RgtxjQRSf4W9qU5Ip+wO9lc4JihTBmdZDwEbKvkqutE=; b=IaYoB7qZvocPpAL/RiHlHDjJKJmOdQlq9xbRvp/O74fhwCNywRMF03uiig3St6AM9IhGQ8 2ls2LltsaA6y7kLkcNKBsOA6GOQQmx9wXAxGaceQ6sEpyzyCvIgGZXdBbkd36897DAE4fW WFtyk5DWwnZwQvu1ncKnaeyFke6FAB0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-5nkq1ViOOwi511R4HdoKWw-1; Fri, 18 Sep 2020 16:48:19 -0400 X-MC-Unique: 5nkq1ViOOwi511R4HdoKWw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC49110A7AE6; Fri, 18 Sep 2020 20:48:18 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF1A260C11; Fri, 18 Sep 2020 20:48:17 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 2/6] optionrom: make kvmapic.S compile with clang Date: Sat, 19 Sep 2020 00:47:55 +0400 Message-Id: <20200918204759.225810-3-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 01:32:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Clang doesn't support specifying segment prefixes before the instruction, and requires specifying them on the address. Signed-off-by: Marc-André Lureau --- pc-bios/optionrom/kvmvapic.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc-bios/optionrom/kvmvapic.S b/pc-bios/optionrom/kvmvapic.S index aa17a402df..9a615549e6 100644 --- a/pc-bios/optionrom/kvmvapic.S +++ b/pc-bios/optionrom/kvmvapic.S @@ -104,7 +104,7 @@ mp_get_tpr_eax: reenable_vtpr push %ecx - fs/movzbl pcr_cpu, %eax + movzbl %fs:pcr_cpu, %eax mov vcpu_shift, %ecx ; fixup shl %cl, %eax @@ -178,7 +178,7 @@ mp_set_tpr: reenable_vtpr mp_set_tpr_failed: - fs/movzbl pcr_cpu, %edx + movzbl %fs:pcr_cpu, %edx mov vcpu_shift, %ecx ; fixup shl %cl, %edx From patchwork Fri Sep 18 20:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 304975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 937C9C43465 for ; Fri, 18 Sep 2020 21:20:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 115C822208 for ; Fri, 18 Sep 2020 21:20:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BV+FDtsu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 115C822208 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNnY-0003Ih-3L for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 17:20:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNJ5-0003BD-JK for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNJ3-0006TF-87 for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462111; 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=Rg1vUGg+NQh0UsEWhYotEM8dC8ClGTsLqERdGE5uJ44=; b=BV+FDtsuzKQ9i8hEUAwU/nIZVVeeEkOnuwuzQGheAdBoGUJynlSS3go8NO92ZovwURacS6 phL1vrrI8HjZGKu0vRMT/tmce6cOc7jzHTekEPgTKINgGmAhCl642HXFw1+sG7pHUUhvcG zncN1Tf+nOupb0BWt3SBt/8MffI8n2A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-576-Men7KVHGPbOIGiijL_DFUw-1; Fri, 18 Sep 2020 16:48:27 -0400 X-MC-Unique: Men7KVHGPbOIGiijL_DFUw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4AC618BA288; Fri, 18 Sep 2020 20:48:26 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE17510013C1; Fri, 18 Sep 2020 20:48:22 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 3/6] meson: convert pc-bios/optionrom Date: Sat, 19 Sep 2020 00:47:56 +0400 Message-Id: <20200918204759.225810-4-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 00:20:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Checking for linker emulation is a bit tricky with meson, since it actually tries to compile a file with a main(). I didn't bother to port the Darwin or SunOS check, as they are quite old, and not very specific to the compiler version/issue, so they might be outdated. Use a subproject: this is a simple workaround to avoid the incompatible flags (such as gprof) that are set globally for the rest of QEMU. Signed-off-by: Marc-André Lureau --- configure | 16 -------- pc-bios/meson.build | 4 ++ pc-bios/optionrom/Makefile | 73 ----------------------------------- pc-bios/optionrom/meson.build | 73 +++++++++++++++++++++++++++++++++++ subprojects/optionrom | 1 + 5 files changed, 78 insertions(+), 89 deletions(-) delete mode 100644 pc-bios/optionrom/Makefile create mode 100644 pc-bios/optionrom/meson.build create mode 120000 subprojects/optionrom diff --git a/configure b/configure index 3a8733c9be..4e56edc70c 100755 --- a/configure +++ b/configure @@ -6441,22 +6441,7 @@ if test "$guest_agent_msi" = "yes"; then esac fi -# Mac OS X ships with a broken assembler roms= -if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \ - test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \ - test "$softmmu" = yes ; then - # Different host OS linkers have different ideas about the name of the ELF - # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd - # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe. - for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do - if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then - ld_i386_emulation="$emu" - roms="optionrom" - break - fi - done -fi # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900 if test "$cpu" = "s390x" ; then @@ -7861,7 +7846,6 @@ DIRS="$DIRS contrib/plugins/" LINKS="Makefile" LINKS="$LINKS tests/tcg/lm32/Makefile" LINKS="$LINKS tests/tcg/Makefile.target" -LINKS="$LINKS pc-bios/optionrom/Makefile" LINKS="$LINKS roms/seabios/Makefile" LINKS="$LINKS pc-bios/qemu-icon.bmp" LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit diff --git a/pc-bios/meson.build b/pc-bios/meson.build index e5139b3ef5..d25585ca97 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -92,6 +92,10 @@ endif subdir('descriptors') subdir('keymaps') +if host_machine.cpu_family() in ['x86', 'x86_64'] + subproject('optionrom') +endif + if host_machine.cpu_family() == 's390x' and cc.has_argument('-march=z900') subproject('s390-ccw') endif diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile deleted file mode 100644 index 084fc10f05..0000000000 --- a/pc-bios/optionrom/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -CURRENT_MAKEFILE := $(realpath $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) -SRC_DIR := $(dir $(CURRENT_MAKEFILE)) -TOPSRC_DIR := $(SRC_DIR)/../.. -VPATH = $(SRC_DIR) - -all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin -# Dummy command so that make thinks it has done something - @true - -include ../../config-host.mak -CFLAGS = -O2 -g - -quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) -cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) - -override CFLAGS += -march=i486 -Wall - -# Flags for dependency generation -override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d - -override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) -override CFLAGS += $(CFLAGS_NOPIE) -ffreestanding -I$(TOPSRC_DIR)/include -override CFLAGS += $(call cc-option, -fno-stack-protector) -override CFLAGS += $(call cc-option, -m16) - -ifeq ($(filter -m16, $(CFLAGS)),) -# Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??) -# On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with -# respect to the rest of the code. clang does not have -fno-toplevel-reorder, -# but it places all asm blocks at the beginning and we're relying on it for -# the option ROM header. So just force clang not to use the integrated -# assembler, which doesn't support .code16gcc. -override CFLAGS += $(call cc-option, -fno-toplevel-reorder) -override CFLAGS += $(call cc-option, -no-integrated-as) -override CFLAGS += -m32 -include $(SRC_DIR)/code16gcc.h -endif - -Wa = -Wa, -override ASFLAGS += -32 -override CFLAGS += $(call cc-option, $(Wa)-32) - -LD_I386_EMULATION ?= elf_i386 -override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds -override LDFLAGS += $(LDFLAGS_NOPIE) - -all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin - -pvh.img: pvh.o pvh_main.o - -%.o: %.S - $(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@") - -%.o: %.c - $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@") - -%.img: %.o - $(call quiet-command,$(LD) $(LDFLAGS) -s -o $@ $^,"BUILD","$@") - -%.raw: %.img - $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$@") - -%.bin: %.raw - $(call quiet-command,$(PYTHON) $(TOPSRC_DIR)/scripts/signrom.py $< $@,"SIGN","$@") - -include $(wildcard *.d) - -clean: - rm -f *.o *.d *.raw *.img *.bin *~ - -# suppress auto-removal of intermediate files -.SECONDARY: - -.PHONY: all clean diff --git a/pc-bios/optionrom/meson.build b/pc-bios/optionrom/meson.build new file mode 100644 index 0000000000..7d5314cd80 --- /dev/null +++ b/pc-bios/optionrom/meson.build @@ -0,0 +1,73 @@ +project('optionrom') + +cc = meson.get_compiler('c') +objcopy = find_program('objcopy') +signrom = find_program(meson.current_source_dir() / '../../scripts/signrom.py') + +emu = '' +foreach e: ['elf_i386', 'elf_i386_fbsd', 'elf_i386_obsd', 'i386pe'] + if cc.has_multi_link_arguments('-nostdlib', '-Wl,-emain', '-m32', '-Wl,-m' + e) + emu = e + break + endif +endforeach + +if emu == '' + message('No suitable compiler/linker found to build optionrom') + subdir_done() +endif + +link_args = ['-nostdlib', '-m32', '-Wl,-m' + e] +link_args += cc.get_supported_link_arguments('-Wl,--build-id=none') +if cc.has_multi_link_arguments('-fno-pie', '-no-pie') + link_args += ['-no-pie'] +endif + +link_args += '-Wl,-T' + meson.current_source_dir() / 'flat.lds' + +c_args = ['-O2', '-ffreestanding', '-march=i486'] +c_args += cc.get_supported_arguments('-fno-pie', '-fno-stack-protector', '-Wa,-32') +if cc.has_argument('-m16') + c_args += '-m16' +else + # Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??) + # On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with + # respect to the rest of the code. clang does not have -fno-toplevel-reorder, + # but it places all asm blocks at the beginning and we're relying on it for + # the option ROM header. So just force clang not to use the integrated + # assembler, which doesn't support .code16gcc. + c_args += cc.get_supported_arguments('-fno-toplevel-reorder', '-no-integrated-as') + c_args += ['-m32', '-include', meson.current_source_dir() / 'code16gcc.h'] +endif + +foreach target, src: { + 'multiboot': ['multiboot.S'], + 'linuxboot_dma': ['linuxboot_dma.c'], + 'linuxboot': ['linuxboot.S'], + 'kvmvapic': ['kvmvapic.S'], + 'pvh': ['pvh.S', 'pvh_main.c'], + } + img = executable( + target + '.img', + src, + c_args: c_args, + include_directories: include_directories('../../include'), + link_args: link_args, + override_options: ['b_coverage=false'], + ) + + raw = custom_target( + target + '.raw', + output: target + '.raw', + input: img, + command: [objcopy, '-O', 'binary', '-j', '.text', '@INPUT@', '@OUTPUT@'], + ) + + bin = custom_target( + target + '.bin', + output: target + '.bin', + input: raw, + command: [signrom, '@INPUT@', '@OUTPUT@'], + build_by_default: true, + ) +endforeach diff --git a/subprojects/optionrom b/subprojects/optionrom new file mode 120000 index 0000000000..0bd7ed1798 --- /dev/null +++ b/subprojects/optionrom @@ -0,0 +1 @@ +../pc-bios/optionrom \ No newline at end of file From patchwork Fri Sep 18 20:47:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 273304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 167C4C43464 for ; Fri, 18 Sep 2020 21:10:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94FBD221EC for ; Fri, 18 Sep 2020 21:10:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KA+sAby4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94FBD221EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNe3-0001zL-Lc for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 17:10:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNJJ-0003K2-B2 for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNJD-0006Tw-PU for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462123; 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=zvFv1j+LUHE70KrYKy1UKr/5aVj0KpVcurmkUc+3HJs=; b=KA+sAby4jBnxdGyCCLBSYtBGbp5wjQ4mSWR0iVKHeFeXwzcZpmeZdPq9gP9BUT/tTHYjAO bBNYvY9byHXrdQ+QWB5AgIqPkElcDqCD6f2fwBPMa6cf/0QRAa4d6YR0EpzcFN9LNHWmk8 CMgwJBhXrPTRiOlzv9Np29HyP7A673g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-cKyohpSJNH-dknVPVxmYiQ-1; Fri, 18 Sep 2020 16:48:40 -0400 X-MC-Unique: cKyohpSJNH-dknVPVxmYiQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C81231018F63; Fri, 18 Sep 2020 20:48:35 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD6A460C07; Fri, 18 Sep 2020 20:48:31 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 4/6] build-sys: remove no longer needed ROMS variable Date: Sat, 19 Sep 2020 00:47:57 +0400 Message-Id: <20200918204759.225810-5-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 01:32:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- Makefile | 9 --------- configure | 3 --- 2 files changed, 12 deletions(-) diff --git a/Makefile b/Makefile index 7c60b9dcb8..cb23123606 100644 --- a/Makefile +++ b/Makefile @@ -180,16 +180,7 @@ slirp/all: .git-submodule-status CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") -ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) -ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) -# Only keep -O and -g cflags -.PHONY: $(ROM_DIRS_RULES) -$(ROM_DIRS_RULES): - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) - .PHONY: recurse-all recurse-clean -recurse-all: $(addsuffix /all, $(ROM_DIRS)) -recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) ###################################################################### diff --git a/configure b/configure index 4e56edc70c..fa9b44328b 100755 --- a/configure +++ b/configure @@ -6441,8 +6441,6 @@ if test "$guest_agent_msi" = "yes"; then esac fi -roms= - # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900 if test "$cpu" = "s390x" ; then write_c_skeleton @@ -7397,7 +7395,6 @@ else QEMU_INCLUDES="-iquote ${source_path}/tcg/${ARCH} $QEMU_INCLUDES" fi -echo "ROMS=$roms" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak From patchwork Fri Sep 18 20:47:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 273303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1202C43464 for ; Fri, 18 Sep 2020 21:13:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 873BF20773 for ; Fri, 18 Sep 2020 21:13:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M9Yhgxa+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 873BF20773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNgi-0004yj-Gs for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 17:13:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNJO-0003L4-PX for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNJJ-0006U5-3A for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462124; 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=y2xkPIiGLF7ORKyIunpyc83WIGvp5DV6GxTj2UktYvs=; b=M9Yhgxa+gwtklVxaDMamHzUM3nnzwJLt4zvD4hdrvZFWHcJwtkONO0xpFuWgmzWBVdsbqR Gn/TF5OV8+10PizzYgl8R4EFZzTe5eHjy7Ih8sgCJKpSr3XEw/u17dAGGxRjIS+U9z6RgN 7604wSmwsz3lEiP4rKpjpNfq1v80z/I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-wJZFsArZMXK_D-WUzPQ93g-1; Fri, 18 Sep 2020 16:48:42 -0400 X-MC-Unique: wJZFsArZMXK_D-WUzPQ93g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3CFC888EF2D; Fri, 18 Sep 2020 20:48:41 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39DA3100164C; Fri, 18 Sep 2020 20:48:39 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 5/6] build-sys: remove recurse-* rules Date: Sat, 19 Sep 2020 00:47:58 +0400 Message-Id: <20200918204759.225810-6-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 00:20:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index cb23123606..4728fcf1bd 100644 --- a/Makefile +++ b/Makefile @@ -135,13 +135,12 @@ Makefile: ; configure: ; .PHONY: all clean distclean install \ - recurse-all dist msi FORCE + dist msi FORCE SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) include $(SRC_PATH)/tests/Makefile.include -all: recurse-all Makefile: $(addsuffix /all, $(SUBDIRS)) # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC @@ -180,11 +179,9 @@ slirp/all: .git-submodule-status CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") -.PHONY: recurse-all recurse-clean - ###################################################################### -clean: recurse-clean ninja-clean clean-ctlist +clean: ninja-clean clean-ctlist if test -f ninjatool; then ./ninjatool $(if $(V),-v,) -t clean; fi # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h From patchwork Fri Sep 18 20:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 304968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40762C43463 for ; Fri, 18 Sep 2020 22:03:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A491A20DD4 for ; Fri, 18 Sep 2020 22:03:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L7+bPsNp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A491A20DD4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJOTn-000333-JB for qemu-devel@archiver.kernel.org; Fri, 18 Sep 2020 18:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJNJR-0003Lh-GN for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:49:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:27270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kJNJO-0006Uf-Oe for qemu-devel@nongnu.org; Fri, 18 Sep 2020 16:48:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600462133; 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=ItsJU/Dhvavx+vu0tFfDepkCUg9sXvnudkLYoCPPh+Q=; b=L7+bPsNpMV+gWzta0QJDLygM2J44JOQSeDf5yBwtHb6ZD3HGTgI7Wb9ASZ/yfQx4X1FgdM DySz0nOz0T0HnaeZh/twpNfOST1RfduDiQ9MZy+p73+uMP/TgeT6D+su2yCmTPayQyRMcN knLNrDEwLgZGhaj/g+cP9quxt5DSlYc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-5-ujRE9BPAqJ6X8bKDziHQ-1; Fri, 18 Sep 2020 16:48:49 -0400 X-MC-Unique: 5-ujRE9BPAqJ6X8bKDziHQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFB11805EE2; Fri, 18 Sep 2020 20:48:48 +0000 (UTC) Received: from localhost (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E70D5D9E4; Fri, 18 Sep 2020 20:48:44 +0000 (UTC) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 6/6] meson: replace pc-bios/Makefile Date: Sat, 19 Sep 2020 00:47:59 +0400 Message-Id: <20200918204759.225810-7-marcandre.lureau@redhat.com> In-Reply-To: <20200918204759.225810-1-marcandre.lureau@redhat.com> References: <20200918204759.225810-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 00:20:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.999, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-s390x@nongnu.org, Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Add an alias target "update-dtb" to recompile the device-tree "sources" to the "blob" format. Signed-off-by: Marc-André Lureau --- pc-bios/Makefile | 19 ------------------- pc-bios/meson.build | 12 ++++++++++++ 2 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 pc-bios/Makefile diff --git a/pc-bios/Makefile b/pc-bios/Makefile deleted file mode 100644 index 315288df84..0000000000 --- a/pc-bios/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# NOTE: only compilable with x86 cross compile tools -# -include ../config-host.mak - -DEFINES= - -TARGETS= - -all: $(TARGETS) - -%.o: %.S - $(CC) $(DEFINES) -c -o $@ $< - -%.dtb: %.dts - dtc -I dts -O dtb -o $@ $< - -clean: - rm -f $(TARGETS) *.o *~ diff --git a/pc-bios/meson.build b/pc-bios/meson.build index d25585ca97..f004df7a4d 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -92,6 +92,18 @@ endif subdir('descriptors') subdir('keymaps') +dtc = find_program('dtc', required: false) +if dtc.found() + t = [] + foreach f: ['bamboo.dts', 'canyonlands.dts', 'petalogix-ml605.dts', 'petalogix-s3adsp1800.dts'] + t += custom_target(f, + input: f, + output: '@BASENAME@' + '.dtb', + command: [dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT@']) + endforeach + alias_target('update-dtb', t) +endif + if host_machine.cpu_family() in ['x86', 'x86_64'] subproject('optionrom') endif