samsung-trltexx: new device (Samsung Galaxy Note 4) (MR 2456)
[ci:skip-build] already built successfully in CI
This commit is contained in:
parent
4eb195efb4
commit
135a134efd
8 changed files with 5182 additions and 0 deletions
25
device/testing/device-samsung-trltexx/APKBUILD
Normal file
25
device/testing/device-samsung-trltexx/APKBUILD
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-trltexx
|
||||||
|
pkgdesc="Samsung Galaxy Note 4 (Qualcomm)"
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="armv7"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="postmarketos-base linux-samsung-trltexx mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
1911827a9fb6b896340f1aadefa86610ec51b1222a64a11c4ba950952560e063b629bac6aebfe7069b25d17d064cb94bf77677f6d82787ba5161c61d08fd2af1 deviceinfo
|
||||||
|
"
|
38
device/testing/device-samsung-trltexx/deviceinfo
Normal file
38
device/testing/device-samsung-trltexx/deviceinfo
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# 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 Note 4 (Qualcomm)"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-trltexx"
|
||||||
|
deviceinfo_year="2014"
|
||||||
|
deviceinfo_arch="armv7"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="handset"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="1440"
|
||||||
|
deviceinfo_screen_height="2560"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="heimdall-bootimg"
|
||||||
|
deviceinfo_kernel_cmdline="console=ttyHSL0 androidboot.hardware=qcom androidboot.bootdevice=msm_sdcc.1 androidboot.selinux=permissive user_debug=23 msm_rtb.filter=0x3b7 dwc3_msm.cpu_to_affin=1 buildvariant=eng"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="true"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_bootimg_append_seandroidenforce="true"
|
||||||
|
deviceinfo_flash_offset_base="0x00000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x02600000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x02400000"
|
||||||
|
deviceinfo_flash_pagesize="4096"
|
||||||
|
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||||
|
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
||||||
|
|
||||||
|
# USB related
|
||||||
|
deviceinfo_usb_idVendor="0x04e8" # Samsung Electronics Co., Ltd
|
||||||
|
deviceinfo_usb_idProduct="0x6860" # Galaxy (MTP)
|
|
@ -0,0 +1,90 @@
|
||||||
|
From a23d549c51e38ad9fc481859326a786bc00baad8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Federico Amedeo Izzo <federico.izzo42@gmail.com>
|
||||||
|
Date: Fri, 22 Mar 2019 19:37:07 +0100
|
||||||
|
Subject: [PATCH] fix video argb setting
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/video/msm/mdss/mdss_fb.c | 34 ++++++++++++++++----------------
|
||||||
|
1 file changed, 17 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
|
||||||
|
index 7d0aa7653c5..b7f47e42e34 100644
|
||||||
|
--- a/drivers/video/msm/mdss/mdss_fb.c
|
||||||
|
+++ b/drivers/video/msm/mdss/mdss_fb.c
|
||||||
|
@@ -1661,16 +1661,16 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||||
|
fix->xpanstep = 1;
|
||||||
|
fix->ypanstep = 1;
|
||||||
|
var->vmode = FB_VMODE_NONINTERLACED;
|
||||||
|
- var->blue.offset = 0;
|
||||||
|
- var->green.offset = 8;
|
||||||
|
- var->red.offset = 16;
|
||||||
|
+ var->blue.offset = 24;
|
||||||
|
+ var->green.offset = 16;
|
||||||
|
+ var->red.offset = 8;
|
||||||
|
var->blue.length = 8;
|
||||||
|
var->green.length = 8;
|
||||||
|
var->red.length = 8;
|
||||||
|
var->blue.msb_right = 0;
|
||||||
|
var->green.msb_right = 0;
|
||||||
|
var->red.msb_right = 0;
|
||||||
|
- var->transp.offset = 24;
|
||||||
|
+ var->transp.offset = 0;
|
||||||
|
var->transp.length = 8;
|
||||||
|
bpp = 4;
|
||||||
|
break;
|
||||||
|
@@ -1680,16 +1680,16 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||||
|
fix->xpanstep = 1;
|
||||||
|
fix->ypanstep = 1;
|
||||||
|
var->vmode = FB_VMODE_NONINTERLACED;
|
||||||
|
- var->blue.offset = 8;
|
||||||
|
- var->green.offset = 16;
|
||||||
|
- var->red.offset = 24;
|
||||||
|
+ var->blue.offset = 16;
|
||||||
|
+ var->green.offset = 8;
|
||||||
|
+ var->red.offset = 0;
|
||||||
|
var->blue.length = 8;
|
||||||
|
var->green.length = 8;
|
||||||
|
var->red.length = 8;
|
||||||
|
var->blue.msb_right = 0;
|
||||||
|
var->green.msb_right = 0;
|
||||||
|
var->red.msb_right = 0;
|
||||||
|
- var->transp.offset = 0;
|
||||||
|
+ var->transp.offset = 24;
|
||||||
|
var->transp.length = 8;
|
||||||
|
bpp = 4;
|
||||||
|
break;
|
||||||
|
@@ -2619,15 +2619,15 @@ static int mdss_fb_check_var(struct fb_var_screeninfo *var,
|
||||||
|
/* Figure out if the user meant RGBA or ARGB
|
||||||
|
and verify the position of the RGB components */
|
||||||
|
|
||||||
|
- if (var->transp.offset == 24) {
|
||||||
|
- if ((var->blue.offset != 0) ||
|
||||||
|
- (var->green.offset != 8) ||
|
||||||
|
- (var->red.offset != 16))
|
||||||
|
- return -EINVAL;
|
||||||
|
- } else if (var->transp.offset == 0) {
|
||||||
|
- if ((var->blue.offset != 8) ||
|
||||||
|
+ if (var->transp.offset == 0) {
|
||||||
|
+ if ((var->blue.offset != 24) ||
|
||||||
|
(var->green.offset != 16) ||
|
||||||
|
- (var->red.offset != 24))
|
||||||
|
+ (var->red.offset != 8))
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ } else if (var->transp.offset == 24) {
|
||||||
|
+ if ((var->blue.offset != 16) ||
|
||||||
|
+ (var->green.offset != 8) ||
|
||||||
|
+ (var->red.offset != 0))
|
||||||
|
return -EINVAL;
|
||||||
|
} else
|
||||||
|
return -EINVAL;
|
||||||
|
@@ -2717,7 +2717,7 @@ static int mdss_fb_set_par(struct fb_info *info)
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 32:
|
||||||
|
- if (var->transp.offset == 24)
|
||||||
|
+ if (var->transp.offset == 0)
|
||||||
|
mfd->fb_imgType = MDP_ARGB_8888;
|
||||||
|
else
|
||||||
|
mfd->fb_imgType = MDP_RGBA_8888;
|
||||||
|
--
|
||||||
|
2.21.0
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 2e32a401ea5df22ab899f4da3e5e1b448b2df51a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Min <alexey.min@gmail.com>
|
||||||
|
Date: Thu, 7 Mar 2019 17:25:48 +0300
|
||||||
|
Subject: [PATCH 5/6] usb_gadget: set random rndis host MAC address to prevent
|
||||||
|
zero address
|
||||||
|
|
||||||
|
This fixes zero host MAC:
|
||||||
|
|
||||||
|
rndis0: MAC f6:45:91:9b:4e:43
|
||||||
|
rndis0: HOST MAC 00:00:00:00:00:00
|
||||||
|
|
||||||
|
and allows devive to automatically obtain IP addrest on PC host side
|
||||||
|
zero MAC address prevented interface from autoconfiguring
|
||||||
|
---
|
||||||
|
drivers/usb/gadget/u_ether.c | 12 ++++++++++--
|
||||||
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
|
||||||
|
index a61487007bf..16f26cb7a9c 100644
|
||||||
|
--- a/drivers/usb/gadget/u_ether.c
|
||||||
|
+++ b/drivers/usb/gadget/u_ether.c
|
||||||
|
@@ -1607,8 +1607,16 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
|
||||||
|
"using random %s ethernet address\n", "self");
|
||||||
|
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
|
||||||
|
if (ethaddr != NULL) {
|
||||||
|
+ if ((ethaddr[0] == 0x00) && (ethaddr[1] == 0x00) &&
|
||||||
|
+ (ethaddr[2] == 0x00) && (ethaddr[3] == 0x00) &&
|
||||||
|
+ (ethaddr[4] == 0x00) && (ethaddr[5] == 0x00)) {
|
||||||
|
+ printk(KERN_DEBUG "%s: no unique host MAC was set, generate random\n", __func__);
|
||||||
|
+ /* we can use random_ether_addr() from include/linux/etherdevice.h */
|
||||||
|
+ random_ether_addr(ethaddr);
|
||||||
|
+ } else {
|
||||||
|
+ printk(KERN_DEBUG "%s: set unique host mac\n", __func__);
|
||||||
|
+ }
|
||||||
|
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
|
||||||
|
- printk(KERN_DEBUG "usb: set unique host mac\n");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (get_ether_addr(host_addr, dev->host_mac))
|
61
device/testing/linux-samsung-trltexx/APKBUILD
Normal file
61
device/testing/linux-samsung-trltexx/APKBUILD
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm/configs/apq8084_sec_trlte_eur_defconfig
|
||||||
|
# arch/arm/configs/apq8084_sec_defconfig
|
||||||
|
# arch/arm/configs/selinux_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-trltexx
|
||||||
|
pkgver=3.10.108
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy Note 4 (Qualcomm) kernel fork"
|
||||||
|
arch="armv7"
|
||||||
|
_carch="arm"
|
||||||
|
_flavor="samsung-trltexx"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl dtbtool xz"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="android_kernel_samsung_apq8084"
|
||||||
|
_commit="45470c5e5fde343926188c3e78a3c652c81408cb"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
gcc8-fix-put-user.patch
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
0004-fix-video-argb-setting.patch
|
||||||
|
0007-usb_gadget-set-random-rndis-host-MAC-address-to-prev.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 (deviceinfo_bootimg_qcdt)
|
||||||
|
dtbTool -s 2048 -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot/dt.img" \
|
||||||
|
"$_outdir/arch/$_carch/boot/"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||||
|
install -Dm644 "$_outdir/arch/$_carch/boot/dt.img" \
|
||||||
|
"$pkgdir/boot/dt.img"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
a09b9f7ac2c70935678e2faac76d5db2d8d98e2dde17de3ed449f5e521c460f6c1d62056b670aba2c99ce0f6941991f8402f31a0696c5763fc799514d6bf3367 linux-samsung-trltexx-45470c5e5fde343926188c3e78a3c652c81408cb.tar.gz
|
||||||
|
321775ec0e38a964794429dbbcd72d3b8a526bf5f72884af332ea6fb595e37f85ed46caae315abbfdfe596ac702e4c7d0e35a33416e823673d9b6bfcd7ddb7df config-samsung-trltexx.armv7
|
||||||
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
5cf99d4ad3fddaeb211203ebfa3b05458b0fe1882f14da0343d218320be4f8ee36fd87b2fc2cf7af6f63f6a2821d2189e44f72a2d968bbfffdfdeb4636315fb9 0004-fix-video-argb-setting.patch
|
||||||
|
e8b1507cad4be72855f840e84a7a894e2469527ff9402c6de491390fd64cae7952af97a2a2eb9709e71464c702902c8d941da95709db5b6b09039ed97669c1e1 0007-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch
|
||||||
|
"
|
4927
device/testing/linux-samsung-trltexx/config-samsung-trltexx.armv7
Normal file
4927
device/testing/linux-samsung-trltexx/config-samsung-trltexx.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
1
device/testing/linux-samsung-trltexx/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-samsung-trltexx/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue