Patchwork [meta-fsl-arm-extra] gk802: Add initial support

login
register
mail settings
Submitter Matthias Benesch
Date July 30, 2013, 8 a.m.
Message ID <1375171222.6132.18.camel@bDesk.lan>
Download mbox | patch
Permalink /patch/54783/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Matthias Benesch - July 30, 2013, 8 a.m.
Hello,
I would like to commit support for Zealz GK802 Freescale i.MX6 Quad Core
device. 
The work is based on the information from
https://github.com/imx6-dongle/wiki/wiki 

Unfortunately it is not complete yet. U-Boot is working and the device
will load the kernel uImage from first fat partition. With the attached
"ubootcmd" file copied to the first fat partition of your micro-sd card,
the kernel will start completely, but will fail to init systemd (see
attached "gk802-boot.log" file).

I already tried several bootargs configuration via the ubootcmd file, up
to following bootargs config without any further success: 

setenv bootargs 'console=ttymxc3,115200 consoleblank=0
root=/dev/mmcblk0p2 rootfstype=ext3 init=/lib/systemd/systemd rootwait
rw video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'

I hope for the communitie's support to be able to finalize this work and
get the GK802 supported within Yocto.

Regards,
Matthias
Otavio Salvador - July 30, 2013, 12:21 p.m.
Hello Matthias,

On Tue, Jul 30, 2013 at 5:00 AM, Matthias Benesch <twoof7@freenet.de> wrote:
> I would like to commit support for Zealz GK802 Freescale i.MX6 Quad Core
> device.
> The work is based on the information from
> https://github.com/imx6-dongle/wiki/wiki

Last time I talked with GK802 guys they were working in porting it to
U-Boot mainline; I have made the patches here to integrate it to
meta-fsl-arm-extra a while ago but I am awaiting for their U-Boot
patch. I am attaching the three patches for reference anyway.

> Unfortunately it is not complete yet. U-Boot is working and the device
> will load the kernel uImage from first fat partition. With the attached
> "ubootcmd" file copied to the first fat partition of your micro-sd card,
> the kernel will start completely, but will fail to init systemd (see
> attached "gk802-boot.log" file).
>
> I already tried several bootargs configuration via the ubootcmd file, up
> to following bootargs config without any further success:
>
> setenv bootargs 'console=ttymxc3,115200 consoleblank=0
> root=/dev/mmcblk0p2 rootfstype=ext3 init=/lib/systemd/systemd rootwait
> rw video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'
>
> I hope for the communitie's support to be able to finalize this work and
> get the GK802 supported within Yocto.

I think you should focus in get it booting and working, initially,
with core-image-base and then move to more complex use-cases like
systemd afterwards.

Please check the patches I attached to see if they help in something.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Daiane Angolini - July 30, 2013, 4:39 p.m.
On 07/30/2013 05:00 AM, Matthias Benesch wrote:
> Hello,
> I would like to commit support for Zealz GK802 Freescale i.MX6 Quad Core
> device.
> The work is based on the information from
> https://github.com/imx6-dongle/wiki/wiki
>
> Unfortunately it is not complete yet. U-Boot is working and the device
> will load the kernel uImage from first fat partition. With the attached
> "ubootcmd" file copied to the first fat partition of your micro-sd card,
> the kernel will start completely, but will fail to init systemd (see
> attached "gk802-boot.log" file).
>
> I already tried several bootargs configuration via the ubootcmd file, up
> to following bootargs config without any further success:
>
> setenv bootargs 'console=ttymxc3,115200 consoleblank=0
> root=/dev/mmcblk0p2 rootfstype=ext3 init=/lib/systemd/systemd rootwait
> rw video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'
>
> I hope for the communitie's support to be able to finalize this work and
> get the GK802 supported within Yocto.

Would it be "the classic DEVTMPS" problem?

Please, check if it's enabled on your kernel
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
Matthias Benesch - July 31, 2013, 8:23 a.m.
On Tue, 2013-07-30 at 13:39 -0300, Daiane Angolini wrote:
> On 07/30/2013 05:00 AM, Matthias Benesch wrote:
> > Hello,
> > I would like to commit support for Zealz GK802 Freescale i.MX6 Quad Core
> > device.
> > The work is based on the information from
> > https://github.com/imx6-dongle/wiki/wiki
> >
> > Unfortunately it is not complete yet. U-Boot is working and the device
> > will load the kernel uImage from first fat partition. With the attached
> > "ubootcmd" file copied to the first fat partition of your micro-sd card,
> > the kernel will start completely, but will fail to init systemd (see
> > attached "gk802-boot.log" file).
> >
> > I already tried several bootargs configuration via the ubootcmd file, up
> > to following bootargs config without any further success:
> >
> > setenv bootargs 'console=ttymxc3,115200 consoleblank=0
> > root=/dev/mmcblk0p2 rootfstype=ext3 init=/lib/systemd/systemd rootwait
> > rw video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'
> >
> > I hope for the communitie's support to be able to finalize this work and
> > get the GK802 supported within Yocto.
> 
> Would it be "the classic DEVTMPS" problem?
> 
> Please, check if it's enabled on your kernel
> CONFIG_DEVTMPFS=y
> CONFIG_DEVTMPFS_MOUNT=y
> 

The DEVTMPFS did it. Now it is starting including systemd ;-).

I can remember that I saw this issue within one of the forum discussions
before. 

I will update the patch accordingly.

Matthias
Dmitriy B. - July 31, 2013, 4:47 p.m.
Hi Matthias,

Some time ago me and guys interested in GK802 started the imx6-dongle
project - https://github.com/imx6-dongle You probably using kernel from
there.
It kinda stuck right now because the wave of interest in GK802 already
passed and guys with skills already done everything with it and lost
interest. If you want to have access to imx6-dongle repos - I can add you,
or merge your pull requests.
There a couple of things left to do - for example - port our hardware
support to 4.0.0 BSP or to 3.5.7 kernel in future.

Same also can be applied to anyone who wants to work on GK802 - you are
welcome.

Best Regards
Dmitriy Beykun

2013/7/31 Matthias Benesch <twoof7@freenet.de>

> On Tue, 2013-07-30 at 13:39 -0300, Daiane Angolini wrote:
> > On 07/30/2013 05:00 AM, Matthias Benesch wrote:
> > > Hello,
> > > I would like to commit support for Zealz GK802 Freescale i.MX6 Quad
> Core
> > > device.
> > > The work is based on the information from
> > > https://github.com/imx6-dongle/wiki/wiki
> > >
> > > Unfortunately it is not complete yet. U-Boot is working and the device
> > > will load the kernel uImage from first fat partition. With the attached
> > > "ubootcmd" file copied to the first fat partition of your micro-sd
> card,
> > > the kernel will start completely, but will fail to init systemd (see
> > > attached "gk802-boot.log" file).
> > >
> > > I already tried several bootargs configuration via the ubootcmd file,
> up
> > > to following bootargs config without any further success:
> > >
> > > setenv bootargs 'console=ttymxc3,115200 consoleblank=0
> > > root=/dev/mmcblk0p2 rootfstype=ext3 init=/lib/systemd/systemd rootwait
> > > rw video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'
> > >
> > > I hope for the communitie's support to be able to finalize this work
> and
> > > get the GK802 supported within Yocto.
> >
> > Would it be "the classic DEVTMPS" problem?
> >
> > Please, check if it's enabled on your kernel
> > CONFIG_DEVTMPFS=y
> > CONFIG_DEVTMPFS_MOUNT=y
> >
>
> The DEVTMPFS did it. Now it is starting including systemd ;-).
>
> I can remember that I saw this issue within one of the forum discussions
> before.
>
> I will update the patch accordingly.
>
> Matthias
>
>
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>

Patch

From 6acae509feaf9deb72f6f9fa57471a7f3eac8d49 Mon Sep 17 00:00:00 2001
From: Matthias Benesch <twoof7@freenet.de>
Date: Tue, 30 Jul 2013 00:24:34 -0700
Subject: [meta-fsl-arm-extra][PATCH] gk802: Add initial support

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
---
 conf/machine/gk802.conf                            | 19 ++++++++++++
 .../0001-use-fat-filesystem.patch                  | 15 ++++++++++
 recipes-bsp/u-boot/u-boot-imx6dongle_git.bb        | 16 ++++++++++
 .../0001-enable-ext2_3-fs.patch                    | 21 +++++++++++++
 recipes-kernel/linux/linux-imx6dongle_3.0.35.bb    | 34 ++++++++++++++++++++++
 5 files changed, 105 insertions(+)
 create mode 100644 conf/machine/gk802.conf
 create mode 100644 recipes-bsp/u-boot/u-boot-imx6dongle/0001-use-fat-filesystem.patch
 create mode 100644 recipes-bsp/u-boot/u-boot-imx6dongle_git.bb
 create mode 100644 recipes-kernel/linux/linux-imx6dongle-3.0.35/0001-enable-ext2_3-fs.patch
 create mode 100644 recipes-kernel/linux/linux-imx6dongle_3.0.35.bb

diff --git a/conf/machine/gk802.conf b/conf/machine/gk802.conf
new file mode 100644
index 0000000..05fcb48
--- /dev/null
+++ b/conf/machine/gk802.conf
@@ -0,0 +1,19 @@ 
+#@TYPE: Machine
+#@NAME: Zealz GK802
+#@SOC: i.MX6Q
+#@DESCRIPTION: Machine configuration for Zealz GK802
+
+include conf/machine/include/imx-base.inc
+include conf/machine/include/tune-cortexa9.inc
+
+SOC_FAMILY = "mx6:mx6q"
+
+PREFERRED_PROVIDER_u-boot = "u-boot-imx6dongle"
+PREFERRED_PROVIDER_virtual/kernel = "linux-imx6dongle"
+
+UBOOT_MACHINE = "gk802_config"
+
+SERIAL_CONSOLE = "115200 ttymxc0"
+
+MACHINE_FEATURES += " pci wifi bluetooth"
+
diff --git a/recipes-bsp/u-boot/u-boot-imx6dongle/0001-use-fat-filesystem.patch b/recipes-bsp/u-boot/u-boot-imx6dongle/0001-use-fat-filesystem.patch
new file mode 100644
index 0000000..e91f32e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-imx6dongle/0001-use-fat-filesystem.patch
@@ -0,0 +1,15 @@ 
+diff --git a/include/configs/gk802.h b/include/configs/gk802.h
+index a84f16b..c4d2b1b 100644
+--- a/include/configs/gk802.h
++++ b/include/configs/gk802.h
+@@ -115,8 +115,8 @@
+ 	"initrd_high=0xffffffff\0" \
+     "boot_recovery=setenv bootsuffix _recovery; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot; run boot_normal\0" \
+     "boot_normal=  setenv bootsuffix ''; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot\0" \
+-    "try_boot=if ext2load mmc ${mmcdev} ${loadaddr} /boot/ubootcmd${bootsuffix}; then source; fi;" \
+-    "         if ext2load mmc ${mmcdev} ${loadaddr} /boot/uImage${bootsuffix}; then bootm; fi;\0"
++    "try_boot=if fatload mmc ${mmcdev} ${loadaddr} /ubootcmd${bootsuffix}; then source; fi;" \
++    "         if fatload mmc ${mmcdev} ${loadaddr} /uImage${bootsuffix}; then bootm; fi;\0"
+ 
+ 
+ 
diff --git a/recipes-bsp/u-boot/u-boot-imx6dongle_git.bb b/recipes-bsp/u-boot/u-boot-imx6dongle_git.bb
new file mode 100644
index 0000000..468b991
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-imx6dongle_git.bb
@@ -0,0 +1,16 @@ 
+require recipes-bsp/u-boot/u-boot.inc
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+COMPATIBLE_MACHINE = "(gk802)"
+
+PROVIDES = "u-boot"
+
+SRCREV = "AUTOINC"
+SRC_URI = "git://github.com/imx6-dongle/uboot-imx6dongle.git \
+           file://0001-use-fat-filesystem.patch \
+"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-kernel/linux/linux-imx6dongle-3.0.35/0001-enable-ext2_3-fs.patch b/recipes-kernel/linux/linux-imx6dongle-3.0.35/0001-enable-ext2_3-fs.patch
new file mode 100644
index 0000000..92f06b8
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx6dongle-3.0.35/0001-enable-ext2_3-fs.patch
@@ -0,0 +1,21 @@ 
+diff --git a/arch/arm/configs/imx6_gk802_defconfig b/arch/arm/configs/imx6_gk802_defconfig
+index da72294..a6ba5cb 100644
+--- a/arch/arm/configs/imx6_gk802_defconfig
++++ b/arch/arm/configs/imx6_gk802_defconfig
+@@ -2432,8 +2432,14 @@ CONFIG_MXC_MIPI_CSI2=m
+ #
+ # File systems
+ #
+-# CONFIG_EXT2_FS is not set
+-# CONFIG_EXT3_FS is not set
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
+ CONFIG_EXT4_FS=y
+ CONFIG_EXT4_USE_FOR_EXT23=y
+ CONFIG_EXT4_FS_XATTR=y
diff --git a/recipes-kernel/linux/linux-imx6dongle_3.0.35.bb b/recipes-kernel/linux/linux-imx6dongle_3.0.35.bb
new file mode 100644
index 0000000..40ee110
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx6dongle_3.0.35.bb
@@ -0,0 +1,34 @@ 
+# Adapted from linux-imx.inc, copyright (C) 2013 O.S. Systems Software LTDA
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-imx.inc
+
+DESCRIPTION = "Linux kernel for Zealz GK802"
+
+PR = "${INC_PR}.1"
+
+COMPATIBLE_MACHINE = "(mx6)"
+
+SRC_URI = "git://github.com/imx6-dongle/linux-imx.git;branch=imx_3.0.35_1.1.0-hdmidongle \
+           file://0001-enable-ext2_3-fs.patch \
+"
+
+SRCREV = "AUTOINC"
+
+LOCALVERSION = "-imx6dongle+yocto"
+
+#KERNEL_DEFCONFIG = "imx6_hdmidongle_defconfig"
+KERNEL_DEFCONFIG = "imx6_gk802_defconfig"
+
+do_configure_prepend() {
+	cp ${S}/arch/arm/configs/${KERNEL_DEFCONFIG} ${S}/.config
+	cp ${S}/arch/arm/configs/${KERNEL_DEFCONFIG} ${S}/../defconfig
+
+	kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+	kernel_conf_variable LOCALVERSION_AUTO y
+
+	# Add GIT revision to the local version
+	head=`git rev-parse --verify --short HEAD 2> /dev/null`
+	printf "%s%s" +g $head > ${S}/.scmversion
+}
+
-- 
1.8.3.4