wiko-lenny2: new device (Wiko Lenny 2) (!773)
This commit is contained in:
parent
729d4f9e7b
commit
bb49d85ca8
17
device/device-wiko-lenny2/APKBUILD
Normal file
17
device/device-wiko-lenny2/APKBUILD
Normal file
|
@ -0,0 +1,17 @@
|
|||
pkgname="device-wiko-lenny2"
|
||||
pkgdesc="Wiko Lenny 2"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-wiko-lenny2 mkbootimg mesa-dri-swrast"
|
||||
source="deviceinfo"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir"/deviceinfo \
|
||||
"$pkgdir"/etc/deviceinfo
|
||||
}
|
||||
|
||||
sha512sums="9786dbf5aeeb7ad8df26f266f3db8b0d5c2e761cbd153ab59c8d530894a0cbdcbcec07676df065d5f187d1cb3a84e7d21b9a276dd613a6e73e00028797c5d390 deviceinfo"
|
32
device/device-wiko-lenny2/deviceinfo
Normal file
32
device/device-wiko-lenny2/deviceinfo
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Wiko Lenny 2"
|
||||
deviceinfo_manufacturer="Wiko"
|
||||
deviceinfo_codename="wiko-lenny2"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="480"
|
||||
deviceinfo_screen_height="864"
|
||||
deviceinfo_dev_touchscreen="/dev/event3"
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="bootopt=64S3,32S1,32S1"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x04000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x0e000000"
|
||||
deviceinfo_flash_pagesize="2048"
|
80
device/linux-wiko-lenny2/APKBUILD
Normal file
80
device/linux-wiko-lenny2/APKBUILD
Normal file
|
@ -0,0 +1,80 @@
|
|||
# Maintainer: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/s5030_defconfig
|
||||
|
||||
pkgname="linux-wiko-lenny2"
|
||||
pkgver=3.10.72
|
||||
pkgrel=0
|
||||
pkgdesc="Wiko Lenny 2 downstream kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="wiko-lenny2"
|
||||
_config="config-wiko-lenny2.armv7"
|
||||
_commit="204adbdcc01951c8eb33fc8b5543320f760bd3e3"
|
||||
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 gcc4"
|
||||
|
||||
# Compiler: GCC 4 (doesn't compile when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc4-" ]; then
|
||||
CC="gcc4-$CC"
|
||||
HOSTCC="gcc4-gcc"
|
||||
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
source="$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/linux-wiko-lenny2/archive/$_commit.tar.gz
|
||||
don't-use-out-of-tree-vendor-tinno.patch
|
||||
fix-paths.patch
|
||||
fix-busybox-sh-compatibility.patch
|
||||
use-gnu89-explicitly.patch
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
mkdir KERNEL_OBJ
|
||||
cp "$srcdir/$_config" "$builddir"/KERNEL_OBJ/.config
|
||||
|
||||
yes "" | make -C "$builddir" ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
O="$builddir"/KERNEL_OBJ oldconfig
|
||||
}
|
||||
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
||||
O="$builddir"/KERNEL_OBJ
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/KERNEL_OBJ/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/KERNEL_OBJ/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="1d99e56624c28d6f5336edda26edbc21bd62803a0d31143bd6c61506f245a6f9682f2a5135a63abbf0c9339eb6fda8510a01ae907f88dcb1b775f3b17e91d9de linux-wiko-lenny2-204adbdcc01951c8eb33fc8b5543320f760bd3e3.tar.gz
|
||||
a88df2c0be9bcc26c738436036750c195986a5eda47529604cc4dd2ca0423e55ac6ae12031ec5553df244b7dc5d4ca8507a79568bf5af2ff27c4740a2f96865f don't-use-out-of-tree-vendor-tinno.patch
|
||||
5a96db8474cdb9f7704c7b30cdf426d3f37b7a5f5d172eeebeb434bdb943555c0abd26ed63531855a7ef1122b7a8c1ef394539f8685a5da15f036f47e3a40564 fix-paths.patch
|
||||
9d5cbfb3fa0d076ae090778f4a80c172c296b71eca55bad69b25ecc6bd5658e38bcb53b7483b43066b21907bcb770974a2639983cb1ff59bb24f3fc429fc71d4 fix-busybox-sh-compatibility.patch
|
||||
7674bf62ce6ac7a6cffa9468d464ed66448b72fdae95023895992a2127c107b9914e1453a1e8913ed4a62416c12ea40a54095da9c581a265c0c08476449de20d use-gnu89-explicitly.patch
|
||||
8442eb8df3177de0db1be818ae32bfa8e6d0906146d9b1a2567b18143d891ffacb9176d1d2954c31cb90370b9fd5f74e6b98369e4036cdf30d9ae4ced9d5284e config-wiko-lenny2.armv7"
|
3346
device/linux-wiko-lenny2/config-wiko-lenny2.armv7
Normal file
3346
device/linux-wiko-lenny2/config-wiko-lenny2.armv7
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,44 @@
|
|||
Author: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
||||
|
||||
No, mediatek, I don't wanna lunch.
|
||||
|
||||
This patch fixup this kind of error:
|
||||
|
||||
cat: can't open '/home/pmos/build/src/linux-wiko-lenny2-204adbdcc01951c8eb33fc8b5543320f760bd3e3/../build.ini': No such file or directory
|
||||
/home/pmos/build/src/linux-wiko-lenny2-204adbdcc01951c8eb33fc8b5543320f760bd3e3/drivers/misc/mediatek/Makefile.custom:11: --PROJECT_NAME -is null--please--do--lunch------
|
||||
|
||||
They are repeated a large number of time.
|
||||
png: https://gitlab.com/postmarketOS/pmaports/uploads/d4d2495df6d8b4e96dca35f5233597aa/photo_2019-12-01_10-15-11.jpg
|
||||
|
||||
diff --git a/drivers/misc/mediatek/Makefile.custom b/drivers/misc/mediatek/Makefile.custom
|
||||
index c27618ab..c16f4c53 100755
|
||||
--- a/drivers/misc/mediatek/Makefile.custom
|
||||
+++ b/drivers/misc/mediatek/Makefile.custom
|
||||
@@ -5,27 +5,6 @@ ARCH_MTK_PROJECT := $(subst ",,$(CONFIG_ARCH_MTK_PROJECT))
|
||||
MTK_CUSTOM_PATH := $(srctree)/drivers/misc/mediatek
|
||||
|
||||
|
||||
-#guomingyi20150127add start.
|
||||
-PROJECT_NAME := $(strip $(subst ro.project =,,$(shell cat $(PWD)/../build.ini |grep ^ro.project)))
|
||||
-ifeq ($(strip $(PROJECT_NAME)),)
|
||||
- $(warning --PROJECT_NAME -is null--please--do--lunch--$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)---)
|
||||
-endif
|
||||
-NEW_MAKE_FILE := $(PWD)/../vendor/tinno/$(ARCH_MTK_PROJECT)/$(PROJECT_NAME)/cust_kcfg/Makefile
|
||||
-ifneq ($(wildcard $(NEW_MAKE_FILE)),)
|
||||
- include $(NEW_MAKE_FILE)
|
||||
-endif
|
||||
-
|
||||
-# For cust_battery_meter_table.h cust_battery_meter.h
|
||||
-CUST_PROJECT_DIR := $(PWD)/../vendor/tinno/$(ARCH_MTK_PROJECT)/$(PROJECT_NAME)
|
||||
-ifneq ($(wildcard $(CUST_PROJECT_DIR)/kernel/power/cust_*.h),)
|
||||
- ccflags-y += -I$(CUST_PROJECT_DIR)/kernel/power
|
||||
- $(warning ---~~~~~$(CUST_PROJECT_DIR)/kernel/power/cust_*.h------exit~~~~~~~)
|
||||
-endif
|
||||
-#guomingyi20150127 add end.
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
ifneq ($(CONFIG_ARM64), y)
|
||||
# For arm32, mach folder
|
||||
MTK_PLATFORM_PATH_ROOT := $(srctree)/arch/arm/mach-$(MTK_PLATFORM)
|
19
device/linux-wiko-lenny2/fix-busybox-sh-compatibility.patch
Normal file
19
device/linux-wiko-lenny2/fix-busybox-sh-compatibility.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
commit a6c7d0f4d5d1e17121a9c91aa10289a86d2fbfc8
|
||||
Author: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
||||
Date: Wed Nov 27 02:22:56 2019 +0100
|
||||
|
||||
busybox sh adaptation
|
||||
|
||||
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
|
||||
index 32b10f53..27cbbbc3 100755
|
||||
--- a/scripts/link-vmlinux.sh
|
||||
+++ b/scripts/link-vmlinux.sh
|
||||
@@ -105,7 +105,7 @@ sortextable()
|
||||
}
|
||||
|
||||
# Delete output files in case of error
|
||||
-trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM ERR
|
||||
+trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM
|
||||
cleanup()
|
||||
{
|
||||
rm -f .old_version
|
19
device/linux-wiko-lenny2/fix-paths.patch
Normal file
19
device/linux-wiko-lenny2/fix-paths.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
commit d44b9ce183b40505e95e784cc67054890f946ffd
|
||||
Author: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
||||
Date: Wed Nov 27 02:18:46 2019 +0100
|
||||
|
||||
fix bad path
|
||||
|
||||
diff --git a/drivers/misc/mediatek/gpu/mt6580/mali/mali/Kbuild b/drivers/misc/mediatek/gpu/mt6580/mali/mali/Kbuild
|
||||
index d3176cb4..4291be00 100755
|
||||
--- a/drivers/misc/mediatek/gpu/mt6580/mali/mali/Kbuild
|
||||
+++ b/drivers/misc/mediatek/gpu/mt6580/mali/mali/Kbuild
|
||||
@@ -201,7 +201,7 @@ endif
|
||||
ccflags-y += -DSVN_REV_STRING=\"$(DRIVER_REV)\"
|
||||
|
||||
VERSION_STRINGS :=
|
||||
-VERSION_STRINGS += API_VERSION=$(shell cd $(DRIVER_DIR); grep "\#define _MALI_API_VERSION" $(FILES_PREFIX)include/linux/mali/mali_utgard_uk_types.h | cut -d' ' -f 3 )
|
||||
+VERSION_STRINGS += API_VERSION=$(shell cd $(DRIVER_DIR); grep "\#define _MALI_API_VERSION" $(PWD)/drivers/misc/mediatek/gpu/mt6580/mali/mali/include/linux/mali/mali_utgard_uk_types.h | cut -d' ' -f 3 )
|
||||
VERSION_STRINGS += REPO_URL=$(REPO_URL)
|
||||
VERSION_STRINGS += REVISION=$(DRIVER_REV)
|
||||
VERSION_STRINGS += CHANGED_REVISION=$(CHANGED_REVISION)
|
29
device/linux-wiko-lenny2/use-gnu89-explicitly.patch
Normal file
29
device/linux-wiko-lenny2/use-gnu89-explicitly.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
Author: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
||||
Date: Wed Nov 27 01:21:35 2019 +0100
|
||||
|
||||
applied patch to use gnu89 standard explicitly.
|
||||
I needed to do so manually because the makefile is changed by downstream.
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 917f5c50..68453b1a 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -241,7 +241,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||
+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
|
||||
HOSTCXXFLAGS = -O2
|
||||
|
||||
# Decide whether to build built-in, modular, or both.
|
||||
@@ -374,7 +374,8 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-Werror-implicit-function-declaration \
|
||||
-Wno-format-security \
|
||||
-fno-delete-null-pointer-checks \
|
||||
- -Werror=format -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
|
||||
+ -Werror=format -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast \
|
||||
+ -std=gnu89
|
||||
|
||||
KBUILD_AFLAGS_KERNEL :=
|
||||
KBUILD_CFLAGS_KERNEL :=
|
Loading…
Reference in New Issue
Block a user