From patchwork Mon Jul 30 16:48:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 174047 X-Patchwork-Delegate: trini@ti.com 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 127F92C007C for ; Tue, 31 Jul 2012 02:49:29 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 526B9280CB; Mon, 30 Jul 2012 18:49:27 +0200 (CEST) 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 oSTg8opPorgc; Mon, 30 Jul 2012 18:49:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 344B128096; Mon, 30 Jul 2012 18:49:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8C08C2808F for ; Mon, 30 Jul 2012 18:49:07 +0200 (CEST) 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 XxoPc1a9Ns8U for ; Mon, 30 Jul 2012 18:49:06 +0200 (CEST) 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-gh0-f172.google.com (mail-gh0-f172.google.com [209.85.160.172]) by theia.denx.de (Postfix) with ESMTPS id 9FD9128090 for ; Mon, 30 Jul 2012 18:49:04 +0200 (CEST) Received: by ghbg16 with SMTP id g16so4944672ghb.3 for ; Mon, 30 Jul 2012 09:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=RB4ElISiNb7c8F8NPenbDwBut5jOzaEDUACnj+ffijI=; b=NrAq2837n8EC614JCsc6Sisl1t0b+XmUIYYnbus6Ze4U2oKK8q33ukwr5x+28XZUEk 4/iXBuF2GqnCFWQoNEtnVbiLWS/wSUGOdQf3mBEu9VVHDftu2fSEeRqqLWuLUWr2YYu7 iPA82p7EVGhQyaLJSGls18PjF6rRuHOIsTOh+Nv+vkCSCJfPLnrquVHYQ7cz8x+eX0qL 5/37eS3HPhfH9sWGuJbcmqf4Qdrmd3x7RWdPqDTl7c1BsNQNleZ8mWUxienZvGt51bvE Ct0lMhcfqUXlihb/mqzaac9DaFbViCtnLzi6z04n0Ih9HBNxlV+JUbM5wVWCylsnrGz4 fULg== Received: by 10.66.75.98 with SMTP id b2mr25835056paw.60.1343666943337; Mon, 30 Jul 2012 09:49:03 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id ny4sm8227805pbb.57.2012.07.30.09.49.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 09:49:02 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 30 Jul 2012 09:48:48 -0700 Message-Id: <1343666943-25378-3-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343666943-25378-1-git-send-email-trini@ti.com> References: <1343666943-25378-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH 02/17] am335x_evm: Update config for common usage 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 - Add default commands - Add HUSH parser - Make environment, malloc areas larger - Add ATAGS and OF_LIBFDT - Add defaults to boot ramdisk and MMC, use uEnv.txt Signed-off-by: Tom Rini --- include/configs/am335x_evm.h | 69 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index d0fbc88..32a7441 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -17,32 +17,81 @@ #define __CONFIG_AM335X_EVM_H #define CONFIG_AM33XX -#define CONFIG_CMD_MEMORY /* for mtest */ -#undef CONFIG_GZIP -#undef CONFIG_ZLIB -#undef CONFIG_SYS_HUSH_PARSER #undef CONFIG_CMD_NET #include #include -#define CONFIG_ENV_SIZE 0x400 -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 * 1024)) +#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ +#define CONFIG_SYS_MALLOC_LEN (1024 << 10) +#define CONFIG_SYS_LONGHELP /* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT "U-Boot# " #define CONFIG_SYS_NO_FLASH #define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */ #define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM +#define CONFIG_OF_LIBFDT +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG + +/* commands to include */ +#include + #define CONFIG_CMD_ASKENV #define CONFIG_VERSION_VARIABLE /* set to negative value for no autoboot */ #define CONFIG_BOOTDELAY 3 -#define CONFIG_SYS_AUTOLOAD "no" -#define CONFIG_BOOTFILE "uImage" #define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=yes\0" \ - "ramdisk_file=ramdisk.gz\0" \ + "loadaddr=0x80200000\0" \ + "rdaddr=0x81000000\0" \ + "bootfile=/boot/uImage\0" \ + "console=ttyO0,115200n8\0" \ + "optargs=\0" \ + "mmcdev=0\0" \ + "mmcroot=/dev/mmcblk0p2 rw\0" \ + "mmcrootfstype=ext3 rootwait\0" \ + "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ + "ramrootfstype=ext2\0" \ + "mmcargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${mmcroot} " \ + "rootfstype=${mmcrootfstype}\0" \ + "bootenv=uEnv.txt\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ + "ramargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${ramroot} " \ + "rootfstype=${ramrootfstype}\0" \ + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ + "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ + "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "bootm ${loadaddr}\0" \ + "ramboot=echo Booting from ramdisk ...; " \ + "run ramargs; " \ + "bootm ${loadaddr}\0" \ + +#define CONFIG_BOOTCOMMAND \ + "if mmc rescan ${mmcdev}; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootenv; then " \ + "echo Loaded environment from ${bootenv};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "if run loaduimage; then " \ + "run mmcboot;" \ + "fi;" \ + "fi;" \ /* Clock Defines */ #define V_OSCK 24000000 /* Clock output from T2 */