* [U-Boot] [PATCH v2] ARM: at91 series: increase size for u-boot and change bootargs
@ 2012-11-13 1:58 Bo Shen
2012-11-26 10:59 ` Andreas Bießmann
0 siblings, 1 reply; 3+ messages in thread
From: Bo Shen @ 2012-11-13 1:58 UTC (permalink / raw)
To: u-boot
As to more features are added into the u-boot, which cause the u-boot
size larger than 0x40000 (256KiB), so increase the size for u-boot
through move offset of the u-boot environment. Or else, when execute
saveenv command, which will erase the end of the u-boot causing it can
not boot up again.
Also, the linux kernel image is bigger than 2MiB, so change the bootcmd
as the same time.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
Change since v1:
change the bootargs as to the size of mainline linux kernel image size
---
include/configs/at91sam9260ek.h | 17 ++++++++---------
include/configs/at91sam9261ek.h | 17 ++++++++---------
include/configs/at91sam9263ek.h | 15 ++++++++-------
include/configs/at91sam9m10g45ek.h | 15 +++++++--------
4 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index f921fac..905d5c5 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -210,16 +210,15 @@
/* bootstrap + u-boot + env + linux in nandflash */
#define CONFIG_ENV_IS_IN_NAND 1
-#define CONFIG_ENV_OFFSET 0x60000
-#define CONFIG_ENV_OFFSET_REDUND 0x80000
+#define CONFIG_ENV_OFFSET 0xc0000
+#define CONFIG_ENV_OFFSET_REDUND 0x100000
#define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
- "root=/dev/mtdblock5 " \
- "mtdparts=atmel_nand:128k(bootstrap)ro," \
- "256k(uboot)ro,128k(env1)ro," \
- "128k(env2)ro,2M(linux),-(root) " \
- "rw rootfstype=jffs2"
+#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
+#define CONFIG_BOOTARGS \
+ "console=ttyS0,115200 earlyprintk " \
+ "mtdparts=atmel_nand:" \
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mtdblock1 rw rootfstype=jffs2"
#endif
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 611e3e2..fc7643b 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -212,16 +212,15 @@
/* bootstrap + u-boot + env + linux in nandflash */
#define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET 0x60000
-#define CONFIG_ENV_OFFSET_REDUND 0x80000
+#define CONFIG_ENV_OFFSET 0xc0000
+#define CONFIG_ENV_OFFSET_REDUND 0x100000
#define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
- "root=/dev/mtdblock5 " \
- "mtdparts=atmel_nand:128k(bootstrap)ro," \
- "256k(uboot)ro,128k(env1)ro," \
- "128k(env2)ro,2M(linux),-(root) " \
- "rw rootfstype=jffs2"
+#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
+#define CONFIG_BOOTARGS \
+ "console=ttyS0,115200 earlyprintk " \
+ "mtdparts=atmel_nand:" \
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mtdblock1 rw rootfstype=jffs2"
#endif
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 3503822..fb94bc7 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -324,14 +324,15 @@
/* bootstrap + u-boot + env + linux in nandflash */
#define CONFIG_ENV_IS_IN_NAND 1
-#define CONFIG_ENV_OFFSET 0x60000
-#define CONFIG_ENV_OFFSET_REDUND 0x80000
+#define CONFIG_ENV_OFFSET 0xc0000
+#define CONFIG_ENV_OFFSET_REDUND 0x100000
#define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
- "root=/dev/mtdblock5 " \
- "mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) " \
- "rw rootfstype=jffs2"
+#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
+#define CONFIG_BOOTARGS \
+ "console=ttyS0,115200 earlyprintk " \
+ "mtdparts=atmel_nand:" \
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mtdblock1 rw rootfstype=jffs2"
#endif
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index e988d81..a09acd1 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -149,19 +149,18 @@
/* bootstrap + u-boot + env in nandflash */
#define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET 0x60000
-#define CONFIG_ENV_OFFSET_REDUND 0x80000
+#define CONFIG_ENV_OFFSET 0xc0000
+#define CONFIG_ENV_OFFSET_REDUND 0x100000
#define CONFIG_ENV_SIZE 0x20000
-#define CONFIG_BOOTCOMMAND "nand read 0x70000000 0x100000 0x200000;" \
+#define CONFIG_BOOTCOMMAND \
+ "nand read 0x70000000 0x200000 0x300000;" \
"bootm 0x70000000"
#define CONFIG_BOOTARGS \
"console=ttyS0,115200 earlyprintk " \
- "root=/dev/mtdblock5 " \
- "mtdparts=atmel_nand:128k(bootstrap)ro," \
- "256k(uboot)ro,128k(env1)ro,128k(env2)ro," \
- "2M at 1M(linux),-(root) " \
- "rw rootfstype=jffs2"
+ "mtdparts=atmel_nand:" \
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mtdblock1 rw rootfstype=jffs2"
#define CONFIG_BAUDRATE 115200
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] ARM: at91 series: increase size for u-boot and change bootargs
2012-11-13 1:58 [U-Boot] [PATCH v2] ARM: at91 series: increase size for u-boot and change bootargs Bo Shen
@ 2012-11-26 10:59 ` Andreas Bießmann
2012-11-27 1:28 ` Bo Shen
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2012-11-26 10:59 UTC (permalink / raw)
To: u-boot
Dear Bo Shen,
On 13.11.2012 02:58, Bo Shen wrote:
> As to more features are added into the u-boot, which cause the u-boot
> size larger than 0x40000 (256KiB), so increase the size for u-boot
> through move offset of the u-boot environment. Or else, when execute
> saveenv command, which will erase the end of the u-boot causing it can
> not boot up again.
>
> Also, the linux kernel image is bigger than 2MiB, so change the bootcmd
> as the same time.
>
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
> Change since v1:
> change the bootargs as to the size of mainline linux kernel image size
> ---
> include/configs/at91sam9260ek.h | 17 ++++++++---------
> include/configs/at91sam9261ek.h | 17 ++++++++---------
> include/configs/at91sam9263ek.h | 15 ++++++++-------
> include/configs/at91sam9m10g45ek.h | 15 +++++++--------
> 4 files changed, 31 insertions(+), 33 deletions(-)
>
> diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
> index f921fac..905d5c5 100644
> --- a/include/configs/at91sam9260ek.h
> +++ b/include/configs/at91sam9260ek.h
> @@ -210,16 +210,15 @@
>
> /* bootstrap + u-boot + env + linux in nandflash */
> #define CONFIG_ENV_IS_IN_NAND 1
> -#define CONFIG_ENV_OFFSET 0x60000
> -#define CONFIG_ENV_OFFSET_REDUND 0x80000
> +#define CONFIG_ENV_OFFSET 0xc0000
> +#define CONFIG_ENV_OFFSET_REDUND 0x100000
> #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
> -#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
> -#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
> - "root=/dev/mtdblock5 " \
> - "mtdparts=atmel_nand:128k(bootstrap)ro," \
> - "256k(uboot)ro,128k(env1)ro," \
> - "128k(env2)ro,2M(linux),-(root) " \
> - "rw rootfstype=jffs2"
> +#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
> +#define CONFIG_BOOTARGS \
> + "console=ttyS0,115200 earlyprintk " \
> + "mtdparts=atmel_nand:" \
> + "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
> + "root=/dev/mtdblock1 rw rootfstype=jffs2"
I personally prefer to change bootlaoder related stuff also from linux.
With this change you can not access the env partition from linux
therefore you can never use tools like fw_pritnenv/fw_setenv.
Can you please change this to a reasonable configuration. I think
current setups will require about 1 sector for bootstrap, 1 or 2 sectors
for each env, about 4 to 6 sectors for u-boot, another bunch of sectors
for linux and maybe some place to store a configuration blob (think of
'Falcon mode' or FDT).
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] ARM: at91 series: increase size for u-boot and change bootargs
2012-11-26 10:59 ` Andreas Bießmann
@ 2012-11-27 1:28 ` Bo Shen
0 siblings, 0 replies; 3+ messages in thread
From: Bo Shen @ 2012-11-27 1:28 UTC (permalink / raw)
To: u-boot
Hi Andreas,
On 11/26/2012 18:59, Andreas Bie?mann wrote:
> Dear Bo Shen,
>
> On 13.11.2012 02:58, Bo Shen wrote:
>> As to more features are added into the u-boot, which cause the u-boot
>> size larger than 0x40000 (256KiB), so increase the size for u-boot
>> through move offset of the u-boot environment. Or else, when execute
>> saveenv command, which will erase the end of the u-boot causing it can
>> not boot up again.
>>
>> Also, the linux kernel image is bigger than 2MiB, so change the bootcmd
>> as the same time.
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> ---
>> Change since v1:
>> change the bootargs as to the size of mainline linux kernel image size
>> ---
>> include/configs/at91sam9260ek.h | 17 ++++++++---------
>> include/configs/at91sam9261ek.h | 17 ++++++++---------
>> include/configs/at91sam9263ek.h | 15 ++++++++-------
>> include/configs/at91sam9m10g45ek.h | 15 +++++++--------
>> 4 files changed, 31 insertions(+), 33 deletions(-)
>>
>> diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
>> index f921fac..905d5c5 100644
>> --- a/include/configs/at91sam9260ek.h
>> +++ b/include/configs/at91sam9260ek.h
>> @@ -210,16 +210,15 @@
>>
>> /* bootstrap + u-boot + env + linux in nandflash */
>> #define CONFIG_ENV_IS_IN_NAND 1
>> -#define CONFIG_ENV_OFFSET 0x60000
>> -#define CONFIG_ENV_OFFSET_REDUND 0x80000
>> +#define CONFIG_ENV_OFFSET 0xc0000
>> +#define CONFIG_ENV_OFFSET_REDUND 0x100000
>> #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
>> -#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
>> -#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
>> - "root=/dev/mtdblock5 " \
>> - "mtdparts=atmel_nand:128k(bootstrap)ro," \
>> - "256k(uboot)ro,128k(env1)ro," \
>> - "128k(env2)ro,2M(linux),-(root) " \
>> - "rw rootfstype=jffs2"
>> +#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
>> +#define CONFIG_BOOTARGS \
>> + "console=ttyS0,115200 earlyprintk " \
>> + "mtdparts=atmel_nand:" \
>> + "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
>> + "root=/dev/mtdblock1 rw rootfstype=jffs2"
>
> I personally prefer to change bootlaoder related stuff also from linux.
> With this change you can not access the env partition from linux
> therefore you can never use tools like fw_pritnenv/fw_setenv.
> Can you please change this to a reasonable configuration. I think
> current setups will require about 1 sector for bootstrap, 1 or 2 sectors
> for each env, about 4 to 6 sectors for u-boot, another bunch of sectors
> for linux and maybe some place to store a configuration blob (think of
> 'Falcon mode' or FDT).
Ok, I will consider this and prepare for the next version.
Thanks.
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-27 1:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13 1:58 [U-Boot] [PATCH v2] ARM: at91 series: increase size for u-boot and change bootargs Bo Shen
2012-11-26 10:59 ` Andreas Bießmann
2012-11-27 1:28 ` Bo Shen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox