From patchwork Sun Apr 3 01:18:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 89463 X-Patchwork-Delegate: wd@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 BCE77B6EFF for ; Sun, 3 Apr 2011 11:19:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EE91E28082; Sun, 3 Apr 2011 03:18:57 +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 52unAREObMyE; Sun, 3 Apr 2011 03:18:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5951B28083; Sun, 3 Apr 2011 03:18:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D85B728083 for ; Sun, 3 Apr 2011 03:18:52 +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 a+B7F6FJoWJx for ; Sun, 3 Apr 2011 03:18:51 +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.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 0EA2F28082 for ; Sun, 3 Apr 2011 03:18:49 +0200 (CEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6EBDB1B400A for ; Sun, 3 Apr 2011 01:18:44 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de Date: Sat, 2 Apr 2011 21:18:47 -0400 Message-Id: <1301793527-4784-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.4.1 Subject: [U-Boot] [PATCH] crc32: make command optional 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 Signed-off-by: Mike Frysinger --- note: needs previous exportenv/go patches merged first to avoid conflicts README | 1 + common/cmd_mem.c | 8 ++++++++ include/config_cmd_defaults.h | 3 ++- 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/README b/README index c8830dc..ccc2c57 100644 --- a/README +++ b/README @@ -625,6 +625,7 @@ The following options need to be configured: CONFIG_CMD_BOOTD bootd CONFIG_CMD_CACHE * icache, dcache CONFIG_CMD_CONSOLE coninfo + CONFIG_CMD_CRC32 * crc32 CONFIG_CMD_DATE * support for RTC, date/time... CONFIG_CMD_DHCP * DHCP support CONFIG_CMD_DIAG * Diagnostics diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 4b524cf..4f64bda 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -1077,6 +1077,8 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) return 0; } +#ifdef CONFIG_CMD_CRC32 + #ifndef CONFIG_CRC32_VERIFY int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) @@ -1161,6 +1163,8 @@ usage: } #endif /* CONFIG_CRC32_VERIFY */ +#endif + #ifdef CONFIG_CMD_MD5SUM int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { @@ -1277,6 +1281,8 @@ U_BOOT_CMD( "[.b, .w, .l] addr1 addr2 count" ); +#ifdef CONFIG_CMD_CRC32 + #ifndef CONFIG_CRC32_VERIFY U_BOOT_CMD( @@ -1296,6 +1302,8 @@ U_BOOT_CMD( #endif /* CONFIG_CRC32_VERIFY */ +#endif + U_BOOT_CMD( base, 2, 1, do_mem_base, "print or set address offset", diff --git a/include/config_cmd_defaults.h b/include/config_cmd_defaults.h index 79c0495..a55b268 100644 --- a/include/config_cmd_defaults.h +++ b/include/config_cmd_defaults.h @@ -1,7 +1,7 @@ /* * config_cmd_defaults.h - sane defaults for everyone * - * Copyright (c) 2010 Analog Devices Inc. + * Copyright (c) 2010-2011 Analog Devices Inc. * * Licensed under the GPL-2 or later. */ @@ -10,6 +10,7 @@ #define _CONFIG_CMD_DEFAULTS_H_ #define CONFIG_CMD_BOOTM 1 +#define CONFIG_CMD_CRC32 1 #define CONFIG_CMD_EXPORTENV 1 #define CONFIG_CMD_GO 1 #define CONFIG_CMD_IMPORTENV 1