From patchwork Wed Sep 23 19:11:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1370060 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=rockwellcollins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=mNGLsnmw; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxST23dvBz9sSt for ; Thu, 24 Sep 2020 05:11:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3B0F5858AF; Wed, 23 Sep 2020 19:11:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eeiLcgp0eLRY; Wed, 23 Sep 2020 19:11:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E167585CCF; Wed, 23 Sep 2020 19:11:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 25F871BF989 for ; Wed, 23 Sep 2020 19:11:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1ECFD858AF for ; Wed, 23 Sep 2020 19:11:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YnRY4l8z4y3u for ; Wed, 23 Sep 2020 19:11:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by whitealder.osuosl.org (Postfix) with ESMTPS id BB78F85540 for ; Wed, 23 Sep 2020 19:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=6MmJmmx2YtK7ezTP5g4m1BCQPMWdVryo3KtLIHKzGi4=; b=mNGLsnmw67VuqklzVIAlL5bzxqqy3vPLlY5K0RaI4RMmj3whlhROYUWV 1px/UFZq4e6724hJKNRJDpxhi2j3gEM2R6le2ui3R8seS9kasRDzlLyQ5 XqEBb2+yl8Zr9OQi7cGGtrEG8jCYF7IJB9uIssaMFRqNANmmG2n7r6yqN L1j/+iTX0RbaSZLUERHrcn28jrGjEFoH5qT0Zad29lcVNcPkAmhv5MDWV w03UeriLxvHO4h6xyLT4GryeTgPoMMzA3TseoDC7KfKMPySNLdsQtBbJn XkNk68rFhnvc2y58tGPcqPHPS+Ua4dT84z3g2fjkSme6QHtk5pZbJypYn Q==; IronPort-SDR: meUf41kVhPodN7+mH5WrcmyCY9Ivyln9pTffR4CGZZwcNh3h2lbiK552Up/G7J+BtfA4Nrmyl5 Kc98JpAtSitdKqCv+5ApOPD3CsDMGS1SomXvIQfe5GNVobkonIomXaM8BwdEJl3//8r298LTpt NA+xqYlg94iw6OMaAWrGEMUEO8s88cjQQwq6JobTOAT/Zcvzl9tdJ1ijHA3rKfaGAn1Yhf+PWc KGFZPEnKbgTjheqIcq+t/BzkVH58FNkUt6yu+4+qXOLYZDF2Yyoe0h0BKS/LFf6VdEUB9bukkA kHw= Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 23 Sep 2020 14:11:08 -0500 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id DECCD60317; Wed, 23 Sep 2020 14:11:07 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Wed, 23 Sep 2020 14:11:05 -0500 Message-Id: <20200923191105.34415-3-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200923191105.34415-1-matthew.weber@rockwellcollins.com> References: <20200923191105.34415-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH 2/2] package/uboot-tools: migrate BR2_TARGET_UBOOT_BOOT_SCRIPT from U-Boot pkg X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" For consistancy and dependencies between uboot and uboot-tools, this patch migrates the script creation over in a similar way as the env image creation. Signed-off-by: Matthew Weber --- Config.in.legacy | 7 +++++++ boot/uboot/Config.in | 16 ---------------- boot/uboot/uboot.mk | 13 ------------- package/uboot-tools/Config.in.host | 16 ++++++++++++++++ package/uboot-tools/uboot-tools.mk | 12 ++++++++++++ 5 files changed, 35 insertions(+), 29 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 6359ca148c..756ccd602c 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2020.11" +config BR2_TARGET_UBOOT_BOOT_SCRIPT + bool "u-boot script generation was moved" + select BR2_LEGACY + select BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + help + Migrated U-Boot script generation to uboot-tools + config BR2_TARGET_UBOOT_ENVIMAGE bool "u-boot env generation was moved" select BR2_LEGACY diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 668806dc50..ae501a05d6 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -533,22 +533,6 @@ config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC In either case the resulting file will be given a .crc extension. -config BR2_TARGET_UBOOT_BOOT_SCRIPT - bool "Generate a U-Boot boot script" - help - Generate a U-Boot boot script, given a file listing U-Boot - commands to be executed at boot time. The generated boot - script will be called 'boot.scr'. - -if BR2_TARGET_UBOOT_BOOT_SCRIPT - -config BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE - string "U-Boot boot script source" - help - Source file to generate the U-Boot boot script. - -endif - if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 9dbd06b64b..f27abbd5ba 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -323,10 +323,6 @@ define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(f) $(BINARIES_DIR)/ ) ) - $(if $(BR2_TARGET_UBOOT_BOOT_SCRIPT), - $(MKIMAGE) -C none -A $(MKIMAGE_ARCH) -T script \ - -d $(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)) \ - $(BINARIES_DIR)/boot.scr) endef ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y) @@ -427,15 +423,6 @@ define UBOOT_KCONFIG_FIXUP_CMDS $(UBOOT_ZYNQMP_KCONFIG_PSU_INIT) endef -ifeq ($(BR2_TARGET_UBOOT_BOOT_SCRIPT),y) -ifeq ($(BR_BUILDING),y) -ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)),) -$(error Please define a source file for U-Boot boot script (BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE setting)) -endif -endif -UBOOT_DEPENDENCIES += host-uboot-tools -endif - ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy) # diff --git a/package/uboot-tools/Config.in.host b/package/uboot-tools/Config.in.host index cf8aed1edb..b64a5fa36a 100644 --- a/package/uboot-tools/Config.in.host +++ b/package/uboot-tools/Config.in.host @@ -89,4 +89,20 @@ config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE +config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + bool "Generate a U-Boot boot script" + help + Generate a U-Boot boot script, given a file listing U-Boot + commands to be executed at boot time. The generated boot + script will be called 'boot.scr'. + +if BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE + string "U-Boot boot script source" + help + Source file to generate the U-Boot boot script. + +endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + endif # BR2_PACKAGE_HOST_UBOOT_TOOLS diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk index c26f5d332c..b5616d9de5 100644 --- a/package/uboot-tools/uboot-tools.mk +++ b/package/uboot-tools/uboot-tools.mk @@ -141,12 +141,24 @@ endif endif endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)),) +$(error Please define a source file for U-Boot boot script (BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE setting)) +endif +endif +endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + define HOST_UBOOT_TOOLS_INSTALL_CMDS $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage $(UBOOT_TOOLS_GENERATE_ENV_DEFAULTS) $(UBOOT_TOOLS_GENERATE_ENV_IMAGE) + $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT), + $(MKIMAGE) -C none -A $(MKIMAGE_ARCH) -T script \ + -d $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)) \ + $(BINARIES_DIR)/boot.scr) endef $(eval $(generic-package))