bq-vegetahd: new device (MR 4468)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Emanuele Sorce 2023-10-11 15:43:01 +02:00 committed by Pablo Correa Gómez
parent 616b3e14bb
commit 40db4c5962
No known key found for this signature in database
GPG key ID: 7A342565FF635F79
10 changed files with 3258 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-bq-vegetahd
pkgdesc="BQ Aquaris E5 HD"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-bq-vegetahd
mkbootimg
postmarketos-base
mtk-mkimage
"
makedepends="
devicepkg-dev
"
source="
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
575bca5e9012f045096a99e0c1ef617dde0002201856cecf37ebb222acfdd5b7d912e42b115e6ff80dfdeac7ad9d3e6d24a91d0c780cc8e5cd9a7c4a458a4dea deviceinfo
"

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="BQ Aquaris E5 HD"
deviceinfo_manufacturer="BQ"
deviceinfo_codename="bq-vegetahd"
deviceinfo_year="2014"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1280"
deviceinfo_screen_height="720"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="true"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x04000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"

View file

@ -0,0 +1,21 @@
Error:
armv7-alpine-linux-musleabihf-ld: drivers/built-in.o: in function `ipanic_mrdump_mini':
/home/pmos/build/src/android_kernel_bq_vegetahd-fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c:381: undefined reference to `ipanic_mem_write'
armv7-alpine-linux-musleabihf-ld: /home/pmos/build/src/android_kernel_bq_vegetahd-fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c:381: undefined reference to `ipanic_mem_write'
In fact the function was declared as inline, but later it was passed as argument to another function. C Inline functions have no address.
Declaring the affected functions as not inline should fix that.
diff --git a/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c b/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c
index 68b68f0e..fb925341 100644
--- a/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c
+++ b/drivers/misc/mediatek/aee/ipanic/ipanic_rom.c
@@ -295,7 +295,7 @@ inline int ipanic_next_write(fn_next next, void *data, int off, int total, int e
return ipanic_func_write(next, data, off, total, encrypt);
}
-inline int ipanic_mem_write(void *buf, int off, int len, int encrypt)
+int ipanic_mem_write(void *buf, int off, int len, int encrypt)
{
struct ipanic_memory_block mem_info = {
.kstart = (unsigned long)buf,

View file

@ -0,0 +1,28 @@
Error:
armv7-alpine-linux-musleabihf-ld: drivers/built-in.o: in function `bootup_finish':
/home/pmos/build/src/android_kernel_bq_vegetahd-fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1/drivers/misc/mediatek/mtprof/bootprof.c:111: undefined reference to `mt_disable_uart'
C Inline functions can't be extern. Maybe
diff --git a/kernel/printk.c b/kernel/printk.c
index 5f62f1f9..c815ce3c 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -275,7 +275,7 @@ static u32 log_buf_len = __LOG_BUF_LEN;
#ifdef CONFIG_MT_PRINTK_UART_CONSOLE
extern int mt_need_uart_console;
-inline void mt_disable_uart()
+void mt_disable_uart()
{
if (mt_need_uart_console == 0) {
printk("<< printk console disable >>\n");
@@ -284,7 +284,7 @@ inline void mt_disable_uart()
printk("<< printk console can't be disabled >>\n");
}
}
-inline void mt_enable_uart()
+void mt_enable_uart()
{
if (mt_need_uart_console == 1) {
if (printk_disable_uart == 0)

View file

@ -0,0 +1,26 @@
Error:
/home/pmos/build/src/android_kernel_bq_vegetahd-fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1/drivers/misc/mediatek/video/mt6582/dsi_drv.c:224: undefined reference to `__bad_udelay'
Source: https://github.com/Pablito2020/android_kernel_bq_vegetahd hfcmulti.c:800 :
ARM arch at least disallows a udelay of
more than 2ms... it gives a fake "__bad_udelay"
reference at link-time.
long delays in kernel code are pretty sucky anyway
for now work around it using 5 x 2ms instead of 1 x 10ms
diff --git a/drivers/misc/mediatek/video/mt6582/dsi_drv.c b/drivers/misc/mediatek/video/mt6582/dsi_drv.c
index 1bc264d9..6b6ad461 100644
--- a/drivers/misc/mediatek/video/mt6582/dsi_drv.c
+++ b/drivers/misc/mediatek/video/mt6582/dsi_drv.c
@@ -221,7 +221,11 @@ unsigned int custom_pll_clock_remap(int input_mipi_clock)
#endif
static void lcm_mdelay(UINT32 ms)
{
- udelay(1000 * ms);
+ udelay(200 * ms);
+ udelay(200 * ms);
+ udelay(200 * ms);
+ udelay(200 * ms);
+ udelay(200 * ms);
}
void DSI_Enable_Log(bool enable)
{

View file

@ -0,0 +1,69 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/alps_defconfig
pkgname=linux-bq-vegetahd
pkgver=3.10.49
pkgrel=0
pkgdesc="BQ Aquaris E5 HD kernel fork"
arch="armv7"
_carch="arm"
_flavor="bq-vegetahd"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
perl
linux-headers
xz
"
# Source
_repository="android_kernel_bq_vegetahd"
_commit="fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/Pablito2020/$_repository/archive/$_commit.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch
001-fix_inline_on_ipanic_rom.patch
002-fix_undefined_reference_to_mt_disable_uart.patch
003-fix_undefined_reference_to_bad_udelay.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
}
sha512sums="
9c6ad7fd482b17a372be01176de972d6016faf216504deb8571ae20087fcb383cf24ed66ee773993b99200649bf69b163d1c05e36fe52c97a0414698dd472e42 linux-bq-vegetahd-fc8ba1dc9fe42ee265d8dadcf6655a749a791ec1.tar.gz
f958fc782311b6401b0285bcdd0916b7b54fffd78ac5063d54ed9efc4e8b387c96482a78e30d3fea0a9d03231c95d5f0747c46e61925a633df5a6feed3389444 config-bq-vegetahd.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
93c961ff44ff4a77a9439ad604e465a046f78d9a57c87cb8ef587fbf49bd6ec5044440e0163c2a3c4f654af2cf34ca47d401aef4d476796207f6427d78d22fa5 001-fix_inline_on_ipanic_rom.patch
f3741832108d66d28b13dc7466859cf0a54a59ab6ffa670df214807bfbff9de90c46eaa7bb83f131900616bbbeff63e626dcccc312d0ce7c72d344ba0d3f622e 002-fix_undefined_reference_to_mt_disable_uart.patch
83f3299ae8af61923eb644c77a131689a78fc3f2e362cd20412d74229ea8530bb5680915f81fe99d135a327a9f43b1ff23a297fc946b7fefa1fdcdb2cc76d594 003-fix_undefined_reference_to_bad_udelay.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

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