From patchwork Mon Jan 21 10:45:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10773547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7803B13B4 for ; Mon, 21 Jan 2019 10:46:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65CE529E32 for ; Mon, 21 Jan 2019 10:46:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57DF929E35; Mon, 21 Jan 2019 10:46:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02A5B29E32 for ; Mon, 21 Jan 2019 10:46:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbfAUKqk (ORCPT ); Mon, 21 Jan 2019 05:46:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727498AbfAUKqj (ORCPT ); Mon, 21 Jan 2019 05:46:39 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 99D049D432; Mon, 21 Jan 2019 10:46:39 +0000 (UTC) Received: from thuth.com (ovpn-116-152.ams2.redhat.com [10.36.116.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04EE068736; Mon, 21 Jan 2019 10:46:30 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, Paolo Bonzini , =?utf-8?b?UmFk?= =?utf-8?b?aW0gS3LEjW3DocWZ?= Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 09/10] s390x: Add binary generation to makefile Date: Mon, 21 Jan 2019 11:45:54 +0100 Message-Id: <1548067555-15766-10-git-send-email-thuth@redhat.com> In-Reply-To: <1548067555-15766-1-git-send-email-thuth@redhat.com> References: <1548067555-15766-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 21 Jan 2019 10:46:39 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Janosch Frank "make test_cases_binary" will now generate binaries that can be booted from disk or as a non ELF kernel boot. Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- s390x/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/s390x/Makefile b/s390x/Makefile index ed6ef0b..af40fd4 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -10,10 +10,12 @@ tests += $(TEST_DIR)/cmm.elf tests += $(TEST_DIR)/vector.elf tests += $(TEST_DIR)/gs.elf tests += $(TEST_DIR)/iep.elf +tests_binary = $(patsubst %.elf,%.bin,$(tests)) -all: directories test_cases +all: directories test_cases test_cases_binary test_cases: $(tests) +test_cases_binary: $(tests_binary) CFLAGS += -std=gnu99 CFLAGS += -ffreestanding @@ -55,8 +57,11 @@ FLATLIBS = $(libcflat) $(RM) $(@:.elf=.aux.o) @chmod a-x $@ +%.bin: %.elf + $(OBJCOPY) -O binary $< $@ + arch_clean: asm_offsets_clean - $(RM) $(TEST_DIR)/*.{o,elf} $(TEST_DIR)/.*.d lib/s390x/.*.d + $(RM) $(TEST_DIR)/*.{o,elf,bin} $(TEST_DIR)/.*.d lib/s390x/.*.d generated-files = $(asm-offsets) $(tests:.elf=.o) $(cstart.o) $(cflatobjs): $(generated-files)