htc-m7: new device (HTC One M7) (!306)
usb networking works echo 100 > /sys/devices/platform/msm_fb.590593/leds/lcd-backlight/brightness cat /sys/devices/virtual/graphics/fb0/modes > /sys/devices/virtual/graphics/fb0/mode to get screen working [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
e4aa322e33
commit
1c4980bda5
8 changed files with 3960 additions and 0 deletions
23
device/device-htc-m7/APKBUILD
Normal file
23
device/device-htc-m7/APKBUILD
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-htc-m7"
|
||||
pkgdesc="HTC One M7"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-htc-m7 mkbootimg mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
|
||||
sha512sums="586d031213dc8d2f6ea01f5fd9a21aa54bff14839a9560a358fc9ef9736ba51e1d63fd904cba55caf0e8d6e2d7f88db3d31e877c4a6956be513bf4ee07d6199b deviceinfo"
|
33
device/device-htc-m7/deviceinfo
Normal file
33
device/device-htc-m7/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="HTC One M7"
|
||||
deviceinfo_manufacturer="HTC"
|
||||
deviceinfo_codename="htc-m7"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
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=none androidboot.hardware=qcom user_debug=31 buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x80600000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01800000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 1bedb739a7daf530d9b0005421b7326fba9afc45 Mon Sep 17 00:00:00 2001
|
||||
From: Tadeo Kondrak <me@tadeo.ca>
|
||||
Date: Thu, 28 Mar 2019 00:01:40 -0600
|
||||
Subject: [PATCH 1/2] don't hardcode cross_compile in makefile
|
||||
|
||||
---
|
||||
Makefile | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c51a0863..778b2490 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -194,8 +194,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
||||
export KBUILD_BUILDHOST := $(SUBARCH)
|
||||
ARCH ?= $(SUBARCH)
|
||||
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
|
||||
-ARCH := arm
|
||||
-CROSS_COMPILE := arm-eabi-
|
||||
|
||||
# Architecture as present in compile.h
|
||||
UTS_MACHINE := $(ARCH)
|
||||
--
|
||||
2.19.2
|
||||
|
41
device/linux-htc-m7/0002-change-lzop-9-to-lzop-6.patch
Normal file
41
device/linux-htc-m7/0002-change-lzop-9-to-lzop-6.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
From cefe3fe6b51ab2cae8b009c0a84c73e2bc32f1ce Mon Sep 17 00:00:00 2001
|
||||
From: Tadeo Kondrak <me@tadeo.ca>
|
||||
Date: Thu, 28 Mar 2019 00:08:23 -0600
|
||||
Subject: [PATCH 2/2] change lzop -9 to lzop -6
|
||||
|
||||
or else you get the error `lzop: high compression not compiled in` on
|
||||
busybox
|
||||
---
|
||||
scripts/Makefile.lib | 2 +-
|
||||
scripts/gen_initramfs_list.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 8e40f069..fc46f991 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -301,7 +301,7 @@ cmd_lzma = (cat $(filter-out FORCE,$^) | \
|
||||
|
||||
quiet_cmd_lzo = LZO $@
|
||||
cmd_lzo = (cat $(filter-out FORCE,$^) | \
|
||||
- lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
+ lzop -6 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
(rm -f $@ ; false)
|
||||
|
||||
quiet_cmd_lz4 = LZ4 $@
|
||||
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
|
||||
index 17fa9014..39d6f3b0 100644
|
||||
--- a/scripts/gen_initramfs_list.sh
|
||||
+++ b/scripts/gen_initramfs_list.sh
|
||||
@@ -254,7 +254,7 @@ case "$arg" in
|
||||
&& compr="xz --check=crc32 --lzma2=dict=1MiB"
|
||||
echo "$output_file" | grep -q "\.lzo$" \
|
||||
&& [ -x "`which lzop 2> /dev/null`" ] \
|
||||
- && compr="lzop -9 -f"
|
||||
+ && compr="lzop -6 -f"
|
||||
echo "$output_file" | grep -q "\.lz4$" \
|
||||
&& [ -x "`which lz4 2> /dev/null`" ] \
|
||||
&& compr="lz4 -l -9 -f"
|
||||
--
|
||||
2.19.2
|
||||
|
70
device/linux-htc-m7/APKBUILD
Normal file
70
device/linux-htc-m7/APKBUILD
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/cyanogenmod_m7_defconfig
|
||||
|
||||
pkgname="linux-htc-m7"
|
||||
pkgver=3.4.10
|
||||
pkgrel=0
|
||||
pkgdesc="HTC One M7 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="htc-m7"
|
||||
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"
|
||||
|
||||
# Compiler: latest GCC from Alpine
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_htc_m7"
|
||||
_commit="f6eb6496406f5a06cdd4716e494082d78df70e83"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
0001-don-t-hardcode-cross_compile-in-makefile.patch
|
||||
0002-change-lzop-9-to-lzop-6.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"
|
||||
}
|
||||
|
||||
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="7014029604b8c448c7d2d6302b9404521d89b12a3df687f3aee10e73cd49b3c31fbd5a3db92c082eeda93e0e83b00487d0ee5e6311f4f9fcb32a4eb139d0d231 linux-htc-m7-f6eb6496406f5a06cdd4716e494082d78df70e83.tar.gz
|
||||
11c41c63bc4002f85cb0e7a84902588c661d66ed11caef9a719151a92f779550c2805847ad8261a93edc0810ba5438e18f3594649a3da20274ba7b4f9125d0e8 config-htc-m7.armv7
|
||||
129e844aadc30b214ed41968b8a0246d21b224b3e7eecc8b056ec6cef122eb5dbdba3927d5db1499e7335211b74f8b38bf756fa48f099a87921e260d99eb27bc 0001-don-t-hardcode-cross_compile-in-makefile.patch
|
||||
526bf8554203b2cde43ccb145589f8f0114f06bbc335b8eb606ec1bb1849824f087cf362bf5ea4f0b84e660de5648fe753995a109ade7aaa11f2bf7ca48d233f 0002-change-lzop-9-to-lzop-6.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"
|
3766
device/linux-htc-m7/config-htc-m7.armv7
Normal file
3766
device/linux-htc-m7/config-htc-m7.armv7
Normal file
File diff suppressed because it is too large
Load diff
1
device/linux-htc-m7/gcc8-fix-put-user.patch
Symbolic link
1
device/linux-htc-m7/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
|
Loading…
Reference in a new issue