samsung-crownlte: new device (MR 2959)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
af08a81fcd
commit
ce2ca309a6
10 changed files with 6049 additions and 0 deletions
51
device/testing/device-samsung-crownlte/APKBUILD
Normal file
51
device/testing/device-samsung-crownlte/APKBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-crownlte
|
||||
pkgdesc="Samsung Galaxy Note 9"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-samsung-crownlte
|
||||
mesa-dri-gallium
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
msm-fb-refresher
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
stylus.conf
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-x11
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="WiFi firmware"
|
||||
depends="firmware-samsung-crownlte"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
x11() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
|
||||
depends="xf86-input-evdev"
|
||||
install -Dm644 "$srcdir"/stylus.conf \
|
||||
"$subpkgdir"/etc/X11/xorg.conf.d/stylus.conf
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5f8b2b51f6da0e4763fd6749f4a5b133cfc8ee9f7a3d0fcdec882954c59bfc21eee9a50ac17c332c797e84ae1058d7ecde07a53bf50170f73e698cb62003cb5b deviceinfo
|
||||
29c2f8fbd67f6aa95a34fc465798be71dc360087b4e4fddbcdc9b43a628de384f48c1b9e6a7b3d41c93954baee3b88f08972f0a827d663b0279b06a4b2908bd2 stylus.conf
|
||||
"
|
33
device/testing/device-samsung-crownlte/deviceinfo
Normal file
33
device/testing/device-samsung-crownlte/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 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 9"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
deviceinfo_codename="samsung-crownlte"
|
||||
deviceinfo_year="2018"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1440"
|
||||
deviceinfo_screen_height="2960"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="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"
|
||||
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
||||
deviceinfo_rootfs_image_sector_size="4096"
|
6
device/testing/device-samsung-crownlte/stylus.conf
Normal file
6
device/testing/device-samsung-crownlte/stylus.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
Section "InputClass"
|
||||
Identifier "evdev tablet catchall"
|
||||
MatchIsTablet "on"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
Driver "evdev"
|
||||
EndSection
|
31
device/testing/firmware-samsung-crownlte/APKBUILD
Normal file
31
device/testing/firmware-samsung-crownlte/APKBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
pkgname=firmware-samsung-crownlte
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for the Samsung Galaxy Note 9"
|
||||
url="https://github.com/rom4nik/android_vendor_samsung"
|
||||
arch="noarch"
|
||||
license="proprietary"
|
||||
options="!check !archcheck !strip !spdx !tracedeps pmb:cross-native"
|
||||
|
||||
# Source
|
||||
_commit="e1494313c7223c0bb39a9c9f91b3f68bdcd204e7"
|
||||
_wifi_files="bcmdhd_sta.bin_b2 bcmdhd_clm.blob nvram.txt_r02a_b2"
|
||||
|
||||
for _file in $_wifi_files; do
|
||||
source="$source $pkgname-$_commit-$_file::$url/raw/$_commit/universal9810-common/proprietary/vendor/etc/wifi/$_file"
|
||||
done
|
||||
|
||||
package() {
|
||||
# Wifi
|
||||
local file
|
||||
for file in $_wifi_files; do
|
||||
install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
|
||||
"$pkgdir/lib/firmware/postmarketos/$file"
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
af96fa7245c06ca494eb6c43903a39795e2f9d316db4df4e88ea63837d87f41933259812503d62851c3bd9b4d6f126979193190544cb3c4db6b6b304661bdab9 firmware-samsung-crownlte-e1494313c7223c0bb39a9c9f91b3f68bdcd204e7-bcmdhd_sta.bin_b2
|
||||
15647eb158603dfee3d14420703e0f05c89fa91a9aaf35b9ea92197f1c75b1aaa1046d18ef539c5d600542ce87ab6b7a776b4616896be3aae192361019996051 firmware-samsung-crownlte-e1494313c7223c0bb39a9c9f91b3f68bdcd204e7-bcmdhd_clm.blob
|
||||
7a9d701311a1e00248c0367c9eea8ab2bf8a4ad859513b55c47b33a000cad784a1ba8ea390e972f13c4e64825e8ca84f3c547bd1a8a7d6861df1b89ad9a18d18 firmware-samsung-crownlte-e1494313c7223c0bb39a9c9f91b3f68bdcd204e7-nvram.txt_r02a_b2
|
||||
"
|
21
device/testing/linux-samsung-crownlte/01-decon_reg.patch
Normal file
21
device/testing/linux-samsung-crownlte/01-decon_reg.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
Adapted from ../linux-samsung-dream/02-fix-decon_reg.patch.
|
||||
Fixes:
|
||||
../drivers/video/fbdev/exynos/dpu_9810/decon_reg.c: In function 'decon_reg_get_clock_ratio':
|
||||
../drivers/video/fbdev/exynos/dpu_9810/decon_reg.c:2376:42: error: '-mgeneral-regs-only' is incompatible with the use of floating-point types
|
||||
2376 | clks->decon[CLK_ID_VCLK] = decon_clocks_table[i][CLK_ID_VCLK];
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
and a few similar errors within this file.
|
||||
|
||||
diff --git a/drivers/video/fbdev/exynos/dpu_9810/decon_reg.c b/drivers/video/fbdev/exynos/dpu_9810/decon_reg.c
|
||||
index 4261b1648cf5..85a31b57b476 100644
|
||||
--- a/drivers/video/fbdev/exynos/dpu_9810/decon_reg.c
|
||||
+++ b/drivers/video/fbdev/exynos/dpu_9810/decon_reg.c
|
||||
@@ -2326,7 +2326,7 @@ u32 decon_reg_get_height(u32 id, int dsi_mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-const double decon_clocks_table[][CLK_ID_MAX] = {
|
||||
+const unsigned decon_clocks_table[][CLK_ID_MAX] = {
|
||||
/* VCLK, ECLK, ACLK, PCLK, DISP_PLL, resolution, MIC_ratio, DSC count */
|
||||
{ 71, 168, 400, 66, 71, 1080 * 1920, MIC_COMP_BYPASS, 0},
|
||||
{ 63, 168, 400, 66, 63, 1440 * 2560, MIC_COMP_RATIO_1_2, 0},
|
|
@ -0,0 +1,21 @@
|
|||
Adapted from ../linux-samsung-dream/05-BGR-to-RGB-colors.patch.
|
||||
Fixes color order - from BGRA to RGBA.
|
||||
|
||||
diff --git a/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c b/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
index 07a084d805af..4504591db73e 100644
|
||||
--- a/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
+++ b/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
@@ -807,11 +807,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,23 @@
|
|||
From 4462b31a33dbd72840269bdccb4aa447f14c9a6c Mon Sep 17 00:00:00 2001
|
||||
From: LONELY-WOLF <zvenayte@gmail.com>
|
||||
Date: Thu, 4 Jul 2019 12:13:46 +0300
|
||||
Subject: [PATCH] [decon] suppress unblank warning
|
||||
|
||||
---
|
||||
drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c b/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
index 07a084d805af..0b9ade4351a2 100644
|
||||
--- a/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
+++ b/drivers/video/fbdev/exynos/dpu_9810/decon_dsi.c
|
||||
@@ -928,8 +928,7 @@ int decon_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
|
||||
if ((!IS_DECON_HIBER_STATE(decon) && IS_DECON_OFF_STATE(decon)) ||
|
||||
decon->state == DECON_STATE_INIT) {
|
||||
- decon_warn("%s: decon%d state(%d), UNBLANK missed\n",
|
||||
- __func__, decon->id, decon->state);
|
||||
+// decon_warn("%s: decon%d state(%d), UNBLANK missed\n", __func__, decon->id, decon->state);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
Adapted from ../linux-samsung-dream/04-firmware-path.patch.
|
||||
Changes hardcoded path for WiFi module's firmware to match pmOS package.
|
||||
|
||||
diff --git a/drivers/net/wireless/bcmdhd_100_15/dhd.h b/drivers/net/wireless/bcmdhd_100_15/dhd.h
|
||||
index f8f13a869622..bac7f7d4aa7c 100644
|
||||
--- a/drivers/net/wireless/bcmdhd_100_15/dhd.h
|
||||
+++ b/drivers/net/wireless/bcmdhd_100_15/dhd.h
|
||||
@@ -401,7 +401,7 @@ enum dhd_op_flags {
|
||||
#if defined(CUSTOMER_HW4) && defined(PLATFORM_SLP)
|
||||
#define CONFIG_BCMDHD_CLM_PATH "/lib/firmware/bcmdhd_clm.blob"
|
||||
#else
|
||||
-#define CONFIG_BCMDHD_CLM_PATH "/etc/wifi/bcmdhd_clm.blob"
|
||||
+#define CONFIG_BCMDHD_CLM_PATH "/lib/firmware/postmarketos/bcmdhd_clm.blob"
|
||||
#endif /* CUSTOMER_HW4 && PLATFORM_SLP */
|
||||
#endif /* CONFIG_BCMDHD_CLM_PATH */
|
||||
#define WL_CCODE_NULL_COUNTRY "#n"
|
||||
@@ -2543,7 +2543,7 @@ extern uint dhd_pktgen_len;
|
||||
extern char fw_path2[MOD_PARAM_PATHLEN];
|
||||
#endif // endif
|
||||
|
||||
-#define VENDOR_PATH "/vendor"
|
||||
+#define VENDOR_PATH ""
|
||||
|
||||
#if defined(DHD_LEGACY_FILE_PATH)
|
||||
#define PLATFORM_PATH "/data/"
|
69
device/testing/linux-samsung-crownlte/APKBUILD
Normal file
69
device/testing/linux-samsung-crownlte/APKBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/exynos9810-crownlte_defconfig
|
||||
|
||||
pkgname=linux-samsung-crownlte
|
||||
pkgver=4.9.218
|
||||
pkgrel=0
|
||||
pkgdesc="Samsung Galaxy Note 9 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="samsung-crownlte"
|
||||
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
|
||||
"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_samsung_universal9810"
|
||||
_commit="5a2dd7d6f3a05168d2f1303c3b29e9e9fa39b781"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
01-decon_reg.patch
|
||||
02-decon_dsi-BGRA-to-RGBA.patch
|
||||
03-decon_dsi-UNBLANK-missed.patch
|
||||
04-wifi-firmware-path.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-exynos -o "$_outdir/arch/$_carch/boot"/dt.img \
|
||||
$(find "$_outdir/arch/$_carch/boot/dts/" -name *crownlte*.dtb)
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
|
||||
"$_flavor" "$_outdir"
|
||||
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
|
||||
"$pkgdir"/boot/dt.img
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a19967220faac402dd6fc2424f89cc236f367047d069a2234ca391e44a47fe04e3aff9562dd0be6f6b81d80e95fc7daf3edb26cf29349a35e0dc1c4af4fcb813 linux-samsung-crownlte-5a2dd7d6f3a05168d2f1303c3b29e9e9fa39b781.tar.gz
|
||||
940d98d0596f1a571f839bfe293e1b75c004cdc18c4536e5ade4f6637d1965ba75be6e0b67c6bb668d5dac0a4c9b505d43f6c1ea0920ee7d445dfe5da63a0613 config-samsung-crownlte.aarch64
|
||||
8d56a239cbd488692249ba856f3e949863dbb60edacfc862171f7b42c2564e99009ba88c8299b2179f468291fdc0de118235307acad07ec88342b8e68ee6f075 01-decon_reg.patch
|
||||
65f5b1541bf3d4dab9db3d5de2aa888e794772f66d85541d11fbf515e7ec9188cda2ec46411f5469d8485caa5f405ffa16159f556bd9180c0cd3a527b14f9f5f 02-decon_dsi-BGRA-to-RGBA.patch
|
||||
24eb8701d77ad6cfc98a153341874d753a67930a369b1a08d8d51682a5d1014971e106bda93b7180bcacdf7032bb952fdca02f68886ea27c761eab8fefdb03fa 03-decon_dsi-UNBLANK-missed.patch
|
||||
596235334147a430d0104d01647e57aeac71b7a9e484daf4ad8fca9cd1cf23e040fbf2c00dea7fb2a096e741eb1dde71471585a59d71d47dcdb1336e5c16efad 04-wifi-firmware-path.patch
|
||||
"
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue