samsung-j6primelte: new device (MR 2444)

[ci:skip-build] Already built on CI in MR
This commit is contained in:
omame 2021-08-19 04:30:54 +02:00 committed by Alexey Minnekhanov
parent f4a6b4f8d1
commit 1431998cff
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
7 changed files with 5049 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: omame <me@omame.tech>
pkgname=device-samsung-j6primelte
pkgdesc="Samsung Galaxy J6+"
pkgver=0.3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-samsung-j6primelte
mesa-dri-gallium
mkbootimg
postmarketos-base
msm-fb-refresher
"
makedepends="devicepkg-dev"
source="
deviceinfo
brightness
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm755 "$srcdir"/brightness "$pkgdir"/etc/local.d/brightness
}
sha512sums="
420369e9a2569615e848d9c84561f28f4416a72ff325d17d55ecd9c7300c94542f8cde842eb300776e1bc5500952b8348816d3e318cbd5c31fbd1215d707815b deviceinfo
85582c47239d5f9cd899f3f6ed9df860e3b44a8855e13a7bc37777b22111f0511cd371a344fb52eb77cb5d1b1989661b07ea1ee6916f425643d13e4ca5261894 brightness
"

View file

@ -0,0 +1,2 @@
#!/bin/bash
echo /sys/class/leds/lcd-backlight/max_brightness > /sys/class/leds/lcd-backlight/brightness

View 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 J6+"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-j6primelte"
deviceinfo_year="2018"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1480"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 androidboot.selinux=permissive loop.max_part=7 buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_heimdall_partition_kernel=""
deviceinfo_flash_heimdall_partition_system=""

View file

@ -0,0 +1,59 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: omame <me@omame.tech>
pkgname=linux-samsung-j6primelte
pkgver=3.18.124
pkgrel=0
pkgdesc="Samsung Galaxy J6+ kernel (LineageOS 18.1)"
arch="armv7"
_carch="arm"
_flavor="samsung-j6primelte"
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
"
# Source
_repository="android_kernel_samsung_msm8917"
_commit="f7e2c1efe869135a768cb5dfcdf452adecb6e0f3"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/samsung-msm8937-devs/$_repository/archive/$_commit.tar.gz
$_config
gcc10-extern_YYLOC_global_declaration.patch
samsung_defex_lsm_use_relative_path.patch"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 \
-pkeyopt rsa_keygen_pubexp:65537 | openssl pkcs8 -topk8 \
-nocrypt -outform der > \
$builddir/security/samsung/defex_lsm/cert/pubkey_user.der
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="
c321711852dfdbc1b36cb507c57e11fb72d3bef2f62d99b1ee84939eaf6b34bb8821a85afaaf0a2477af39d6128f889f15d8fd06f98030d98ed123eb15a627d5 linux-samsung-j6primelte-f7e2c1efe869135a768cb5dfcdf452adecb6e0f3.tar.gz
53e1b743a655a164085fd54d27c95ddc1cc5de992bc6f34ce4773469abcc770ba058a03d627dabd6c8bee048f383322bc1edfef9b3f572e62c59c0812e737fd2 config-samsung-j6primelte.armv7
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
1be8126e7a3e38827536eb5dc22fce6a713322a1e564abaac571a240844f13d8fde7f9e5d0b4c803c2a2f9fef9d2d35b3a57448a944270cc8f105112ee65acb9 samsung_defex_lsm_use_relative_path.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -0,0 +1,14 @@
diff -ur a/security/samsung/defex_lsm/cert/defex_cert.S b/security/samsung/defex_lsm/cert/defex_cert.S
--- a/security/samsung/defex_lsm/cert/defex_cert.S 2021-01-30 00:06:40.000000000 +0100
+++ b/security/samsung/defex_lsm/cert/defex_cert.S 2021-08-16 22:07:20.313587993 +0200
@@ -26,8 +26,8 @@
GLOBAL(defex_public_key_start)
#ifdef DEFEX_DEBUG_ENABLE
- .incbin "security/samsung/defex_lsm/cert/pubkey_eng.der"
+ .incbin "pubkey_eng.der"
#else
- .incbin "security/samsung/defex_lsm/cert/pubkey_user.der"
+ .incbin "pubkey_user.der"
#endif
GLOBAL(defex_public_key_end)