From patchwork Fri Feb 1 16:29:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 1034935 X-Patchwork-Delegate: sbabic@denx.de 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=none (p=none dis=none) header.from=ziswiler.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43rjPr2JZ7z9sDX for ; Sat, 2 Feb 2019 03:35:11 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 30E99C21DA6; Fri, 1 Feb 2019 16:32: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=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, 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 5267FC21DEC; Fri, 1 Feb 2019 16:30:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 355BFC21DB5; Fri, 1 Feb 2019 16:29:55 +0000 (UTC) Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) by lists.denx.de (Postfix) with ESMTPS id B1918C21DA2 for ; Fri, 1 Feb 2019 16:29:50 +0000 (UTC) Received: from localhost.localdomain ([81.221.68.199]) by mrelay.perfora.net (mreueus001 [74.208.5.2]) with ESMTPSA (Nemesis) id 0M0SMt-1h8f140yej-00uWpJ; Fri, 01 Feb 2019 17:29:47 +0100 From: Marcel Ziswiler To: u-boot@lists.denx.de Date: Fri, 1 Feb 2019 17:29:11 +0100 Message-Id: <20190201162920.32067-15-marcel@ziswiler.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201162920.32067-1-marcel@ziswiler.com> References: <20190201162920.32067-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:b7M+XY/JTYbwbYogU9zB0BYKOFarkbNyYLetuoXp35iCn0n0NfD rxR2aP26XtNu91n+4q/EPMqooK470D/eVcUejX2Qi7KtpJWBnFnj5pd+J0LGgFnzKCinNDy H0U00UQ3M5HRjQEY3QKYNnxXYLKt6Bkez1Tbirzftfc7xy8iFF0m6V9DJ5ipv1iH7cinayv G9H3rDoouNzmGvxzqTOvg== X-UI-Out-Filterresults: notjunk:1; V03:K0:smWh9okb6NM=:PED6oT2b00i7xCriUXZmf+ jY4JtmBFsKzWqJx84PEhof58NVBQzj+ae09PXUKtJ2/nxczJ+FHMjgqSNpNlGqNXQX5pVopuE VHfBUMnDRPLDyUVbANVnlFaHmtIb59cW51zo+Mvk8PRHXv0jiQZxEQJDP5Xj/aHn93gi6RZ2A eIrpCNHQWVLOZqFpGu0jtSQ23uJaYt7mWCIsWcJitcrx+3il1CVt/eWHoU6SKMwqct8ym4Wm1 6KoIxZ5LpJAipiPkjthhsWtxqCNuHx8T6fsy+Ug8HV1w79bdaGCkX8sWvYR7Id9dQc9SJq4yM t/H8Mcv9xPgyVuDWmpN02UPrDwo+dwI1eJ2Kdz69+K8FQ3YrgxcDahR9m9Iqb/xGF6/4LrxFK jRhZqDhsk8O5IYEjxHbAcAtWPVg6MgLyIslKeaNLZIKOkDN3Z63Lvlxl8M276r+0DcoCgEl2g Ie9toUZZ8lcprPC3BLeE9dVZnD8Y+Q5u0u6/pWf9Kk3yw2r5o61ujdQDfrmNguLaJOb1mWo/U 6aViaNQXSPkvgKIleq3coyvcxFrSGrGBhDqqrFyNK7pdyKoRDLsdrukB7ybBonN2ojqSY8sAo V5owKjOEH8Zwrtz/cNpeK4wkk+NVwJyRpUHiubTyZdX5r4mPxQw/DmcynmomVS2pN0jzXI7xJ Ox0dPNjnNQtOetEfPL4BvZwTIqGqzyZxooTbifNNOWMAoS/SlW+eGnvH0m9i/wacR1r+h4oPs wVG3/oXrdU9kNF0JvdjB/iGb2HsO3uMkEdNVgw== Cc: Marcel Ziswiler , Max Krummenacher , Stefan Agner Subject: [U-Boot] [PATCH v1 14/23] apalis_imx6: add distroboot support 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" From: Marcel Ziswiler Add support for distro boot. This is especially helpful for external devices. There is a global boot command which scans a predefined list of boot targets: run distro_bootcmd As well as direct boot commands such as: run bootcmd_mmc1 run bootcmd_mmc2 run bootcmd_usb run bootcmd_dhcp ... Refer to doc/README.distro for details. While at it, remove the CONFIG_DRIVE_TYPES define which has not been used and was meant to be used for multi device boot support which is now provided by distroboot. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher Acked-by: Marcel Ziswiler --- include/configs/apalis_imx6.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 382048d2ef..5f865e1f08 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -109,20 +109,19 @@ #define CONFIG_LOADADDR 0x12000000 -#ifdef CONFIG_CMD_SATA -#define CONFIG_DRIVE_SATA "sata " +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(USB, usb, 0) \ + func(DHCP, dhcp, na) +#include +#undef BOOTENV_RUN_NET_USB_START +#define BOOTENV_RUN_NET_USB_START "" #else -#define CONFIG_DRIVE_SATA +#define BOOTENV #endif -#ifdef CONFIG_CMD_MMC -#define CONFIG_DRIVE_MMC "mmc " -#else -#define CONFIG_DRIVE_MMC -#endif - -#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC - #define DFU_ALT_EMMC_INFO \ "u-boot.imx raw 0x2 0x3ff mmcpart 0;" \ "boot part 0 1;" \ @@ -149,7 +148,9 @@ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "kernel_addr_r=0x11000000\0" \ - "ramdisk_addr_r=0x12100000\0" + "pxefile_addr_r=0x17100000\0" \ + "ramdisk_addr_r=0x12100000\0" \ + "scriptaddr=0x17000000\0" #define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \ @@ -191,9 +192,10 @@ #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb" #endif #define CONFIG_EXTRA_ENV_SETTINGS \ + BOOTENV \ "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \ - "run nfsboot ; echo ; echo nfsboot failed ; " \ - "usb start ;" \ + "run distro_bootcmd ; " \ + "usb start ; " \ "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \ "boot_file=uImage\0" \ "console=ttymxc0\0" \