Message ID | 20200221143521.28928-1-joe.skb7@gmail.com |
---|---|
State | Accepted |
Commit | 41ee72f48b0ab4c0f056a5e5fc4ff9007fdfaf29 |
Headers | show |
Series | [v2] env: ti: boot: Fix Android boot on AM57x EVM | expand |
Hi Lokesh, On Fri, Feb 21, 2020 at 4:35 PM Sam Protsenko <joe.skb7 at gmail.com> wrote: > > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next error message: > > failed on fdt_overlay_apply(): FDT_ERR_NOSPACE > > To overcome that issue let's provide 512 KiB of space to keep DTB and > all merged DTBO blobs. To do so, "length" parameter should be specified > for "fdt addr" command: > > => fdt addr $fdtaddr 0x80000 > > 512 KiB is the maximum size we can use for this, because next address > after $fdtaddr is 512 KiB ahead of it: > > fdtaddr=0x88000000 > rdaddr=0x88080000 > > Also add size variables to 'adtimg' command invocations, to avoid > cluttering the console with DTBO blob sizes. > > Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com> > --- Can you please review and pull this one? Thanks! > Changes in v2: > - Reserve 512 KiB for DTB area, not 1 MiB > > include/environment/ti/boot.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h > index 523c8fc4fe..11a57af0a4 100644 > --- a/include/environment/ti/boot.h > +++ b/include/environment/ti/boot.h > @@ -103,18 +103,18 @@ > "echo \" Reading DTB for AM57x EVM RevA3...\"; " \ > "abootimg get dtb --index=0 dtb_start dtb_size; " \ > "cp.b $dtb_start $fdtaddr $dtb_size; " \ > - "fdt addr $fdtaddr; " \ > + "fdt addr $fdtaddr 0x80000; " \ > "echo \" Applying DTBOs for AM57x EVM RevA3...\"; " \ > "adtimg addr $dtboaddr; " \ > - "adtimg get dt --index=0 dtbo0_addr; " \ > + "adtimg get dt --index=0 dtbo0_addr dtbo0_size; " \ > "fdt apply $dtbo0_addr; " \ > - "adtimg get dt --index=1 dtbo1_addr; " \ > + "adtimg get dt --index=1 dtbo1_addr dtbo1_size; " \ > "fdt apply $dtbo1_addr; " \ > "elif test $board_name = beagle_x15_revc; then " \ > "echo \" Reading DTB for Beagle X15 RevC...\"; " \ > "abootimg get dtb --index=0 dtb_start dtb_size; " \ > "cp.b $dtb_start $fdtaddr $dtb_size; " \ > - "fdt addr $fdtaddr; " \ > + "fdt addr $fdtaddr 0x80000; " \ > "else " \ > "echo Error: Android boot is not supported for $board_name; " \ > "exit; " \ > -- > 2.24.1 >
On Fri, Feb 21, 2020 at 04:35:21PM +0200, Sam Protsenko wrote: > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next error message: > > failed on fdt_overlay_apply(): FDT_ERR_NOSPACE > > To overcome that issue let's provide 512 KiB of space to keep DTB and > all merged DTBO blobs. To do so, "length" parameter should be specified > for "fdt addr" command: > > => fdt addr $fdtaddr 0x80000 > > 512 KiB is the maximum size we can use for this, because next address > after $fdtaddr is 512 KiB ahead of it: > > fdtaddr=0x88000000 > rdaddr=0x88080000 > > Also add size variables to 'adtimg' command invocations, to avoid > cluttering the console with DTBO blob sizes. > > Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com> > --- > Changes in v2: > - Reserve 512 KiB for DTB area, not 1 MiB Reviewed-by: Eugeniu Rosca <rosca.eugeniu at gmail.com>
On 21/02/20 8:05 PM, Sam Protsenko wrote: > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next error message: > > failed on fdt_overlay_apply(): FDT_ERR_NOSPACE > > To overcome that issue let's provide 512 KiB of space to keep DTB and > all merged DTBO blobs. To do so, "length" parameter should be specified > for "fdt addr" command: > > => fdt addr $fdtaddr 0x80000 > > 512 KiB is the maximum size we can use for this, because next address > after $fdtaddr is 512 KiB ahead of it: > > fdtaddr=0x88000000 > rdaddr=0x88080000 > > Also add size variables to 'adtimg' command invocations, to avoid > cluttering the console with DTBO blob sizes. > > Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com> Applied to u-boot-ti next. Thanks and regards, Lokesh
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 523c8fc4fe..11a57af0a4 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -103,18 +103,18 @@ "echo \" Reading DTB for AM57x EVM RevA3...\"; " \ "abootimg get dtb --index=0 dtb_start dtb_size; " \ "cp.b $dtb_start $fdtaddr $dtb_size; " \ - "fdt addr $fdtaddr; " \ + "fdt addr $fdtaddr 0x80000; " \ "echo \" Applying DTBOs for AM57x EVM RevA3...\"; " \ "adtimg addr $dtboaddr; " \ - "adtimg get dt --index=0 dtbo0_addr; " \ + "adtimg get dt --index=0 dtbo0_addr dtbo0_size; " \ "fdt apply $dtbo0_addr; " \ - "adtimg get dt --index=1 dtbo1_addr; " \ + "adtimg get dt --index=1 dtbo1_addr dtbo1_size; " \ "fdt apply $dtbo1_addr; " \ "elif test $board_name = beagle_x15_revc; then " \ "echo \" Reading DTB for Beagle X15 RevC...\"; " \ "abootimg get dtb --index=0 dtb_start dtb_size; " \ "cp.b $dtb_start $fdtaddr $dtb_size; " \ - "fdt addr $fdtaddr; " \ + "fdt addr $fdtaddr 0x80000; " \ "else " \ "echo Error: Android boot is not supported for $board_name; " \ "exit; " \
When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM board, there is not enough memory reserved in RAM for DTB blob. Hence, DTBO can't be merged in DTB. It leads to inability to boot Android with next error message: failed on fdt_overlay_apply(): FDT_ERR_NOSPACE To overcome that issue let's provide 512 KiB of space to keep DTB and all merged DTBO blobs. To do so, "length" parameter should be specified for "fdt addr" command: => fdt addr $fdtaddr 0x80000 512 KiB is the maximum size we can use for this, because next address after $fdtaddr is 512 KiB ahead of it: fdtaddr=0x88000000 rdaddr=0x88080000 Also add size variables to 'adtimg' command invocations, to avoid cluttering the console with DTBO blob sizes. Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com> --- Changes in v2: - Reserve 512 KiB for DTB area, not 1 MiB include/environment/ti/boot.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)