configs: add defconfig for Freescale i.MX31 PDK
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
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.
--- .../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
board/freescale/imx31_3stack/linux-kbuild-fix-make-incompatibility.patch new file +60 -0
@@ -0,0 +1,60 @@ +From f1b86605650627a0876163a89065b584f562e3b0 Mon Sep 17 00:00:00 2001 +From: Sam Ravnborg <[email protected]> +Date: Sat, 13 Dec 2008 23:00:45 +0100 +Subject: [PATCH] kbuild: fix make incompatibility + +"Paul Smith" <[email protected]> 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" <[email protected]> +Signed-off-by: Sam Ravnborg <[email protected]> +--- + 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 +
board/freescale/imx31_3stack/readme.txt new file +89 -0
89 lines not on this page · raw message
configs/freescale_imx31_3stack_defconfig new file +23 -0
@@ -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
Signature · 1 line
2.1.4
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
Quoted 6 lines · Vincent Stehl?
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...
Quoted 5 lines
Note that we have a patch to reconciliate the recent GNU make with the "old"
Makefilein the Linux kernel this configuration refers to.Signed-off-by Vincent Stehl? <[email protected]>
[snip]
configs/freescale_imx31_3stack_defconfig line 7
Quoted 13 lines
configs/freescale_imx31_3stack_defconfig new file +7
-0@@ -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...
configs/freescale_imx31_3stack_defconfig line 9
Quoted 2 lines
configs/freescale_imx31_3stack_defconfig new file +2
-0+BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y
Why not uClibc and why C++?
configs/freescale_imx31_3stack_defconfig line 12
Quoted 3 lines
configs/freescale_imx31_3stack_defconfig new file +3
-0+ +# system +BR2_ROOTFS_DEVICE_CREATION_STATIC=y
With a more recent kernel we don't need this crappy option...
configs/freescale_imx31_3stack_defconfig line 14
Quoted 2 lines
configs/freescale_imx31_3stack_defconfig new file +2
-0+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
Why?
configs/freescale_imx31_3stack_defconfig line 23
Quoted 9 lines
configs/freescale_imx31_3stack_defconfig new file +9
-0+ +# 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
Quoted 1 line
Signature · 6 lines
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
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
On 03/19/2015 12:32 AM, Arnout Vandecappelle wrote:
..
Quoted 1 line
Doesn't the upstream
MACH_MX31_3DSwork? 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?
..
Quoted 2 lines
Quoted 1 line
+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?
..
Quoted 3 lines
configs/freescale_imx31_3stack_defconfig line 9
Quoted 2 lines
configs/freescale_imx31_3stack_defconfig new file +2
-0+BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=yWhy not uClibc and why C++?
Those are "leftovers", sorry. Thanks for spotting those mistakes. I will remove that.
..
Quoted 2 lines
Quoted 1 line
+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.
..
Quoted 2 lines
Quoted 1 line
+#
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RWis not setWhy?
Also "leftovers", sorry. Thanks for spotting, I will remove as well.
..
Quoted 3 lines
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.
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
Dear Vincent Stehl?,
Quoted 10 lines · Vincent Stehl?
Quoted 2 lines
Quoted 1 line
+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Vincent StehléQuoted 9 lines · Vincent Stehl?
On 03/19/2015 12:32 AM, Arnout Vandecappelle wrote:
..Quoted 1 line
Doesn't the upstream
MACH_MX31_3DSwork? 2.6.28 is extremely old...Hi Arnout,
Thank you for reviewing this patch so quickly and sending feedbacks.
Quoted 8 lines
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.
Quoted 3 lines
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.
Quoted 10 lines
Quoted 2 lines
Quoted 1 line
+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]
Quoted 6 lines
Quoted 3 lines
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.
Quoted 10 lines
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
Quoted 14 lines
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.
Signature · 6 lines
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
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
On the other hand, if we stay with network booting, initramfs is
Quoted 5 lines
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
Signature · 6 lines
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
PATCH 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Arnout VandecappelleOn 03/19/2015 10:26 PM, Arnout Vandecappelle wrote:
..
Quoted 3 lines
It doesn't look like it's using DT, but there's a
mach-mx31_3ds.cthat 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.
PATCH v4 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Arnout VandecappelleThe 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.
---
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
board/freescale/imx31_3stack/readme.txt new file +92 -0
@@ -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
configs/freescale_imx31_3stack_defconfig new file +20 -0
@@ -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
Signature · 1 line
2.1.4
PATCH v4 1/1 configs: add defconfig for Freescale i.MX31 PDK
Quoted 9 lines · Vincent Stehl?
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? <[email protected]>Cc Arnout Vandecappelle <[email protected]>
Minor comments below.
board/freescale/imx31_3stack/readme.txt line 3
Quoted 9 lines
board/freescale/imx31_3stack/readme.txt new file +3
-0@@ -0,0 +1,92 @@ +************************************** +Freescale i.MX31 PDK development board +**************************************
Excellent readme!
[snip]
Quoted 6 lines
configs/freescale_imx31_3stack_defconfig new file +0
-0
configs/freescale_imx31_3stack_defconfig line 9
Quoted 9 lines
configs/freescale_imx31_3stack_defconfig new file +9
-0@@ -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 :-)
configs/freescale_imx31_3stack_defconfig line 17
Quoted 8 lines
configs/freescale_imx31_3stack_defconfig new file +8
-0+ +# 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
Quoted 4 lines
configs/freescale_imx31_3stack_defconfig new file +3
-0+BR2_LINUX_KERNEL_ZIMAGE=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_INITRAMFS=y
Signature · 6 lines
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
PATCH v4 1/1 configs: add defconfig for Freescale i.MX31 PDK
On 03/21/2015 06:27 PM, Arnout Vandecappelle wrote:
..
Quoted 1 line
Hi Arnout,
Thank you for your efforts reviewing this patch.
..
Quoted 4 lines
configs/freescale_imx31_3stack_defconfig line 9
Quoted 2 lines
configs/freescale_imx31_3stack_defconfig new file +2
-0+BR2_DEFAULT_KERNEL_VERSION="3.15.10" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=yIt 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.
Quoted 1 line
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.
PATCH v5 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Arnout VandecappelleThe 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.
---
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
board/freescale/imx31_3stack/readme.txt new file +92 -0
@@ -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
configs/freescale_imx31_3stack_defconfig new file +22 -0
@@ -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
Signature · 1 line
2.1.4
Thomas Petazzoni
AppliedPATCH v5 1/1 configs: add defconfig for Freescale i.MX31 PDK
Dear Vincent Stehl?,
Quoted 9 lines · Vincent Stehl?
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? <[email protected]>
Applied, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Arnout VandecappelleThe 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.
---
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
board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch new file +56 -0
@@ -0,0 +1,56 @@ +From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001 +From: "Justin P. Mattock" <[email protected]> +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 <[email protected]> +Cc: Frederic Weisbecker <[email protected]> +Signed-off-by: Andrew Morton <[email protected]> +Signed-off-by: Sam Ravnborg <[email protected]> +--- + 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 +
board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch new file +1 -0
@@ -0,0 +1 @@ +../linux/linux-kbuild-fix-make-incompatibility.patch
board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch new file +30 -0
@@ -0,0 +1,30 @@ +From d951151b94a03c1ad33bcfec223358a0e7437115 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <[email protected]> +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? <[email protected]> +--- + 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 +
board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch new file +60 -0
60 lines not on this page · raw message
board/freescale/imx31_3stack/readme.txt new file +92 -0
92 lines not on this page · raw message
configs/freescale_imx31_3stack_defconfig new file +24 -0
@@ -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
Signature · 1 line
2.1.4
PATCH v2 1/1 configs: add defconfig for Freescale i.MX31 PDK
[Quick remark, I don't have time for a full review now]
Quoted 20 lines · Vincent Stehl?
board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch new file +14
-0@@ -0,0 +1,30 @@ +From d951151b94a03c1ad33bcfec223358a0e7437115 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <[email protected]> +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? <[email protected]> +--- + 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
board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch line 24
Quoted 10 lines
board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch new file +10
-0+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
Quoted 5 lines
board/freescale/imx31_3stack/patches/linux/linux-imx31_3stack_defconfig-enable-support-for-initramfs.patch new file +5
-0+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y + CONFIG_SYSCTL=y + CONFIG_EMBEDDED=y +-- +2.1.4
Signature · 6 lines
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
PATCH v2 1/1 configs: add defconfig for Freescale i.MX31 PDK
On 03/19/2015 10:32 PM, Arnout Vandecappelle wrote:
(kernel patch to enable initramfs)
Quoted 2 lines
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.
PATCH v3 1/1 configs: add defconfig for Freescale i.MX31 PDK
In reply to Arnout VandecappelleThe 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.
---
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
board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-C-libary-confusion-in-unifdef.c-due-to-ge.patch new file +56 -0
@@ -0,0 +1,56 @@ +From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001 +From: "Justin P. Mattock" <[email protected]> +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 <[email protected]> +Cc: Frederic Weisbecker <[email protected]> +Signed-off-by: Andrew Morton <[email protected]> +Signed-off-by: Sam Ravnborg <[email protected]> +--- + 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 +
board/freescale/imx31_3stack/patches/linux-headers/linux-headers-kbuild-fix-make-incompatibility.patch new file +1 -0
@@ -0,0 +1 @@ +../linux/linux-kbuild-fix-make-incompatibility.patch
board/freescale/imx31_3stack/patches/linux/linux-kbuild-fix-make-incompatibility.patch new file +60 -0
60 lines not on this page · raw message
board/freescale/imx31_3stack/readme.txt new file +92 -0
92 lines not on this page · raw message
configs/freescale_imx31_3stack_defconfig new file +24 -0
@@ -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
Signature · 1 line
2.1.4