From 5280245f29d21d6e5851107b15731b4ed76c33c3 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Wed, 5 Feb 2020 22:55:47 +0800 Subject: kernels: add htc ocn Apparently, the ocn kernel source tree is created by the same one that maintains the TWRP image [1]. Only a few irrelevant files are different from the kernel in the tarball downloaded from htcdev.com (ocndtwl-4.4.153-perf-g0041d80.tar.gz). $ diff -ur android_kernel_htc_ocn kernel Only in android_kernel_htc_ocn: .git Only in android_kernel_htc_ocn: .gitignore Only in kernel/Documentation/DocBook/media/dvb: dvbstb.pdf Only in kernel/Documentation/DocBook/media/v4l: crop.pdf Only in kernel/Documentation/DocBook/media/v4l: fieldseq_bt.pdf Only in kernel/Documentation/DocBook/media/v4l: fieldseq_tb.pdf Only in kernel/Documentation/DocBook/media/v4l: pipeline.pdf Only in kernel/Documentation/DocBook/media/v4l: vbi_525.pdf Only in kernel/Documentation/DocBook/media/v4l: vbi_625.pdf Only in kernel/Documentation/DocBook/media/v4l: vbi_hsync.pdf Only in android_kernel_htc_ocn: Readme.txt Only in kernel/arch/sh/boot/compressed: vmlinux.scr Only in kernel/arch/sh/boot/romimage: vmlinux.scr I've tested the built module wireguard-80ee34126cd97c9a15bc3b970a6f38ce30852d0b8547dbcc43eee22956aa1934.ko on my ocndugl device. [1] https://twrp.me/htc/htcu11.html Signed-off-by: Chih-Hsuan Yen --- kernels/ocn/do.bash | 16 ++++++++++++++++ kernels/ocn/manifest.xml | 10 ++++++++++ kernels/ocn/version-hashes.txt | 1 + 3 files changed, 27 insertions(+) create mode 100644 kernels/ocn/do.bash create mode 100644 kernels/ocn/manifest.xml create mode 100644 kernels/ocn/version-hashes.txt (limited to 'kernels/ocn') diff --git a/kernels/ocn/do.bash b/kernels/ocn/do.bash new file mode 100644 index 0000000..a5a5e2c --- /dev/null +++ b/kernels/ocn/do.bash @@ -0,0 +1,16 @@ +#!/bin/bash +set -ex + +cd kernel +ln -s ../../wireguard-linux-compat/src net/wireguard + +# Inject the kernel module. Reference: https://git.zx2c4.com/android_kernel_wireguard/tree/patch-kernel.sh +[[ $(< net/Makefile) == *wireguard* ]] || sed -i "/^obj-\\\$(CONFIG_NETFILTER).*+=/a obj-\$(CONFIG_WIREGUARD) += wireguard/" net/Makefile +[[ $(< net/Kconfig) == *wireguard* ]] || sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" net/Kconfig + +# Based on Readme.txt in ocndtwl-4.4.153-perf-g0041d80.tar.gz, which is in turn downloaded from htcdev.com +mkdir out +make ARCH=arm64 CROSS_COMPILE="$PWD/../aarch64-linux-android-4.9/bin/aarch64-linux-android-" O=out htcperf_defconfig +make ARCH=arm64 CROSS_COMPILE="$PWD/../aarch64-linux-android-4.9/bin/aarch64-linux-android-" O=out -j$(nproc) + +readlink -f out/net/wireguard/wireguard.ko >&7 diff --git a/kernels/ocn/manifest.xml b/kernels/ocn/manifest.xml new file mode 100644 index 0000000..312cc1f --- /dev/null +++ b/kernels/ocn/manifest.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/kernels/ocn/version-hashes.txt b/kernels/ocn/version-hashes.txt new file mode 100644 index 0000000..9241fce --- /dev/null +++ b/kernels/ocn/version-hashes.txt @@ -0,0 +1 @@ +80ee34126cd97c9a15bc3b970a6f38ce30852d0b8547dbcc43eee22956aa1934|Linux version 4.4.153-perf-g66b46bd (and@AABM) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Thu Nov 7 21:09:01 CST 2019 -- cgit v1.2.3-59-g8ed1b