From patchwork Sun Oct 12 18:21:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 399002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7610F1400F4 for ; Mon, 13 Oct 2014 05:21:15 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B6274A1B61; Sun, 12 Oct 2014 18:21: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 AtM-V9W90aXX; Sun, 12 Oct 2014 18:21:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 345D1A1B67; Sun, 12 Oct 2014 18:21:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 606131C2A61 for ; Sun, 12 Oct 2014 18:21:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5C1A8A19BA for ; Sun, 12 Oct 2014 18:21:10 +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 RE5mLhGIuVBU for ; Sun, 12 Oct 2014 18:21:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 10FBDA1B64 for ; Sun, 12 Oct 2014 18:21:09 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop.lan) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1XdNlS-0001R9-E9; Sun, 12 Oct 2014 20:21:06 +0200 Received: from arnout by vandecaa-laptop.lan with local (Exim 4.84) (envelope-from ) id 1XdNlR-0001bi-JP; Sun, 12 Oct 2014 20:21:05 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Sun, 12 Oct 2014 20:21:05 +0200 Message-Id: <1413138065-6138-2-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1413138065-6138-1-git-send-email-arnout@mind.be> References: <1413134795-32050-1-git-send-email-arnout@mind.be> <1413138065-6138-1-git-send-email-arnout@mind.be> Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH v2 2/2] randconfig: seed with BR2_RAND_PRESEED_CONFIG_FILES 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" Currently, randconfig is completely unusable. Instead, we use randpackageconfig, with two use cases: in the autobuilders, and when doing manual testing of the validity of depends/select chains. In both cases, we actually want the possibility to explicitly select some packages or to set a string value or to randomise between a choice or to test bootloaders and kernels - all of this is currently impossible. This patch adds a BR2_RAND_PRESEED_CONFIG_FILES environment variable that can be set to a (set of) files with config options that should be set or unset. randconfig and randpackageconfig will force these values. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: "Yann E. MORIN" Cc: Thomas Petazzoni --- v2: - split off the fix for legacy - apply to both randconfig and randpackageconfig - rename to BR2_RAND_PRESEED_CONFIG_FILES because it supports multiple files Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5bcaa77..fb99de1 100644 --- a/Makefile +++ b/Makefile @@ -732,6 +732,9 @@ oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config @rm -f $(CONFIG_DIR)/.config.nopkg +ifneq ($(BR2_RAND_PRESEED_CONFIG_FILES),) + @cp $(BR2_RAND_PRESEED_CONFIG_FILES) $(CONFIG_DIR)/.config.nopkg +endif @grep '^config ' Config.in.legacy | \ while read config pkg; do \ echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done @@ -758,6 +761,9 @@ allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg +ifneq ($(BR2_RAND_PRESEED_CONFIG_FILES),) + @grep BR2_PACKAGE_ $(BR2_RAND_PRESEED_CONFIG_FILES) >> $(CONFIG_DIR)/.config.nopkg +endif @grep '^config BR2_PACKAGE_' Config.in.legacy | \ while read config pkg; do \ echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done @@ -870,13 +876,15 @@ help: @echo ' oldconfig - resolve any unresolved symbols in .config' @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' - @echo ' randconfig - New config with random answer to all options' + @echo ' randconfig - New config with random answer to all options -' + @echo ' options can be forced by setting BR2_RAND_PRESEED_CONFIG_FILES' @echo ' defconfig - New config with default answer to all options' @echo ' BR2_DEFCONFIG, if set, is used as input' @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' @echo ' allyesconfig - New config where all options are accepted with yes' @echo ' allnoconfig - New config where all options are answered with no' - @echo ' randpackageconfig - New config with random answer to package options' + @echo ' randpackageconfig - New config with random answer to package options -' + @echo ' options can be forced by setting BR2_RAND_PRESEED_CONFIG_FILES' @echo ' allyespackageconfig - New config where pkg options are accepted with yes' @echo ' allnopackageconfig - New config where package options are answered with no' ifeq ($(BR2_PACKAGE_BUSYBOX),y)