All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
@ 2015-03-17  9:43 Vincent Stehlé
  2015-03-18 23:32 ` Arnout Vandecappelle
  0 siblings, 1 reply; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-17  9:43 UTC (permalink / raw)
  To: buildroot

The i.MX31 Product Development Kit (or PDK) is Freescale development board
based on the i.MX31 application processor.

This defconfig is based on Freescale kernel 2.6.28 5.1.0, and is aimed at a PDK
in "3 stack" configuration, with CPU engine board, personality board and debug
board.

Note that we have a patch to reconciliate the recent GNU make with the "old"
Makefile in the Linux kernel this configuration refers to.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
---
 .../linux-kbuild-fix-make-incompatibility.patch    | 60 +++++++++++++++
 board/freescale/imx31_3stack/readme.txt            | 89 ++++++++++++++++++++++
 configs/freescale_imx31_3stack_defconfig           | 23 ++++++
 3 files changed, 172 insertions(+)
 create mode 100644 board/freescale/imx31_3stack/linux-kbuild-fix-make-incompatibility.patch
 create mode 100644 board/freescale/imx31_3stack/readme.txt
 create mode 100644 configs/freescale_imx31_3stack_defconfig

diff --git a/board/freescale/imx31_3stack/linux-kbuild-fix-make-incompatibility.patch b/board/freescale/imx31_3stack/linux-kbuild-fix-make-incompatibility.patch
new file mode 100644
index 0000000..b9a54e0
--- /dev/null
+++ b/board/freescale/imx31_3stack/linux-kbuild-fix-make-incompatibility.patch
@@ -0,0 +1,60 @@
+From f1b86605650627a0876163a89065b584f562e3b0 Mon Sep 17 00:00:00 2001
+From: Sam Ravnborg <sam@ravnborg.org>
+Date: Sat, 13 Dec 2008 23:00:45 +0100
+Subject: [PATCH] kbuild: fix make incompatibility
+
+"Paul Smith" <psmith@gnu.org> reported that we would fail
+to build with a new check that may be enabled in an
+upcoming version of make.
+
+The error was:
+
+      Makefile:442: *** mixed implicit and normal rules.  Stop.
+
+The problem is that we did stuff like this:
+
+config %config: ...
+
+The solution was simple - the above was split into two with identical
+prerequisites and commands.
+With only three lines it was not worth to try to avoid the duplication.
+
+Cc: "Paul Smith" <psmith@gnu.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+---
+ Makefile | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 71e98e9..f4161a1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
+ include $(srctree)/arch/$(SRCARCH)/Makefile
+ export KBUILD_DEFCONFIG KBUILD_KCONFIG
+ 
+-config %config: scripts_basic outputmakefile FORCE
++config: scripts_basic outputmakefile FORCE
++	$(Q)mkdir -p include/linux include/config
++	$(Q)$(MAKE) $(build)=scripts/kconfig $@
++
++%config: scripts_basic outputmakefile FORCE
+ 	$(Q)mkdir -p include/linux include/config
+ 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+ 
+@@ -1604,7 +1608,11 @@ endif
+ 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ 
+ # Modules
+-/ %/: prepare scripts FORCE
++/: prepare scripts FORCE
++	$(cmd_crmodverdir)
++	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
++	$(build)=$(build-dir)
++%/: prepare scripts FORCE
+ 	$(cmd_crmodverdir)
+ 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ 	$(build)=$(build-dir)
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
new file mode 100644
index 0000000..7f11ac1
--- /dev/null
+++ b/board/freescale/imx31_3stack/readme.txt
@@ -0,0 +1,89 @@
+**************************************
+Freescale i.MX31 PDK development board
+**************************************
+
+This file documents the Buildroot support for the Freescale i.MX31 PDK in "3
+stack" configuration.
+
+The i.MX31 Product Development Kit (or PDK) is Freescale development board [1]
+based on the i.MX31 application processor [2].
+
+For more details on the i.MX31 PDK board, refer to the User's Guide [3].
+
+Build
+=====
+
+First, configure Buildroot for your i.MX31 PDK board:
+
+  make freescale_imx31_3stack_defconfig
+
+Build all components:
+
+  make
+
+You will find in ./output/images/ the following files:
+  - rootfs.tar
+  - zImage
+
+Boot the PDK board
+==================
+
+The i.MX31 PDK contains a RedBoot bootloader in flash, which can be used to
+boot the newly created Buildroot images from the network.
+
+This necessitates to setup a TFTP server first, as well as an NFS server. This
+setup is explained for example in Freescale i.MX31 PDK 1.5 Linux User's Guide
+[4].
+
+Here is a sample RedBoot configuration, for proper network boot of Buildroot on
+the i.MX31 PDK:
+
+    RedBoot> fconfig -l
+    Run script at boot: true
+    Boot script:
+    .. load -r -b 0x100000 zImage
+    .. exec -c "console=ttymxc0,115200 rw root=/dev/nfs ip=dhcp nfsroot=<your NFS server IP address>:<your NFS root path>,v3,tcp"
+    
+    Boot script timeout (1000ms resolution): 2
+    Use BOOTP for network configuration: false
+    Gateway IP address: <your gateway IP address>
+    Local IP address: <your PDK IP address>
+    Local IP address mask: 255.255.255.0
+    Default server IP address: <your TFTP"server IP address>
+    Board specifics: 0
+    Console baud rate: 115200
+    Set eth0 network hardware address [MAC]: false
+    GDB connection port: 9000
+    Force console for special debug messages: false
+    Network debug at boot time: false
+
+Adapt those settings to your network configuration by replacing the appropriate
+network addresses and paths where necessary.
+
+You might want to verify that your i.MX31 PDK switches settings are the correct
+ones for UART, power, boot mode, etc. Here is a reference switches
+configuration:
+
+    SW4
+    1   2   3   4   5   6   7  8
+    ON off off off off off off ON
+
+    SW5 SW6 SW7 SW8 SW9 SW10
+     0   1   0   0   0    0
+
+See the i.MX31 PDK Linux Quick Start Guide [5] for more details on the switches
+settings.
+
+Connect a serial terminal set to 115200n8 and power on the i.MX31 PDK board.
+Buildroot will present a login prompt on the serial port.
+
+Enjoy!
+
+References
+==========
+
+[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK
+[2] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31
+[3] http://cache.freescale.com/files/32bit/doc/user_guide/pdk15_imx31_Hardware_UG.pdf
+[4] http://cache.freescale.com/files/32bit/doc/support_info/IMX31_PDK15_LINUXDOCS_BUNDLE.zip, pdk15_imx31__Linux_UG.pdf
+[5] http://www.freescale.com/files/32bit/doc/quick_ref_guide/PDK14LINUXQUICKSTART.pdf
diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
new file mode 100644
index 0000000..96c9eb0
--- /dev/null
+++ b/configs/freescale_imx31_3stack_defconfig
@@ -0,0 +1,23 @@
+# architecture
+BR2_arm=y
+BR2_arm1136jf_s_r0=y
+BR2_ARM_EABIHF=y
+
+# toolchain
+BR2_KERNEL_HEADERS_3_2=y
+BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+# system
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_2.6.28_5.1.0"
+BR2_LINUX_KERNEL_PATCH="board/freescale/imx31_3stack/"
+BR2_LINUX_KERNEL_DEFCONFIG="imx31_3stack"
+BR2_LINUX_KERNEL_ZIMAGE=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-17  9:43 [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK Vincent Stehlé
@ 2015-03-18 23:32 ` Arnout Vandecappelle
  2015-03-19 15:37   ` Vincent Stehlé
  2015-03-19 15:52   ` [Buildroot] [PATCH v2] " Vincent Stehlé
  0 siblings, 2 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-03-18 23:32 UTC (permalink / raw)
  To: buildroot

On 17/03/15 10:43, Vincent Stehl? wrote:
> The i.MX31 Product Development Kit (or PDK) is Freescale development board
> based on the i.MX31 application processor.
> 
> This defconfig is based on Freescale kernel 2.6.28 5.1.0, and is aimed at a PDK
> in "3 stack" configuration, with CPU engine board, personality board and debug
> board.

 Doesn't the upstream MACH_MX31_3DS work? 2.6.28 is extremely old...

> 
> Note that we have a patch to reconciliate the recent GNU make with the "old"
> Makefile in the Linux kernel this configuration refers to.
> 
> Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>

[snip]
> diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
> new file mode 100644
> index 0000000..96c9eb0
> --- /dev/null
> +++ b/configs/freescale_imx31_3stack_defconfig
> @@ -0,0 +1,23 @@
> +# architecture
> +BR2_arm=y
> +BR2_arm1136jf_s_r0=y
> +BR2_ARM_EABIHF=y
> +
> +# toolchain
> +BR2_KERNEL_HEADERS_3_2=y

 That doesn't sound like a good idea when the kernel is 2.6.28...

> +BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y
> +BR2_TOOLCHAIN_BUILDROOT_CXX=y

 Why not uClibc and why C++?

> +
> +# system
> +BR2_ROOTFS_DEVICE_CREATION_STATIC=y

 With a more recent kernel we don't need this crappy option...

> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
> +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set

 Why?

> +
> +# kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_2.6.28_5.1.0"
> +BR2_LINUX_KERNEL_PATCH="board/freescale/imx31_3stack/"
> +BR2_LINUX_KERNEL_DEFCONFIG="imx31_3stack"
> +BR2_LINUX_KERNEL_ZIMAGE=y

 If network boot is really the only option, then perhaps it would be nicer to
use an initramfs linked into the kernel? Or doesn't the board have enough memory
to support that?


 Regards,
 Arnout

> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-18 23:32 ` Arnout Vandecappelle
@ 2015-03-19 15:37   ` Vincent Stehlé
  2015-03-19 15:58     ` Thomas Petazzoni
  2015-03-19 21:26     ` Arnout Vandecappelle
  2015-03-19 15:52   ` [Buildroot] [PATCH v2] " Vincent Stehlé
  1 sibling, 2 replies; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-19 15:37 UTC (permalink / raw)
  To: buildroot

On 03/19/2015 12:32 AM, Arnout Vandecappelle wrote:
..
>  Doesn't the upstream MACH_MX31_3DS work? 2.6.28 is extremely old...

Hi Arnout,

Thank you for reviewing this patch so quickly and sending
feedbacks.

This defconfig is indeed based on an old 2.6.28 kernel; the idea
was to base the defconfig on the last Freescale "official"
release, which works fine for me.

You are right that mainline kernel has support for the i.MX31
processor, but there is no dts in there for the i.MX31 PDK right
now. The few tries I just did do not boot "as is" but I will
continue a bit.
  Do you insist that this i.MX31 config uses mainline, or would
it be acceptable to stay on the "old", Freescale "official"
kernel?

..
>> +BR2_KERNEL_HEADERS_3_2=y
>  That doesn't sound like a good idea when the kernel is 2.6.28...

Granted, this is not optimal. Those are the kernel headers
closest to 2.6.28, "easily" available in buildroot.

It is indeed possible to manually specify the 2.6.28 kernel
headers version, but this necessitates two patches to fix the
linux-headers "build".
  Do you prefer this solution?

..
>> +BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y
>> +BR2_TOOLCHAIN_BUILDROOT_CXX=y
>  Why not uClibc and why C++?

Those are "leftovers", sorry. Thanks for spotting those mistakes.
I will remove that.

..
>> +BR2_ROOTFS_DEVICE_CREATION_STATIC=y
>  With a more recent kernel we don't need this crappy option...

This is correct: this is necessary only with the "official"
release kernel.

..
>> +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
>  Why?

Also "leftovers", sorry. Thanks for spotting, I will remove as
well.

..
>  If network boot is really the only option, then perhaps it would be nicer to
> use an initramfs linked into the kernel? Or doesn't the board have enough memory
> to support that?

This is my only boot method for the moment.
  Do you insist that the defconfig should use MMC?
  I will continue to try a bit to generate a suitable MMC with
buildroot anyway. Maybe that can be changed in the defconfig later
on?

On the other hand, if we stay with network booting, initramfs is
a nice idea as it makes the setup simpler indeed. Also, the
i.MX31 PDK has 128 MB of memory, so this is a practical solution.
  I just tested and an initramfs included in the zImage works
fine. Only, Freescale "official" kernel has no support for
initrd/initramfs, so we need another patch.
  Would you prefer this solution?

I will send a v2 patch right away, with a few reworks discussed
here, and still based on the "old" Freescale "official" release.
Please let me know if this is going in the right direction (or
not ;)

Thanks again for reviewing!

Best regards,

V.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-18 23:32 ` Arnout Vandecappelle
  2015-03-19 15:37   ` Vincent Stehlé
@ 2015-03-19 15:52   ` Vincent Stehlé
  2015-03-19 21:32     ` Arnout Vandecappelle
  1 sibling, 1 reply; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-19 15:52 UTC (permalink / raw)
  To: buildroot

The i.MX31 Product Development Kit (or PDK) is Freescale development board
based on the i.MX31 application processor.

This defconfig is based on Freescale kernel 2.6.28 5.1.0, and is aimed at a PDK
in "3 stack" configuration, with CPU engine board, personality board and debug
board.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
Cc: Arnout Vandecappelle <arnout@mind.be>

---

Changes since v1:

- Use kernel headers 2.6.28 and add two patches to fix "build".

- Generate an initramfs included in the zImage and add one kernel patch to
  enable initramfs support. Adapt readme.txt accordingly.

- Remove a few "leftovers" from defconfig (eglibc, c++, no rootfs rw remount).

 ...C-libary-confusion-in-unifdef.c-due-to-ge.patch | 56 +++++++++++++
 ...x-headers-kbuild-fix-make-incompatibility.patch |  1 +
 ...ck_defconfig-enable-support-for-initramfs.patch | 30 +++++++
 .../linux-kbuild-fix-make-incompatibility.patch    | 60 ++++++++++++++
 board/freescale/imx31_3stack/readme.txt            | 92 ++++++++++++++++++++++
 configs/freescale_imx31_3stack_defconfig           | 24 ++++++
 6 files changed, 263 insertions(+)
 create mode 100644 board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
 create mode 120000 board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
 create mode 100644 board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch
 create mode 100644 board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
 create mode 100644 board/freescale/imx31_3stack/readme.txt
 create mode 100644 configs/freescale_imx31_3stack_defconfig

diff --git a/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
new file mode 100644
index 0000000..7020e51
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
@@ -0,0 +1,56 @@
+From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001
+From: "Justin P. Mattock" <justinmattock@gmail.com>
+Date: Sat, 7 Mar 2009 13:31:29 +0100
+Subject: [PATCH] kbuild: fix C libary confusion in unifdef.c due to getline()
+
+This fixes an error when compiling the kernel.
+
+  CHK     include/linux/version.h
+  HOSTCC  scripts/unifdef
+scripts/unifdef.c:209: error: conflicting types for 'getline'
+/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
+make[1]: *** [scripts/unifdef] Error 1
+make: *** [__headers] Error 2
+
+Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
+Cc:  Frederic Weisbecker <fweisbec@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+---
+ scripts/unifdef.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/unifdef.c b/scripts/unifdef.c
+index 552025e..05a31a6 100644
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -206,7 +206,7 @@ static void             done(void);
+ static void             error(const char *);
+ static int              findsym(const char *);
+ static void             flushline(bool);
+-static Linetype         getline(void);
++static Linetype         get_line(void);
+ static Linetype         ifeval(const char **);
+ static void             ignoreoff(void);
+ static void             ignoreon(void);
+@@ -512,7 +512,7 @@ process(void)
+ 
+ 	for (;;) {
+ 		linenum++;
+-		lineval = getline();
++		lineval = get_line();
+ 		trans_table[ifstate[depth]][lineval]();
+ 		debug("process %s -> %s depth %d",
+ 		    linetype_name[lineval],
+@@ -526,7 +526,7 @@ process(void)
+  * help from skipcomment().
+  */
+ static Linetype
+-getline(void)
++get_line(void)
+ {
+ 	const char *cp;
+ 	int cursym;
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
new file mode 120000
index 0000000..194c46e
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
@@ -0,0 +1 @@
+../linux/linux-kbuild-fix-make-incompatibility.patch
\ No newline at end of file
diff --git a/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch b/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch
new file mode 100644
index 0000000..6c326d9
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch
@@ -0,0 +1,30 @@
+From d951151b94a03c1ad33bcfec223358a0e7437115 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
+Date: Thu, 19 Mar 2015 10:53:56 +0100
+Subject: [PATCH] imx31_3stack_defconfig: enable support for initramfs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
+---
+ arch/arm/configs/imx31_3stack_defconfig | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/imx31_3stack_defconfig b/arch/arm/configs/imx31_3stack_defconfig
+index d54abf1..ca5d885 100644
+--- a/arch/arm/configs/imx31_3stack_defconfig
++++ b/arch/arm/configs/imx31_3stack_defconfig
+@@ -55,7 +55,8 @@ CONFIG_SYSFS_DEPRECATED=y
+ CONFIG_SYSFS_DEPRECATED_V2=y
+ # CONFIG_RELAY is not set
+ # CONFIG_NAMESPACES is not set
+-# CONFIG_BLK_DEV_INITRD is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+ CONFIG_SYSCTL=y
+ CONFIG_EMBEDDED=y
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch b/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
new file mode 100644
index 0000000..b9a54e0
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
@@ -0,0 +1,60 @@
+From f1b86605650627a0876163a89065b584f562e3b0 Mon Sep 17 00:00:00 2001
+From: Sam Ravnborg <sam@ravnborg.org>
+Date: Sat, 13 Dec 2008 23:00:45 +0100
+Subject: [PATCH] kbuild: fix make incompatibility
+
+"Paul Smith" <psmith@gnu.org> reported that we would fail
+to build with a new check that may be enabled in an
+upcoming version of make.
+
+The error was:
+
+      Makefile:442: *** mixed implicit and normal rules.  Stop.
+
+The problem is that we did stuff like this:
+
+config %config: ...
+
+The solution was simple - the above was split into two with identical
+prerequisites and commands.
+With only three lines it was not worth to try to avoid the duplication.
+
+Cc: "Paul Smith" <psmith@gnu.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+---
+ Makefile | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 71e98e9..f4161a1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
+ include $(srctree)/arch/$(SRCARCH)/Makefile
+ export KBUILD_DEFCONFIG KBUILD_KCONFIG
+ 
+-config %config: scripts_basic outputmakefile FORCE
++config: scripts_basic outputmakefile FORCE
++	$(Q)mkdir -p include/linux include/config
++	$(Q)$(MAKE) $(build)=scripts/kconfig $@
++
++%config: scripts_basic outputmakefile FORCE
+ 	$(Q)mkdir -p include/linux include/config
+ 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+ 
+@@ -1604,7 +1608,11 @@ endif
+ 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ 
+ # Modules
+-/ %/: prepare scripts FORCE
++/: prepare scripts FORCE
++	$(cmd_crmodverdir)
++	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
++	$(build)=$(build-dir)
++%/: prepare scripts FORCE
+ 	$(cmd_crmodverdir)
+ 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ 	$(build)=$(build-dir)
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
new file mode 100644
index 0000000..47447fd
--- /dev/null
+++ b/board/freescale/imx31_3stack/readme.txt
@@ -0,0 +1,92 @@
+**************************************
+Freescale i.MX31 PDK development board
+**************************************
+
+This file documents the Buildroot support for the Freescale i.MX31 PDK in "3
+stack" configuration.
+
+The i.MX31 Product Development Kit (or PDK) is Freescale development board [1]
+based on the i.MX31 application processor [2].
+
+For more details on the i.MX31 PDK board, refer to the User's Guide [3].
+
+Build
+=====
+
+First, configure Buildroot for your i.MX31 PDK board:
+
+  make freescale_imx31_3stack_defconfig
+
+Build all components:
+
+  make
+
+You will find in ./output/images/ the following files:
+  - rootfs.cpio
+  - rootfs.cpio.gz
+  - rootfs.tar
+  - zImage
+
+The generated zImage does include the rootfs.
+
+Boot the PDK board
+==================
+
+The i.MX31 PDK contains a RedBoot bootloader in flash, which can be used to
+boot the newly created Buildroot images from the network.
+
+This necessitates to setup a TFTP server first. This setup is explained for
+example in Freescale i.MX31 PDK 1.5 Linux User's Guide [4].
+
+Here is a sample RedBoot configuration, for proper network boot of Buildroot on
+the i.MX31 PDK:
+
+    RedBoot> fconfig -l
+    Run script at boot: true
+    Boot script:
+    .. load -r -b 0x100000 zImage
+    .. exec -c "console=ttymxc0,115200"
+    
+    Boot script timeout (1000ms resolution): 2
+    Use BOOTP for network configuration: false
+    Gateway IP address: <your gateway IP address>
+    Local IP address: <your PDK IP address>
+    Local IP address mask: 255.255.255.0
+    Default server IP address: <your TFTP server IP address>
+    Board specifics: 0
+    Console baud rate: 115200
+    Set eth0 network hardware address [MAC]: false
+    GDB connection port: 9000
+    Force console for special debug messages: false
+    Network debug at boot time: false
+
+Adapt those settings to your network configuration by replacing the appropriate
+network addresses where necessary.
+
+You might want to verify that your i.MX31 PDK switches settings are the correct
+ones for UART, power, boot mode, etc. Here is a reference switches
+configuration:
+
+    SW4
+    1   2   3   4   5   6   7  8
+    ON off off off off off off ON
+
+    SW5 SW6 SW7 SW8 SW9 SW10
+     0   1   0   0   0    0
+
+See the i.MX31 PDK Linux Quick Start Guide [5] for more details on the switches
+settings.
+
+Connect a serial terminal set to 115200n8 and power on the i.MX31 PDK board.
+Buildroot will present a login prompt on the serial port.
+
+Enjoy!
+
+References
+==========
+
+[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK
+[2] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31
+[3] http://cache.freescale.com/files/32bit/doc/user_guide/pdk15_imx31_Hardware_UG.pdf
+[4] http://cache.freescale.com/files/32bit/doc/support_info/IMX31_PDK15_LINUXDOCS_BUNDLE.zip, pdk15_imx31__Linux_UG.pdf
+[5] http://www.freescale.com/files/32bit/doc/quick_ref_guide/PDK14LINUXQUICKSTART.pdf
diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
new file mode 100644
index 0000000..ce8c9c7
--- /dev/null
+++ b/configs/freescale_imx31_3stack_defconfig
@@ -0,0 +1,24 @@
+# architecture
+BR2_arm=y
+BR2_arm1136jf_s_r0=y
+BR2_ARM_EABIHF=y
+
+BR2_GLOBAL_PATCH_DIR="board/freescale/imx31_3stack/patches"
+
+# toolchain
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="2.6.28"
+
+# system
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_2.6.28_5.1.0"
+BR2_LINUX_KERNEL_DEFCONFIG="imx31_3stack"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 15:37   ` Vincent Stehlé
@ 2015-03-19 15:58     ` Thomas Petazzoni
  2015-03-19 21:26     ` Arnout Vandecappelle
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2015-03-19 15:58 UTC (permalink / raw)
  To: buildroot

Dear Vincent Stehl?,

On Thu, 19 Mar 2015 16:37:35 +0100, Vincent Stehl? wrote:

> >> +BR2_KERNEL_HEADERS_3_2=y
> >  That doesn't sound like a good idea when the kernel is 2.6.28...
> 
> Granted, this is not optimal. Those are the kernel headers
> closest to 2.6.28, "easily" available in buildroot.
> 
> It is indeed possible to manually specify the 2.6.28 kernel
> headers version, but this necessitates two patches to fix the
> linux-headers "build".
>   Do you prefer this solution?

It is not a preference at all: running userspace binaries and C
libraries built with kernel headers more recent than the running is a
very good recipe for disaster. Your userspace and C library will
believe that certain system calls exist while it's not the case.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 15:37   ` Vincent Stehlé
  2015-03-19 15:58     ` Thomas Petazzoni
@ 2015-03-19 21:26     ` Arnout Vandecappelle
  2015-03-19 21:28       ` Arnout Vandecappelle
                         ` (2 more replies)
  1 sibling, 3 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-03-19 21:26 UTC (permalink / raw)
  To: buildroot

On 19/03/15 16:37, Vincent Stehl? wrote:
> On 03/19/2015 12:32 AM, Arnout Vandecappelle wrote:
> ..
>>  Doesn't the upstream MACH_MX31_3DS work? 2.6.28 is extremely old...
> 
> Hi Arnout,
> 
> Thank you for reviewing this patch so quickly and sending
> feedbacks.
> 
> This defconfig is indeed based on an old 2.6.28 kernel; the idea
> was to base the defconfig on the last Freescale "official"
> release, which works fine for me.
> 
> You are right that mainline kernel has support for the i.MX31
> processor, but there is no dts in there for the i.MX31 PDK right
> now. The few tries I just did do not boot "as is" but I will
> continue a bit.

 It doesn't look like it's using DT, but there's a mach-mx31_3ds.c that uses the
old platform approach. Of course your bootloader has to set the correct machine
ID (1151) in that case.

>   Do you insist that this i.MX31 config uses mainline, or would
> it be acceptable to stay on the "old", Freescale "official"
> kernel?

 If there's no other way it's acceptable, but it's really not nice. And the
headers issue definitely has to be fixed.

>>> +BR2_KERNEL_HEADERS_3_2=y
>>  That doesn't sound like a good idea when the kernel is 2.6.28...
> 
> Granted, this is not optimal. Those are the kernel headers
> closest to 2.6.28, "easily" available in buildroot.
> 
> It is indeed possible to manually specify the 2.6.28 kernel
> headers version, but this necessitates two patches to fix the
> linux-headers "build".
>   Do you prefer this solution?

 Not really :-)

[snip]
>>  If network boot is really the only option, then perhaps it would be nicer to
>> use an initramfs linked into the kernel? Or doesn't the board have enough memory
>> to support that?
> 
> This is my only boot method for the moment.
>   Do you insist that the defconfig should use MMC?

 No, MMC is not that much better since not many PCs can access it anyway.

>   I will continue to try a bit to generate a suitable MMC with
> buildroot anyway. Maybe that can be changed in the defconfig later
> on?
> 
> On the other hand, if we stay with network booting, initramfs is
> a nice idea as it makes the setup simpler indeed. Also, the
> i.MX31 PDK has 128 MB of memory, so this is a practical solution.
>   I just tested and an initramfs included in the zImage works
> fine. Only, Freescale "official" kernel has no support for
> initrd/initramfs, so we need another patch.

 Er, you say that initramfs works but it isn't supported? WTF?


 Regards,
 Arnout


>   Would you prefer this solution?
> 
> I will send a v2 patch right away, with a few reworks discussed
> here, and still based on the "old" Freescale "official" release.
> Please let me know if this is going in the right direction (or
> not ;)
> 
> Thanks again for reviewing!
> 
> Best regards,
> 
> V.
> 
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 21:26     ` Arnout Vandecappelle
@ 2015-03-19 21:28       ` Arnout Vandecappelle
  2015-03-20 14:53       ` Vincent Stehlé
  2015-03-20 14:57       ` [Buildroot] [PATCH v4] " Vincent Stehlé
  2 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-03-19 21:28 UTC (permalink / raw)
  To: buildroot

On 19/03/15 22:26, Arnout Vandecappelle wrote:
>> On the other hand, if we stay with network booting, initramfs is
>> > a nice idea as it makes the setup simpler indeed. Also, the
>> > i.MX31 PDK has 128 MB of memory, so this is a practical solution.
>> >   I just tested and an initramfs included in the zImage works
>> > fine. Only, Freescale "official" kernel has no support for
>> > initrd/initramfs, so we need another patch.
>  Er, you say that initramfs works but it isn't supported? WTF?

 Sorry, just saw the patch that enables it in your v2 :-)


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 15:52   ` [Buildroot] [PATCH v2] " Vincent Stehlé
@ 2015-03-19 21:32     ` Arnout Vandecappelle
  2015-03-20  9:02       ` Vincent Stehlé
  2015-03-20  9:05       ` [Buildroot] [PATCH v3] " Vincent Stehlé
  0 siblings, 2 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-03-19 21:32 UTC (permalink / raw)
  To: buildroot

[Quick remark, I don't have time for a full review now]

On 19/03/15 16:52, Vincent Stehl? wrote:
> diff --git a/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch b/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch
> new file mode 100644
> index 0000000..6c326d9
> --- /dev/null
> +++ b/board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch
> @@ -0,0 +1,30 @@
> +From d951151b94a03c1ad33bcfec223358a0e7437115 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
> +Date: Thu, 19 Mar 2015 10:53:56 +0100
> +Subject: [PATCH] imx31_3stack_defconfig: enable support for initramfs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
> +---
> + arch/arm/configs/imx31_3stack_defconfig | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/arch/arm/configs/imx31_3stack_defconfig b/arch/arm/configs/imx31_3stack_defconfig
> +index d54abf1..ca5d885 100644
> +--- a/arch/arm/configs/imx31_3stack_defconfig
> ++++ b/arch/arm/configs/imx31_3stack_defconfig
> +@@ -55,7 +55,8 @@ CONFIG_SYSFS_DEPRECATED=y
> + CONFIG_SYSFS_DEPRECATED_V2=y
> + # CONFIG_RELAY is not set
> + # CONFIG_NAMESPACES is not set
> +-# CONFIG_BLK_DEV_INITRD is not set
> ++CONFIG_BLK_DEV_INITRD=y
> ++CONFIG_INITRAMFS_SOURCE=""

 This shouldn't be needed, since buildroot will enable these automatically when
cpio or initramfs filesystem is selected. If not, there's something wrong with
the linux/kconfig infrastructure...


 Regards,
 Arnout

> + CONFIG_CC_OPTIMIZE_FOR_SIZE=y
> + CONFIG_SYSCTL=y
> + CONFIG_EMBEDDED=y
> +-- 
> +2.1.4


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 21:32     ` Arnout Vandecappelle
@ 2015-03-20  9:02       ` Vincent Stehlé
  2015-03-20  9:05       ` [Buildroot] [PATCH v3] " Vincent Stehlé
  1 sibling, 0 replies; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-20  9:02 UTC (permalink / raw)
  To: buildroot

On 03/19/2015 10:32 PM, Arnout Vandecappelle wrote:
(kernel patch to enable initramfs)
> This shouldn't be needed, since buildroot will enable these automatically when
> cpio or initramfs filesystem is selected.

Hi Arnout,

Thanks for this remark; I did not know about this buildroot feature, and
this works fine indeed. I will send a v3 right away.

Best regards,

V.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v3] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 21:32     ` Arnout Vandecappelle
  2015-03-20  9:02       ` Vincent Stehlé
@ 2015-03-20  9:05       ` Vincent Stehlé
  1 sibling, 0 replies; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-20  9:05 UTC (permalink / raw)
  To: buildroot

The i.MX31 Product Development Kit (or PDK) is Freescale development board
based on the i.MX31 application processor.

This defconfig is based on Freescale kernel 2.6.28 5.1.0, and is aimed at a PDK
in "3 stack" configuration, with CPU engine board, personality board and debug
board.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
Cc: Arnout Vandecappelle <arnout@mind.be>

---

Changes since v2:

- Remove unnecessary initramfs kernel patch.

Changes since v1:

- Use kernel headers 2.6.28 and add two patches to fix "build".

- Generate an initramfs included in the zImage and add one kernel patch to
  enable initramfs support. Adapt readme.txt accordingly.

- Remove a few "leftovers" from defconfig (eglibc, c++, no rootfs rw remount).

 ...C-libary-confusion-in-unifdef.c-due-to-ge.patch | 56 +++++++++++++
 ...x-headers-kbuild-fix-make-incompatibility.patch |  1 +
 .../linux-kbuild-fix-make-incompatibility.patch    | 60 ++++++++++++++
 board/freescale/imx31_3stack/readme.txt            | 92 ++++++++++++++++++++++
 configs/freescale_imx31_3stack_defconfig           | 24 ++++++
 5 files changed, 233 insertions(+)
 create mode 100644 board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
 create mode 120000 board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
 create mode 100644 board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
 create mode 100644 board/freescale/imx31_3stack/readme.txt
 create mode 100644 configs/freescale_imx31_3stack_defconfig

diff --git a/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
new file mode 100644
index 0000000..7020e51
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch
@@ -0,0 +1,56 @@
+From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001
+From: "Justin P. Mattock" <justinmattock@gmail.com>
+Date: Sat, 7 Mar 2009 13:31:29 +0100
+Subject: [PATCH] kbuild: fix C libary confusion in unifdef.c due to getline()
+
+This fixes an error when compiling the kernel.
+
+  CHK     include/linux/version.h
+  HOSTCC  scripts/unifdef
+scripts/unifdef.c:209: error: conflicting types for 'getline'
+/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
+make[1]: *** [scripts/unifdef] Error 1
+make: *** [__headers] Error 2
+
+Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
+Cc:  Frederic Weisbecker <fweisbec@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+---
+ scripts/unifdef.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/unifdef.c b/scripts/unifdef.c
+index 552025e..05a31a6 100644
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -206,7 +206,7 @@ static void             done(void);
+ static void             error(const char *);
+ static int              findsym(const char *);
+ static void             flushline(bool);
+-static Linetype         getline(void);
++static Linetype         get_line(void);
+ static Linetype         ifeval(const char **);
+ static void             ignoreoff(void);
+ static void             ignoreon(void);
+@@ -512,7 +512,7 @@ process(void)
+ 
+ 	for (;;) {
+ 		linenum++;
+-		lineval = getline();
++		lineval = get_line();
+ 		trans_table[ifstate[depth]][lineval]();
+ 		debug("process %s -> %s depth %d",
+ 		    linetype_name[lineval],
+@@ -526,7 +526,7 @@ process(void)
+  * help from skipcomment().
+  */
+ static Linetype
+-getline(void)
++get_line(void)
+ {
+ 	const char *cp;
+ 	int cursym;
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
new file mode 120000
index 0000000..194c46e
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch
@@ -0,0 +1 @@
+../linux/linux-kbuild-fix-make-incompatibility.patch
\ No newline at end of file
diff --git a/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch b/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
new file mode 100644
index 0000000..b9a54e0
--- /dev/null
+++ b/board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch
@@ -0,0 +1,60 @@
+From f1b86605650627a0876163a89065b584f562e3b0 Mon Sep 17 00:00:00 2001
+From: Sam Ravnborg <sam@ravnborg.org>
+Date: Sat, 13 Dec 2008 23:00:45 +0100
+Subject: [PATCH] kbuild: fix make incompatibility
+
+"Paul Smith" <psmith@gnu.org> reported that we would fail
+to build with a new check that may be enabled in an
+upcoming version of make.
+
+The error was:
+
+      Makefile:442: *** mixed implicit and normal rules.  Stop.
+
+The problem is that we did stuff like this:
+
+config %config: ...
+
+The solution was simple - the above was split into two with identical
+prerequisites and commands.
+With only three lines it was not worth to try to avoid the duplication.
+
+Cc: "Paul Smith" <psmith@gnu.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+---
+ Makefile | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 71e98e9..f4161a1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
+ include $(srctree)/arch/$(SRCARCH)/Makefile
+ export KBUILD_DEFCONFIG KBUILD_KCONFIG
+ 
+-config %config: scripts_basic outputmakefile FORCE
++config: scripts_basic outputmakefile FORCE
++	$(Q)mkdir -p include/linux include/config
++	$(Q)$(MAKE) $(build)=scripts/kconfig $@
++
++%config: scripts_basic outputmakefile FORCE
+ 	$(Q)mkdir -p include/linux include/config
+ 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+ 
+@@ -1604,7 +1608,11 @@ endif
+ 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ 
+ # Modules
+-/ %/: prepare scripts FORCE
++/: prepare scripts FORCE
++	$(cmd_crmodverdir)
++	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
++	$(build)=$(build-dir)
++%/: prepare scripts FORCE
+ 	$(cmd_crmodverdir)
+ 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ 	$(build)=$(build-dir)
+-- 
+2.1.4
+
diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
new file mode 100644
index 0000000..47447fd
--- /dev/null
+++ b/board/freescale/imx31_3stack/readme.txt
@@ -0,0 +1,92 @@
+**************************************
+Freescale i.MX31 PDK development board
+**************************************
+
+This file documents the Buildroot support for the Freescale i.MX31 PDK in "3
+stack" configuration.
+
+The i.MX31 Product Development Kit (or PDK) is Freescale development board [1]
+based on the i.MX31 application processor [2].
+
+For more details on the i.MX31 PDK board, refer to the User's Guide [3].
+
+Build
+=====
+
+First, configure Buildroot for your i.MX31 PDK board:
+
+  make freescale_imx31_3stack_defconfig
+
+Build all components:
+
+  make
+
+You will find in ./output/images/ the following files:
+  - rootfs.cpio
+  - rootfs.cpio.gz
+  - rootfs.tar
+  - zImage
+
+The generated zImage does include the rootfs.
+
+Boot the PDK board
+==================
+
+The i.MX31 PDK contains a RedBoot bootloader in flash, which can be used to
+boot the newly created Buildroot images from the network.
+
+This necessitates to setup a TFTP server first. This setup is explained for
+example in Freescale i.MX31 PDK 1.5 Linux User's Guide [4].
+
+Here is a sample RedBoot configuration, for proper network boot of Buildroot on
+the i.MX31 PDK:
+
+    RedBoot> fconfig -l
+    Run script at boot: true
+    Boot script:
+    .. load -r -b 0x100000 zImage
+    .. exec -c "console=ttymxc0,115200"
+    
+    Boot script timeout (1000ms resolution): 2
+    Use BOOTP for network configuration: false
+    Gateway IP address: <your gateway IP address>
+    Local IP address: <your PDK IP address>
+    Local IP address mask: 255.255.255.0
+    Default server IP address: <your TFTP server IP address>
+    Board specifics: 0
+    Console baud rate: 115200
+    Set eth0 network hardware address [MAC]: false
+    GDB connection port: 9000
+    Force console for special debug messages: false
+    Network debug at boot time: false
+
+Adapt those settings to your network configuration by replacing the appropriate
+network addresses where necessary.
+
+You might want to verify that your i.MX31 PDK switches settings are the correct
+ones for UART, power, boot mode, etc. Here is a reference switches
+configuration:
+
+    SW4
+    1   2   3   4   5   6   7  8
+    ON off off off off off off ON
+
+    SW5 SW6 SW7 SW8 SW9 SW10
+     0   1   0   0   0    0
+
+See the i.MX31 PDK Linux Quick Start Guide [5] for more details on the switches
+settings.
+
+Connect a serial terminal set to 115200n8 and power on the i.MX31 PDK board.
+Buildroot will present a login prompt on the serial port.
+
+Enjoy!
+
+References
+==========
+
+[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK
+[2] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31
+[3] http://cache.freescale.com/files/32bit/doc/user_guide/pdk15_imx31_Hardware_UG.pdf
+[4] http://cache.freescale.com/files/32bit/doc/support_info/IMX31_PDK15_LINUXDOCS_BUNDLE.zip, pdk15_imx31__Linux_UG.pdf
+[5] http://www.freescale.com/files/32bit/doc/quick_ref_guide/PDK14LINUXQUICKSTART.pdf
diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
new file mode 100644
index 0000000..ce8c9c7
--- /dev/null
+++ b/configs/freescale_imx31_3stack_defconfig
@@ -0,0 +1,24 @@
+# architecture
+BR2_arm=y
+BR2_arm1136jf_s_r0=y
+BR2_ARM_EABIHF=y
+
+BR2_GLOBAL_PATCH_DIR="board/freescale/imx31_3stack/patches"
+
+# toolchain
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="2.6.28"
+
+# system
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_2.6.28_5.1.0"
+BR2_LINUX_KERNEL_DEFCONFIG="imx31_3stack"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 21:26     ` Arnout Vandecappelle
  2015-03-19 21:28       ` Arnout Vandecappelle
@ 2015-03-20 14:53       ` Vincent Stehlé
  2015-03-20 14:57       ` [Buildroot] [PATCH v4] " Vincent Stehlé
  2 siblings, 0 replies; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-20 14:53 UTC (permalink / raw)
  To: buildroot

On 03/19/2015 10:26 PM, Arnout Vandecappelle wrote:
..
> It doesn't look like it's using DT, but there's a mach-mx31_3ds.c that uses the
> old platform approach. Of course your bootloader has to set the correct machine
> ID (1151) in that case.

Hi Arnout,

Thanks for pointing that out; it helped a lot.

After some experiments, it seems that sadly, mainline kernel will
not boot anymore on i.MX31 PDK, starting with v3.16 and up to
current v4.0-rc4.

Now for the good news: I have a working buildroot defconfig based
on mainline kernel v3.15.10, with zero patch.
  I will post a patch v4 right away; could you please maybe
forget about the patch v3 I posted, and look at this v4 instead?

Thank you for your help all along!

Best regards,

V.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v4] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-19 21:26     ` Arnout Vandecappelle
  2015-03-19 21:28       ` Arnout Vandecappelle
  2015-03-20 14:53       ` Vincent Stehlé
@ 2015-03-20 14:57       ` Vincent Stehlé
  2015-03-21 17:27         ` Arnout Vandecappelle
  2 siblings, 1 reply; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-20 14:57 UTC (permalink / raw)
  To: buildroot

The i.MX31 Product Development Kit (or PDK) is Freescale development board
based on the i.MX31 application processor.

This defconfig is based on mainline kernel v3.15.10, and is aimed at a PDK in
"3 stack" configuration, with CPU engine board, personality board and debug
board.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
Cc: Arnout Vandecappelle <arnout@mind.be>

---


Changes since v3:

- Switch kernel and headers to v3.15.10 and remove all patches and static
  device nodes creation.

Changes since v2:

- Remove unnecessary initramfs kernel patch.

Changes since v1:

- Use kernel headers 2.6.28 and add two patches to fix "build".

- Generate an initramfs included in the zImage and add one kernel patch to
  enable initramfs support. Adapt readme.txt accordingly.

- Remove a few "leftovers" from defconfig (eglibc, c++, no rootfs rw remount).


 board/freescale/imx31_3stack/readme.txt  | 92 ++++++++++++++++++++++++++++++++
 configs/freescale_imx31_3stack_defconfig | 20 +++++++
 2 files changed, 112 insertions(+)
 create mode 100644 board/freescale/imx31_3stack/readme.txt
 create mode 100644 configs/freescale_imx31_3stack_defconfig

diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
new file mode 100644
index 0000000..47447fd
--- /dev/null
+++ b/board/freescale/imx31_3stack/readme.txt
@@ -0,0 +1,92 @@
+**************************************
+Freescale i.MX31 PDK development board
+**************************************
+
+This file documents the Buildroot support for the Freescale i.MX31 PDK in "3
+stack" configuration.
+
+The i.MX31 Product Development Kit (or PDK) is Freescale development board [1]
+based on the i.MX31 application processor [2].
+
+For more details on the i.MX31 PDK board, refer to the User's Guide [3].
+
+Build
+=====
+
+First, configure Buildroot for your i.MX31 PDK board:
+
+  make freescale_imx31_3stack_defconfig
+
+Build all components:
+
+  make
+
+You will find in ./output/images/ the following files:
+  - rootfs.cpio
+  - rootfs.cpio.gz
+  - rootfs.tar
+  - zImage
+
+The generated zImage does include the rootfs.
+
+Boot the PDK board
+==================
+
+The i.MX31 PDK contains a RedBoot bootloader in flash, which can be used to
+boot the newly created Buildroot images from the network.
+
+This necessitates to setup a TFTP server first. This setup is explained for
+example in Freescale i.MX31 PDK 1.5 Linux User's Guide [4].
+
+Here is a sample RedBoot configuration, for proper network boot of Buildroot on
+the i.MX31 PDK:
+
+    RedBoot> fconfig -l
+    Run script at boot: true
+    Boot script:
+    .. load -r -b 0x100000 zImage
+    .. exec -c "console=ttymxc0,115200"
+    
+    Boot script timeout (1000ms resolution): 2
+    Use BOOTP for network configuration: false
+    Gateway IP address: <your gateway IP address>
+    Local IP address: <your PDK IP address>
+    Local IP address mask: 255.255.255.0
+    Default server IP address: <your TFTP server IP address>
+    Board specifics: 0
+    Console baud rate: 115200
+    Set eth0 network hardware address [MAC]: false
+    GDB connection port: 9000
+    Force console for special debug messages: false
+    Network debug at boot time: false
+
+Adapt those settings to your network configuration by replacing the appropriate
+network addresses where necessary.
+
+You might want to verify that your i.MX31 PDK switches settings are the correct
+ones for UART, power, boot mode, etc. Here is a reference switches
+configuration:
+
+    SW4
+    1   2   3   4   5   6   7  8
+    ON off off off off off off ON
+
+    SW5 SW6 SW7 SW8 SW9 SW10
+     0   1   0   0   0    0
+
+See the i.MX31 PDK Linux Quick Start Guide [5] for more details on the switches
+settings.
+
+Connect a serial terminal set to 115200n8 and power on the i.MX31 PDK board.
+Buildroot will present a login prompt on the serial port.
+
+Enjoy!
+
+References
+==========
+
+[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK
+[2] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31
+[3] http://cache.freescale.com/files/32bit/doc/user_guide/pdk15_imx31_Hardware_UG.pdf
+[4] http://cache.freescale.com/files/32bit/doc/support_info/IMX31_PDK15_LINUXDOCS_BUNDLE.zip, pdk15_imx31__Linux_UG.pdf
+[5] http://www.freescale.com/files/32bit/doc/quick_ref_guide/PDK14LINUXQUICKSTART.pdf
diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
new file mode 100644
index 0000000..f929db0
--- /dev/null
+++ b/configs/freescale_imx31_3stack_defconfig
@@ -0,0 +1,20 @@
+# architecture
+BR2_arm=y
+BR2_arm1136jf_s_r0=y
+BR2_ARM_EABIHF=y
+
+# toolchain
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.15.10"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y
+
+# system
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v4] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-20 14:57       ` [Buildroot] [PATCH v4] " Vincent Stehlé
@ 2015-03-21 17:27         ` Arnout Vandecappelle
  2015-03-24 18:51           ` Vincent Stehlé
  2015-03-24 18:53           ` [Buildroot] [PATCH v5] " Vincent Stehlé
  0 siblings, 2 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2015-03-21 17:27 UTC (permalink / raw)
  To: buildroot

On 20/03/15 15:57, Vincent Stehl? wrote:
> The i.MX31 Product Development Kit (or PDK) is Freescale development board
> based on the i.MX31 application processor.
> 
> This defconfig is based on mainline kernel v3.15.10, and is aimed at a PDK in
> "3 stack" configuration, with CPU engine board, personality board and debug
> board.
> 
> Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Minor comments below.

> diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
> new file mode 100644
> index 0000000..47447fd
> --- /dev/null
> +++ b/board/freescale/imx31_3stack/readme.txt
> @@ -0,0 +1,92 @@
> +**************************************
> +Freescale i.MX31 PDK development board
> +**************************************

 Excellent readme!

[snip]
> diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
> new file mode 100644
> index 0000000..f929db0
> --- /dev/null
> +++ b/configs/freescale_imx31_3stack_defconfig
> @@ -0,0 +1,20 @@
> +# architecture
> +BR2_arm=y
> +BR2_arm1136jf_s_r0=y
> +BR2_ARM_EABIHF=y
> +
> +# toolchain
> +BR2_KERNEL_HEADERS_VERSION=y
> +BR2_DEFAULT_KERNEL_VERSION="3.15.10"
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y

 It would be good to add a comment here that explains that upstream is broken
since 3.16.

 It would be even better to fix upstream :-)

> +
> +# system
> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
> +
> +# kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
> +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"

 That's actually a pretty bloated config, containing many drivers that are
irrelevant for this board. But it's probably not easy to tone it down to the
really needed set, and you probably anyway want to keep v4l, alsa and IPv6, so
perhaps it's not worth the bother to look for a reduced defconfig.


 Regards,
 Arnout


> +BR2_LINUX_KERNEL_ZIMAGE=y
> +BR2_TARGET_ROOTFS_CPIO_GZIP=y
> +BR2_TARGET_ROOTFS_INITRAMFS=y
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v4] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-21 17:27         ` Arnout Vandecappelle
@ 2015-03-24 18:51           ` Vincent Stehlé
  2015-03-24 18:53           ` [Buildroot] [PATCH v5] " Vincent Stehlé
  1 sibling, 0 replies; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-24 18:51 UTC (permalink / raw)
  To: buildroot

On 03/21/2015 06:27 PM, Arnout Vandecappelle wrote:
..
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Hi Arnout,

Thank you for your efforts reviewing this patch.

..
>> +BR2_DEFAULT_KERNEL_VERSION="3.15.10"
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y
>  It would be good to add a comment here that explains that upstream is broken
> since 3.16.

Sure, why not? I'll resend a v5 right away, with a quick comment in the
config file.

>  It would be even better to fix upstream :-)

I could not agree more :) I'll try to bisect at least, but this week is
a bit more busy for me.

Best regards,

V.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v5] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-21 17:27         ` Arnout Vandecappelle
  2015-03-24 18:51           ` Vincent Stehlé
@ 2015-03-24 18:53           ` Vincent Stehlé
  2015-03-25  0:02             ` Thomas Petazzoni
  1 sibling, 1 reply; 16+ messages in thread
From: Vincent Stehlé @ 2015-03-24 18:53 UTC (permalink / raw)
  To: buildroot

The i.MX31 Product Development Kit (or PDK) is Freescale development board
based on the i.MX31 application processor.

This defconfig is based on mainline kernel v3.15.10, and is aimed at a PDK in
"3 stack" configuration, with CPU engine board, personality board and debug
board.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---

Changes since v4:

- Add some comments in the config file, to explain why we use Linux v3.15.y.

Changes since v3:

- Switch kernel and headers to v3.15.10 and remove all patches and static
  device nodes creation.

Changes since v2:

- Remove unnecessary initramfs kernel patch.

Changes since v1:

- Use kernel headers 2.6.28 and add two patches to fix "build".

- Generate an initramfs included in the zImage and add one kernel patch to
  enable initramfs support. Adapt readme.txt accordingly.

- Remove a few "leftovers" from defconfig (eglibc, c++, no rootfs rw remount).

 board/freescale/imx31_3stack/readme.txt  | 92 ++++++++++++++++++++++++++++++++
 configs/freescale_imx31_3stack_defconfig | 22 ++++++++
 2 files changed, 114 insertions(+)
 create mode 100644 board/freescale/imx31_3stack/readme.txt
 create mode 100644 configs/freescale_imx31_3stack_defconfig

diff --git a/board/freescale/imx31_3stack/readme.txt b/board/freescale/imx31_3stack/readme.txt
new file mode 100644
index 0000000..47447fd
--- /dev/null
+++ b/board/freescale/imx31_3stack/readme.txt
@@ -0,0 +1,92 @@
+**************************************
+Freescale i.MX31 PDK development board
+**************************************
+
+This file documents the Buildroot support for the Freescale i.MX31 PDK in "3
+stack" configuration.
+
+The i.MX31 Product Development Kit (or PDK) is Freescale development board [1]
+based on the i.MX31 application processor [2].
+
+For more details on the i.MX31 PDK board, refer to the User's Guide [3].
+
+Build
+=====
+
+First, configure Buildroot for your i.MX31 PDK board:
+
+  make freescale_imx31_3stack_defconfig
+
+Build all components:
+
+  make
+
+You will find in ./output/images/ the following files:
+  - rootfs.cpio
+  - rootfs.cpio.gz
+  - rootfs.tar
+  - zImage
+
+The generated zImage does include the rootfs.
+
+Boot the PDK board
+==================
+
+The i.MX31 PDK contains a RedBoot bootloader in flash, which can be used to
+boot the newly created Buildroot images from the network.
+
+This necessitates to setup a TFTP server first. This setup is explained for
+example in Freescale i.MX31 PDK 1.5 Linux User's Guide [4].
+
+Here is a sample RedBoot configuration, for proper network boot of Buildroot on
+the i.MX31 PDK:
+
+    RedBoot> fconfig -l
+    Run script at boot: true
+    Boot script:
+    .. load -r -b 0x100000 zImage
+    .. exec -c "console=ttymxc0,115200"
+    
+    Boot script timeout (1000ms resolution): 2
+    Use BOOTP for network configuration: false
+    Gateway IP address: <your gateway IP address>
+    Local IP address: <your PDK IP address>
+    Local IP address mask: 255.255.255.0
+    Default server IP address: <your TFTP server IP address>
+    Board specifics: 0
+    Console baud rate: 115200
+    Set eth0 network hardware address [MAC]: false
+    GDB connection port: 9000
+    Force console for special debug messages: false
+    Network debug at boot time: false
+
+Adapt those settings to your network configuration by replacing the appropriate
+network addresses where necessary.
+
+You might want to verify that your i.MX31 PDK switches settings are the correct
+ones for UART, power, boot mode, etc. Here is a reference switches
+configuration:
+
+    SW4
+    1   2   3   4   5   6   7  8
+    ON off off off off off off ON
+
+    SW5 SW6 SW7 SW8 SW9 SW10
+     0   1   0   0   0    0
+
+See the i.MX31 PDK Linux Quick Start Guide [5] for more details on the switches
+settings.
+
+Connect a serial terminal set to 115200n8 and power on the i.MX31 PDK board.
+Buildroot will present a login prompt on the serial port.
+
+Enjoy!
+
+References
+==========
+
+[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK
+[2] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31
+[3] http://cache.freescale.com/files/32bit/doc/user_guide/pdk15_imx31_Hardware_UG.pdf
+[4] http://cache.freescale.com/files/32bit/doc/support_info/IMX31_PDK15_LINUXDOCS_BUNDLE.zip, pdk15_imx31__Linux_UG.pdf
+[5] http://www.freescale.com/files/32bit/doc/quick_ref_guide/PDK14LINUXQUICKSTART.pdf
diff --git a/configs/freescale_imx31_3stack_defconfig b/configs/freescale_imx31_3stack_defconfig
new file mode 100644
index 0000000..68781eb
--- /dev/null
+++ b/configs/freescale_imx31_3stack_defconfig
@@ -0,0 +1,22 @@
+# architecture
+BR2_arm=y
+BR2_arm1136jf_s_r0=y
+BR2_ARM_EABIHF=y
+
+# toolchain
+BR2_KERNEL_HEADERS_VERSION=y
+# Note: sadly the Linux kernel will not boot on the i.MX31 PDK, starting with
+# v3.16 and at least up to v4.0-rc4; this is why we use v3.15.y here.
+BR2_DEFAULT_KERNEL_VERSION="3.15.10"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y
+
+# system
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v5] configs: add defconfig for Freescale i.MX31 PDK
  2015-03-24 18:53           ` [Buildroot] [PATCH v5] " Vincent Stehlé
@ 2015-03-25  0:02             ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2015-03-25  0:02 UTC (permalink / raw)
  To: buildroot

Dear Vincent Stehl?,

On Tue, 24 Mar 2015 19:53:17 +0100, Vincent Stehl? wrote:
> The i.MX31 Product Development Kit (or PDK) is Freescale development board
> based on the i.MX31 application processor.
> 
> This defconfig is based on mainline kernel v3.15.10, and is aimed at a PDK in
> "3 stack" configuration, with CPU engine board, personality board and debug
> board.
> 
> Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-03-25  0:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17  9:43 [Buildroot] [PATCH] configs: add defconfig for Freescale i.MX31 PDK Vincent Stehlé
2015-03-18 23:32 ` Arnout Vandecappelle
2015-03-19 15:37   ` Vincent Stehlé
2015-03-19 15:58     ` Thomas Petazzoni
2015-03-19 21:26     ` Arnout Vandecappelle
2015-03-19 21:28       ` Arnout Vandecappelle
2015-03-20 14:53       ` Vincent Stehlé
2015-03-20 14:57       ` [Buildroot] [PATCH v4] " Vincent Stehlé
2015-03-21 17:27         ` Arnout Vandecappelle
2015-03-24 18:51           ` Vincent Stehlé
2015-03-24 18:53           ` [Buildroot] [PATCH v5] " Vincent Stehlé
2015-03-25  0:02             ` Thomas Petazzoni
2015-03-19 15:52   ` [Buildroot] [PATCH v2] " Vincent Stehlé
2015-03-19 21:32     ` Arnout Vandecappelle
2015-03-20  9:02       ` Vincent Stehlé
2015-03-20  9:05       ` [Buildroot] [PATCH v3] " Vincent Stehlé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.