From patchwork Sun Mar 20 22:35:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pieter Smith X-Patchwork-Id: 599904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3qSv2R2BQpz9s5l for ; Mon, 21 Mar 2016 09:36:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Z/jjNb/U; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 950E73113B; Sun, 20 Mar 2016 22:36:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id niVX+-c8i1yG; Sun, 20 Mar 2016 22:36:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 21B7D2F367; Sun, 20 Mar 2016 22:36:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0600B1CF53A for ; Sun, 20 Mar 2016 22:36:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 029F58890D; Sun, 20 Mar 2016 22:36:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DapQVoNeSz9a; Sun, 20 Mar 2016 22:36:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BA20A878A4; Sun, 20 Mar 2016 22:36:11 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x188so18217502wmg.0; Sun, 20 Mar 2016 15:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZUmqwbq3y1UzvI7ECVynQ2QRjsJluEHoY9W5K+c+mQA=; b=Z/jjNb/UzwKT2fxHeH1Q9HAqIFvQn2DQnJcRFSlPsbhu0qEQRY0qVsOAMD2C7daWi1 wD941cecdd0KGRLYNxaByELfeWPwWSlCnQdMENlM26IHMG0b1szoME4tPW2HReYJBQRB 9Nn1IIJkrWT3WgQWhPLs45GyH4IwJjaVEKlsclnOJSIx+ioDhHFIImI53RMNVjcr67Qg WTJ4NrTlHN9mQeKc7ItNDgaXvDwYHxrywP7AQANUUE6KmXZt9rf1dea+/NAFLcdXiHtK GPGmowWMSJjhIf/v1/7Qsqk4smiBORgxHuLlD/3xYS/tWOg4k4Mfqw9cxPli6yVZkfbn fVvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ZUmqwbq3y1UzvI7ECVynQ2QRjsJluEHoY9W5K+c+mQA=; b=CDYYnOBwqm0vM7jXWRls/XUNntf3gLYe3MUlG7ODy3fVVvh8u4UwD2ODQ10fmkh8Gy xUqCuHM9+TPzSelLkr2YOh1QFp6C9DsAartxaiRnnAGjjzH4R3QGKJkxMe9ggWDSMs89 82o1Fv/mTeJPehFt0HHF3fel3UInxr1B6exRsPeKYG04M9fLfe/fc8EvOLaIxMld2nRm 9Nvad9UnL33NOfv5b2uXzOWhz0hgmCAAU9s6kVQY7XSTPBB44eOqCr1kk0gT3iynWhJ2 0jewEKh6YsIY7NTqFWuQ07Q5pYEWKFh5fLhGPbs6vTfPVW4b+HywgYn2iffjDkCn5MyN 23mw== X-Gm-Message-State: AD7BkJKkICTeMD9dO2FP9WPaVfM6KVG5Rh4Gi/ewh8iG36Wpnc8TYf9XkESfkvKhwfg/2g== X-Received: by 10.194.63.7 with SMTP id c7mr27183124wjs.168.1458513370270; Sun, 20 Mar 2016 15:36:10 -0700 (PDT) Received: from localhost.localdomain (ip4da2e5c1.direct-adsl.nl. [77.162.229.193]) by smtp.gmail.com with ESMTPSA id i5sm22510820wjx.15.2016.03.20.15.36.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Mar 2016 15:36:09 -0700 (PDT) From: Pieter Smith To: buildroot@uclibc.org, Arnout Vandecappelle , Yegor Yefremov Date: Sun, 20 Mar 2016 23:35:45 +0100 Message-Id: <1458513351-6556-2-git-send-email-pieter@boesman.nl> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458513351-6556-1-git-send-email-pieter@boesman.nl> References: <1458513351-6556-1-git-send-email-pieter@boesman.nl> Cc: Thomas Petazzoni , Pieter Smith , "Yann E. MORIN" , Peter Korsgaard Subject: [Buildroot] [PATCH v4 1/7] barebox: support multi-image-build image selection X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Support selection of the built image filename in a multi-image barebox build. This makes it possible to specify which image to pick in a in a multi-image barebox config such as the am335x_defconfig. The specified image can either be located in the barebox build directory or the barebox build images directory. For compatibility with contemporary barbox builds, a sane default has been chosen. For barebox versions older than 2012.10, the user will have to specify 'barebox.bin'. Signed-off-by: Pieter Smith Reviewed-by: Yegor Yefremov --- boot/barebox/Config.in | 9 +++++++++ boot/barebox/barebox.mk | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in index bbe6ae2..4f6872c 100644 --- a/boot/barebox/Config.in +++ b/boot/barebox/Config.in @@ -97,6 +97,15 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES A space-separated list of configuration fragment files, that will be merged to the main Barebox configuration file. +config BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE + string "Built image filename" + default "barebox-flash-image" + help + Name of the built barebox image filename in the barebox build or + build images directory. + + Set to barebox.bin for barebox versions older than 2012.10. + config BR2_TARGET_BAREBOX_BAREBOXENV bool "bareboxenv tool in target" help diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 7715daf..2a3b724 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -92,10 +92,10 @@ define BAREBOX_BUILD_CMDS endef define BAREBOX_INSTALL_IMAGES_CMDS - if test -h $(@D)/barebox-flash-image ; then \ - cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \ + if test -e $(@D)/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)); then \ + cp -L $(@D)/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) $(BINARIES_DIR)/barebox.bin ; \ else \ - cp $(@D)/barebox.bin $(BINARIES_DIR);\ + cp $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) $(BINARIES_DIR)/barebox.bin ; \ fi $(BAREBOX_INSTALL_CUSTOM_ENV) endef @@ -115,6 +115,9 @@ ifeq ($(BR2_TARGET_BAREBOX)$(BR_BUILDING),yy) ifeq ($(or $(BAREBOX_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),) $(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings) endif +ifndef BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE +$(error No barebox built image filename specified. Check your BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE setting) +endif endif $(eval $(kconfig-package))