Verified Commit 3003f256 authored by Konrad Dybcio's avatar Konrad Dybcio Committed by Oliver Smith

sony-suzu: new device (Sony Xperia X) (!482)

Also known as: SoMC Loire Suzu RoW

[ci:skip-build]: already built successfully in CI
parent 00ed89ba
Pipeline #70172572 passed with stages
in 3 minutes and 40 seconds
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-sony-suzu"
pkgdesc="Sony Xperia X"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-sony-suzu mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="dadfa98035a6895534152b6d049edee4cb7ae3907ed1dab9dcc45a43821310923a29ae407461166ef2bab19f05a83d60183fe6845ec29b366f86605b44b3e946 deviceinfo"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Sony Xperia X"
deviceinfo_manufacturer="Sony"
deviceinfo_codename="sony-suzu"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
deviceinfo_dev_touchscreen="/dev/input/event3"
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="msm_rtb.filter=0x3F ehci-hcd.park=3 coherent_pool=8M sched_enable_power_aware=1 user_debug=31 console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_flash_offset_base="0x20000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="4096"
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/aosp_loire_suzu_defconfig
pkgname="linux-sony-suzu"
pkgver=4.9
pkgrel=0
pkgdesc="Sony Xperia X kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="sony-suzu"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool file bison flex gcc6 gcc6-aarch64 openssl-dev"
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="kernel"
_commit="6593c13acef86ad284ca49aa890e593855210dd1"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/sonyxperiadev/${_repository}/archive/${_commit}.tar.gz
$_config
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
[ -e "$_zimg" ] || continue
msg "zImage found: $_zimg"
install -Dm644 "$_zimg" "$_target"
break
done
if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi
}
sha512sums="c21d609d76ed65bd87e05e0b2874b861fce2af342286f65cf189dd651e54bce34147222880c812ccc7d70ae92d170c2b994c4a94b59fe0f69066240bb67326a2 linux-sony-suzu-6593c13acef86ad284ca49aa890e593855210dd1.tar.gz
4ea6cef4e8cd924299c26d36ca22bd25ad98e594703619738ef13f1e04ac08ac767aefd9cdc22a699cc3020416d2e3cd3bc77ce3e198bf5f37584d6a13fcdcc6 config-sony-suzu.aarch64"
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment