AT91SAM9*: Change kernel address in dataflash to match u-boot's size
PATCH v5 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
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.
Now, the layout is:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00084000
---
Changes for v2:
- changed the layout as per Marek's recommendation
Changes for v3:
- prefixed the patch title with AT91SAM9*:
Changes for v4:
- changed the layout again as per Ulf Samuelsson's request:
http://lists.denx.de/pipermail/u-boot/2012-February/118988.html
Changes for v5:
- also update partition list
board/atmel/at91sam9260ek/partition.c | 2 +- board/atmel/at91sam9261ek/partition.c | 2 +- board/atmel/at91sam9263ek/partition.c | 2 +- board/atmel/at91sam9rlek/partition.c | 2 +- include/configs/at91sam9260ek.h | 5 +++-- include/configs/at91sam9261ek.h | 5 +++-- include/configs/at91sam9263ek.h | 4 +++- include/configs/at91sam9rlek.h | 3 ++- 8 files changed, 15 insertions(+), 10 deletions(-)
board/atmel/at91sam9260ek/partition.c +1 -1
@@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9261ek/partition.c +1 -1
@@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9263ek/partition.c +1 -1
@@ -34,6 +34,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9rlek/partition.c +1 -1
@@ -34,6 +34,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
include/configs/at91sam9260ek.h +3 -2
@@ -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 0xC0084000 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 0xD0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -231,6 +231,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
include/configs/at91sam9261ek.h +3 -2
@@ -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 0xC0084000 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 0xD0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -233,6 +233,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP #define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
include/configs/at91sam9263ek.h +3 -1
@@ -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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
@@ -347,6 +347,8 @@#define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +#define CONFIG_AUTO_COMPLETE +/* * Size of malloc() pool
include/configs/at91sam9rlek.h +2 -1
@@ -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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
@@ -183,6 +183,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
Signature · 1 line
1.7.5.4
Andreas Bießmann
NAKPATCH v5 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
Dear Alexandre Belloni,
I would like to apply this to upcoming 2012.07. Unfortunately this patch does not apply cleanly on current u-boot-atmel, please rebase and fix some minor parts.
Quoted 28 lines · Alexandre Belloni
On at91sam platforms, u-boot grew larger than the allocated size in dataflash, the layout was:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00042000u-boot with the defconfig doesn't seem to fit in
0x42000-0x8400=0x39C00bytes anymore.Now, the layout is:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00084000Signed-off-by Alexandre Belloni <[email protected]>---
Changes for v2:
- changed the layout as per Marek's recommendation
Changes for v3:
- prefixed the patch title with AT91SAM9*:
Changes for v4:
- changed the layout again as per Ulf Samuelsson's request:http://lists.denx.de/pipermail/u-boot/2012-February/118988.htmlChanges for v5:
- also update partition list
Quoted 10 lines
board/atmel/at91sam9260ek/partition.c | 2 +- board/atmel/at91sam9261ek/partition.c | 2 +- board/atmel/at91sam9263ek/partition.c | 2 +- board/atmel/at91sam9rlek/partition.c | 2 +- include/configs/at91sam9260ek.h | 5 +++-- include/configs/at91sam9261ek.h | 5 +++-- include/configs/at91sam9263ek.h | 4 +++- include/configs/at91sam9rlek.h | 3 ++- 8 files changed, 15 insertions(+), 10 deletions(-)
<ACK for partition stuff>
include/configs/at91sam9260ek.h
Quoted 4 lines
include/configs/at91sam9260ek.h +0
-0
<ACK for BOOTCMD stuff>
include/configs/at91sam9260ek.h line 234
Quoted 5 lines
include/configs/at91sam9260ek.h +1
-0@@ -231,6 +231,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE
please send another patch or write this change down in commit message, separate patch preferred.
include/configs/at91sam9261ek.h
Quoted 7 lines
include/configs/at91sam9260ek.h +0
-0/* * Size of malloc() pool include/configs/at91sam9261ek.h +0
-0
<ACK for BOOTCMD stuff>
include/configs/at91sam9261ek.h line 236
Quoted 5 lines
include/configs/at91sam9261ek.h +1
-0@@ -233,6 +233,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP #define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE
Again, please separate patch here.
Quoted 17 lines
include/configs/at91sam9261ek.h +0
-0/* * Size of malloc() pool include/configs/at91sam9263ek.h +1
-1@@ -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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
include/configs/at91sam9263ek.h line 352
Quoted 6 lines
include/configs/at91sam9263ek.h +2
-0@@ -347,6 +347,8 @@#define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +#define CONFIG_AUTO_COMPLETE +
NAK:
a) unnecessary double blank line here
b) CONFIG_AUTO_COMPLETE is defined some lines above
c) does not apply cleanly, cause CONFIG_SYS_PROMPT_HUSH_PS2 was removed previously
Quoted 16 lines
include/configs/at91sam9263ek.h +0
-0/* * Size of malloc() pool include/configs/at91sam9rlek.h +1
-1@@ -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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
include/configs/at91sam9rlek.h line 186
Quoted 4 lines
include/configs/at91sam9rlek.h +1
-0@@ -183,6 +183,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE
separate patch please.
Best regards
Andreas Bie?mann
PATCH v6 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
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.
Now, the layout is:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00084000
---
Changes for v2:
- changed the layout as per Marek's recommendation Changes for v3:
- prefixed the patch title with AT91SAM9*:
Changes for v4:
- changed the layout again as per Ulf Samuelsson's request:
http://lists.denx.de/pipermail/u-boot/2012-February/118988.html
Changes for v5:
- also update partition list
Changes for v6:
- rebase on latest u-boot-atmel
board/atmel/at91sam9260ek/partition.c | 2 +- board/atmel/at91sam9261ek/partition.c | 2 +- board/atmel/at91sam9263ek/partition.c | 2 +- board/atmel/at91sam9rlek/partition.c | 2 +- include/configs/at91sam9260ek.h | 5 +++-- include/configs/at91sam9261ek.h | 5 +++-- include/configs/at91sam9263ek.h | 2 +- include/configs/at91sam9rlek.h | 3 ++- 8 files changed, 13 insertions(+), 10 deletions(-)
board/atmel/at91sam9260ek/partition.c +1 -1
@@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9261ek/partition.c +1 -1
@@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9263ek/partition.c +1 -1
@@ -34,6 +34,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
board/atmel/at91sam9rlek/partition.c +1 -1
@@ -34,6 +34,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
include/configs/at91sam9260ek.h +3 -2
@@ -187,7 +187,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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -201,7 +201,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 0xD0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -230,6 +230,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
include/configs/at91sam9261ek.h +3 -2
@@ -189,7 +189,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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -203,7 +203,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 0xD0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \
@@ -232,6 +232,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP #define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
include/configs/at91sam9263ek.h +1 -1
@@ -318,7 +318,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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
include/configs/at91sam9rlek.h +2 -1
@@ -155,7 +155,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 0xC0084000 0x22000000 0x210000; bootm"#define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) "\
@@ -182,6 +182,7 @@#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)#define CONFIG_SYS_LONGHELP 1#define CONFIG_CMDLINE_EDITING 1 +#define CONFIG_AUTO_COMPLETE /* * Size of malloc() pool
Signature · 1 line
1.7.9.5
PATCH v6 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
Dear Alexandre Belloni,
Quoted 45 lines · Alexandre Belloni
On at91sam platforms, u-boot grew larger than the allocated size in dataflash, the layout was:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00042000u-boot with the defconfig doesn't seem to fit in
0x42000-0x8400=0x39C00bytes anymore.Now, the layout is:
bootstrap 0x00000000 ubootenv 0x00004200 uboot 0x00008400 kernel 0x00084000Signed-off-by Alexandre Belloni <[email protected]>---
Changes for v2:
- changed the layout as per Marek's recommendation Changes for v3:
- prefixed the patch title with AT91SAM9*:
Changes for v4:
- changed the layout again as per Ulf Samuelsson's request:
http://lists.denx.de/pipermail/u-boot/2012-February/118988.html
Changes for v5:
- also update partition list
Changes for v6:
- rebase on latest u-boot-atmelboard/atmel/at91sam9260ek/partition.c | 2 +- board/atmel/at91sam9261ek/partition.c | 2 +- board/atmel/at91sam9263ek/partition.c | 2 +- board/atmel/at91sam9rlek/partition.c | 2 +- include/configs/at91sam9260ek.h | 5 +++-- include/configs/at91sam9261ek.h | 5 +++-- include/configs/at91sam9263ek.h | 2 +- include/configs/at91sam9rlek.h | 3 ++- 8 files changed, 13 insertions(+), 10 deletions(-)board/atmel/at91sam9260ek/partition.c +0
-0
board/atmel/at91sam9260ek/partition.c dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { · line 38
Quoted 5 lines
board/atmel/at91sam9260ek/partition.c +1
-1@@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, + {0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"},
really sorry for that, I should have seen it before. Shouldn't we also make the U-Boot partition greater when we move the start of kernel partition?
Can you please send another version, rest is fine (checkpatch, apply cleanly, no build errors).
Quoted 2 lines
board/atmel/at91sam9260ek/partition.c +0
-0{0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, };
<snip>
include/configs/at91sam9260ek.h line 190
Quoted 10 lines
include/configs/at91sam9260ek.h +1
-1@@ -187,7 +187,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 0xC0084000 0x22000000 0x210000; bootm"
also sorry, but size is wrong here! We reduced the partition to 0x1CE000, it is about 1.8 MiB now and not 2 MiB as before.
Best regards
Andreas Bie?mann
PATCH v6 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
Quoted 8 lines · Andreas Bie?mann
really sorry for that, I should have seen it before. Shouldn't we also make the U-Boot partition greater when we move the start of kernel partition?
Can you please send another version, rest is fine (checkpatch, apply cleanly, no build errors).Quoted 2 lines
{
0x00252000,0xFFFFFFFF,FLAG_PROTECT_CLEAR, 0, "FS"},
};
Ah, sure, I'll fix that.
Quoted 17 lines
<snip>
include/configs/at91sam9260ek.h line 190
Quoted 10 lines
include/configs/at91sam9260ek.h +1
-1@@ -187,7 +187,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 0xC0084000 0x22000000 0x210000; bootm"also sorry, but size is wrong here! We reduced the partition to
0x1CE000, it is about 1.8 MiB now and not 2 MiB as before.
Right, I didn't really care about the end of the kernel partition as the 9261ek has an 8MiB dataflash and my rootfs is in NAND. The kernel is around 1.7MiB using the default configuration. Maybe, we should also extend its partition ?
Quoted 4 lines
Best regards
Andreas Bie?mann
Signature · 1 line
Alexandre Belloni
PATCH v6 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
Dear Alexandre Belloni,
Quoted 17 lines · Alexandre Belloni
Quoted 5 lines · Andreas Bie?mann
Quoted 5 lines
include/configs/at91sam9260ek.h +0
-0@@ -187,7 +187,7 @@Quoted 9 lines
include/configs/at91sam9260ek.h line 190
Quoted 5 lines
include/configs/at91sam9260ek.h +1
-1#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 0xC0084000 0x22000000 0x210000; bootm"also sorry, but size is wrong here! We reduced the partition to
0x1CE000, it is about 1.8 MiB now and not 2 MiB as before.
Quoted 4 lines
Right, I didn't really care about the end of the kernel partition as the 9261ek has an 8MiB dataflash and my rootfs is in NAND. The kernel is around 1.7MiB using the default configuration. Maybe, we should also extend its partition ?
well, I don't care about that too cause we usually don't have a dataflash in our devices.
I think for the eval kits it would be nice to have a board support package which can be loaded from different media. Unfortunately I used to work with bare UBoot, vanilla kernel a.s.o. Therefore I have not such deep insight into the atmel provided bsp's. In short words: I tend to say we should increase the space for kernel partition but I fear to break some special bsp's.
As I can see the kernel do not provide a special mapping here. If you are not aware of some other source (e.g. linux4sam), let us increase the space for kernel a bit.
Best regards
Andreas Bie?mann
PATCH v6 1/1 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
Quoted 8 lines · Andreas Bie?mann
Quoted 4 lines
Right, I didn't really care about the end of the kernel partition as the 9261ek has an 8MiB dataflash and my rootfs is in NAND. The kernel is around 1.7MiB using the default configuration. Maybe, we should also extend its partition ?
well, I don't care about that too cause we usually don't have a dataflash in our devices.
Quoted 10 lines
I think for the eval kits it would be nice to have a board support package which can be loaded from different media. Unfortunately I used to work with bare UBoot, vanilla kernel a.s.o. Therefore I have not such deep insight into the atmel provided bsp's. In short words: I tend to say we should increase the space for kernel partition but I fear to break some special bsp's.
As I can see the kernel do not provide a special mapping here. If you are not aware of some other source (e.g. linux4sam), let us increase the space for kernel a bit.
Actually, the two use cases listed on linux4sam are:
- at91bootstrap, u-boot, kernel in dataflash and rootfs in nand
- at91bootstrap, u-boot, kernel and rootfs in nand
See: www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
Actually, the 9rlek, 9260ek and 9261ek have a 4MiB dataflash and the 9263ek doesn't have an embedded dataflash. I guess I'll change the mapping to still get 2MiB for the kernel.
regards,
Signature · 1 line
Alexandre Belloni