From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Change kernel address in dataflash to match u-boot's size
Date: Mon, 2 Jan 2012 06:18:05 +0100 [thread overview]
Message-ID: <201201020618.05875.marek.vasut@gmail.com> (raw)
In-Reply-To: <1325474968-18373-1-git-send-email-alexandre.belloni@piout.net>
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap 0x00000000
> ubootenv 0x00004200
> uboot 0x00008400
> kernel 0x00042000
>
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore. Loading the kernel from 0x44000 will make the
> process easier for users using the default configuration but they'll
> have to remember to flash the kernel at 0x44000.
You're just pushing it slowly further. That's bogus:
1) ubootenv is at weird offset ... why such a weird number? Also, what about
redund. env?
2) u-boot itself is at weird offset ... just set it to some normal location and
let it be eg. up to 512kb big, to make sure you don't need to change it in the
future.
3) Why is env at offset 0x4200 ... is the bootstrap exactly so big ? what about
erasing nor, you can't make sure you won't overwrite those 0x200 bytes safely
too, right ?
=> I'd do the layout like this:
0x00000 - bootstrap
0x05000 - u-boot (align to block size)
0x85000 - env (~16kb)
0x89000 - env redund
< note, here's some space, so align as necessary >
0x90000 - kernel
It wastes a bit, but it's ready for future growth
M
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
> ---
> include/configs/at91sam9260ek.h | 4 ++--
> include/configs/at91sam9261ek.h | 4 ++--
> include/configs/at91sam9263ek.h | 2 +-
> include/configs/at91sam9rlek.h | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/configs/at91sam9260ek.h
> b/include/configs/at91sam9260ek.h index db52ee6..7f99975 100644
> --- a/include/configs/at91sam9260ek.h
> +++ b/include/configs/at91sam9260ek.h
> @@ -188,7 +188,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xC0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 "
\
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) " \
> @@ -202,7 +202,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xD0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xD0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 "
\
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) " \
> diff --git a/include/configs/at91sam9261ek.h
> b/include/configs/at91sam9261ek.h index 5140b26..1aa6373 100644
> --- a/include/configs/at91sam9261ek.h
> +++ b/include/configs/at91sam9261ek.h
> @@ -190,7 +190,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xC0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 "
\
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) " \
> @@ -204,7 +204,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xD0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xD0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 "
\
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) " \
> diff --git a/include/configs/at91sam9263ek.h
> b/include/configs/at91sam9263ek.h index 8399246..658ae73 100644
> --- a/include/configs/at91sam9263ek.h
> +++ b/include/configs/at91sam9263ek.h
> @@ -317,7 +317,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xC0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) "\
> diff --git a/include/configs/at91sam9rlek.h
> b/include/configs/at91sam9rlek.h index 79ea1f2..dc6e007 100644
> --- a/include/configs/at91sam9rlek.h
> +++ b/include/configs/at91sam9rlek.h
> @@ -156,7 +156,7 @@
> #define CONFIG_ENV_OFFSET 0x4200
> #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 +
> CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE 0x4200
> -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND "cp.b 0xC0044000 0x22000000 0x210000; bootm"
> #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
> "root=/dev/mtdblock0 " \
> "mtdparts=atmel_nand:-(root) "\
next prev parent reply other threads:[~2012-01-02 5:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-02 3:29 [U-Boot] [PATCH] Change kernel address in dataflash to match u-boot's size Alexandre Belloni
2012-01-02 5:18 ` Marek Vasut [this message]
2012-01-02 12:44 ` Alexandre Belloni
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=201201020618.05875.marek.vasut@gmail.com \
--to=marek.vasut@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox