Skip to content
Snippets Groups Projects
Commit 6efece91 authored by Emanuele Sorce's avatar Emanuele Sorce
Browse files

bq-vegetahd: new device

parent 72e55aae
No related branches found
No related tags found
No related merge requests found
Showing
with 3268 additions and 0 deletions
# 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
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
b83f025c34a772b8bbc5db64c11718feaa4cf2dc0f81b540700d3ee11668ce23a43bcdb5db587fee03e058a7f1d0d205db05c7809c72dce70e7a7c720fb1484e deviceinfo
03cab135b4d8d249724a36e30af94404ad56fb14f30819838a2fa35a84ec4f65152a72db7534c97fcfe0aa4de16c112f556f799f66ec8134f76aba84efc3eafa modules-initfs
"
# 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_dtb=""
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_kernel_cmdline=""
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"
# Remove this comment after reading, or the file if unnecessary
# This file can contain a list of modules to be included in the initramfs,
# so that they are available in early boot stages. It should have one
# module name per line. If there are multiple kernel variants with different
# requirements for modules into the initramfs, one modules-initfs.$variant
# file should be created for each of them.
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,
\ No newline at end of file
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)
\ No newline at end of file
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)
{
# 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
"
This diff is collapsed.
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
\ No newline at end of file
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
\ No newline at end of file
../../.shared-patches/linux/gcc8-fix-put-user.patch
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment