mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 21:59:42 +01:00
linux-mx31: MX31 LiteKit support.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2838 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
12
meta/conf/machine/mx31litekit.conf
Normal file
12
meta/conf/machine/mx31litekit.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: imx31 Lite Kit
|
||||
#@DESCRIPTION: Machine configuration for the imx31 based Lite Kit
|
||||
TARGET_ARCH = "arm"
|
||||
PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-mx31"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm alsa bluetooth irda screen touchscreen"
|
||||
|
||||
IMAGE_FSTYPES ?= "tar.gz"
|
||||
SERIAL_CONSOLE = "-L 115200 ttymxc0"
|
||||
1365
meta/packages/linux/linux-mx31-2.6.19.2/defconfig-mx31litekit
vendored
Normal file
1365
meta/packages/linux/linux-mx31-2.6.19.2/defconfig-mx31litekit
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
meta/packages/linux/linux-mx31-2.6.19.2/linux-2.6.19.2-mx3lite.patch.gz
vendored
Normal file
BIN
meta/packages/linux/linux-mx31-2.6.19.2/linux-2.6.19.2-mx3lite.patch.gz
vendored
Normal file
Binary file not shown.
42
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-boot.patch
vendored
Normal file
42
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-boot.patch
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
arch/arm/boot/compressed/Makefile | 4 ++++
|
||||
arch/arm/boot/compressed/head-mx3.S | 17 +++++++++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
Index: linux-2.6.19.2/arch/arm/boot/compressed/Makefile
|
||||
===================================================================
|
||||
--- linux-2.6.19.2.orig/arch/arm/boot/compressed/Makefile 2007-01-10 20:10:37.000000000 +0100
|
||||
+++ linux-2.6.19.2/arch/arm/boot/compressed/Makefile 2007-10-02 15:46:13.000000000 +0200
|
||||
@@ -50,6 +50,10 @@
|
||||
OBJS += head-at91rm9200.o
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_ARCH_MX3),y)
|
||||
+OBJS += head-mx3.o
|
||||
+endif
|
||||
+
|
||||
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
|
||||
ifeq ($(CONFIG_CPU_CP15),y)
|
||||
OBJS += big-endian.o
|
||||
Index: linux-2.6.19.2/arch/arm/boot/compressed/head-mx3.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.19.2/arch/arm/boot/compressed/head-mx3.S 2007-10-02 16:00:13.000000000 +0200
|
||||
@@ -0,0 +1,17 @@
|
||||
+/*
|
||||
+ * linux/arch/arm/boot/compressed/head-mx3.S
|
||||
+ *
|
||||
+ * MX3 specific hacks. This is merged into head.S by the linker.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/linkage.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+
|
||||
+ .section ".start", "ax"
|
||||
+
|
||||
+__MX3_start:
|
||||
+#ifdef CONFIG_MACH_MX31LITE
|
||||
+ mov r7, #(MACH_TYPE_MX31LITE & 0xff)
|
||||
+ orr r7, r7, #(MACH_TYPE_MX31LITE & 0xff00)
|
||||
+#endif
|
||||
85
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-fb.patch
vendored
Normal file
85
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-fb.patch
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
arch/arm/mach-mx3/mx31lite.c | 26 ++++++++++++++++++++++++++
|
||||
drivers/video/mxc/mxcfb_modedb.c | 25 +++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
|
||||
Index: linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.2.orig/arch/arm/mach-mx3/mx31lite.c 2007-10-03 19:37:43.000000000 +0200
|
||||
+++ linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c 2007-10-03 19:43:09.000000000 +0200
|
||||
@@ -280,6 +280,31 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_FB_MXC_SYNC_PANEL) || defined(CONFIG_FB_MXC_SYNC_PANEL_MODULE)
|
||||
+static const char fb_default_mode[] = "Sharpsix-VGA";
|
||||
+
|
||||
+/* mxc lcd driver */
|
||||
+static struct platform_device mxc_fb_device = {
|
||||
+ .name = "mxc_sdc_fb",
|
||||
+ .id = 0,
|
||||
+ .dev = {
|
||||
+ .release = mxc_nop_release,
|
||||
+ .platform_data = &fb_default_mode,
|
||||
+ .coherent_dma_mask = 0xFFFFFFFF,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void mxc_init_fb(void)
|
||||
+{
|
||||
+ (void)platform_device_register(&mxc_fb_device);
|
||||
+}
|
||||
+#else
|
||||
+static inline void mxc_init_fb(void)
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/*!
|
||||
* Board specific fixup function. It is called by \b setup_arch() in
|
||||
* setup.c file very early on during kernel starts. It allows the user to
|
||||
@@ -400,6 +425,7 @@
|
||||
mxc_init_nor_mtd();
|
||||
mxc_init_nand_mtd();
|
||||
mxc_init_eth();
|
||||
+ mxc_init_fb();
|
||||
}
|
||||
|
||||
/*
|
||||
Index: linux-2.6.19.2/drivers/video/mxc/mxcfb_modedb.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.2.orig/drivers/video/mxc/mxcfb_modedb.c 2007-10-03 19:37:43.000000000 +0200
|
||||
+++ linux-2.6.19.2/drivers/video/mxc/mxcfb_modedb.c 2007-10-03 19:43:02.000000000 +0200
|
||||
@@ -55,6 +55,31 @@
|
||||
"TV-VGA", 60, 640, 480, 40574, 35, 45, 9, 1, 46, 5,
|
||||
0, FB_VMODE_NONINTERLACED, 0,
|
||||
},
|
||||
+ [5] = {
|
||||
+ /* 640x480 @ 60 Hz, 6" */
|
||||
+ "Sharpsix-VGA",
|
||||
+ 60, 640, 480, // 60 Hz, 640x480
|
||||
+ 35285, // 36.66 ns clock period
|
||||
+ 128, 128, // left & right margin
|
||||
+ 34, 10, // upper & lower margin
|
||||
+ 2, 2, // hsync & vsync len
|
||||
+ FB_SYNC_OE_ACT_HIGH,
|
||||
+ FB_VMODE_NONINTERLACED,
|
||||
+ 0,
|
||||
+ },
|
||||
+ [6] = {
|
||||
+ /* 640x480 @ 60 Hz 10" */
|
||||
+ "Sharpten-VGA",
|
||||
+ 60, 640, 480, // 60 Hz, 640x480
|
||||
+ 35285, // 35.285b ns clock period
|
||||
+ 128, 128, // left & right margin
|
||||
+ 34, 10, // upper & lower margin
|
||||
+ 2, 2, // hsync & vsync len
|
||||
+ FB_SYNC_OE_ACT_HIGH,
|
||||
+ FB_VMODE_NONINTERLACED,
|
||||
+ 0,
|
||||
+ },
|
||||
+
|
||||
};
|
||||
|
||||
int mxcfb_modedb_sz = ARRAY_SIZE(mxcfb_modedb);
|
||||
42
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-spi.patch
vendored
Normal file
42
meta/packages/linux/linux-mx31-2.6.19.2/mx31lite-spi.patch
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
arch/arm/mach-mx3/mx31lite.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
Index: linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.2.orig/arch/arm/mach-mx3/mx31lite.c 2007-10-03 20:12:16.000000000 +0200
|
||||
+++ linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c 2007-10-03 20:14:14.000000000 +0200
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/map.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
|
||||
#include <asm/mach/flash.h>
|
||||
#endif
|
||||
@@ -304,6 +305,16 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+static struct spi_board_info mxc_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "pmic_spi",
|
||||
+ .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
|
||||
+ .max_speed_hz = 4000000,
|
||||
+ .bus_num = 2,
|
||||
+ .chip_select = 0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
|
||||
/*!
|
||||
* Board specific fixup function. It is called by \b setup_arch() in
|
||||
@@ -426,6 +437,8 @@
|
||||
mxc_init_nand_mtd();
|
||||
mxc_init_eth();
|
||||
mxc_init_fb();
|
||||
+ spi_register_board_info(mxc_spi_board_info,
|
||||
+ ARRAY_SIZE(mxc_spi_board_info));
|
||||
}
|
||||
|
||||
/*
|
||||
41
meta/packages/linux/linux-mx31.inc
Normal file
41
meta/packages/linux/linux-mx31.inc
Normal file
@@ -0,0 +1,41 @@
|
||||
SECTION = "kernel"
|
||||
DESCRIPTION = "Linux kernel for imx31 Lite Kit"
|
||||
LICENSE = "GPL"
|
||||
|
||||
KERNEL_OUTPUT = "arch/${ARCH}/boot/compressed/${KERNEL_IMAGETYPE}"
|
||||
|
||||
inherit kernel
|
||||
|
||||
COMPATIBLE_MACHINE = "mx31litekit"
|
||||
|
||||
do_configure_prepend() {
|
||||
|
||||
rm -f ${S}/.config || true
|
||||
|
||||
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
|
||||
echo "CONFIG_AEABI=y" >> ${S}/.config
|
||||
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
|
||||
else
|
||||
echo "# CONFIG_AEABI is not set" >> ${S}/.config
|
||||
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
|
||||
fi
|
||||
|
||||
sed -e '/CONFIG_AEABI/d' \
|
||||
-e '/CONFIG_OABI_COMPAT=/d' \
|
||||
'${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config'
|
||||
|
||||
yes '' | oe_runmake oldconfig
|
||||
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOY_DIR_IMAGE}
|
||||
install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin
|
||||
rm -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
|
||||
ln -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
|
||||
tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${MACHINE}.tgz -C ${D} lib
|
||||
}
|
||||
|
||||
do_deploy[dirs] = "${S}"
|
||||
|
||||
addtask deploy before do_populate_staging after do_install
|
||||
20
meta/packages/linux/linux-mx31_2.6.19.2.bb
Normal file
20
meta/packages/linux/linux-mx31_2.6.19.2.bb
Normal file
@@ -0,0 +1,20 @@
|
||||
require linux-mx31.inc
|
||||
|
||||
PR = "r1"
|
||||
|
||||
FILESDIR = "${WORKDIR}"
|
||||
|
||||
SRC_URI = " \
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.bz2 \
|
||||
file://linux-2.6.19.2-mx3lite.patch.gz \
|
||||
file://linux-2.6.19.2-mx3lite.patch;patch=1 \
|
||||
file://defconfig-mx31litekit \
|
||||
"
|
||||
|
||||
SRC_URI_append_mx31litekit = " \
|
||||
file://mx31lite-boot.patch;patch=1 \
|
||||
file://mx31lite-fb.patch;patch=1 \
|
||||
file://mx31lite-spi.patch;patch=1 \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/linux-2.6.19.2"
|
||||
Reference in New Issue
Block a user