samsung-gts210lte: new device (MR 2599)
Touchscreen and usb networking works. Much of the hardware is the same as on gts210velte (but that one has a qcom soc and not exynos5433). Exactly the same touchscreen calibrarion as for gts210velte works for this device as well. Also include firmware package with wifi files. Unlike on many other Samsung devices wifi does not work out of the box after these firmware files has been added. [ci:skip-build] Already built on CI in MR
This commit is contained in:
parent
15dd2115cf
commit
5e120e490c
13 changed files with 5416 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
||||||
|
# * need ATTRS{name}=="sec_touchscreen" else device not detected as touchscreen
|
||||||
|
# * give size hint (in mm) otherwise too small size is assumed
|
||||||
|
# * to avoid palm detection, need LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=256
|
||||||
|
# and libinput>1.10
|
||||||
|
# * set calibration matrix for 270 degree clockwise rotation, see [1]
|
||||||
|
# * remove TOUCHPAD, add TOUCHSCREEN to ensure that device is seen as
|
||||||
|
# touchscreen only, see [2]
|
||||||
|
#
|
||||||
|
# [1] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html
|
||||||
|
# [2] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#udev_device_type
|
||||||
|
#
|
||||||
|
ACTION=="add|change", SUBSYSTEM=="input", ATTRS{name}=="sec_touchscreen", \
|
||||||
|
ENV{LIBINPUT_ATTR_SIZE_HINT}="190x140", \
|
||||||
|
ENV{LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD}="256", \
|
||||||
|
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1", \
|
||||||
|
ENV{ID_INPUT}="1", \
|
||||||
|
ENV{ID_INPUT_TOUCHPAD}="", \
|
||||||
|
ENV{ID_INPUT_TOUCHSCREEN}="1"
|
45
device/testing/device-samsung-gts210lte/APKBUILD
Normal file
45
device/testing/device-samsung-gts210lte/APKBUILD
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-gts210lte
|
||||||
|
pkgdesc="Samsung Galaxy Tab S2 9.7 LTE (2015)"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="armv7"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="
|
||||||
|
linux-samsung-gts210lte
|
||||||
|
mesa-dri-swrast
|
||||||
|
msm-fb-refresher
|
||||||
|
mkbootimg
|
||||||
|
postmarketos-base
|
||||||
|
"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo 90-sec_touchscreen.rules"
|
||||||
|
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
# Disable v4l udev rules, because if enabled the device will fail to boot
|
||||||
|
# when VIDEO_EXYNOS_FIMC_IS is enabled.
|
||||||
|
mkdir -p "$pkgdir"/etc/udev/rules.d
|
||||||
|
ln -s /dev/null "$pkgdir"/etc/udev/rules.d/60-persistent-v4l.rules
|
||||||
|
install -D -m644 "$srcdir"/90-sec_touchscreen.rules \
|
||||||
|
"$pkgdir"/etc/udev/rules.d/90-sec_touchscreen.rules
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
nonfree_firmware() {
|
||||||
|
pkgdesc="Non-free firmware for Samsung Galaxy Tab S2"
|
||||||
|
depends="firmware-samsung-gts210 firmware-samsung-gts210-lte"
|
||||||
|
mkdir "$subpkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
3afdfb0ad9a0d302ce8aa7fac5ac24d32754f3d49f8fadfe2dd92b1fa0f6e490a1cb6e96acbda1e6dba108658c401b1678114edb713d51af5125d8c4c7984807 deviceinfo
|
||||||
|
0d23fae6de9b04a36f395068278b8a9054c33e435b24de943da1e55a0ee2d88ee932a3fd2f660596377b14474483edecb8357684f9b7bc2c53979c7f863fae52 90-sec_touchscreen.rules
|
||||||
|
"
|
37
device/testing/device-samsung-gts210lte/deviceinfo
Normal file
37
device/testing/device-samsung-gts210lte/deviceinfo
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell
|
||||||
|
# scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Samsung Galaxy Tab S2 9.7 LTE (SM-T815)"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-gts210lte"
|
||||||
|
deviceinfo_year="2015"
|
||||||
|
deviceinfo_arch="armv7"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="tablet"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="2048"
|
||||||
|
deviceinfo_screen_height="1536"
|
||||||
|
deviceinfo_dev_touchscreen="/dev/input/event2"
|
||||||
|
deviceinfo_dev_touchscreen_calibration="0 1 1.342 -1 0 1536"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="heimdall-bootimg"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="true"
|
||||||
|
deviceinfo_bootimg_append_seandroidenforce="true"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
deviceinfo_flash_offset_base="0x10000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
|
|
||||||
|
# Heimdall related
|
||||||
|
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||||
|
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
84
device/testing/firmware-samsung-gts210/APKBUILD
Normal file
84
device/testing/firmware-samsung-gts210/APKBUILD
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
pkgname=firmware-samsung-gts210
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Firmware for Samsung tablets based on exynos5433"
|
||||||
|
url="https://github.com/universal5433/proprietary_vendor_samsung"
|
||||||
|
arch="armv7"
|
||||||
|
license="proprietary"
|
||||||
|
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
|
||||||
|
|
||||||
|
# gts210lte and gts210wifi share most wifi fw files, keep them in
|
||||||
|
# main firmware-samsung-gts210 package. The non-shared files are put in
|
||||||
|
# subpackages firmware-samsung-gts210-{lte,wifi}.
|
||||||
|
subpackages="$pkgname-lte"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_commit="be9861bee2728486d5da4c7b700800cef97127d7"
|
||||||
|
_url="$url/raw/$_commit"
|
||||||
|
|
||||||
|
_gts210_wifi_files_common="
|
||||||
|
bcmdhd_apsta.bin
|
||||||
|
bcmdhd_apsta.bin_4358
|
||||||
|
bcmdhd_apsta.bin_a1
|
||||||
|
bcmdhd_ibss.bin
|
||||||
|
bcmdhd_ibss.bin_4358
|
||||||
|
bcmdhd_ibss.bin_a1
|
||||||
|
bcmdhd_mfg.bin
|
||||||
|
bcmdhd_mfg.bin_4358
|
||||||
|
bcmdhd_mfg.bin_a1
|
||||||
|
bcmdhd_sta.bin
|
||||||
|
bcmdhd_sta.bin_4358
|
||||||
|
bcmdhd_sta.bin_a1
|
||||||
|
cred.conf
|
||||||
|
nvram_mfg.txt_4358_a1
|
||||||
|
nvram_net.txt_4358_a1
|
||||||
|
"
|
||||||
|
|
||||||
|
_gts210_wifi_files_lte="
|
||||||
|
nvram_mfg.txt
|
||||||
|
nvram_net.txt
|
||||||
|
"
|
||||||
|
|
||||||
|
for _i in $_gts210_wifi_files_common; do
|
||||||
|
source="$source $pkgname-$_commit-$_i::$_url/gts210ltexx/proprietary/system/vendor/etc/wifi/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
for _i in $_gts210_wifi_files_lte; do
|
||||||
|
source="$source $pkgname-$_commit-$_i::$_url/gts210ltexx/proprietary/system/vendor/etc/wifi/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
package() {
|
||||||
|
local file
|
||||||
|
for file in $_gts210_wifi_files_common; do
|
||||||
|
install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
|
||||||
|
"$pkgdir/lib/firmware/postmarketos/$file"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
lte() {
|
||||||
|
local file
|
||||||
|
for file in $_gts210_wifi_files_lte; do
|
||||||
|
install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
|
||||||
|
"$subpkgdir/lib/firmware/postmarketos/$file"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
069acc0a495bc83afa1e071c4d3d5d3d4d2315c0807ce16ef0eaa49d86eb04dcfaaad1d14eda6d1e10efb0688e373edf935f4010c533503e9c86a46b9ed20a99 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_apsta.bin
|
||||||
|
81cd331ecdf90b098904f7d19e4fe0696de94aa95052ac70723f58cdf6a730f3c63e88a384b862ba2616e85362af4e6f6d82559b0df0106ab1c36f1a03eef542 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_apsta.bin_4358
|
||||||
|
43afbd2754a5f6cf8e27af95ac850574a8fede7265388fc37eca5b5b37a0a11f4838ce144b39f39d1c16874e9ff420f9e3e9a49dbffda9a210b2d68d222aae9a firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_apsta.bin_a1
|
||||||
|
2a33533174d7946878b8c0a40c435fd7b280f60c9547865c783a47f53210894ec8ba3f529dd8e9bf1db9f4b2182e2257d2110efcd148ceaca0fcf01ad3312f06 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_ibss.bin
|
||||||
|
cf15bf3b5797ef344c24189b14cf9e6177544babf744a40deb4e56fffca56d9714cb1870522a790c79c972cb05951ff5e970116f54e1b6cd29c9647cf145a989 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_ibss.bin_4358
|
||||||
|
6c9fd6fbd7848b18ade0292178d1f2b44fda9965e8e9d62e9419a80f3ebc256aa0204ae59e5264d1d22a30b9363af5e606448bce9a0c86df4a906342def7ccc4 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_ibss.bin_a1
|
||||||
|
1c54df659ea269e7dd430e64709aaf78b6e79e9336e9192ad589d48b500ccdb3ccd1104d9aa17fb3cad59b8f42c52d8ab95a24184c8fa70c09049eba503fa002 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_mfg.bin
|
||||||
|
087ce8dcfa39348eb038d37c630e03fa163ea5807a2ae44091853f913010b552fda3364eb28713c8121719db479069a0ca86ba68362bec60e146fa92ac548197 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_mfg.bin_4358
|
||||||
|
fa4ab6bcbe5fcaf769f954d5f19fd5f58219ce9e10d49c18213b30b7a29f3805608492ce0c7586865f5300cf026af04e08c017de72d28b03c185e2dde2d231bf firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_mfg.bin_a1
|
||||||
|
fcfd883c5e1a027c7864cf7e01023d6b954ea63218e886048c5feaeceeb05a09a190993d2fd7b185e08688600cec0aead8c8cf77433c9aae826ea2f2b3f77f7b firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_sta.bin
|
||||||
|
b96a7507e245b9c0479bf37effcbe7a88a604bc045282a60917d085730452ad3fbf5fc84a9b115202a47903fdcb33b8dc27101d564d1f82107a5f9fe394f8539 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_sta.bin_4358
|
||||||
|
e5c5271cd556fdf3658a8a18dfe687f163f79bf4c81e3aafbbb46f58877eb682ef3cce6e266df603eaa984c3f1d3210f15740003469f02dc2420e41d38b4c7f1 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-bcmdhd_sta.bin_a1
|
||||||
|
16ee43800bf7c05f550a14036ef1d648999568996854c72c1ef3965a8fd18eabfda284266fa2e2a0fee8c5fec01fd9a7e22b11b6723797742b5a6260e0b44096 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-cred.conf
|
||||||
|
48eea987097fd9c6693a2b037e40ee81dd65a9285045809f4e2c0061ef3d7c39fb7e9807e0c7c84920c21bcfc4b332be29e77b7602df9ad9ce6d37dbb370d0f8 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-nvram_mfg.txt_4358_a1
|
||||||
|
9f1f26f68602b9671a4aa8548396747fd0ee49d761d19bd341bce4f0cb7625881dc61077626410ead70d525127880080c5329ef9406bdc182176b33ded0268da firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-nvram_net.txt_4358_a1
|
||||||
|
068059064aca94ba1a6eed00b8d95ddbabd311bcacaa2bae54fa32e9103bfe89f10aea39afc21509ee610945e3dc571d1493e94390c4f07ca81368cbe0135ab3 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-nvram_mfg.txt
|
||||||
|
037464b6f50f3d95e8b014187b494bc44b55a860f378a6870d96d30b84bd9d0c86abe86ab3a52e43031defff1213f913d0411f991938896ebaa51889fafaa922 firmware-samsung-gts210-be9861bee2728486d5da4c7b700800cef97127d7-nvram_net.txt
|
||||||
|
"
|
80
device/testing/linux-samsung-gts210lte/APKBUILD
Normal file
80
device/testing/linux-samsung-gts210lte/APKBUILD
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm/configs/lineage_gts210ltexx_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-gts210lte
|
||||||
|
pkgver=3.10.9
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy Tab S2 9.7 LTE (SM-T815) kernel fork"
|
||||||
|
arch="armv7"
|
||||||
|
_carch="arm"
|
||||||
|
_flavor="samsung-gts210lte"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="
|
||||||
|
bash
|
||||||
|
bc
|
||||||
|
bison
|
||||||
|
devicepkg-dev
|
||||||
|
dtbtool-exynos
|
||||||
|
flex
|
||||||
|
openssl-dev
|
||||||
|
perl
|
||||||
|
xz
|
||||||
|
linux-headers
|
||||||
|
"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="android_kernel_samsung_universal5433"
|
||||||
|
_commit="dc682c9aafeeab34db1423c50ff10d80a5c05fed"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/universal5433/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
gcc8-fix-put-user.patch
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
samsung-usb-ethaddr.patch
|
||||||
|
kernel-use-the-gnu89-standard-explicitly.patch
|
||||||
|
drivers-muic-fix.patch
|
||||||
|
security-tima_uevent-fix.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_repository-$_commit"
|
||||||
|
_outdir="out"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
. downstreamkernel_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
|
|
||||||
|
# Master DTB
|
||||||
|
dtbTool-exynos --pagesize 2048 \
|
||||||
|
--platform 0x347e \
|
||||||
|
--subtype 0x88668650 \
|
||||||
|
-o "$_outdir/arch/$_carch/boot"/dt.img \
|
||||||
|
$(find "$_outdir/arch/$_carch/boot/dts/" -name *exynos5433-gts210*.dtb)
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
|
||||||
|
"$_flavor" "$_outdir"
|
||||||
|
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
|
||||||
|
"$pkgdir"/boot/dt.img
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
58dc7208a2a1228650ef8e80f223c273f757faadf2dc1e409856550cc0a5115c0f01413aa237c53840c35d0cf9b35b83f5cbf2ae56fa2ba1723b3261f5822796 linux-samsung-gts210lte-dc682c9aafeeab34db1423c50ff10d80a5c05fed.tar.gz
|
||||||
|
84bb23628855157c6ca1bf58577a5d7d611224eb9a423d3e530f6e20b47db586d757efc0783c65d009d23c9110a219c3dfdf69bf5f1a8a6531e218518f93bd46 config-samsung-gts210lte.armv7
|
||||||
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
|
7abefc75702b3275ad88055c57a580d419342d34df59ca38e0b2b183216ba563f0955a6794b1e3ee8dbc49da1d4531ae7c24451e53b0bc18fe1a0db209c66ddb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
015cc3cd31c1edc208bf2bee872d3be1fe35006f8b90c3cc5c082fb7d89b2ae91a04239676b8868da75d5682e330b1d60d1f5fad67410cbaeeb66a8685df36f5 samsung-usb-ethaddr.patch
|
||||||
|
841d23c78c490a1434c254b06a284f08e6a63a2ed94150302e931b336e1d19704554e5027a29500d073ca89f624ecbdd6c2d323902b03f1b1134d927e6538d00 kernel-use-the-gnu89-standard-explicitly.patch
|
||||||
|
e2e550d9d5020c2f51e1af0576236ac9d57b2e0c10c14a2a92dc7b1bf4100ebc15a6bf0fff4f57232164e84358dc37d24721e1d9f133a526bf78b610eaf00add drivers-muic-fix.patch
|
||||||
|
f48216b4f2068d7ee2788d18deee4af769bcfa8cb88d4257275285a6017e8f193d527a1ede1ef1fb3a1bf7795f633434b57c13aed95ab1161066f215619a8c8b security-tima_uevent-fix.patch
|
||||||
|
"
|
File diff suppressed because it is too large
Load diff
114
device/testing/linux-samsung-gts210lte/drivers-muic-fix.patch
Normal file
114
device/testing/linux-samsung-gts210lte/drivers-muic-fix.patch
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
Fixes error:
|
||||||
|
|
||||||
|
drivers/muic/universal/muic_state.c:363:1: fatal error: opening dependency file drivers/muic/universal/.muic_state.o.d: No such file or directory
|
||||||
|
|
||||||
|
This commit is basically the same as (part of)
|
||||||
|
https://github.com/jcadduono/android_kernel_samsung_universal3475/commit/8b34f9d012cc
|
||||||
|
|
||||||
|
diff --git a/drivers/muic/Kconfig b/drivers/muic/Kconfig
|
||||||
|
index 9de6622d5791..ff3a5a0757a6 100644
|
||||||
|
--- a/drivers/muic/Kconfig
|
||||||
|
+++ b/drivers/muic/Kconfig
|
||||||
|
@@ -168,30 +168,11 @@ config MUIC_SM5502_SUPPORT_AUDIODOCK
|
||||||
|
help
|
||||||
|
If you say yes here you will get support for AUDIO DOCK
|
||||||
|
|
||||||
|
-config MUIC_UNIVERSAL
|
||||||
|
- bool "UNIVERSAL MUIC"
|
||||||
|
- depends on USE_MUIC
|
||||||
|
- default n
|
||||||
|
- help
|
||||||
|
- If you say yes here you will get support for various MUIC chips.
|
||||||
|
-
|
||||||
|
-config MUIC_UNIVERSAL_SM5703
|
||||||
|
- bool "SM5703 MUIC"
|
||||||
|
- depends on USE_MUIC
|
||||||
|
- default n
|
||||||
|
- help
|
||||||
|
- If you say yes here you will get support for the SM5703 MUIC chip.
|
||||||
|
-
|
||||||
|
-config MUIC_UNIVERSAL_MAX77849
|
||||||
|
- bool "MAX77849 MUIC"
|
||||||
|
- depends on USE_MUIC
|
||||||
|
- default n
|
||||||
|
- help
|
||||||
|
- If you say yes here you will get support for the MAX77849 MUIC chip.
|
||||||
|
-
|
||||||
|
config MUIC_HV_FORCE_LIMIT
|
||||||
|
bool "Force limit AFC QC MAX CHG VOLTAGE"
|
||||||
|
depends on HV_MUIC_MAX77843_AFC
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
- If you say yes here you will add function of limit afc charging volatage.
|
||||||
|
\ No newline at end of file
|
||||||
|
+ If you say yes here you will add function of limit afc charging voltage.
|
||||||
|
+
|
||||||
|
+source "drivers/muic/universal/Kconfig"
|
||||||
|
diff --git a/drivers/muic/Makefile b/drivers/muic/Makefile
|
||||||
|
index 4c99f107570e..6188662c5b6e 100644
|
||||||
|
--- a/drivers/muic/Makefile
|
||||||
|
+++ b/drivers/muic/Makefile
|
||||||
|
@@ -15,15 +15,4 @@ obj-$(CONFIG_MUIC_FSA9480) += fsa9480.o
|
||||||
|
obj-$(CONFIG_MUIC_SM5502) += sm5502-muic.o
|
||||||
|
|
||||||
|
# MUIC_UNIVERSAL
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_task.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_state.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_apis.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_sysfs.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_debug.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_dt.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_i2c.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_regmap.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL) += universal/muic_vps.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL_SM5703) += universal/muic_regmap_sm5703.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL_S2MM001) += universal/muic_regmap_s2mm001b.o
|
||||||
|
-obj-$(CONFIG_MUIC_UNIVERSAL_MAX77849) += universal/muic_regmap_max77849.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += universal/
|
||||||
|
diff --git a/drivers/muic/universal/Kconfig b/drivers/muic/universal/Kconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..802ca2dd8a22
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/muic/universal/Kconfig
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+# MUIC_UNIVERSAL
|
||||||
|
+
|
||||||
|
+config MUIC_UNIVERSAL
|
||||||
|
+ bool "UNIVERSAL MUIC"
|
||||||
|
+ depends on USE_MUIC
|
||||||
|
+ default n
|
||||||
|
+ help
|
||||||
|
+ If you say yes here you will get support for various MUIC chips.
|
||||||
|
+
|
||||||
|
+config MUIC_UNIVERSAL_SM5703
|
||||||
|
+ bool "SM5703 MUIC"
|
||||||
|
+ depends on USE_MUIC
|
||||||
|
+ default n
|
||||||
|
+ help
|
||||||
|
+ If you say yes here you will get support for the SM5703 MUIC chip.
|
||||||
|
+
|
||||||
|
+config MUIC_UNIVERSAL_MAX77849
|
||||||
|
+ bool "MAX77849 MUIC"
|
||||||
|
+ depends on USE_MUIC
|
||||||
|
+ default n
|
||||||
|
+ help
|
||||||
|
+ If you say yes here you will get support for the MAX77849 MUIC chip.
|
||||||
|
diff --git a/drivers/muic/universal/Makefile b/drivers/muic/universal/Makefile
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..2beb93df6b3c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/muic/universal/Makefile
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+# MUIC_UNIVERSAL
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_task.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_state.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_apis.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_sysfs.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_debug.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_dt.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_i2c.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_regmap.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL) += muic_vps.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL_SM5703) += muic_regmap_sm5703.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL_S2MM001) += muic_regmap_s2mm001b.o
|
||||||
|
+obj-$(CONFIG_MUIC_UNIVERSAL_MAX77849) += muic_regmap_max77849.o
|
|
@ -0,0 +1,52 @@
|
||||||
|
Based on https://lkml.org/lkml/2020/4/1/1206. In original patch, YYLOC declaration was removed.
|
||||||
|
However, using original patch, which removes yylloc declaration on 3.18.14 kernel version results in 'yylloc not declared' error.
|
||||||
|
See part of the original description below:
|
||||||
|
|
||||||
|
gcc 10 will default to -fno-common, which causes this error at link
|
||||||
|
time:
|
||||||
|
|
||||||
|
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||||
|
|
||||||
|
This is because both dtc-lexer as well as dtc-parser define the same
|
||||||
|
global symbol yyloc. Before with -fcommon those were merged into one
|
||||||
|
defintion. The proper solution would be to to mark this as "extern",
|
||||||
|
|
||||||
|
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||||
|
index 3b41bfca636c..9b9c29e6f311 100644
|
||||||
|
--- a/scripts/dtc/dtc-lexer.l
|
||||||
|
+++ b/scripts/dtc/dtc-lexer.l
|
||||||
|
@@ -39,7 +39,7 @@ LINECOMMENT "//".*\n
|
||||||
|
#include "srcpos.h"
|
||||||
|
#include "dtc-parser.tab.h"
|
||||||
|
|
||||||
|
-YYLTYPE yylloc;
|
||||||
|
+extern YYLTYPE yylloc;
|
||||||
|
|
||||||
|
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||||
|
#define YY_USER_ACTION \
|
||||||
|
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||||
|
index 2d30f41778b7..d0eb405cb811 100644
|
||||||
|
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||||
|
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||||
|
@@ -637,7 +637,7 @@ char *yytext;
|
||||||
|
#include "srcpos.h"
|
||||||
|
#include "dtc-parser.tab.h"
|
||||||
|
|
||||||
|
-YYLTYPE yylloc;
|
||||||
|
+extern YYLTYPE yylloc;
|
||||||
|
|
||||||
|
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||||
|
#define YY_USER_ACTION \
|
||||||
|
diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped
|
||||||
|
index c8c8ca8b744f..ee1d8c3042fb 100644
|
||||||
|
--- a/scripts/dtc/dtc-parser.tab.c_shipped
|
||||||
|
+++ b/scripts/dtc/dtc-parser.tab.c_shipped
|
||||||
|
@@ -73,7 +73,7 @@
|
||||||
|
#include "dtc.h"
|
||||||
|
#include "srcpos.h"
|
||||||
|
|
||||||
|
-extern YYLTYPE yylloc;
|
||||||
|
+YYLTYPE yylloc;
|
||||||
|
|
||||||
|
extern int yylex(void);
|
||||||
|
extern void print_error(char const *fmt, ...);
|
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-samsung-gts210lte/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-samsung-gts210lte/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -0,0 +1,68 @@
|
||||||
|
From 51b97e354ba9fce1890cf38ecc754aa49677fc89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
Date: Mon, 20 Oct 2014 12:23:12 +0300
|
||||||
|
Subject: kernel: use the gnu89 standard explicitly
|
||||||
|
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
|
||||||
|
commit 51b97e354ba9fce1890cf38ecc754aa49677fc89 upstream.
|
||||||
|
|
||||||
|
Sasha Levin reports:
|
||||||
|
"gcc5 changes the default standard to c11, which makes kernel build
|
||||||
|
unhappy
|
||||||
|
|
||||||
|
Explicitly define the kernel standard to be gnu89 which should keep
|
||||||
|
everything working exactly like it was before gcc5"
|
||||||
|
|
||||||
|
There are multiple small issues with the new default, but the biggest
|
||||||
|
issue seems to be that the old - and very useful - GNU extension to
|
||||||
|
allow a cast in front of an initializer has gone away.
|
||||||
|
|
||||||
|
Patch updated by Kirill:
|
||||||
|
"I'm pretty sure all gcc versions you can build kernel with supports
|
||||||
|
-std=gnu89. cc-option is redunrant.
|
||||||
|
|
||||||
|
We also need to adjust HOSTCFLAGS otherwise allmodconfig fails for me"
|
||||||
|
|
||||||
|
Note by Andrew Pinski:
|
||||||
|
"Yes it was reported and both problems relating to this extension has
|
||||||
|
been added to gnu99 and gnu11. Though there are other issues with the
|
||||||
|
kernel dealing with extern inline have different semantics between
|
||||||
|
gnu89 and gnu99/11"
|
||||||
|
|
||||||
|
End result: we may be able to move up to a newer stdc model eventually,
|
||||||
|
but right now the newer models have some annoying deficiencies, so the
|
||||||
|
traditional "gnu89" model ends up being the preferred one.
|
||||||
|
|
||||||
|
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||||
|
Singed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||||
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -242,7 +242,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTCXX = g++
|
||||||
|
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||||
|
+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
|
||||||
|
HOSTCXXFLAGS = -O2
|
||||||
|
|
||||||
|
# Decide whether to build built-in, modular, or both.
|
||||||
|
@@ -380,8 +380,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||||
|
-Wno-implicit-function-declaration \
|
||||||
|
-Wno-format-security \
|
||||||
|
-fno-delete-null-pointer-checks \
|
||||||
|
- -fdiagnostics-show-option
|
||||||
|
-
|
||||||
|
+ -fdiagnostics-show-option \
|
||||||
|
+ -std=gnu89
|
||||||
|
+
|
||||||
|
KBUILD_AFLAGS_KERNEL :=
|
||||||
|
KBUILD_CFLAGS_KERNEL :=
|
||||||
|
KBUILD_AFLAGS := -D__ASSEMBLY__
|
|
@ -0,0 +1,17 @@
|
||||||
|
For some reason, CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE disables the code in u_ether
|
||||||
|
that assigns a random MAC address to the USB network interface. This patch simply
|
||||||
|
disables it to fall back to the original code that works correctly.
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
|
||||||
|
index 61d98db8bd63..105feffa4686 100644
|
||||||
|
--- a/drivers/usb/gadget/u_ether.c
|
||||||
|
+++ b/drivers/usb/gadget/u_ether.c
|
||||||
|
@@ -1148,7 +1148,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
|
||||||
|
if (get_ether_addr(dev_addr, net->dev_addr))
|
||||||
|
dev_warn(&g->dev,
|
||||||
|
"using random %s ethernet address\n", "self");
|
||||||
|
-#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
|
||||||
|
+#if 0
|
||||||
|
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
|
||||||
|
printk(KERN_DEBUG "usb: set unique host mac\n");
|
||||||
|
#else
|
|
@ -0,0 +1,77 @@
|
||||||
|
Fixes error:
|
||||||
|
|
||||||
|
security/tima_uevent/tima_uevent.c:217:1: fatal error: opening dependency file security/tima_uevent/.tima_uevent.o.d: No such file or directory
|
||||||
|
217 | module_exit(tima_uevent_exit);
|
||||||
|
| ^~~~~~~~~~~
|
||||||
|
|
||||||
|
This commit is basically the same as (part of)
|
||||||
|
https://github.com/jcadduono/android_kernel_samsung_universal3475/commit/8b34f9d012cc
|
||||||
|
|
||||||
|
diff --git a/security/Kconfig b/security/Kconfig
|
||||||
|
index 0351ba7e4ed5..e332c9225bb1 100644
|
||||||
|
--- a/security/Kconfig
|
||||||
|
+++ b/security/Kconfig
|
||||||
|
@@ -133,6 +133,7 @@ source security/apparmor/Kconfig
|
||||||
|
source security/yama/Kconfig
|
||||||
|
|
||||||
|
source security/integrity/Kconfig
|
||||||
|
+source security/tima_uevent/Kconfig
|
||||||
|
source security/tz_iccc/Kconfig
|
||||||
|
|
||||||
|
choice
|
||||||
|
@@ -178,4 +179,3 @@ config DEFAULT_SECURITY
|
||||||
|
default "" if DEFAULT_SECURITY_DAC
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
-
|
||||||
|
diff --git a/security/Makefile b/security/Makefile
|
||||||
|
index 36d3f0d176b7..597e4f0369a1 100644
|
||||||
|
--- a/security/Makefile
|
||||||
|
+++ b/security/Makefile
|
||||||
|
@@ -30,7 +30,7 @@ subdir-$(CONFIG_INTEGRITY) += integrity
|
||||||
|
obj-$(CONFIG_INTEGRITY) += integrity/built-in.o
|
||||||
|
|
||||||
|
# TIMA uevent
|
||||||
|
-obj-$(CONFIG_TIMA) += tima_uevent/tima_uevent.o
|
||||||
|
+obj-$(CONFIG_TIMA) += tima_uevent/
|
||||||
|
|
||||||
|
#TZ ICCC
|
||||||
|
obj-$(CONFIG_TZ_ICCC) += tz_iccc/
|
||||||
|
diff --git a/security/tima_uevent/Kconfig b/security/tima_uevent/Kconfig
|
||||||
|
index fd7ea958b753..5c8006f19b3a 100644
|
||||||
|
--- a/security/tima_uevent/Kconfig
|
||||||
|
+++ b/security/tima_uevent/Kconfig
|
||||||
|
@@ -2,14 +2,11 @@
|
||||||
|
# TIMA uevent configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
-menuconfig TIMA_UEVENT_MENU
|
||||||
|
- tristate "TIMA uevent support"
|
||||||
|
- help
|
||||||
|
- TIMA uevent device and driver provides a mechanism to propogate
|
||||||
|
- periodic kernel and module measurement events to observer.
|
||||||
|
-
|
||||||
|
config TIMA_UEVENT
|
||||||
|
- bool "TIMA uevents (EXPERIMENTAL)"
|
||||||
|
- depends on EXPERIMENTAL
|
||||||
|
- ---help---
|
||||||
|
- Generate udev events for TIMA events.
|
||||||
|
+ bool "TIMA uevents (EXPERIMENTAL)"
|
||||||
|
+ depends on EXPERIMENTAL
|
||||||
|
+ default n
|
||||||
|
+ ---help---
|
||||||
|
+ Generate udev events for TIMA events.
|
||||||
|
+ TIMA uevent device and driver provides a mechanism to propogate
|
||||||
|
+ periodic kernel and module measurement events to observer.
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/security/tima_uevent/Makefile b/security/tima_uevent/Makefile
|
||||||
|
index 4f1ca82645b7..ae0c213e371c 100644
|
||||||
|
--- a/security/tima_uevent/Makefile
|
||||||
|
+++ b/security/tima_uevent/Makefile
|
||||||
|
@@ -2,5 +2,4 @@
|
||||||
|
# Makefile for TIMA kernel uevent drivers.
|
||||||
|
#
|
||||||
|
|
||||||
|
-#obj-$(CONFIG_TIMA) += tima_uevent.o
|
||||||
|
-
|
||||||
|
+obj-$(CONFIG_TIMA) += tima_uevent.o
|
Loading…
Reference in a new issue