aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2010-09-25 22:16:27 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-10-27 23:30:23 +0200
commit5d5987b3f82037527ce410bf3ca199736027df28 (patch)
treecbe6a7a3f316faadecb3413871c9f2f4fbcc54ce /recipes/linux
parent5a00fb6dd12440af38a95dcbfde0d73af3115414 (diff)
downloadopenembedded-5d5987b3f82037527ce410bf3ca199736027df28.tar.gz
openembedded-5d5987b3f82037527ce410bf3ca199736027df28.tar.bz2
openembedded-5d5987b3f82037527ce410bf3ca199736027df28.zip
linux-2.6.28: make it bootable and usefull on nokia900
*crucial boot support(mmc,mmc block devices,and filesystems) are now builtin *a CMDLINE is now set in the recipe(there is a custom nokia bootloader on the nokia900), That is also necessary to boot on microsd *g_ether is now built, which is required for usbnet *ondemand cpufreq governor is now the default *the inconsistent-mmc-fix-2.6.28-20094803.3.diff patch comes from: https://bugs.maemo.org/show_bug.cgi?id=2747 and is necessary to be able to boot on microsd *there is also a patch that reports the battery capacity which comes from: http://my.arava.co.il/~matan/770/n900/bq27x00_battery.c That patch should be temporary,and be replcaed by somwthing like that: Sep 24 18:48:06 <DocScrutinizer51> the bq27200 kernel module is rather rudimentary Sep 24 18:48:09 <DocScrutinizer51> should be easy to adapt FR bq2700 module to provide same szsfs nodes and just use I2C instead of FIQ+HDQ Sep 24 18:48:11 <DocScrutinizer51> and that's exactly what I'd recommend to do (from #openmoko-cdevel on Freenode) Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-2.6.28/nokia900/0001-Fix-CPU-frequency-driver-so-that-it-loads-before-the.patch26
-rw-r--r--recipes/linux/linux-2.6.28/nokia900/bq27x00_readings.patch35
-rw-r--r--recipes/linux/linux-2.6.28/nokia900/defconfig42
-rw-r--r--recipes/linux/linux-2.6.28/nokia900/inconsistent-mmc-fix-2.6.28-20094803.3.diff79
-rw-r--r--recipes/linux/linux_2.6.28.bb7
5 files changed, 168 insertions, 21 deletions
diff --git a/recipes/linux/linux-2.6.28/nokia900/0001-Fix-CPU-frequency-driver-so-that-it-loads-before-the.patch b/recipes/linux/linux-2.6.28/nokia900/0001-Fix-CPU-frequency-driver-so-that-it-loads-before-the.patch
new file mode 100644
index 0000000000..df306f7b0e
--- /dev/null
+++ b/recipes/linux/linux-2.6.28/nokia900/0001-Fix-CPU-frequency-driver-so-that-it-loads-before-the.patch
@@ -0,0 +1,26 @@
+From 30b1d92216154c9da2c9c33b6add9c458f98df44 Mon Sep 17 00:00:00 2001
+From: Alistair Buxton <a.j.buxton@gmail.com>
+Date: Wed, 8 Sep 2010 11:51:21 +0100
+Subject: [PATCH] Fix CPU frequency driver so that it loads *before* the things that use it.
+
+Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
+---
+ arch/arm/plat-omap/cpu-omap.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index 3974680..033a2bb 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -188,7 +188,7 @@ static int __init omap_cpufreq_init(void)
+ return cpufreq_register_driver(&omap_driver);
+ }
+
+-late_initcall(omap_cpufreq_init);
++arch_initcall(omap_cpufreq_init);
+
+ /*
+ * if ever we want to remove this, upon cleanup call:
+--
+1.7.0.4
+
diff --git a/recipes/linux/linux-2.6.28/nokia900/bq27x00_readings.patch b/recipes/linux/linux-2.6.28/nokia900/bq27x00_readings.patch
new file mode 100644
index 0000000000..3f91944698
--- /dev/null
+++ b/recipes/linux/linux-2.6.28/nokia900/bq27x00_readings.patch
@@ -0,0 +1,35 @@
+Index: linux-2.6.28/drivers/power/bq27x00_battery.c
+===================================================================
+--- linux-2.6.28.orig/drivers/power/bq27x00_battery.c 2010-09-25 16:57:27.659097996 +0200
++++ linux-2.6.28/drivers/power/bq27x00_battery.c 2010-04-01 16:01:16.000000000 +0200
+@@ -358,6 +358,22 @@
+ .id_table = bq27200_id,
+ };
+
++struct bq27200_platform_data {
++ int dummy;
++};
++
++static struct bq27200_platform_data bq27200_config = {
++ .dummy = 0,
++};
++
++static struct i2c_board_info rx51_camera_board_info_2 =
++ {
++ I2C_BOARD_INFO("bq27200", 0x55),
++ .platform_data = &bq27200_config,
++ };
++
++static struct i2c_client *client;
++
+ static int __init bq27x00_battery_init(void)
+ {
+ int ret;
+@@ -365,6 +381,7 @@
+ ret = i2c_add_driver(&bq27200_battery_driver);
+ if (ret)
+ printk(KERN_ERR "Unable to register BQ27200 driver\n");
++ client = i2c_new_device(i2c_get_adapter(2), &rx51_camera_board_info_2);
+
+ return ret;
+ }
diff --git a/recipes/linux/linux-2.6.28/nokia900/defconfig b/recipes/linux/linux-2.6.28/nokia900/defconfig
index 88d1e07c3e..d00580fdcb 100644
--- a/recipes/linux/linux-2.6.28/nokia900/defconfig
+++ b/recipes/linux/linux-2.6.28/nokia900/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.28-omap1
-# Thu Jul 9 09:32:52 2009
+# Sat Oct 9 15:29:13 2010
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -36,7 +36,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -45,7 +45,8 @@ CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
@@ -61,8 +62,7 @@ CONFIG_CGROUP_SCHED=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MM_OWNER=y
CONFIG_CGROUP_MEM_RES_CTLR=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
@@ -319,7 +319,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0 snd-soc-rx51.hp_lim=42 snd-soc-tlv320aic3x.hp_dac_lim=6"
+CONFIG_CMDLINE=" quiet "
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
@@ -337,11 +337,11 @@ CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
-# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
-# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
@@ -1250,9 +1250,10 @@ CONFIG_I2C_BCM2048=m
# Graphics support
#
CONFIG_PVR=m
-# CONFIG_DRM_VER_ORIG is not set
-# CONFIG_DRM_VER_TUNGSTEN is not set
-# CONFIG_DRM_TUNGSTEN is not set
+CONFIG_PVR_RELEASE=y
+# CONFIG_PVR_DEBUG is not set
+# CONFIG_PVR_TIMING is not set
+# CONFIG_PVR_EXAMPLES is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
CONFIG_FB=y
@@ -1535,8 +1536,9 @@ CONFIG_USB_GADGET_SELECTED=y
CONFIG_USB_GADGET_DUALSPEED=y
CONFIG_USB_ZERO=m
# CONFIG_USB_ZERO_HNPTEST is not set
-# CONFIG_USB_ETH is not set
-# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
CONFIG_USB_FILE_STORAGE=m
CONFIG_USB_FILE_STORAGE_TEST=y
# CONFIG_USB_G_SERIAL is not set
@@ -1553,14 +1555,14 @@ CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_ISP1301_OMAP is not set
CONFIG_TWL4030_USB=y
-CONFIG_MMC=m
+CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
#
# MMC/SD/SDIO Card Drivers
#
-CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK=y
# CONFIG_MMC_BLOCK_BOUNCE is not set
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
@@ -1569,7 +1571,7 @@ CONFIG_MMC_BLOCK=m
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
-CONFIG_MMC_OMAP_HS=m
+CONFIG_MMC_OMAP_HS=y
# CONFIG_MMC_SPI is not set
# CONFIG_MEMSTICK is not set
# CONFIG_ACCESSIBILITY is not set
@@ -1675,13 +1677,13 @@ CONFIG_BRIDGE_MEMPOOL_SIZE=0x412800
#
# File systems
#
-CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set
# CONFIG_EXT4_FS is not set
-CONFIG_JBD=m
+CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
diff --git a/recipes/linux/linux-2.6.28/nokia900/inconsistent-mmc-fix-2.6.28-20094803.3.diff b/recipes/linux/linux-2.6.28/nokia900/inconsistent-mmc-fix-2.6.28-20094803.3.diff
new file mode 100644
index 0000000000..0d8b4dab81
--- /dev/null
+++ b/recipes/linux/linux-2.6.28/nokia900/inconsistent-mmc-fix-2.6.28-20094803.3.diff
@@ -0,0 +1,79 @@
+--- kernel-2.6.28-20094803.3/arch/arm/mach-omap2/board-rx51-flash.c 2010-01-24 23:23:10.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/arch/arm/mach-omap2/board-rx51-flash.c 2010-01-24 22:22:02.000000000 +0100
+@@ -59,6 +59,7 @@ static struct platform_device *rx51_flas
+ static struct twl4030_hsmmc_info mmc[] __initdata = {
+ {
+ .name = "external",
++ .mmcblk_devidx = 1,
+ .mmc = 1,
+ .wires = 4,
+ .cover_only = true,
+@@ -69,6 +70,7 @@ static struct twl4030_hsmmc_info mmc[] _
+ },
+ {
+ .name = "internal",
++ .mmcblk_devidx = 0,
+ .mmc = 2,
+ .wires = 8,
+ .gpio_cd = -EINVAL,
+--- kernel-2.6.28-20094803.3/arch/arm/mach-omap2/mmc-twl4030.c 2010-01-24 23:23:10.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/arch/arm/mach-omap2/mmc-twl4030.c 2010-01-24 22:59:35.000000000 +0100
+@@ -745,6 +745,7 @@ void __init twl4030_mmc_init(struct twl4
+ else
+ sprintf(twl->name, "mmc%islot%i", c->mmc, 1);
+ mmc->slots[0].name = twl->name;
++ mmc->slots[0].mmcblk_devidx = c->mmcblk_devidx;
+ mmc->nr_slots = 1;
+ mmc->slots[0].wires = c->wires;
+ mmc->slots[0].internal_clock = !c->ext_clock;
+--- kernel-2.6.28-20094803.3/arch/arm/mach-omap2/mmc-twl4030.h 2010-01-24 23:23:10.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/arch/arm/mach-omap2/mmc-twl4030.h 2010-01-24 22:20:51.000000000 +0100
+@@ -19,6 +19,7 @@ struct twl4030_hsmmc_info {
+ int gpio_cd; /* or -EINVAL */
+ int gpio_wp; /* or -EINVAL */
+ char *name; /* or NULL for default */
++ int mmcblk_devidx; /* preferred mmcblkX device index */
+ };
+
+ #if defined(CONFIG_TWL4030_CORE) && \
+--- kernel-2.6.28-20094803.3/arch/arm/plat-omap/include/mach/mmc.h 2010-01-24 23:23:10.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/arch/arm/plat-omap/include/mach/mmc.h 2010-01-24 22:53:59.000000000 +0100
+@@ -110,6 +110,7 @@ struct omap_mmc_platform_data {
+ int (* get_cover_state)(struct device *dev, int slot);
+
+ const char *name;
++ int mmcblk_devidx; /* preferred mmcblkX index for this slot */
+ u32 ocr_mask;
+
+ /* Card detection IRQs */
+--- kernel-2.6.28-20094803.3/drivers/mmc/card/block.c 2010-01-24 23:23:09.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/drivers/mmc/card/block.c 2010-01-24 22:14:12.000000000 +0100
+@@ -479,7 +479,7 @@ static struct mmc_blk_data *mmc_blk_allo
+ struct mmc_blk_data *md;
+ int devidx, ret;
+
+- devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
++ devidx = find_next_zero_bit(dev_use, MMC_NUM_MINORS, card->host->mmcblk_devidx);
+ if (devidx >= MMC_NUM_MINORS)
+ return ERR_PTR(-ENOSPC);
+ __set_bit(devidx, dev_use);
+--- kernel-2.6.28-20094803.3/drivers/mmc/host/omap_hsmmc.c 2010-01-24 23:23:09.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/drivers/mmc/host/omap_hsmmc.c 2010-01-25 12:27:07.000000000 +0100
+@@ -1710,6 +1710,7 @@ static int __init omap_hsmmc_probe(struc
+ mmc->max_seg_size = mmc->max_req_size;
+
+ mmc->ocr_avail = mmc_slot(host).ocr_mask;
++ mmc->mmcblk_devidx = mmc_slot(host).mmcblk_devidx;
+ mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
+
+ if (mmc_slot(host).wires >= 8)
+--- kernel-2.6.28-20094803.3/include/linux/mmc/host.h 2010-01-24 23:23:10.000000000 +0100
++++ kernel-2.6.28-20094803.3-fanoush/include/linux/mmc/host.h 2010-01-24 22:12:20.000000000 +0100
+@@ -207,7 +207,7 @@ struct mmc_host {
+ #endif
+
+ struct dentry *debugfs_root;
+-
++ unsigned int mmcblk_devidx; /* preferred mmc block device index (mmcblkX) */
+ unsigned long private[0] ____cacheline_aligned;
+ };
diff --git a/recipes/linux/linux_2.6.28.bb b/recipes/linux/linux_2.6.28.bb
index 0a24bcbd7a..04cd548bb1 100644
--- a/recipes/linux/linux_2.6.28.bb
+++ b/recipes/linux/linux_2.6.28.bb
@@ -57,7 +57,10 @@ SRC_URI_mini6410 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.b
SRC_URI_nokia900 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2;name=kernel \
http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20101501+0m5.diff.gz;name=nokiapatch \
file://gcc_4.4_endianess_macros.patch \
- file://defconfig"
+ file://inconsistent-mmc-fix-2.6.28-20094803.3.diff \
+ file://0001-Fix-CPU-frequency-driver-so-that-it-loads-before-the.patch \
+ file://bq27x00_readings.patch \
+ file://defconfig"
SRC_URI_smartqv7 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2;name=kernel \
http://gitorious.org/mer-smartq/mer-smartq-kernel/blobs/raw/9714361dc936f8948179df93a5241c46092bde71/drivers/block/tcc/libtnftl/libtnftl_V7014_TCC8900.o_shipped;name=libtnftl \
@@ -73,6 +76,8 @@ do_configure_append_smartqv7 () {
S = "${WORKDIR}/linux-2.6.28/"
+CMDLINE_nokia900_shr = "snd-soc-rx51.hp_lim=42 snd-soc-tlv320aic3x.hp_dac_lim=6 console=tty1 root=/dev/mmcblk1p1 rootdelay=10 panic=20"
+
SRC_URI[kernel.md5sum] = "d351e44709c9810b85e29b877f50968a"
SRC_URI[kernel.sha256sum] = "ae0d97c55efe7fce01273c97f8152af0deff5541e3bbf5b9ad98689112b54380"
SRC_URI[stablepatch.md5sum] = "64e6b226f1dc469755d82d0d8b677feb"