linux: allow using hardkernel version

This commit is contained in:
Lukas Rusak 2016-05-05 01:23:04 -07:00
parent 7205f0e5f5
commit 78044ca6c5
5 changed files with 79 additions and 0 deletions

View File

@ -30,6 +30,10 @@ PKG_SECTION="linux"
PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and modules"
PKG_LONGDESC="This package contains a precompiled kernel image and the modules."
case "$LINUX" in
hardkernel)
PKG_VERSION="55d5417"
PKG_URL="https://github.com/hardkernel/linux/archive/$PKG_VERSION.tar.gz"
;;
amlogic)
PKG_VERSION="amlogic-3.10-c8d5b2f"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"

View File

@ -0,0 +1,17 @@
diff -Naur a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
--- a/include/linux/compiler-gcc.h 2016-02-09 12:52:30.000000000 +0100
+++ b/include/linux/compiler-gcc.h 2016-02-09 21:43:41.133285186 +0100
@@ -53,9 +53,10 @@
*/
#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
!defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
-# define inline inline __attribute__((always_inline)) notrace
-# define __inline__ __inline__ __attribute__((always_inline)) notrace
-# define __inline __inline __attribute__((always_inline)) notrace
+/* XXX: check __GNUC_STDC_INLINE__, fix line length */
+# define inline inline __attribute__((always_inline)) __attribute__((__gnu_inline__))
+# define __inline__ __inline__ __attribute__((always_inline)) __attribute__((__gnu_inline__))
+# define __inline __inline __attribute__((always_inline)) __attribute__((__gnu_inline__))
#else
/* A lot of inline functions can cause havoc with function tracing */
# define inline inline notrace

View File

@ -0,0 +1,21 @@
diff --git a/init/main.c b/init/main.c
index 9484f4b..db55edd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -880,8 +880,14 @@ static noinline void __init kernel_init_freeable(void)
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)
- pr_err("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,25 @@
diff -Naur a/drivers/amlogic/display/vout/tv_vout.c b/drivers/amlogic/display/vout/tv_vout.c
--- a/drivers/amlogic/display/vout/tv_vout.c 2016-04-06 23:18:37.000000000 -0700
+++ b/drivers/amlogic/display/vout/tv_vout.c 2016-04-14 02:05:33.041542772 -0700
@@ -70,8 +70,8 @@
#ifdef CONFIG_AML_VOUT_FRAMERATE_AUTOMATION
#define DEFAULT_POLICY_FR_AUTO 1
static enum vmode_e mode_by_user = VMODE_INIT_NULL;
-static int fr_auto_policy = DEFAULT_POLICY_FR_AUTO;
-static int fr_auto_policy_hold = DEFAULT_POLICY_FR_AUTO;
+static int fr_auto_policy = 0;
+static int fr_auto_policy_hold = 2;
static int fps_playing_flag;
static enum vmode_e fps_target_mode = VMODE_INIT_NULL;
static void policy_framerate_automation_switch_store(char *para);
@@ -1532,8 +1532,8 @@
}
#ifdef CONFIG_AML_VOUT_FRAMERATE_AUTOMATION
- sprintf(policy_fr_auto, "%d", DEFAULT_POLICY_FR_AUTO);
- sprintf(policy_fr_auto_switch, "%d", DEFAULT_POLICY_FR_AUTO);
+ sprintf(policy_fr_auto, "%d", 0);
+ sprintf(policy_fr_auto_switch, "%d", 2);
#endif
return 0;
}

View File

@ -0,0 +1,12 @@
diff -Naur a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h
--- a/arch/arm64/include/uapi/asm/sigcontext.h 2016-04-06 23:18:37.000000000 -0700
+++ b/arch/arm64/include/uapi/asm/sigcontext.h 2016-04-07 16:00:47.870241223 -0700
@@ -58,7 +58,7 @@
struct esr_context {
struct _aarch64_ctx head;
- u64 esr;
+ __u64 esr;
};
#endif /* _UAPI__ASM_SIGCONTEXT_H */