From patchwork Wed Jul 17 05:11:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1133107 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45pQNf12m2z9sMQ for ; Wed, 17 Jul 2019 15:11:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zr2PgrKo"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45pQNf02pYzDqXw for ; Wed, 17 Jul 2019 15:11:46 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zr2PgrKo"; dkim-atps=neutral Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45pQNX18bYzDqSh for ; Wed, 17 Jul 2019 15:11:37 +1000 (AEST) Received: by mail-pf1-x444.google.com with SMTP id r1so10205295pfq.12 for ; Tue, 16 Jul 2019 22:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=j5CF6wzosfK3p1pnrou6qLqrM8G0uXm++NoumcqEwWE=; b=Zr2PgrKoe4TfcZPS+OWOnVRlIFwIqmdPM1l31zPZ3a4jD9jMcm8y19gC67qov79QLi 4IILWxRTcFJs5Vv0tNKorJRSZs422too4uR2+yzYnSb6SC6N9gRzJOI6gKhPVVzfJewI D/ZQnFq+PumV5aKsO4i/cBJaCXtOrc/3s5ZNoF/OLrCHGgav2N2Z7N/mUyBEC3lRjrp4 qCvouZno9ZV2wPoTVgDONgeu0mhYFJo34iKggXJFDoX1KskzVtWXjaksiCBVNIpLK4qH 2N3euAx8oFmNqHJNSOI3iDN1uFHhUj8Vv/c4Oro9wWPGAieQVZjMCvegiJzha+rRF9Nn JQzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=j5CF6wzosfK3p1pnrou6qLqrM8G0uXm++NoumcqEwWE=; b=FiQ/ajcsxgRa9tw8CApmUznvNgtTD2FdUt69dXmbjgFX7r7xxpH8/q2PRTkT5LtQfA c1uRKhXw4wOUY04/Ce5b3umeNK01i/7sJ5eK3KktJQUE6vQUqAoW6uC4AC7/aSOiDpdb tM89ZKqLUnBEA8y5brFrUZy6ceklm4Jhj8TDVgh+XrHluvtDwi1QK/F232CLT13DgIem 6f1TuHdo12Br42iH5Jkw/IgjJ0cCqw/ogPCn5NVkZPMi13ZwMFovaBOGPnDHVAUhgwHG 9ve0Q8Ys/C49OoQJC5WONzdbKJ4N3w6lv91WswHqct8Mt6KW0Nre2fyVXZZ0gDDW2m3E h3mQ== X-Gm-Message-State: APjAAAUZIN01tdJ20pgZnfSyFTONJfRH/LDZiNOb1NDWzRISQQH/tFwm J72dsQcUtIpLDSwLk4wbw54gQitRoVU= X-Google-Smtp-Source: APXvYqyZTDBWZN6rqi5uL6yNnvfeMNYGV7CAN4rvNk8UBsmDFLDV3G79gvU4P5yg95kEjWPueVo+vg== X-Received: by 2002:a63:bf01:: with SMTP id v1mr38039270pgf.278.1563340292624; Tue, 16 Jul 2019 22:11:32 -0700 (PDT) Received: from wafer.ozlabs.ibm.com.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id 65sm28572244pgf.30.2019.07.16.22.11.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 22:11:31 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Wed, 17 Jul 2019 15:11:23 +1000 Message-Id: <20190717051123.24610-1-oohall@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] Makefile: Use implict rules for .xz and .stb X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Currently we use explicit rules to make: skiboot.lid.xz skiboot.lid.xz.stb skiboot.lid.stb There's no real need to use an explicit rule here and converting them to use an implicit rule allows you to do this: $ touch /tmp/test $ make /tmp/test.stb [STB-DEVELOPMENT-SIGNED-CONTAINER] /tmp/test.stb Or slightly more usefully: $ make zImage.epapr.stb [STB-DEVELOPMENT-SIGNED-CONTAINER] zImage.epapr.stb Do it for the .xz rule too since it's the same and I always forget that embedded XZ chokes unless you use the 32bit crc. Signed-off-by: Oliver O'Halloran Reviewed-by: Stewart Smith --- Makefile.main | 9 --------- Makefile.rules | 6 ++++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.main b/Makefile.main index fac6e4487460..2997b6ebc305 100644 --- a/Makefile.main +++ b/Makefile.main @@ -258,18 +258,9 @@ ALL_OBJS = $(OBJS) version.o ALL_OBJS_1 = $(TARGET).tmp.a asm/dummy_map.o ALL_OBJS_2 = $(TARGET).tmp.a asm/real_map.o -$(TARGET).lid.xz: $(TARGET).lid - $(call Q,XZ, cat $^ | xz -9 -C crc32 > $@, $@) - $(TARGET).lid: $(TARGET).elf $(call Q,OBJCOPY, $(OBJCOPY) -O binary -S $^ $@, $@) -$(TARGET).lid.stb: $(TARGET).lid libstb/create-container - $(call Q,STB-DEVELOPMENT-SIGNED-CONTAINER,$(SRC)/libstb/sign-with-local-keys.sh $< $@ $(SRC)/libstb/keys/ PAYLOAD,$@) - -$(TARGET).lid.xz.stb: $(TARGET).lid.xz libstb/create-container - $(call Q,STB-DEVELOPMENT-SIGNED-CONTAINER,$(SRC)/libstb/sign-with-local-keys.sh $< $@ $(SRC)/libstb/keys/ PAYLOAD,$@) - $(TARGET).tmp.a: $(ALL_OBJS) @rm -f $(TARGET).tmp.a $(call Q,AR, $(AR) rcsTPD $@ $(ALL_OBJS), $@) diff --git a/Makefile.rules b/Makefile.rules index 11b0e5ee8a19..6b35dbafbd9e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -76,3 +76,9 @@ endif %.map: %.elf $(call Q,NM, $(NM) --synthetic -n $< | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $@, $@) + +%.xz: % + $(call Q,XZ, cat $^ | xz -9 -C crc32 > $@, $@) + +%.stb: % libstb/create-container + $(call Q,STB-DEVELOPMENT-SIGNED-CONTAINER,$(SRC)/libstb/sign-with-local-keys.sh $< $@ $(SRC)/libstb/keys/ PAYLOAD,$@)