Skip to content

Instantly share code, notes, and snippets.

View bkrepo's full-sized avatar

Brian Kim bkrepo

View GitHub Profile
@bkrepo
bkrepo / exynos5422.patch
Last active October 12, 2015 06:29
Patch to support for exynos5422 CPU in Xen
diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
index 79e3a5f..7813f59 100644
--- a/xen/arch/arm/platforms/exynos5.c
+++ b/xen/arch/arm/platforms/exynos5.c
@@ -165,8 +165,9 @@ static void exynos_cpu_power_up(void __iomem *power, int cpu)
static int exynos5_cpu_power_up(void __iomem *power, int cpu)
{
- unsigned int timeout;
+ unsigned int timeout, val;
@bkrepo
bkrepo / boot.ini
Last active October 13, 2015 10:33
boot.ini for Xen virtualization on ODROID-XU4
ODROIDXU-UBOOT-CONFIG
# source by kenken> http://forum.odroid.com/viewtopic.php?f=98&t=6643#p64051
setenv dtb_addr_r 0x42000000
setenv dtb_path /exynos5422-odroidxu3.dtb
setenv kernel_addr_r 0x60000000
setenv kernel_path /zImage
setenv xen_addr_r 0x50000000
setenv xen_path /xen
@bkrepo
bkrepo / xen_blkif.patch
Created October 14, 2015 07:22
Xen blkif.h patch for arm32 architecture
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h
index c33e1c4..075a251 100644
--- a/include/xen/interface/io/blkif.h
+++ b/include/xen/interface/io/blkif.h
@@ -145,7 +145,7 @@ struct blkif_request_segment {
struct blkif_request_rw {
uint8_t nr_segments; /* number of segments */
blkif_vdev_t handle; /* only for read/write requests */
-#ifndef CONFIG_X86_32
+#if !defined(CONFIG_X86_32) && !defined(CONFIG_ARM)
@bkrepo
bkrepo / kvm_cpu_mode.patch
Last active December 1, 2015 02:35
Patch for KVM/ARM cpu mode check
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
index 0f6c100..720f3b2 100644
--- a/arch/arm/kernel/sleep.S
+++ b/arch/arm/kernel/sleep.S
@@ -131,7 +131,10 @@ ENTRY(cpu_resume_arm)
ENTRY(cpu_resume)
ARM_BE8(setend be) @ ensure we are in BE mode
#ifdef CONFIG_ARM_VIRT_EXT
- bl __hyp_stub_install_secondary
+ mrc p15, 0, r1, c0, c0, 5
@bkrepo
bkrepo / cec_disable_tv_on.patch
Last active January 4, 2016 06:42
Add disable automatic TV ON function by HDMI-CEC
From 6f1e3aa7371d29a2de74b019753e4f2ee82c6bb7 Mon Sep 17 00:00:00 2001
From: Brian Kim <[email protected]>
Date: Mon, 4 Jan 2016 15:27:19 +0900
Subject: [PATCH] ODROIDC: Add disable automatic TV power on function in
HDMI-CEC
This change can disable switch TV on automatically using HDMI-CEC. This
function support it using AUTO_POWER_ON_MASK flag in boot parameter.
Change-Id: I3257dbeb4e13b829cd1e3c7df8a9a6321060e9e3
@bkrepo
bkrepo / fix_cec_freeze.patch
Created January 8, 2016 06:57
ODROID-C1: cec: Fix to the CEC freeze bug after applying disable switch TV on by CEC patch
diff --git a/arch/arm/mach-meson8b/pm.c b/arch/arm/mach-meson8b/pm.c
index 2855008..a5b111f 100755
--- a/arch/arm/mach-meson8b/pm.c
+++ b/arch/arm/mach-meson8b/pm.c
@@ -56,9 +56,8 @@ static int early_suspend_flag = 0;
#define ON 1
#define OFF 0
-static unsigned int cec_config; // 4 bytes: use to control cec switch on/off,distinguish between Mbox and Tablet. bit[0]:1:Mbox; 0:Tablet
+static unsigned int cec_config = 0; // 4 bytes: use to control cec switch on/off,distinguish between Mbox and Tablet. bit[0]:1:Mbox; 0:Tablet
@bkrepo
bkrepo / dmesg.txt
Created February 4, 2016 06:40
dmesg after exynos drm patchset
[ 0.000000] [c0] Booting Linux on physical CPU 0x100
[ 0.000000] [c0] Initializing cgroup subsys cpuset
[ 0.000000] [c0] Initializing cgroup subsys cpu
[ 0.000000] [c0] Initializing cgroup subsys cpuacct
[ 0.000000] [c0] Linux version 3.10.92+ (brian@brian-desktop) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #1 SMP PREEMPT Thu Feb 4 14:41:34 KST 2016
[ 0.000000] [c0] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[ 0.000000] [c0] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] [c0] Machine: ODROID-XU3, model: Hardkernel odroid-xu3 board based on EXYNOS5422
[ 0.000000] [c0] ION: Contiguous 0x6650000 bytes @ 0x0 defined for 0:common
[ 0.000000] [c0] ION: Contiguous 0x400000 bytes @ 0x0 defined for 2:mfc_sh
@bkrepo
bkrepo / usbreset.c
Created February 15, 2016 07:14
USB reset
/* usbreset -- send a USB port reset to a USB device */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>
@bkrepo
bkrepo / gist:ad5a08429f773106c875
Created March 3, 2016 10:02
C2 Amlogic Library build log
odroid@odroid64:~/c2_aml_libs$ make
make -C amavutils
make[1]: Entering directory '/home/odroid/c2_aml_libs/amavutils'
cc -O2 -fPIC -g -I/home/odroid/c2_aml_libs/amavutils -I/home/odroid/c2_aml_libs/amavutils/include -I/home/odroidc
cc -O2 -fPIC -g -I/home/odroid/c2_aml_libs/amavutils -I/home/odroid/c2_aml_libs/amavutils/include -I/home/odroidc
cc -O2 -fPIC -g -I/home/odroid/c2_aml_libs/amavutils -I/home/odroid/c2_aml_libs/amavutils/include -I/home/odroidc
amdisplayutils.c: In function 'get_display_mode':
amdisplayutils.c:45:14: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {ak]
LOGI("[get_display_mode]mode=%s strlen=%d\n", mode, strlen(mode));
^
@bkrepo
bkrepo / boot.ini.xen
Last active January 17, 2017 06:34
boot.ini for Xen for ODROID-C2
ODROIDC2-UBOOT-CONFIG
# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.
# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz