samsung-k3gxx: new device (MR 2646)

This commit is contained in:
WeirdTreeThing 2021-10-31 13:23:03 -04:00 committed by Newbyte
parent 2c9a4920be
commit b5d5a48e41
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
7 changed files with 4373 additions and 0 deletions

View file

@ -0,0 +1,30 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-k3gxx
pkgdesc="Samsung Galaxy S5 (International 3G)"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-samsung-k3gxx
mesa-dri-gallium
mkbootimg
postmarketos-base
msm-fb-refresher
"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
ad52bcc820936c49af0a4ebea05370d2c36dc355f61fe1f9025f452422faae4543f4c30d9340b8ec10407739e26dcba12b13746d706ec6e68d5d2854612a363e deviceinfo
"

View file

@ -0,0 +1,31 @@
# 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 S5 (International 3G)"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-k3gxx"
deviceinfo_year="2014"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="buildvariant=eng"
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="0x11000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x10000100"

View file

@ -0,0 +1,68 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/lineage_k3gxx_defconfig
pkgname=linux-samsung-k3gxx
pkgver=3.10.9
pkgrel=0
pkgdesc="Samsung Galaxy S5 (International 3G) kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-k3gxx"
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
linux-headers
"
# Source
_repository="android_kernel_samsung_k3gxx"
_commit="2f78dde45cd08d9f1f7f047c81ffb237f7ab9b56"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_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
"
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 *k3g*.dtb)
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
"$pkgdir"/boot/dt.img
}
sha512sums="
cee8e8a1fcca8dcdc9083baaa4df3bd5f93f8a24c33bc29b7615b9e04a3b27baad673b978f5f661dfaaa0bc548f02cdbc623f9bd039cab3ecbcdc7cf295cabf0 linux-samsung-k3gxx-2f78dde45cd08d9f1f7f047c81ffb237f7ab9b56.tar.gz
f2b588987e839713fd058cc05ed4d137be78823f8ad84fbbd1728ae5200c04e8108196f1a59025d66fbfcbdda1598585c495cb7015503c63a4644aeabece1543 config-samsung-k3gxx.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.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 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch