Skip to content

Instantly share code, notes, and snippets.

@h-yamamo
h-yamamo / odroid-u3_fan.patch
Created October 3, 2014 09:42
Improve FAN control for ODROID-U3 - linux 3.8.13
--- linux/drivers/hardkernel/odroidu2_fan.c 2014-09-06 15:18:25.000000000 +0900
+++ new/drivers/hardkernel/odroidu2_fan.c 2014-10-02 22:51:30.977219061 +0900
@@ -291,6 +291,8 @@
{
struct odroid_fan *fan = container_of(work, struct odroid_fan, work.work);
unsigned long temperature;
+ int hysteresis = fan->duty ? 2 : 0; // FAN off under start_temp - 2C
+ int duty, spinup = 0;
/* check if its in auto-mode */
@h-yamamo
h-yamamo / odroid-u3_fan.patch
Created October 8, 2014 17:02
Improve FAN control for ODROID-U3 - linux 3.8.13.28 #2
--- linux/drivers/hardkernel/odroidu2_fan.c 2014-09-06 15:18:25.000000000 +0900
+++ new/drivers/hardkernel/odroidu2_fan.c 2014-10-08 00:38:06.233601714 +0900
@@ -291,6 +291,8 @@
{
struct odroid_fan *fan = container_of(work, struct odroid_fan, work.work);
unsigned long temperature;
+ int hysteresis = fan->duty ? 2 : 0; // FAN off under start_temp - 2C
+ int duty, spinup = 0;
/* check if its in auto-mode */
@h-yamamo
h-yamamo / ca-alt-chains.patch
Last active February 25, 2016 14:28
Support CA alternate chains for ubuntu trusty openssl package - merged from openssl-1.0.1p
# See https://github.com/openssl/openssl commit log.
Commits on Aug 14, 2015
GH364: Free memory on an error path [OpenSSL_1_0_2-stable]
Commits on Jul 8, 2015
Fix alternate chains certificate forgery issue (CVE-2015-1793)
Fix alt chains bug
Reject calls to X509_verify_cert that have not been reinitialised
Commits on May 21, 2015
Add -no_alt_chains option ... 3 commits
In certain situations the server provided certificate chain may no ...
@h-yamamo
h-yamamo / ca-alt-chains.patch
Last active August 29, 2016 15:34
Support CA alternate chains for debian jessie openssl package - merged from openssl-1.0.1p
# See https://github.com/openssl/openssl commit log.
Commits on Aug 14, 2015
GH364: Free memory on an error path [OpenSSL_1_0_2-stable]
Commits on Jul 8, 2015
Fix alternate chains certificate forgery issue (CVE-2015-1793)
Fix alt chains bug
Reject calls to X509_verify_cert that have not been reinitialised
Commits on May 21, 2015
Add -no_alt_chains option ... 3 commits
In certain situations the server provided certificate chain may no ...
@h-yamamo
h-yamamo / sun4i-codec.c
Last active April 7, 2019 15:56
alternative sound module in linux-4.4, add support Capture, for Allwinner A10,A13,R8,A20 Audio Codec
/*
* Copyright 2014 Emilio López <emilio@elopez.com.ar>
* Copyright 2014 Jon Smirl <jonsmirl@gmail.com>
* Copyright 2015 Maxime Ripard <maxime.ripard@free-electrons.com>
*
* Based on the Allwinner SDK driver, released under the GPL.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@h-yamamo
h-yamamo / mmc-blockcount.patch
Created January 11, 2016 15:55
Display block count of eMMC/SD card for linux 4.4
# mmc: Display media block count
#
# linux-4.4
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -2549,6 +2549,7 @@
static int mmc_blk_probe(struct mmc_card *card)
{
struct mmc_blk_data *md, *part_md;
+ sector_t capacity;
@h-yamamo
h-yamamo / camellia-gcm.patch
Last active May 7, 2016 07:08
Support Camellia-GCM cipher suites (RFC 6367) for debian jessie openssl package
diff -u openssl-1.0.1k-3+deb8u2 +camellia-gcm
--- a/crypto/evp/aeadtest.c 2015-12-20 20:40:00.000000000 +0900
+++ b/crypto/evp/aeadtest.c 2016-02-03 20:36:41.000000000 +0900
@@ -257,6 +257,24 @@
return 0;
#endif
}
+ else if (strcmp(argv[1], "camellia-128-gcm") == 0)
+ {
+#ifndef OPENSSL_NO_CAMELLIA
@h-yamamo
h-yamamo / camellia-gcm.patch
Last active May 7, 2016 07:06
Support Camellia-GCM cipher suites (RFC 6367) for ubuntu trusty openssl package
updated for openssl-1.0.1f-1ubuntu2.17+ore1
diff -u openssl-1.0.1f-1ubuntu2.16+ore2 +camellia-gcm
--- a/crypto/evp/aeadtest.c 2015-12-21 23:40:00.000000000 +0900
+++ b/crypto/evp/aeadtest.c 2016-02-03 20:36:41.000000000 +0900
@@ -257,6 +257,24 @@
return 0;
#endif
}
+ else if (strcmp(argv[1], "camellia-128-gcm") == 0)
@h-yamamo
h-yamamo / tlsext-signhashalgs.patch
Created February 19, 2016 14:35
Fix downgrade hash algorithm to SHA1 via SNI for ubuntu trusty openssl package
Improve TLS Extensions signature and hash algorithm
Reference:
Move signing digest out of CERT.
https://github.com/openssl/openssl/commit/d376e57d6826e56f4c922806e088a111c52f9e92
diff -ur openssl-1.0.1f-1ubuntu2.16 1.0.1f-1ubuntu2.16+alg
--- a/ssl/ssl_lib.c 2014-10-15 16:56:03.000000000 +0000
+++ b/ssl/ssl_lib.c 2016-02-19 21:58:14.000000000 +0900
@@ -2406,6 +2406,9 @@ EVP_PKEY *ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *
@h-yamamo
h-yamamo / tlsext-signhashalgs.patch
Created February 19, 2016 14:37
Fix downgrade hash algorithm to SHA1 via SNI for debian jessie openssl package
Improve TLS Extensions signature and hash algorithm
Reference:
Move signing digest out of CERT.
https://github.com/openssl/openssl/commit/d376e57d6826e56f4c922806e088a111c52f9e92
diff -ur openssl-1.0.1k-3+deb8u2 openssl-1.0.1k-3+deb8u2+alg
--- a/ssl/ssl_lib.c 2015-01-08 23:00:56.000000000 +0900
+++ b/ssl/ssl_lib.c 2016-02-19 21:58:14.000000000 +0900
@@ -2392,6 +2392,9 @@ EVP_PKEY *ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *