linux: add support to use a special kernel, add support for Ti's OMAP kernel

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-03-15 18:46:02 +01:00
parent dc7511f40c
commit 164b7f45af
14 changed files with 17546 additions and 1 deletions

View File

@ -36,8 +36,13 @@ PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$LINUX_NEXT" = "yes" ]; then
if [ "$LINUX_NEXT" = "yes" -a "$LINUX" = "default" ]; then
PKG_VERSION="2.6.38"
PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2"
# PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
fi
if [ "$LINUX" = "ti-omap4" ]; then
PKG_VERSION="2.6.35-ti.980.1r14"
PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
fi

View File

@ -0,0 +1,22 @@
--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200
+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200
@@ -29,7 +29,6 @@
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/sysmacros.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
@@ -42,6 +41,11 @@
#define DEFAULT_MAJOR_ROOT 0
#define DEFAULT_MINOR_ROOT 0
+#undef major
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
+#undef minor
+#define minor(dev) ((int)((dev) & 0xff))
+
/* Minimal number of setup sectors */
#define SETUP_SECT_MIN 5
#define SETUP_SECT_MAX 64

View File

@ -0,0 +1,15 @@
Index: linux-2.6.16/scripts/gen_initramfs_list.sh
===================================================================
--- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100
+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100
@@ -56,9 +56,7 @@
parse() {
local location="$1"
- local name="${location/${srcdir}//}"
- # change '//' into '/'
- name="${name//\/\///}"
+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')"
local mode="$2"
local uid="$3"
local gid="$4"

View File

@ -0,0 +1,20 @@
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
@@ -886,8 +886,14 @@
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ char *console = "/dev_console";
+
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
+ if (sys_open(console, O_RDWR, 0) < 0)
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ sys_unlink(console);
+ }
(void) sys_dup(0);
(void) sys_dup(0);

View File

@ -0,0 +1,24 @@
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c
--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200
+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200
@@ -92,7 +92,7 @@
int getchar_timeout(void)
{
- int cnt = 30;
+ int cnt = 3;
int t0, t1;
t0 = gettime();
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c
--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200
+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200
@@ -329,7 +329,7 @@
unsigned int sel;
puts("Press <ENTER> to see video modes available, "
- "<SPACE> to continue, or wait 30 sec\n");
+ "<SPACE> to continue, or wait 3 sec\n");
kbd_flush();
while (1) {

View File

@ -0,0 +1,13 @@
Index: linux-2.6.16/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100
@@ -340,7 +340,7 @@
int type, l;
const char *str;
time_t now;
- int use_timestamp = 1;
+ int use_timestamp = 0;
char *env;
dirname[0] = 0;

View File

@ -0,0 +1,25 @@
diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c
--- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200
+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200
@@ -979,7 +979,8 @@
}
opts->name_check = 'n';
opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
- opts->utf8 = opts->unicode_xlate = 0;
+ opts->utf8 = 1;
+ opts->unicode_xlate = 0;
opts->numtail = 1;
opts->usefree = opts->nocase = 0;
opts->tz_utc = 0;
diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c
--- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200
+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200
@@ -377,7 +377,7 @@
popt->gid = 0;
popt->uid = 0;
popt->iocharset = NULL;
- popt->utf8 = 0;
+ popt->utf8 = 1;
popt->overriderockperm = 0;
popt->session=-1;
popt->sbsector=-1;

View File

@ -0,0 +1,30 @@
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
Date: Tue, 30 Mar 2010 00:04:29 -0400
Subject: die-floppy-die
Kill the floppy.ko pnp modalias. We were surviving just fine without
autoloading floppy drivers, tyvm.
Please feel free to register all complaints in the wastepaper bin.
---
drivers/block/floppy.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 90c4038..f4a0b90 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
{"PNP0700", 0},
{}
};
-
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
#else
--
1.7.0.1

View File

@ -0,0 +1,22 @@
diff -Naur linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile
--- linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile 2011-01-19 11:27:25.000000000 +0100
+++ linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile 2011-02-27 17:50:38.370778859 +0100
@@ -29,7 +29,9 @@
obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o \
omap4-wakeupgen.o
-AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
+AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec)
+AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
# Functions loaded to SRAM
obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
@@ -63,6 +65,7 @@
AFLAGS_sleep24xx.o :=-Wa,-march=armv6
AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a
+AFLAGS_sleep44xx.o :=-Wa,-march=armv7-a$(plus_sec)
ifeq ($(CONFIG_PM_VERBOSE),y)
CFLAGS_pm_bus.o += -DDEBUG

View File

@ -83,6 +83,14 @@
# Configuration for u-boot
UBOOT_CONFIG=""
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel
LINUX="default"
# use linux-next (latest rc) instead latest released version
LINUX_NEXT="no"
# Mediacenter to use (xbmc / no)
MEDIACENTER="xbmc"

View File

@ -83,6 +83,14 @@
# Configuration for u-boot
UBOOT_CONFIG=""
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel
LINUX="default"
# use linux-next (latest rc) instead latest released version
LINUX_NEXT="no"
# Mediacenter to use (xbmc / no)
MEDIACENTER="xbmc"

View File

@ -83,6 +83,14 @@
# Configuration for u-boot
UBOOT_CONFIG=""
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel
LINUX="default"
# use linux-next (latest rc) instead latest released version
LINUX_NEXT="no"
# Mediacenter to use (xbmc / no)
MEDIACENTER="xbmc"

View File

@ -83,6 +83,14 @@
# Configuration for u-boot
UBOOT_CONFIG=""
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel
LINUX="default"
# use linux-next (latest rc) instead latest released version
LINUX_NEXT="no"
# Mediacenter to use (xbmc / no)
MEDIACENTER="xbmc"