blob: 2b08b0d062296ad725c871657d150c9193e2419f [file] [log] [blame]
#!/bin/bash
. $(dirname $0)/functions
PATCHES=0
if [ -n "$1" ]; then
AOSP="$1"
else
AOSP="`pwd`"
fi
if ! [ -d "$AOSP" ] && ! [ -d "$AOSP/bionic" ] && [ -d "$AOSP"/build ]; then
echo "This script must be run from the AOSP source directory"
echo "or with the AOSP source directory as its first parameter."
exit 1
fi
function apply_jstultz_mainline_patch(){
local commit_id=$1 && shift
local dst_dir="kernel/common/mainline"
if [ -n "$1" ]; then
dst_dir="$1"
fi
if [ -d "${dst_dir}" ]; then
curl_am https://git.linaro.org/people/john.stultz/android-dev.git/patch/?id=${commit_id} "${dst_dir}"
else
echo "${dst_dir} does not exist, skip to apply commit:${commit_id}"
fi
}
function apply_android_review_mainline_patch(){
local commit_id=$1 && shift
local dst_dir="kernel/common/mainline"
if [ -n "$1" ]; then
dst_dir="$1"
fi
if [ -d "${dst_dir}" ]; then
curl_am https://android-git.linaro.org/kernel/common.git/patch/?id=${commit_id} "${dst_dir}"
else
echo "${dst_dir} does not exist, skip to apply commit:${commit_id}"
fi
}
##################################################
################ Linaro hack ###################
##################################################
## DTS/hikey960_defconfig for hikey960 for android-mainline
## dts: Add usb mux hub for hikey960
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=95c33482f5fdc9a36a87719513792b918d628258
## http://android-review.linaro.org/c/kernel/common/+/21678
apply --linaro --local kernel/common/mainline --remote kernel/common 21678/5
## arm64: dts: hikey960: Add CMA entry for ION/framebuffers
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=1981114fee6439b2ac3ac9ad217e2f335a0ab572
## http://android-review.linaro.org/c/kernel/common/+/21679
apply --linaro --local kernel/common/mainline --remote kernel/common 21679/4
## arm64: dts: hi3660: add display driver dts
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=f8788a10734cec35f692e34d8b92d4a57fab594c
## http://android-review.linaro.org/c/kernel/common/+/21680
apply --linaro --local kernel/common/mainline --remote kernel/common 21680/4
## arm64: dts: hi3660-hikey960: Add i2s & sound device
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=e84e68d9b7eebaf05857111d1af8893184a88a23
## http://android-review.linaro.org/c/kernel/common/+/21681
apply --linaro --local kernel/common/mainline --remote kernel/common 21681/4
## arm64: dts: enable gpu
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=0c0b39ef80e2d599d6337bf1ad89bab7915f04c1
## http://android-review.linaro.org/c/kernel/common/+/21682
apply --linaro --local kernel/common/mainline --remote kernel/common 21682/4
## dts: Add pmctrl entry
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=3fb5e44635e2ec7131eb535f02abc0a414594022
## http://android-review.linaro.org/c/kernel/common/+/21683
apply --linaro --local kernel/common/mainline --remote kernel/common 21683/4
## arm64: dts: hi3660: adb reboot node
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=05955848beebcaf896844bb420c6797def8d4dac
## http://android-review.linaro.org/c/kernel/common/+/21684
apply --linaro --local kernel/common/mainline --remote kernel/common 21684/4
## dts: hikey960: Fix bootwarning on mapping reboot reason syscon
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/arch/arm64/boot/dts/hisilicon?h=dev/hikey960-mainline-WIP&id=a04c874593f6f127319d0395fba4d194c1680e3d
## http://android-review.linaro.org/c/kernel/common/+/21685
apply --linaro --local kernel/common/mainline --remote kernel/common 21685/4
## arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
revert kernel/common/mainline 4dc5288f5a5a6
## reset: hisi-reboot: adb reboot bootloader
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/power/reset?h=dev/hikey960-mainline-WIP&id=fe671288fa7ad845e525149d6e4686b692926ff8
## https://android-review.linaro.org/c/kernel/common/+/21719
apply --linaro --local kernel/common/mainline --remote kernel/common 21719/1
## sound: Add hikey960 i2s audio driver
## https://android-git.linaro.org/kernel/common.git/patch/?id=2d6e446fde0abe2ee1425f745a23e5f2b3ad1736
apply_android_review_mainline_patch 2d6e446fde0abe2ee1425f745a23e5f2b3ad1736
## fix: bluetooth: hci_ll: set enable_gpio direction OUT at probe
## https://android-git.linaro.org/kernel/common.git/commit/?h=android-mainline-gki-hikey960&id=01f917927efca505bb8e31901a89ee2fa71d73e7
apply_android_review_mainline_patch 01f917927efca505bb8e31901a89ee2fa71d73e7
## Changes on DRM for hikey960 with android-mainline
## drm: kirin: Introduce kirin960
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/gpu/drm/hisilicon?h=dev/hikey960-mainline-WIP&id=82e66d3d37fa4fc5036775cf7ac4fa80d29fce1d
## http://android-review.linaro.org/c/kernel/common/+/21069
apply --linaro --local kernel/common/mainline --remote kernel/common 21069/17
## drm: kirin: Add kirin960 dpe driver support
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/gpu/drm/hisilicon?h=dev/hikey960-mainline-WIP&id=33ae60376de916afb091d42cb045d3824460b0ce
## http://android-review.linaro.org/c/kernel/common/+/21071
apply --linaro --local kernel/common/mainline --remote kernel/common 21071/10
## drm: kirin: remove wait for VACTIVE IRQ
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/gpu/drm/hisilicon?h=dev/hikey960-mainline-WIP&id=cfad6320488e174e19a3078b4783cf665e06e76e
## http://android-review.linaro.org/c/kernel/common/+/21673
apply --linaro --local kernel/common/mainline --remote kernel/common 21673/8
## drm: kirin_drm_dpe: Fix rdma_stride calculation
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/gpu/drm/hisilicon?h=dev/hikey960-mainline-WIP&id=dc568369d72634043e0e5775659bbb2daef13d17
## http://android-review.linaro.org/c/kernel/common/+/21674
apply --linaro --local kernel/common/mainline --remote kernel/common 21674/8
## hikey960: drm: Fix LDI not being enabled
## http://android-review.linaro.org/c/kernel/common/+/22733
apply --linaro --local kernel/common/mainline --remote kernel/common 22733/1
## HACK: adv7511: Add poweron delay to allow for EDID probing to work
## https://git.linaro.org/people/john.stultz/android-dev.git/commit/drivers/gpu/drm?h=dev/hikey960-mainline-WIP&id=20572af2f4123ffc8e0ab64db2b6029ce8f727bd
## http://android-review.linaro.org/c/kernel/common/+/21676
apply --linaro --local kernel/common/mainline --remote kernel/common 21676/7
## Revert "drm/bridge: adv7511: Register and attach our DSI device at probe"
## HDMI monitor does not display, but the boot is finished from the screencap command
revert kernel/common/mainline 864c49a31d6b84fd20748a003523fc2181fd54b1