From patchwork Fri Apr 29 00:52:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 93361 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 C26D6B6F59 for ; Fri, 29 Apr 2011 10:54:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 46CBB280A1; Fri, 29 Apr 2011 02:54:12 +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 bief6Hgvg+DT; Fri, 29 Apr 2011 02:54:12 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8491B280AC; Fri, 29 Apr 2011 02:54:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D37612808D for ; Fri, 29 Apr 2011 02:54:06 +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 t7NgXLBTKXD7 for ; Fri, 29 Apr 2011 02:54: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 smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by theia.denx.de (Postfix) with ESMTPS id C4ED82809D for ; Fri, 29 Apr 2011 02:54:01 +0200 (CEST) Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p3T0rk7c025524; Thu, 28 Apr 2011 17:53:46 -0700 Received: from sglass.mtv.corp.google.com (sglass.mtv.corp.google.com [172.22.72.144]) by wpaz33.hot.corp.google.com with ESMTP id p3T0ritZ022666; Thu, 28 Apr 2011 17:53:45 -0700 Received: by sglass.mtv.corp.google.com (Postfix, from userid 121222) id AE7091405CC; Thu, 28 Apr 2011 17:53:44 -0700 (PDT) From: Simon Glass To: u-boot@lists.denx.de Date: Thu, 28 Apr 2011 17:52:51 -0700 Message-Id: <1304038371-22931-8-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1304038371-22931-1-git-send-email-sjg@chromium.org> References: <1304038371-22931-1-git-send-email-sjg@chromium.org> X-System-Of-Record: true Subject: [U-Boot] [PATCH 7/7] Tegra2: config: enable network booting X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 This enables networking booting using a USB dongle plugged into the side seaboard port. Signed-off-by: Simon Glass --- include/configs/seaboard.h | 5 +++ include/configs/tegra2-common.h | 66 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-) -- 1.7.3.1 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 76ffd95..696fbff 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -53,4 +53,9 @@ /* Put USB1 in host mode */ #define CONFIG_TEGRA2_USB1_HOST +#define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_EXTRA_ENV_SETTINGS_COMMON \ + "board=seaboard\0" \ + + #endif /* __CONFIG_H */ diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index ae417ea..0b6c928 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -113,6 +113,9 @@ #define CONFIG_EFI_PARTITION #define CONFIG_CMD_EXT2 +/* support USB ethernet adapters */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX /* include default commands */ #include @@ -123,7 +126,37 @@ #undef CONFIG_CMD_IMI #undef CONFIG_CMD_IMLS #undef CONFIG_CMD_NFS /* NFS support */ -#undef CONFIG_CMD_NET /* network support */ + +/* + * Ethernet support + */ +#define CONFIG_CMD_NET +#define CONFIG_NET_MULTI +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP + +/* + * BOOTP / TFTP options + */ +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_TFTP_TSIZE + +#define CONFIG_IPADDR 10.0.0.2 +#define CONFIG_SERVERIP 10.0.0.1 +#define CONFIG_BOOTFILE uImage + +/* + * We decorate the nfsroot name so that multiple users / boards can easily + * share an NFS server: + * user - username, e.g. 'frank' + * board - board, e.g. 'seaboard' + * serial - serial number, e.g. '1234' + */ +#define CONFIG_ROOTPATH "/export/nfsroot-${user}-${board}-${serial#}" +#define CONFIG_TFTPPATH "/tftpboot/uImage-${user}-${board}-${serial#}" /* turn on command-line edit/hist/auto */ #define CONFIG_CMDLINE_EDITING @@ -133,10 +166,37 @@ #define CONFIG_SYS_NO_FLASH /* Environment information */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ "console=ttyS0,115200n8\0" \ - "mem=" TEGRA2_SYSMEM "\0" \ "smpflag=smp\0" \ + "user=user\0" \ + "serial#=1\0" \ + "tftpserverip=172.22.72.144\0" \ + "nfsserverip=172.22.72.144\0" \ + "extra_bootargs=\0" \ + "platform_extras=mem= " TEGRA2_SYSMEM"\0" \ + "regen_all="\ + "setenv common_bootargs console=${console} " \ + "${platform_extras} noinitrd; " \ + "setenv bootargs ${common_bootargs} ${extra_bootargs} " \ + "${bootdev_bootargs}\0" \ + "regen_net_bootargs=setenv bootdev_bootargs " \ + "dev=/dev/nfs4 rw nfsroot=${nfsserverip}:${rootpath} " \ + "ip=dhcp; " \ + "run regen_all\0" \ + "dhcp_setup=setenv tftppath " CONFIG_TFTPPATH "; " \ + "setenv rootpath " CONFIG_ROOTPATH "; " \ + "setenv autoload n; " \ + "run regen_net_bootargs\0" \ + "dhcp_boot=run dhcp_setup; " \ + "bootp; tftpboot ${loadaddr} ${tftpserverip}:${tftppath}; " \ + "bootm ${loadaddr}\0" \ + +#define CONFIG_BOOTCOMMAND \ + "usb start; "\ + "if test ${ethact} != \"\"; then "\ + "run dhcp_boot ; " \ + "fi ; " \ #define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ #define CONFIG_BOOTDELAY 2 /* -1 to disable auto boot */