Re: [U-Boot] [PATCH v3] nitrogen6x : Use generic distro configuration

2016-07-13 Thread Stefano Babic
Hi Fabien,

On 29/06/2016 09:05, Fabien Lahoudere wrote:
> In order to simplify the use of various images on various media
> for nitrogen6x, the configuration of the board must follow the
> generic distro configuration (doc/README.distro).
> 
> In order to boot your old rootfs, move your kernel and your device
> tree in /boot/. Then create /boot/extlinux/extlinux.conf with for
> example:
> 
> default Buildroot
> 
> label Buildroot
>   kernel /boot/zImage
>   append console=ttymxc1,115200 root=/dev/mmcblk0p1 rootwait rw
>   fdtdir /boot
> 
> Signed-off-by: Fabien Lahoudere 
> ---
> Changes for V2:
>   - reintegration of deleted env
>   - changes are applied only if CONFIG_DISTRO_DEFAULTS=y
> 
> Changes for V3:
>   - remove undefined device tree
>   
>  configs/mx6qsabrelite_defconfig |  1 +
>  configs/nitrogen6dl2g_defconfig |  1 +
>  configs/nitrogen6dl_defconfig   |  1 +
>  configs/nitrogen6q2g_defconfig  |  1 +
>  configs/nitrogen6q_defconfig|  1 +
>  configs/nitrogen6s1g_defconfig  |  1 +
>  configs/nitrogen6s_defconfig|  1 +
>  doc/README.imx6 | 47 
> +
>  include/configs/mx6_common.h| 24 +
>  include/configs/nitrogen6x.h| 36 +--
>  10 files changed, 108 insertions(+), 6 deletions(-)
> 
> diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
> index fa6139a..27b64c4 100644
> --- a/configs/mx6qsabrelite_defconfig
> +++ b/configs/mx6qsabrelite_defconfig
> @@ -36,3 +36,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
> index 02b2462..b1344c6 100644
> --- a/configs/nitrogen6dl2g_defconfig
> +++ b/configs/nitrogen6dl2g_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
> index 52553f6..f794c08 100644
> --- a/configs/nitrogen6dl_defconfig
> +++ b/configs/nitrogen6dl_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
> index 11188b7..56cebe0 100644
> --- a/configs/nitrogen6q2g_defconfig
> +++ b/configs/nitrogen6q2g_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
> index 05bf140..c150b97 100644
> --- a/configs/nitrogen6q_defconfig
> +++ b/configs/nitrogen6q_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
> index bb081a2..dfd096d 100644
> --- a/configs/nitrogen6s1g_defconfig
> +++ b/configs/nitrogen6s1g_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
> index 08e91c9..5e2e693 100644
> --- a/configs/nitrogen6s_defconfig
> +++ b/configs/nitrogen6s_defconfig
> @@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
>  CONFIG_G_DNL_VENDOR_NUM=0x0525
>  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
>  CONFIG_OF_LIBFDT=y
> +CONFIG_DISTRO_DEFAULTS=y
> \ No newline at end of file
> diff --git a/doc/README.imx6 b/doc/README.imx6
> index 1823fb2..36452f6 100644
> --- a/doc/README.imx6
> +++ b/doc/README.imx6
> @@ -138,3 +138,50 @@ c
>  The last "c" command tells kermit (from ckermit package in most distros)
>  to switch from command line mode to communication mode, and when the
>  script is finished, the U-Boot prompt is shown in the same shell.
> +
> +3. Using generic distro configuration
> +-
> +
> +In order to simplify the use of various images on various media
> +for imx6 boards, the configuration of the board must follow the
> +generic distro configuration (doc/README.distro).
> +
> +3.1. Setup uboot configuration for your board
> +-
> +
> +First, you have to set 'CONFIG_DISTRO_DEFAULTS=y' in your board defconfig
> +
> +Some mandatory variable are set in mx6_common.h bu

Re: [U-Boot] [PATCH v3] nitrogen6x : Use generic distro configuration

2016-07-20 Thread Fabien Lahoudere

Hi Stefano,

Thank you for your comments.

On 13/07/2016 16:28, Stefano Babic wrote:

Hi Fabien,

On 29/06/2016 09:05, Fabien Lahoudere wrote:

In order to simplify the use of various images on various media
for nitrogen6x, the configuration of the board must follow the
generic distro configuration (doc/README.distro).

In order to boot your old rootfs, move your kernel and your device
tree in /boot/. Then create /boot/extlinux/extlinux.conf with for
example:

default Buildroot

label Buildroot
kernel /boot/zImage
append console=ttymxc1,115200 root=/dev/mmcblk0p1 rootwait rw
fdtdir /boot

Signed-off-by: Fabien Lahoudere 
---
Changes for V2:
- reintegration of deleted env
- changes are applied only if CONFIG_DISTRO_DEFAULTS=y

Changes for V3:
- remove undefined device tree

  configs/mx6qsabrelite_defconfig |  1 +
  configs/nitrogen6dl2g_defconfig |  1 +
  configs/nitrogen6dl_defconfig   |  1 +
  configs/nitrogen6q2g_defconfig  |  1 +
  configs/nitrogen6q_defconfig|  1 +
  configs/nitrogen6s1g_defconfig  |  1 +
  configs/nitrogen6s_defconfig|  1 +
  doc/README.imx6 | 47 +
  include/configs/mx6_common.h| 24 +
  include/configs/nitrogen6x.h| 36 +--
  10 files changed, 108 insertions(+), 6 deletions(-)

diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index fa6139a..27b64c4 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -36,3 +36,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 02b2462..b1344c6 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index 52553f6..f794c08 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index 11188b7..56cebe0 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index 05bf140..c150b97 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index bb081a2..dfd096d 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index 08e91c9..5e2e693 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -34,3 +34,4 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
  CONFIG_G_DNL_VENDOR_NUM=0x0525
  CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
  CONFIG_OF_LIBFDT=y
+CONFIG_DISTRO_DEFAULTS=y
\ No newline at end of file
diff --git a/doc/README.imx6 b/doc/README.imx6
index 1823fb2..36452f6 100644
--- a/doc/README.imx6
+++ b/doc/README.imx6
@@ -138,3 +138,50 @@ c
  The last "c" command tells kermit (from ckermit package in most distros)
  to switch from command line mode to communication mode, and when the
  script is finished, the U-Boot prompt is shown in the same shell.
+
+3. Using generic distro configuration
+-
+
+In order to simplify the use of various images on various media
+for imx6 boards, the configuration of the board must follow the
+generic distro configuration (doc/README.distro).
+
+3.1. Setup uboot configuration for your board
+-
+
+First, you have to set 'CONFIG_DISTRO_DEFAULTS=y' in your board defconfig
+
+Some mandatory variable are set in mx6_common.h but can be overwritten like:
+  - fdtfile with CONFIG_FDTFILE
+  - fdt_addr_r and fdt_addr with CONFIG_FDTADDR
+

Re: [U-Boot] [PATCH v3] nitrogen6x : Use generic distro configuration

2016-07-21 Thread Stefano Babic
Hi Fabien,

On 20/07/2016 10:07, Fabien Lahoudere wrote:
>
>> On most boards, mx6_common is included at the beginning of the
>> configuration file. This means that CONFIG_FDTADDR is surely not set,
>> and it will be set to 0x1800.
>>
>> For some boards this could be flawless: for example, I see  the
>> "aristainetos" board, it uses as address 0x1400. But it is set
>> later. It remains just confusing that a CONFIG_FDTADDR is set to a
>> different address as used.
>>
>> But for other boards I am quite unsure - it could generate some problems.
> I will remove those lines that just lead to a compilation error only if
> we forgot to set CONFIG_FDTADDR when CONFIG_DISTRO_DEFAULTS=y.
> Is this change acceptable for you?

I agree - this lets boards that do not use CONFIG_DISTRO unchanged.

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot