hisense-m470bsa: new device (Hisense Sero 7 Pro) (!721)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Hunter Sell 2019-11-22 18:48:41 -08:00 committed by Oliver Smith
parent d76b8994b2
commit 8baf04df3c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
7 changed files with 3756 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-hisense-m470bsa"
pkgdesc="Hisense Sero 7 Pro"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-hisense-m470bsa mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
source="deviceinfo modules-load.conf pointercal"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/modules-load.conf \
"$pkgdir"/etc/modules-load.d/01-${pkgname}.conf
install -Dm644 "$srcdir"/pointercal \
"$pkgdir"/etc/pointercal
}
nonfree_firmware() {
pkgdesc="WiFi Firmware"
depends="firmware-hisense-m470bsa"
mkdir "$subpkgdir"
}
sha512sums="b2435c033f88394c6702ce126a237d12e89e8368cfb001f26135f992f7b96726b005b039cd5a1eb0aedab59cdbcdb91aadc842aff8486a4e5d694d6d80a2289e deviceinfo
6a53747e22b530dcd52ca523017edf422b36bcd6616d7b0df0ba23f50de0f91dff63913ec6aab5051eebc131879c235cfb724aacefc90a10b94a1790985144ec modules-load.conf
8fcb7330a660995bb1aabf3fd2f3a3536fed79e9369bda115874151e84651839c59d134ac3ca0919eff0770ac51c934b252e7d544a26c076614f7f1d10bfd016 pointercal"

View file

@ -0,0 +1,34 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Hisense Sero 7 Pro"
deviceinfo_manufacturer="Hisense"
deviceinfo_codename="hisense-m470bsa"
deviceinfo_date=""
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="800"
deviceinfo_screen_height="1280"
deviceinfo_framebuffer_landscape="false"
deviceinfo_dev_touchscreen="/dev/input/event0"
deviceinfo_dev_touchscreen_calibration="/etc/pointercal"
deviceinfo_dev_keyboard=""
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="androidboot.selinux=enforcing"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_flash_offset_base="0x10000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1,6 @@
bcmdhd
cfg80211
lib80211
mac80211
raw_ip_net
scsi_wait_scan

View file

@ -0,0 +1 @@
66762 -983 -70772 479 66085 50192 65536 800 1280 0

View file

@ -0,0 +1,82 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/m470_v2_dopa1_defconfig
pkgname="linux-hisense-m470bsa"
pkgver=3.1.10
pkgrel=0
pkgdesc="Hisense Sero 7 Pro kernel fork"
arch="armv7"
_carch="arm"
_flavor="hisense-m470bsa"
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 gcc6 xz"
# 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="android_kernel_hisense_m470bsa"
_commit="7af4a85198eb80cdb6964bd0550f6f5ea722274c"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/dolorespark/${_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"
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
CFLAGS_MODULE=-fno-pic modules
}
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
echo "--[ Installing modules ]--"
install -Dm644 "$builddir/drivers/net/wireless/bcmdhd/bcmdhd.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/bcmdhd.ko"
install -Dm644 "$builddir/drivers/net/usb/raw_ip_net.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/raw_ip_net.ko"
install -Dm644 "$builddir/net/mac80211/mac80211.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/mac80211.ko"
install -Dm644 "$builddir/net/wireless/cfg80211.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/cfg80211.ko"
install -Dm644 "$builddir/net/wireless/lib80211.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/lib80211.ko"
install -Dm644 "$builddir/drivers/scsi/scsi_wait_scan.ko" \
"$pkgdir/lib/modules/3.1.10-postmarketos/scsi_wait_scan.ko"
}
sha512sums="e9089411df58f64e0cb1ff8c2027cc4262f6bc1bc3bedebcc69d8417c99ab24d1520f2668287ed79bd84f45bfd660dee5199271504ce574beb8d9c7d089ae651 linux-hisense-m470bsa-7af4a85198eb80cdb6964bd0550f6f5ea722274c.tar.gz
41d207963406161684d840cdfbdb35e5a5dc25c3a676b9dd8236b3f75feb80dafe6c7fab5a95905529aa8d9e2058873a1e3491d9fbbc85bef68b5d4f3f5a7960 config-hisense-m470bsa.armv7"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,29 @@
pkgname=firmware-hisense-m470bsa
pkgver=1
pkgrel=0
pkgdesc="Hisense Sero 7 Pro Firmware"
url="https://github.com/dolorespark/android_vendor_hisense_m470bsa"
arch="armv7"
license="proprietary"
# Source
_commit="42fbba77c06cf822021554ed1b0e4736dbce2e72"
source="https://github.com/dolorespark/android_vendor_hisense_m470bsa/archive/${_commit}.tar.gz"
options="!check !strip"
package() {
cd "$srcdir/android_vendor_hisense_m470bsa-${_commit}"
# Wifi
for _i in fw_bcmdhd.bin fw_bcmdhd_apsta.bin; do
install -Dm644 "prebuilt/vendor/firmware/bcm4330/$_i" \
"$pkgdir/lib/firmware/postmarketos/bcm4330/$_i"
done
for _fw in BCM20791B4_002.005.010.0103.0000_Hisense_I2CGED_NCD_Signed_Test.ncd BCM20791B4_002.005.010.0103.0000_Hisense_PreI2C_NCD_Signed_Test.ncd tlv320aic3206_fw_v1.bin; do
install -Dm644 "prebuilt/vendor/firmware/$_fw" \
"$pkgdir/lib/firmware/postmarketos/$fw"
done
install -Dm644 "prebuilt/etc/nvram_4330.txt" \
"$pkgdir/lib/firmware/postmarketos/nvram_4330.txt"
}
sha512sums="131f9bd8f50eae8df25f5857c775163a6d61e1e2a708b2a921c18a36d7b75d1075af82d927affe759e476932920e201da06100a9b975d116583c4401d84a8662 42fbba77c06cf822021554ed1b0e4736dbce2e72.tar.gz"