Skip to content
Snippets Groups Projects
Commit ef3f9dc1 authored by Dzmitry Sankouski's avatar Dzmitry Sankouski Committed by Dzmitry
Browse files

samsung-starqltechn: add device SM-G9600

Device uses mainline kernel. What works:
- boots
- pstore log
parent 351c2420
No related branches found
No related tags found
No related merge requests found
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-starqltechn"
pkgdesc="Samsung Galaxy S9"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-postmarketos-qcom-sdm845-starqltechn mesa-dri-swrast mkbootimg u-boot"
makedepends="devicepkg-dev linux-postmarketos-qcom-sdm845-starqltechn postmarketos-mkinitfs"
source="deviceinfo boot_image.dts"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
b5b93a8be93e4e373058aa0d3b8dce39878660a6759bc9522d64b266dea70faa69dc14b610c7a4a2dd9d8c175c2348954549f651e13ffdaa9cd6be22f14edaaf deviceinfo
59173383b798fd63cd91f7f270a34f78cbfbb4c91abded01dab9b4674d07ae888a6988c87de45b4798560444884e1c189995cd7741e1907080bbbd1d1034ef84 boot_image.dts
"
/dts-v1/;
/ {
description = "Samsung S9 SM-G9600 starqltechn FIT Image";
#address-cells = <1>;
images {
kernel {
description = "Kernel";
data = /incbin/("vmlinuz");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "gzip";
load = <0x80000000>;
entry = <0x80000000>;
hash {
algo = "sha1";
};
};
fdt {
description = "DTB";
data = /incbin/("/usr/share/dtb/qcom/sdm845-samsung-starqltechn.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
load = <0x81a80000>;
entry = <0x81a80000>;
hash {
algo = "sha1";
};
};
initrd {
description = "Initrd";
compression = "none";
data = /incbin/("initramfs");
type = "ramdisk";
arch = "arm64";
load = <0x81000000>;
os = "linux";
hash {
algo = "sha1";
};
};
};
configurations {
default = "standard";
standard {
description = "Standard Boot";
kernel = "kernel";
fdt = "fdt";
ramdisk = "initrd";
hash {
algo = "sha1";
};
};
};
};
# 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 S9"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-starqltechn"
deviceinfo_boardname="starqltechn"
deviceinfo_year="2018"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="2960"
deviceinfo_screen_height="1440"
deviceinfo_dev_touchscreen=""
deviceinfo_dev_touchscreen_calibration=""
# Bootloader related
deviceinfo_flash_method="heimdall-isorec"
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048"
deviceinfo_generate_bootimg="true"
deviceinfo_generate_uboot_fit_images="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_bootimg_override_payload="u-boot.bin"
deviceinfo_bootimg_override_payload_compression="gzip"
deviceinfo_bootimg_override_initramfs="boot_image.itb"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_heimdall_partition_kernel="boot"
deviceinfo_flash_heimdall_partition_initfs="boot"
deviceinfo_flash_heimdall_partition_system="system"
# Temprorary package, based on linux-postmarketos-qcom-sdm845
_flavor="postmarketos-qcom-sdm845-starqltechn"
pkgname=linux-$_flavor
pkgver=5.10.12
pkgrel=1
pkgdesc="Mainline Kernel fork for starqltechn"
arch="aarch64"
_carch="arm64"
url="https://gitlab.com/dsankouski"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-nftables
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
pmb:kconfigcheck-anbox"
makedepends="bison findutils flex installkernel openssl-dev perl"
_repo="sdm845-linux-next"
_config="config-$_flavor.$arch"
_commit="d3aaebf8c611a24bf9876d5961acfc1d1a373ab9"
# Source
source="
$_repo-$_commit.tar.gz::$url/$_repo/-/archive/$_commit/$_repo-$_commit.tar.gz
$_config
"
builddir="$srcdir/$_repo-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
mkdir -p "$pkgdir"/boot
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
d0733263feb6b3d2487eabbd3605e75e744c59f758b4c4b12bfcedc6748e1cf91ead54ffc2850ed391a181b8c8a2aef4c3ae858ac55649aab77058e1dd670fc0 sdm845-linux-next-d3aaebf8c611a24bf9876d5961acfc1d1a373ab9.tar.gz
13df82fde5b1a72a2b34852fb8ed354a0cd1845c3628b797406cb2c9a1b6b64e119397b54e46f42528d20c5ea157363b384968d1cf155a81cfc17a5f1e8a6508 config-postmarketos-qcom-sdm845-starqltechn.aarch64
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment