oppo-find-7a: new device (Oppo Find 7a)

I only tested the usb network feature by ssh'ing in to the device.
Nothing else works yet.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Tito Ragusa 2019-05-08 23:44:19 +02:00 committed by Oliver Smith
parent b4b7f1ffdc
commit 1f8095771c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
7 changed files with 3803 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-oppo-find-7a"
pkgdesc="OPPO Find 7a"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-oppo-find-7a mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="cf22482f1948c0c99c9d10cd28dbd12c9881c67266547e0271b9249c27c4cfb7d954797b11704dc3a6ece95ef15bbf45f34a659244226304ef0b264a2416c41e deviceinfo"

View 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="OPPO Find 7a"
deviceinfo_manufacturer="OPPO"
deviceinfo_codename="oppo-find-7a"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
deviceinfo_dev_touchscreen=""
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
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="2048"

View file

@ -0,0 +1,75 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/lineageos_find7_defconfig
pkgname="linux-oppo-find-7a"
pkgver=3.4.113
pkgrel=0
pkgdesc="OPPO Find 7a kernel fork"
arch="armv7"
_carch="arm"
_flavor="oppo-find-7a"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-libelf devicepkg-dev dtbtool xz"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="android_kernel_oppo_msm8974"
_commit="60e8a8df2d253b053cdac10a0ffd196b7b9c3925"
_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
kernel-use-the-gnu89-standard-explicitly.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="e3fa1f9ab51a2b6213b9abaa3bb5e010fd2c41e98f572022fcfff66f17fc3639e1b29184b923c437ab4ed3411feb7e5667303304600fac3e929793c10a16daa2 linux-oppo-find-7a-60e8a8df2d253b053cdac10a0ffd196b7b9c3925.tar.gz
30134ad4cbd9cc3c906425847dbc095b4db37011e98d0c200bb7bd4fc8c6bb468f7537b2f77e542ae401c65c75feed9e16abde1d8d9787f83131684c5a52c8bc config-oppo-find-7a.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"

File diff suppressed because it is too large Load diff

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

View file

@ -0,0 +1 @@
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch