From patchwork Mon Oct 3 09:57:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: loic.minier@linaro.org X-Patchwork-Id: 4490 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AF50823F57 for ; Mon, 3 Oct 2011 10:06:38 +0000 (UTC) Received: from mail-wy0-f180.google.com (mail-wy0-f180.google.com [74.125.82.180]) by fiordland.canonical.com (Postfix) with ESMTP id 86BC2A182C7 for ; Mon, 3 Oct 2011 10:06:38 +0000 (UTC) Received: by wyh11 with SMTP id 11so4165152wyh.11 for ; Mon, 03 Oct 2011 03:06:38 -0700 (PDT) Received: by 10.223.5.76 with SMTP id 12mr23288659fau.103.1317635856263; Mon, 03 Oct 2011 02:57:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs8709laf; Mon, 3 Oct 2011 02:57:36 -0700 (PDT) Received: by 10.223.36.4 with SMTP id r4mr1112852fad.109.1317635855166; Mon, 03 Oct 2011 02:57:35 -0700 (PDT) Received: from pig2.dooz.org (pig2.dooz.org. [88.191.118.219]) by mx.google.com with ESMTPS id c19si6575150fah.25.2011.10.03.02.57.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Oct 2011 02:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of lool@bee.dooz.org designates 88.191.118.219 as permitted sender) client-ip=88.191.118.219; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lool@bee.dooz.org designates 88.191.118.219 as permitted sender) smtp.mail=lool@bee.dooz.org Received: from bee.dooz.org (unknown [IPv6:2a01:e35:8a6e:5e80:224:7eff:fe14:65c3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bee.dooz.org", Issuer "dooz.org CA" (verified OK)) by pig2.dooz.org (Postfix) with ESMTPS id A9702C0BE4; Mon, 3 Oct 2011 11:57:34 +0200 (CEST) Received: by bee.dooz.org (Postfix, from userid 1000) id F1D2279AC; Mon, 3 Oct 2011 11:57:33 +0200 (CEST) From: =?UTF-8?q?Lo=C3=AFc=20Minier?= To: u-boot@lists.denx.de Cc: =?UTF-8?q?Lo=C3=AFc=20Minier?= , Heiko Schocher , patches@linaro.org Subject: [PATCH 3/3] ublimage: NAND block size isn't set at build-time Date: Mon, 3 Oct 2011 11:57:12 +0200 Message-Id: <1317635832-10764-4-git-send-email-loic.minier@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1317635832-10764-1-git-send-email-loic.minier@linaro.org> References: <1317635832-10764-1-git-send-email-loic.minier@linaro.org> MIME-Version: 1.0 mkimage's ublimage support can't depend of build-time board configs; instead, this should be set in ublimage.cfg. Since currently no configs in u-boot override the NAND block size, hardcode it as such in ublimage.h to fix a build failure with "make tools": gcc [...] -o ublimage.o ublimage.c -c In file included from ublimage.c:37:0: ublimage.h:31:20: fatal error: config.h: No such file or directory Cc: Heiko Schocher Cc: patches@linaro.org Signed-off-by: Loïc Minier Acked-by: Heiko Schocher --- tools/ublimage.h | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/ublimage.h b/tools/ublimage.h index c926689..93ec8ee 100644 --- a/tools/ublimage.h +++ b/tools/ublimage.h @@ -28,12 +28,6 @@ #ifndef _UBLIMAGE_H_ #define _UBLIMAGE_H_ -#include - -#if !defined(CONFIG_SYS_UBL_BLOCK) -#define CONFIG_SYS_UBL_BLOCK 512 -#endif - enum ublimage_cmd { CMD_INVALID, CMD_BOOT_MODE, @@ -71,6 +65,9 @@ enum ublimage_fld_types { /* Define max UBL image size */ #define UBL_IMAGE_SIZE (0x00003800u) +/* one NAND block */ +#define UBL_BLOCK_SIZE 512 + /* from sprufg5a.pdf Table 109 */ struct ubl_header { uint32_t magic; /* Magic Number, see UBL_* defines */ @@ -97,7 +94,7 @@ struct ubl_header { * Magic Number indicates fast EMIF boot). */ /* to fit in one nand block */ - unsigned char res[CONFIG_SYS_UBL_BLOCK - 8 * 4]; + unsigned char res[UBL_BLOCK_SIZE - 8 * 4]; }; #endif /* _UBLIMAGE_H_ */