Re: [U-Boot] [PATCH 12/19] powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards

2015-01-26 Thread Simon Glass
Hi Stefan,

On 26 January 2015 at 06:17, Stefan Roese s...@denx.de wrote:
 On 15.12.2014 15:19, Simon Glass wrote:

 Enable CONFIG_OF_CONTROL so that U-Boot on these three boards uses a
 device
 tree for its configuration.

 Signed-off-by: Simon Glass s...@chromium.org


 This need further work on the ppc4xx platforms to get it booting from flash.
 As now the dtb is appended to the normal U-Boot image. And this image is
 fine-tuned to fit into currently 512KiB. With the last word (reset vector of
 the ppc4xx) located at 0x.fffc. So we need to include this dtb into the
 image this way:

 0xfff8. U-Boot code / text etc
 ...
 dtb
 0x.fffc reset vector

 Looking for the current options shows that perhaps CONFIG_OF_EMBED seems to
 be exactly what we are need. I'll got it working on Canyonlands after a bit
 of debugging. I'll post the necessary small patches soon...

Sounds good, thanks!

It almost feels like you should have a mkimage image for this, to
create a 512KB blob from u-boot.bin and u-boot.dtb. There must be
linker magic to make this all hold together. But yes the embed option
will build it in, so avoiding that.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 12/19] powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards

2015-01-26 Thread Stefan Roese

On 15.12.2014 15:19, Simon Glass wrote:

Enable CONFIG_OF_CONTROL so that U-Boot on these three boards uses a device
tree for its configuration.

Signed-off-by: Simon Glass s...@chromium.org


This need further work on the ppc4xx platforms to get it booting from 
flash. As now the dtb is appended to the normal U-Boot image. And this 
image is fine-tuned to fit into currently 512KiB. With the last word 
(reset vector of the ppc4xx) located at 0x.fffc. So we need to 
include this dtb into the image this way:


0xfff8. U-Boot code / text etc
...
dtb
0x.fffc reset vector

Looking for the current options shows that perhaps CONFIG_OF_EMBED seems 
to be exactly what we are need. I'll got it working on Canyonlands after 
a bit of debugging. I'll post the necessary small patches soon...


Thanks,
Stefan

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 12/19] powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards

2015-01-26 Thread Bin Meng
Hi Simon,

On Mon, Jan 26, 2015 at 9:31 PM, Simon Glass s...@chromium.org wrote:
 Hi Stefan,

 On 26 January 2015 at 06:17, Stefan Roese s...@denx.de wrote:
 On 15.12.2014 15:19, Simon Glass wrote:

 Enable CONFIG_OF_CONTROL so that U-Boot on these three boards uses a
 device
 tree for its configuration.

 Signed-off-by: Simon Glass s...@chromium.org


 This need further work on the ppc4xx platforms to get it booting from flash.
 As now the dtb is appended to the normal U-Boot image. And this image is
 fine-tuned to fit into currently 512KiB. With the last word (reset vector of
 the ppc4xx) located at 0x.fffc. So we need to include this dtb into the
 image this way:

 0xfff8. U-Boot code / text etc
 ...
 dtb
 0x.fffc reset vector

 Looking for the current options shows that perhaps CONFIG_OF_EMBED seems to
 be exactly what we are need. I'll got it working on Canyonlands after a bit
 of debugging. I'll post the necessary small patches soon...

 Sounds good, thanks!


We need do the same for Freescale BookE powerpc series too.

 It almost feels like you should have a mkimage image for this, to
 create a 512KB blob from u-boot.bin and u-boot.dtb. There must be
 linker magic to make this all hold together. But yes the embed option
 will build it in, so avoiding that.


Or maybe we can extend x86 solution (like ifdtool) to non-x86
architectures like BookE powerpc?

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 12/19] powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards

2014-12-15 Thread Simon Glass
Enable CONFIG_OF_CONTROL so that U-Boot on these three boards uses a device
tree for its configuration.

Signed-off-by: Simon Glass s...@chromium.org
---

 board/amcc/canyonlands/u-boot-ram.lds | 10 --
 configs/arches_defconfig  |  3 +++
 configs/canyonlands_defconfig |  3 +++
 configs/glacier_defconfig |  3 +++
 configs/glacier_ramboot_defconfig |  3 +++
 5 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/board/amcc/canyonlands/u-boot-ram.lds 
b/board/amcc/canyonlands/u-boot-ram.lds
index 6765256..1750c74 100644
--- a/board/amcc/canyonlands/u-boot-ram.lds
+++ b/board/amcc/canyonlands/u-boot-ram.lds
@@ -12,6 +12,7 @@ SECTIONS
   . = + SIZEOF_HEADERS;
   .text  :
   {
+_image_copy_start = .;
 arch/powerpc/cpu/ppc4xx/start.o(.text*)
 board/amcc/canyonlands/init.o  (.text*)
 
@@ -61,9 +62,14 @@ SECTIONS
   . = ALIGN(256);
   __init_begin = .;
   .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(256);
+  .data.init : {
+   *(.data.init)
+   . = ALIGN(256);
+   LONG(0) LONG(0) /* Extend u-boot.bin to here */
+  }
   __init_end = .;
+  _end = .;
+  _image_binary_end = .;
 
   __bss_start = .;
   .bss (NOLOAD)   :
diff --git a/configs/arches_defconfig b/configs/arches_defconfig
index 60e6ef9..30c6932 100644
--- a/configs/arches_defconfig
+++ b/configs/arches_defconfig
@@ -2,3 +2,6 @@ CONFIG_PPC=y
 CONFIG_4xx=y
 CONFIG_TARGET_CANYONLANDS=y
 CONFIG_ARCHES=y
+CONFIG_DEFAULT_DEVICE_TREE=arches
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
diff --git a/configs/canyonlands_defconfig b/configs/canyonlands_defconfig
index 37a2b4d..6f6cf14 100644
--- a/configs/canyonlands_defconfig
+++ b/configs/canyonlands_defconfig
@@ -2,3 +2,6 @@ CONFIG_PPC=y
 CONFIG_4xx=y
 CONFIG_TARGET_CANYONLANDS=y
 CONFIG_CANYONLANDS=y
+CONFIG_DEFAULT_DEVICE_TREE=canyonlands
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
diff --git a/configs/glacier_defconfig b/configs/glacier_defconfig
index 436b9f8..e67fa32 100644
--- a/configs/glacier_defconfig
+++ b/configs/glacier_defconfig
@@ -2,3 +2,6 @@ CONFIG_PPC=y
 CONFIG_4xx=y
 CONFIG_TARGET_CANYONLANDS=y
 CONFIG_GLACIER=y
+CONFIG_DEFAULT_DEVICE_TREE=glacier
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
diff --git a/configs/glacier_ramboot_defconfig 
b/configs/glacier_ramboot_defconfig
index 4fc2303..e5b402e 100644
--- a/configs/glacier_ramboot_defconfig
+++ b/configs/glacier_ramboot_defconfig
@@ -3,3 +3,6 @@ CONFIG_PPC=y
 CONFIG_4xx=y
 CONFIG_TARGET_CANYONLANDS=y
 CONFIG_GLACIER=y
+CONFIG_DEFAULT_DEVICE_TREE=glacier
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
-- 
2.2.0.rc0.207.ga3a616c

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot