From patchwork Tue Jun 16 19:20:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1310666 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=qkR4SX/i; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mdQq32D0z9sRW for ; Wed, 17 Jun 2020 05:23:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F26781F57; Tue, 16 Jun 2020 21:21:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qkR4SX/i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 081CA81F4D; Tue, 16 Jun 2020 21:20:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8D68481F32 for ; Tue, 16 Jun 2020 21:20:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x233.google.com with SMTP id n23so24918334ljh.7 for ; Tue, 16 Jun 2020 12:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MCkcJt5nm/fzfiKfv4FzBUqy1yJWJGwrYqczLaf/FVI=; b=qkR4SX/ip2jUtWgyukWUAs1c20PI6A6Yr91ItkiOC1SnpNHViG1WrWDjBpazcfoJoB ZYRKiKR4LV0yoU4JqPIs3kEpCWcGa51Zl/6wHkjRoI25Um5czdnvXSylCxZGM2Ykdhqh s2Oti5uUvTno/nu/Cv7t5Nsw5UcsC/7Fvde6KyMvsJ7ic2VyCRTOvZ31KitstTHxXZwz 1HsoboYYp9ntXC3DrLXVfCCJlds5ZRrMhmE2co/5Y7WVbUyvlOCPBGdgPHTUbaLbYxQV QrCilVuH+LoJryErXB2S5XI6Mf0SZzgvUcJbDfEQpka32f9+bre4fhwW4meKHquPzWUw 4qhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MCkcJt5nm/fzfiKfv4FzBUqy1yJWJGwrYqczLaf/FVI=; b=qfmgllbiJOWymURvPOHggP8PcGF3dMEsq50fmxwijETupYlE3recq1PShGL5S5PZhv NRescalA+cJ2zpSwGATazjXLnSrYveXxUTaFZSnMdvv65S5PdhRmHcnsfdTMuT0/p3uL wH6SB8qdMRUjfgdRLR3ssX5IdiZ19PbLN6zmWJlTnS4b92LZZ5BhY1WF6wkt1X3rH/kn TWkPUv5ACGEalvRV8GmA9o+IcTwcPnZWACZdgpb8PAMMWNOiEPy6bQL0E30N5O+OxerP 0Ds30jyTq4GV7ECb8nHcXadFAZEuY8fwmpbbZHZ9mQ+9QQFhYUtfi428J8hSVGXmBfhF 7ekw== X-Gm-Message-State: AOAM533HRKHL4g4/d0MQiU7ktjeyXgcio2gIkvF18SyWFx0gKAbMfmhl nz9ctdJT5763RADEo5nxX+6o53ex X-Google-Smtp-Source: ABdhPJz4VXHp/53IqN+TUB8PBgH+QAgl+c3TiHu5TALuOfHDNIB4qujsumijszKXdS8eV0H81AQqKg== X-Received: by 2002:a05:651c:299:: with SMTP id b25mr2358176ljo.13.1592335229126; Tue, 16 Jun 2020 12:20:29 -0700 (PDT) Received: from localhost ([194.44.17.239]) by smtp.gmail.com with ESMTPSA id n23sm5461869lfq.76.2020.06.16.12.20.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 12:20:28 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: twarren@nvidia.com, stefan.agner@toradex.com, marcel.ziswiler@toradex.com, max.krummenacher@toradex.com, oleksandr.suvorov@toradex.com, philippe.schenker@toradex.com, Igor Opaniuk Subject: [PATCH v1 08/13] apalis-tk1: enable distroboot Date: Tue, 16 Jun 2020 22:20:06 +0300 Message-Id: <1592335211-5998-9-git-send-email-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592335211-5998-1-git-send-email-igor.opaniuk@gmail.com> References: <1592335211-5998-1-git-send-email-igor.opaniuk@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean From: Igor Opaniuk 1. Use distro_bootcmd as default boot command instead of legacy emmcboot wrapper. 2. Drop emmcboot and sdboot wrappers. 3. Provide proper boot order for Distro Boot. Signed-off-by: Igor Opaniuk --- configs/apalis-tk1_defconfig | 2 +- include/configs/apalis-tk1.h | 51 ++++++++++++-------------------------------- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig index 868303a..db66d68 100644 --- a/configs/apalis-tk1_defconfig +++ b/configs/apalis-tk1_defconfig @@ -11,7 +11,7 @@ CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=1 -CONFIG_BOOTCOMMAND="run emmcboot; setenv fdtfile ${soc}-${fdt-module}-${fdt_board}.dtb && run distro_bootcmd" +CONFIG_BOOTCOMMAND="setenv fdtfile ${soc}-${fdt-module}-${fdt_board}.dtb && run distro_bootcmd" CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_VERSION_VARIABLE=y diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h index 965259c..6f73606 100644 --- a/include/configs/apalis-tk1.h +++ b/include/configs/apalis-tk1.h @@ -34,6 +34,20 @@ /* General networking support */ #define CONFIG_TFTP_TSIZE +/* + * Custom Distro Boot configuration: + * 1. 8bit SD port (MMC1) + * 2. 4bit SD port (MMC2) + * 3. eMMC (MMC0) + */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) + #undef CONFIG_IPADDR #define CONFIG_IPADDR 192.168.10.2 #define CONFIG_NETMASK 255.255.255.0 @@ -54,24 +68,6 @@ "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \ "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \ -#define EMMC_BOOTCMD \ - "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} " \ - "ro rootfstype=ext4 rootwait\0" \ - "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \ - "setenv bootargs ${defargs} ${emmcargs} " \ - "${setupargs} ${vidargs}; echo Booting from internal eMMC; " \ - "run emmcdtbload; " \ - "load mmc ${emmcdev}:${emmcbootpart} ${kernel_addr_r} " \ - "${boot_file} && run fdt_fixup && " \ - "bootz ${kernel_addr_r} - ${dtbparam}\0" \ - "emmcbootpart=1\0" \ - "emmcdev=0\0" \ - "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \ - "${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb && " \ - "setenv dtbparam ${fdt_addr_r}\0" \ - "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \ - "emmcrootpart=2\0" - #define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \ "nfsboot=pci enum; run setup; setenv bootargs ${defargs} ${nfsargs} " \ @@ -82,23 +78,6 @@ "${soc}-${fdt_module}-${fdt_board}.dtb " \ "&& setenv dtbparam ${fdt_addr_r}\0" -#define SD_BOOTCMD \ - "set_sdargs=setenv sdargs ip=off root=PARTUUID=${uuid} ro " \ - "rootfstype=ext4 rootwait\0" \ - "sdboot=run setup; run sdfinduuid; run set_sdargs; " \ - "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \ - "${vidargs}; echo Booting from SD card in 8bit slot...; " \ - "run sddtbload; load mmc ${sddev}:${sdbootpart} " \ - "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \ - "bootz ${kernel_addr_r} - ${dtbparam}\0" \ - "sdbootpart=1\0" \ - "sddev=1\0" \ - "sddtbload=setenv dtbparam; load mmc ${sddev}:${sdbootpart} " \ - "${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb " \ - "&& setenv dtbparam ${fdt_addr_r}\0" \ - "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \ - "sdrootpart=2\0" - #define BOARD_EXTRA_ENV_SETTINGS \ "boot_file=zImage\0" \ "console=ttyS0\0" \ @@ -106,12 +85,10 @@ "usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0 " \ "user_debug=30 pcie_aspm=off\0" \ "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \ - EMMC_BOOTCMD \ "fdt_board=eval\0" \ "fdt_fixup=;\0" \ "fdt_module=" FDT_MODULE "\0" \ NFS_BOOTCMD \ - SD_BOOTCMD \ UBOOT_UPDATE \ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ "00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} " \