From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] nand: sunxi: change BLOCK_SIZE in mksunxiboot to match NAND block size
Date: Thu, 21 May 2015 20:12:59 +0200 [thread overview]
Message-ID: <555E202B.3040809@redhat.com> (raw)
In-Reply-To: <1432216765-8421-2-git-send-email-r.spliet@ultimaker.com>
Hi,
On 21-05-15 15:59, Roy Spliet wrote:
> From: Daniel Kochma?ski <dkochmanski@turtle-solutions.eu>
>
> This change is necessary to calculate correct checksum for NAND
> boot. Works both for MMC and NAND. Without it BROM rejects boot image
> as invalid (bad checksum). (Changes block size from 0x200 to 0x2000).
>
> V2: Document decision in source too
>
> Signed-off-by: Daniel Kochma?ski <dkochmanski@turtle-solutions.eu>
> Cc: Ian Campbell <ijc@hellion.org.uk>
> Cc: Hans De Goede <hdegoede@redhat.com>
> Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Looks good: Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> tools/mksunxiboot.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/mksunxiboot.c b/tools/mksunxiboot.c
> index 0035f6e..3361251 100644
> --- a/tools/mksunxiboot.c
> +++ b/tools/mksunxiboot.c
> @@ -65,7 +65,13 @@ int gen_check_sum(struct boot_file_head *head_p)
>
> #define SUN4I_SRAM_SIZE 0x7600 /* 0x7748+ is used by BROM */
> #define SRAM_LOAD_MAX_SIZE (SUN4I_SRAM_SIZE - sizeof(struct boot_file_head))
> -#define BLOCK_SIZE 512
> +
> +/*
> + * BROM (at least on A10 and A20) requires NAND-images to be explicitly aligned
> + * to a multiple of 8K, and rejects the image otherwise. MMC-images are fine
> + * with 512B blocks. To cater for both, align to the largest of the two.
> + */
> +#define BLOCK_SIZE 0x2000
>
> struct boot_img {
> struct boot_file_head header;
>
next prev parent reply other threads:[~2015-05-21 18:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 13:59 [U-Boot] Proposal to add NAND-boot support for Sunxi SPL Roy Spliet
2015-05-21 13:59 ` [U-Boot] [PATCH 1/2] nand: sunxi: change BLOCK_SIZE in mksunxiboot to match NAND block size Roy Spliet
2015-05-21 18:12 ` Hans de Goede [this message]
2015-05-21 13:59 ` [U-Boot] [PATCH 2/2] nand: sunxi: Add support for booting from internal NAND memory Roy Spliet
2015-05-21 18:39 ` Hans de Goede
2015-05-21 19:02 ` Ian Campbell
2015-05-22 7:30 ` Hans de Goede
2015-05-22 8:57 ` Ian Campbell
2015-06-01 22:14 ` Scott Wood
2015-06-02 6:43 ` Roy Spliet
2015-05-21 18:08 ` [U-Boot] Proposal to add NAND-boot support for Sunxi SPL Hans de Goede
2015-05-22 2:23 ` kaplan2539 at gmail.com
2015-05-22 7:04 ` Roy Spliet
2015-05-25 18:35 ` Hans de Goede
2015-05-25 20:39 ` Hans de Goede
2015-05-26 7:34 ` Roy Spliet
2015-05-26 14:52 ` Hans de Goede
2015-05-26 19:56 ` Alexander Kaplan
2015-05-26 20:06 ` Daniel Kochmański
2015-05-26 20:20 ` Hans de Goede
2015-05-22 7:38 ` [U-Boot] [linux-sunxi] " Michal Suchanek
2015-05-22 10:12 ` [U-Boot] " Roy Spliet
2015-05-22 13:51 ` Hans de Goede
[not found] ` <5561D264.4000705@ultimaker.com>
2015-05-25 7:20 ` Hans de Goede
2015-05-25 9:29 ` Daniel Kochmański
2015-05-25 10:10 ` Hans de Goede
2015-05-27 20:19 ` [U-Boot] [linux-sunxi] " Henrik Nordström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555E202B.3040809@redhat.com \
--to=hdegoede@redhat.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.