samsung-xcover4lte: new device (MR 2294)
[ci:skip-build] already built successfully in CI
This commit is contained in:
parent
3d7f70b114
commit
7ba97fda03
8 changed files with 4752 additions and 0 deletions
24
device/testing/device-samsung-xcover4lte/APKBUILD
Normal file
24
device/testing/device-samsung-xcover4lte/APKBUILD
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-samsung-xcover4lte
|
||||||
|
pkgdesc="Samsung Galaxy Xcover 4"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="postmarketos-base linux-samsung-xcover4lte mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
79b5e23e53e5a2fcfba3f4399bb30d8db71d890810c5cbe08054f6e6e8f1068ba2ea6e42251a51daf678a416566634b17afc8abac1a1aa23795ffdd7841db6f3 deviceinfo
|
||||||
|
"
|
35
device/testing/device-samsung-xcover4lte/deviceinfo
Normal file
35
device/testing/device-samsung-xcover4lte/deviceinfo
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# 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 Xcover 4"
|
||||||
|
deviceinfo_manufacturer="Samsung"
|
||||||
|
deviceinfo_codename="samsung-xcover4lte"
|
||||||
|
deviceinfo_year="2017"
|
||||||
|
deviceinfo_dtb=""
|
||||||
|
deviceinfo_modules_initfs=""
|
||||||
|
deviceinfo_arch="aarch64"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_chassis="handset"
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="720"
|
||||||
|
deviceinfo_screen_height="1280"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="heimdall-bootimg"
|
||||||
|
deviceinfo_kernel_cmdline=""
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="true"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
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"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||||
|
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
|
@ -0,0 +1,22 @@
|
||||||
|
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
|
||||||
|
index c016ac37..b01fb1ab 100755
|
||||||
|
--- a/drivers/usb/gadget/function/u_ether.c
|
||||||
|
+++ b/drivers/usb/gadget/function/u_ether.c
|
||||||
|
@@ -1271,8 +1271,16 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
|
||||||
|
dev_warn(&g->dev,
|
||||||
|
"using random %s ethernet address\n", "self");
|
||||||
|
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
|
||||||
|
+ 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))
|
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git a/decon-int_drv.c b/decon-int_drv.c
|
||||||
|
index 7695b67..b3010c9 100755
|
||||||
|
--- a/drivers/video/fbdev/exynos/decon_7570/decon-int_drv.c
|
||||||
|
+++ b/drivers/video/fbdev/exynos/decon_7570/decon-int_drv.c
|
||||||
|
@@ -440,11 +440,11 @@ int decon_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||||
|
case 24:
|
||||||
|
/* our 24bpp is unpacked, so 32bpp */
|
||||||
|
var->bits_per_pixel = 32;
|
||||||
|
- var->red.offset = 16;
|
||||||
|
+ var->red.offset = 0;
|
||||||
|
var->red.length = 8;
|
||||||
|
var->green.offset = 8;
|
||||||
|
var->green.length = 8;
|
||||||
|
- var->blue.offset = 0;
|
||||||
|
+ var->blue.offset = 16;
|
||||||
|
var->blue.length = 8;
|
||||||
|
break;
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
diff --git a/drivers/misc/samsung/scsc/mx140_file.c b/drivers/misc/samsung/scsc/mx140_file.c
|
||||||
|
index 0bc345ca..a726aa67 100755
|
||||||
|
--- a/drivers/misc/samsung/scsc/mx140_file.c
|
||||||
|
+++ b/drivers/misc/samsung/scsc/mx140_file.c
|
||||||
|
@@ -23,8 +23,8 @@
|
||||||
|
#define MX140_FW_BASE_DIR_SYSTEM_ETC_WIFI CONFIG_SCSC_CORE_FW_LOCATION
|
||||||
|
#define MX140_FW_BASE_DIR_VENDOR_ETC_WIFI CONFIG_SCSC_CORE_FW_LOCATION
|
||||||
|
#else
|
||||||
|
-#define MX140_FW_BASE_DIR_SYSTEM_ETC_WIFI "/system/etc/wifi"
|
||||||
|
-#define MX140_FW_BASE_DIR_VENDOR_ETC_WIFI "/vendor/etc/wifi"
|
||||||
|
+#define MX140_FW_BASE_DIR_SYSTEM_ETC_WIFI "/lib/firmware/postmarketos/mx140"
|
||||||
|
+#define MX140_FW_BASE_DIR_VENDOR_ETC_WIFI "/lib/firmware/postmarketos/mx140"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look for this file in <dir>/etc/wifi */
|
||||||
|
@@ -488,26 +488,6 @@ int mx140_basedir_file(struct scsc_mx *mx)
|
||||||
|
/* Set to kernel segment. */
|
||||||
|
set_fs(get_ds());
|
||||||
|
|
||||||
|
- /* If /system isn't present, assume platform isn't ready yet */
|
||||||
|
- r = vfs_stat("/system", &stat);
|
||||||
|
- if (r != 0) {
|
||||||
|
- SCSC_TAG_ERR(MX_FILE, "/system not mounted yet\n");
|
||||||
|
- r = -EAGAIN;
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* If /vendor isn't present, assume O platform isn't ready yet.
|
||||||
|
- * Android M and N still have /vendor, though we don't use it.
|
||||||
|
- * Searching for /vendor is not enough as it's a mountpoint and
|
||||||
|
- * appears before its contents.
|
||||||
|
- */
|
||||||
|
- r = vfs_stat("/vendor", &stat);
|
||||||
|
- if (r != 0) {
|
||||||
|
- SCSC_TAG_ERR(MX_FILE, "/vendor not mounted yet\n");
|
||||||
|
- r = -EAGAIN;
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* Search for SCSC FW under the mountpoints */
|
||||||
|
|
||||||
|
/* Try /vendor partition (Oreo) first.
|
60
device/testing/linux-samsung-xcover4lte/APKBUILD
Normal file
60
device/testing/linux-samsung-xcover4lte/APKBUILD
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/xcover4lte_00_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-samsung-xcover4lte
|
||||||
|
pkgver=3.18.91
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Samsung Galaxy Xcover 4 kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="samsung-xcover4lte"
|
||||||
|
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-exynos linux-headers"
|
||||||
|
|
||||||
|
# Source: backup of https://opensource.samsung.com/uploadSearch?searchValue=G390F (SM-G390F_EUR_PP_Opensource, version: G390FXXU4CSF9)
|
||||||
|
_repository="android_kernel_samsung_xcover4lte"
|
||||||
|
_commit="e4347897745d3e550d45ae2a8fc6c6bf82db722b"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/spholz/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
01-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch
|
||||||
|
02-swap-red-blue.patch
|
||||||
|
03-fix-wifi-fw-path.patch
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_repository-$_commit"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
. downstreamkernel_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
|
|
||||||
|
# Build dt image with exynos dtbtool
|
||||||
|
dtbTool-exynos --pagesize 2048 \
|
||||||
|
--platform 0x50a6 \
|
||||||
|
--subtype 0x217584da \
|
||||||
|
-o "arch/arm64/boot/dt.img" \
|
||||||
|
"arch/arm64/boot/dts/exynos7570-xcover4lte_eur_open_04.dtb"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
||||||
|
install -Dm644 "$builddir/arch/arm64/boot"/dt.img "$pkgdir"/boot/dt.img
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
085f36365fc105a880520b79eaaff621ef491a3e1721f5425cb3f4d27e003497193f5e69a404dc7816d20a5075a912d9c0835c576127137d33c120bee3d931ca linux-samsung-xcover4lte-e4347897745d3e550d45ae2a8fc6c6bf82db722b.tar.gz
|
||||||
|
7d261f49fb6798ff66c8ea8dffb5bf6d8f65801920a906a1060600446736cc726af9eb6af7e38177081012aeda3a4751bc938af09d6e22eb9d21a954525eb726 config-samsung-xcover4lte.aarch64
|
||||||
|
8b46920d7e81edfaeb3a66c10f6eb0c2a409bce9a210fd8ca4e58a7c0207aef28c732826ff806e339b28c737054316c8204fda91feb37eb692a78b873f328e1a 01-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch
|
||||||
|
94f397f127d14e5649b21587e819e65104d92c54dd2035e6cfd3706c31918f4252bdea1328084e41946e47873711419e813fdb0652926a854b1139371d468835 02-swap-red-blue.patch
|
||||||
|
e28f88cb51e91748fb609ab2ee9bf354d147f8edb5c9c60685443d9aaed28a8f0bf42db6cbae9b6623b5c1773f81c2181ef8ab04f37cd7a6882d5e4fc043a92c 03-fix-wifi-fw-path.patch
|
||||||
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
"
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
Loading…
Reference in a new issue