From patchwork Thu Feb 27 00:37:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis 'GNUtoo' Carikli X-Patchwork-Id: 1245422 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cyberdimension.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 48SYfM6GJ8z9sQx for ; Thu, 27 Feb 2020 11:37:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0BA780E91; Thu, 27 Feb 2020 01:36:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=cyberdimension.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B44B580671; Thu, 27 Feb 2020 01:36:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, KHOP_HELO_FCRDNS,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from gnutoo.cyberdimension.org (cyberdimension.org [80.67.179.20]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5C5D78065D for ; Thu, 27 Feb 2020 01:36:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=cyberdimension.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=GNUtoo@cyberdimension.org Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 03943926; Thu, 27 Feb 2020 00:33:51 +0000 (UTC) Received: from primarylaptop.localdomain (localhost.localdomain [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 37febdf6; Thu, 27 Feb 2020 00:33:50 +0000 (UTC) From: Denis 'GNUtoo' Carikli To: Soeren Moch Cc: Stefano Babic , Fabio Estevam , u-boot@lists.denx.de, Denis 'GNUtoo' Carikli Subject: [PATCH][v4 5/6] board: tbs2910: Enable distro_boot support. Date: Thu, 27 Feb 2020 01:37:01 +0100 Message-Id: <20200227003702.13936-5-GNUtoo@cyberdimension.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227003702.13936-1-GNUtoo@cyberdimension.org> References: <20200227003702.13936-1-GNUtoo@cyberdimension.org> MIME-Version: 1.0 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 This keeps the compatibility with the old bootcmd. The fdtfile environment variable also needed to be set to imx6q-tbs2910.dtb to enable booting mainline kernels otherwise with extlinux.conf it tries to load mx6-tbs2910.dtb instead. With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution, we have the following size differences: - text: +2041 bytes - data: 0 bytes - bss: 0 bytes - total: +2041 bytes Signed-off-by: Denis 'GNUtoo' Carikli --- Changelog: In addition to the changes requested I also did the following changes: - I removed func(PXE, pxe, na) from the BOOT_TARGET_DEVICES - I removed func(DHCP, dhcp, na) from the BOOT_TARGET_DEVICES --- configs/tbs2910_defconfig | 3 ++- include/configs/tbs2910.h | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig index 1cf09bb741..b3a8e11a57 100644 --- a/configs/tbs2910_defconfig +++ b/configs/tbs2910_defconfig @@ -11,10 +11,11 @@ CONFIG_CMD_HDMIDETECT=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 -CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi" +CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi" CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi" CONFIG_PRE_CONSOLE_BUFFER=y +CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb" CONFIG_BOUNCE_BUFFER=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Matrix U-Boot> " diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 3975f4cc8b..9380406529 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -8,6 +8,15 @@ #ifndef __TBS2910_CONFIG_H #define __TBS2910_CONFIG_H +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(SATA, sata, 0) \ + func(USB, usb, 0) + +#include + #include "mx6_common.h" /* General configuration */ @@ -80,6 +89,12 @@ #define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - 1024) */ #define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_addr=0x13000000\0" \ + "fdt_addr_r=0x13000000\0" \ + "kernel_addr_r=0x10008000\0" \ + "pxefile_addr_r=0x10008000\0" \ + "ramdisk_addr_r=0x18000000\0" \ + "scriptaddr=0x14000000\0" \ "bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \ "bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M@60 " \ "video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \ @@ -102,6 +117,8 @@ "setenv stderr serial,vga\0" \ "stderr=serial,vga\0" \ "stdin=serial,usbkbd\0" \ - "stdout=serial,vga\0" + "stdout=serial,vga\0" \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + BOOTENV #endif /* __TBS2910_CONFIG_H * */