From patchwork Tue Nov 13 08:07:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Lahoudere X-Patchwork-Id: 997057 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=collabora.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42vRSW5db9z9s9G for ; Tue, 13 Nov 2018 23:16:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 33C5CC224FC; Tue, 13 Nov 2018 12:15:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2E560C22510; Tue, 13 Nov 2018 12:15:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C81ADC224A6; Tue, 13 Nov 2018 08:08:08 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id 71ACBC21E35 for ; Tue, 13 Nov 2018 08:08:08 +0000 (UTC) Received: from laptop.home (unknown [IPv6:2a01:cb19:8784:8a00:9075:9968:7826:7441]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: aragua) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id F04792639E2; Tue, 13 Nov 2018 08:08:06 +0000 (GMT) From: Fabien Lahoudere To: u-boot@lists.denx.de Date: Tue, 13 Nov 2018 09:07:57 +0100 Message-Id: X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 13 Nov 2018 12:15:27 +0000 Cc: Fabien Lahoudere Subject: [U-Boot] [PATCH 1/2] spl: define kernel and dtb name for falcon mode from menuconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If we use falcon mode with ext or fat filesystem, we have to define CONFIG_SPL_FS_LOAD_KERNEL_NAME and CONFIG_SPL_FS_LOAD_ARGS_NAME in the board header. However a header can be used for different boards (e.g Marsboard and riotboardlike use embestmx6boards.h). We can aslo have some project with binaries in different places. The two previous problem let me think that it can be easier to add this information in the config file and have an entry in menuconfig to define them, instead of patching source code. This patch propose a solution. Signed-off-by: Fabien Lahoudere --- common/spl/Kconfig | 18 ++++++++++++++++++ configs/riotboard_spl_defconfig | 2 +- include/configs/embestmx6boards.h | 2 -- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index d0564621d4..dd0c4eb8ac 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -551,6 +551,24 @@ config SPL_OS_BOOT Enable booting directly to an OS from SPL. for more info read doc/README.falcon +config SPL_FS_LOAD_KERNEL_NAME + string "Falcon mode image name" + depends on (SPL_OS_BOOT && (SPL_EXT_SUPPORT || SPL_FAT_SUPPORT)) + default "uImage" + help + If falcon mode is enabled (SPL_OS_BOOT) and you chose to boot + from ext or fat partition, you need to define the name of the + kernel to boot. + +config SPL_FS_LOAD_ARGS_NAME + string "Falcon mode device tree name" + depends on (SPL_OS_BOOT && SPL_OF_LIBFDT && (SPL_EXT_SUPPORT || SPL_FAT_SUPPORT)) + default "args" + help + If falcon mode is enabled (SPL_OS_BOOT) and you need a device + tree to bootchose to boot from ext or fat partition, define here + the name of the dtb. + if SPL_OS_BOOT config SYS_OS_BASE hex "addr, where OS is found" diff --git a/configs/riotboard_spl_defconfig b/configs/riotboard_spl_defconfig index 8b5459aa1a..6561cc91f9 100644 --- a/configs/riotboard_spl_defconfig +++ b/configs/riotboard_spl_defconfig @@ -17,9 +17,9 @@ CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd" CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_SPL_RAW_IMAGE_SUPPORT=y CONFIG_SPL_EXT_SUPPORT=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_FS_LOAD_ARGS_NAME="imx6dl-riotboard.dtb" # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h index 7e7de4dae6..98681fb3e0 100644 --- a/include/configs/embestmx6boards.h +++ b/include/configs/embestmx6boards.h @@ -113,8 +113,6 @@ #include "imx6_spl.h" /* RiOTboard */ #define CONFIG_SYS_SPL_ARGS_ADDR 0x13000000 -#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage" -#define CONFIG_SPL_FS_LOAD_ARGS_NAME "imx6dl-riotboard.dtb" #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 /* offset 69KB */ #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 /* offset 69KB */