From patchwork Fri Dec 21 16:59:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 207848 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id BCB362C008A for ; Sat, 22 Dec 2012 04:03:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7233A4A0F5; Fri, 21 Dec 2012 18:03:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XXLMh1UcCBVp; Fri, 21 Dec 2012 18:03:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 008804A0BA; Fri, 21 Dec 2012 18:03:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 51E6C4A088 for ; Fri, 21 Dec 2012 18:03:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c3CikTySQT5q for ; Fri, 21 Dec 2012 18:03:35 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) by theia.denx.de (Postfix) with ESMTPS id 8A9F34A08B for ; Fri, 21 Dec 2012 18:03:34 +0100 (CET) Received: by mail-yh0-f43.google.com with SMTP id 3so1008716yhp.16 for ; Fri, 21 Dec 2012 09:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=jpbqV8vaxY5fFivRecdGbLYiNlEQEjp/yoTa0mma71o=; b=WLrl30tmcyELeiiCGNcVfZ2B5YEVPCppkfuUHxDCtG3DfDcO26udPXDbuf87RBlLnA +coE9jNTvz0ObtuKjhBZ0Am+MWNnr6XpIIj5DGsjhkPUdjjRIJjYWtZq3LcY28XlF0bb qt7ijkQH5Ex/XbEmyzE2owcoeRuccxKFJV8KUoox33BYfHUHl/3dkhyl1f1XeoJmVlwN izsc4gSKeKXM+Kklpb7oNGw46UrVf0VXuhGCtvMZF9/TirM3RcdnkpQVLK1AuQcUrwzy AlgK0MUhgAMlYh1TXG10i+lgRPkCrODDBXV1c9nCTCFaZvlWPEF7dIpteA+JnsyJN1PS 1ASQ== X-Received: by 10.236.52.198 with SMTP id e46mr13008026yhc.57.1356108983473; Fri, 21 Dec 2012 08:56:23 -0800 (PST) Received: from nano.lab.ossystems.com.br.lab.ossystems.com.br ([187.23.158.26]) by mx.google.com with ESMTPS id k63sm11162510yhj.20.2012.12.21.08.56.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Dec 2012 08:56:23 -0800 (PST) From: Otavio Salvador To: U-Boot Mailing List Date: Fri, 21 Dec 2012 14:59:09 -0200 Message-Id: <1356109151-6623-8-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1356109151-6623-1-git-send-email-otavio@ossystems.com.br> References: <1356109151-6623-1-git-send-email-otavio@ossystems.com.br> Cc: Fabio Estevam , Otavio Salvador Subject: [U-Boot] [PATCH 7/9] mx53loco: Add support to dynamically choose between ftd use or not X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Otavio Salvador --- include/configs/mx53loco.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 4cfdc0b..505957c 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -118,6 +118,8 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "uimage=uImage\0" \ + "ftd_file=imx53-qsb.dtb\0" \ + "ftd_addr=0x71000000\0" \ "mmcdev=0\0" \ "mmcpart=2\0" \ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ @@ -129,13 +131,22 @@ "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ - "bootm\0" \ + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} ${ftd_file}; then " \ + "bootm ${loadaddr} - ${ftd_addr}; " \ + "else " \ + "bootm; " \ + "fi;\0" \ "netargs=setenv bootargs console=ttymxc0,${baudrate} " \ "root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ "netboot=echo Booting from net ...; " \ "run netargs; " \ - "dhcp ${uimage}; bootm\0" \ + "dhcp ${uimage}; " \ + "if dhcp ${ftd_addr} ${ftd_file}; then " \ + "bootm ${loadaddr} - ${ftd_addr}; " \ + "else " \ + "bootm; " \ + "fi;\0" #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \