first step of porting motorola-harpia to motorola-surnia (Moto E)
This commit is contained in:
parent
9249bf2122
commit
3324b51fdd
5 changed files with 3981 additions and 0 deletions
22
device/device-motorola-surnia/APKBUILD
Normal file
22
device/device-motorola-surnia/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-motorola-surnia"
|
||||
pkgdesc="Motorola Moto E (2nd Gen)"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="postmarketos-base linux-motorola-surnia mkbootimg mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="c5ba74e2859ff0b25aac8561d20d618822031bf6436b98080d00fceadc2275e3427f688c32fc7b6c686f84c394f18fb3cda6513919e2ca49884cdf6ed7c99e0a deviceinfo"
|
33
device/device-motorola-surnia/deviceinfo
Normal file
33
device/device-motorola-surnia/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="Motorola Moto E (2nd Gen)"
|
||||
deviceinfo_manufacturer="Motorola"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="540"
|
||||
deviceinfo_screen_height="960"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.bootdevice=soc.0 utags.blkdev=/dev/block/platform/soc.0/by-name/utags utags.backup=/dev/block/platform/soc.0/by-name/utagsBackup movablecore=160M androidboot.write_protect=0"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
||||
|
74
device/linux-motorola-surnia/APKBUILD
Normal file
74
device/linux-motorola-surnia/APKBUILD
Normal file
|
@ -0,0 +1,74 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/surnia_defconfig
|
||||
|
||||
pkgname="linux-motorola-surnia"
|
||||
pkgver=3.10.49
|
||||
pkgrel=0
|
||||
pkgdesc="Motorola Moto E (2nd Gen) kernel fork"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor="motorola-surnia"
|
||||
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 gcc6 xz"
|
||||
|
||||
# Compiler: GCC 6 (doesn't compile with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_motorola_msm8916"
|
||||
_commit="4c864820053bb70e21cf1e9764baefefd4d2f6b1"
|
||||
_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
|
||||
"
|
||||
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"
|
||||
|
||||
# Generate master DTB (deviceinfo_bootimg_qcdt)
|
||||
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
|
||||
"$pkgdir/boot/dt.img"
|
||||
}
|
||||
|
||||
sha512sums="28e70a5af0df65b85c257c4ca455553d38b17dad8d141876854c5a38502114638c8e59440cffcf81c278a6836e39ec0f63ed35dad825c49a8c3f299de7617b80 linux-motorola-surnia-4c864820053bb70e21cf1e9764baefefd4d2f6b1.tar.gz
|
||||
44b4dbdddbc054f5d8188fde5ae4197c6005aadbf0ebf82fdf50fa529bc5b09fed62744fdb6592a9790e99795c5f7be9763a515ff43bd990117372ac5ff2f8a2 config-motorola-surnia.armhf
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch"
|
3851
device/linux-motorola-surnia/config-motorola-surnia.armhf
Normal file
3851
device/linux-motorola-surnia/config-motorola-surnia.armhf
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
Loading…
Reference in a new issue