[Q] Compiling 10.2 nightly *** [sub-make] Error 2 tf700t/arch/arm/mach-tegra/pm.c - Asus Transformer TF700

Hi Guys,
I keep getting an error while compiling cm 10.2 I have built 10.1 without problems, so I believe the build environment is ok. The error which I received is below. I have recieved this error with a debian 7.1 dist build environment and a ubuntu 13.04 dist. environment.
/home/david/android/kernel/asus/tf700t/arch/arm/mach-tegra/pm.c: In function 'tegra_pm_enter_resume':
/home/david/android/kernel/asus/tf700t/arch/arm/mach-tegra/pm.c:1086:50: error: inlining failed in call to always_inline 'read_pmc_wake_status': function body not available
/home/david/android/kernel/asus/tf700t/arch/arm/mach-tegra/pm.c:1094:58: error: called from here
make[3]: *** [arch/arm/mach-tegra/pm.o] Error 1
make[2]: *** [arch/arm/mach-tegra] Error 2
Anyone know a solution, I have been searching but not much luck in finding a solution.
thanks
Dave

Try this patch:
Code:
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -1084,7 +1084,7 @@ static int tegra_pm_enter_suspend(void)
return 0;
}
-extern inline u64 read_pmc_wake_status(void);
+extern u64 read_pmc_wake_status(void);
static void tegra_pm_enter_resume(void)
{
if (current_suspend_mode == TEGRA_SUSPEND_LP0)

Thanks Problem Solved
_that said:
Try this patch:
Code:
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -1084,7 +1084,7 @@ static int tegra_pm_enter_suspend(void)
return 0;
}
-extern inline u64 read_pmc_wake_status(void);
+extern u64 read_pmc_wake_status(void);
static void tegra_pm_enter_resume(void)
{
if (current_suspend_mode == TEGRA_SUSPEND_LP0)
Click to expand...
Click to collapse
Thanks. Build completed after updating pm.c with your patch suggestion.
Dave

Related

j4fs driver is now OpenSource

Big news for every hacker on Samsung devices! j4fs driver is now OpenSource Enjoy: http://bit.ly/jatK1c
Click to expand...
Click to collapse
http://romkitchen.org/sgs/?s=home
Someone care to explain the benefits, if any, of this? My understanding from what little i read is it will help with kernal development on a decent number of samsung devices.
Edit: as in should i be "super excited", "meh", or "cool beans".
second that question .. does this help us?
Would this driver be the one that controls download mode?
Sent from my GT-I9000 using XDA Premium App
Maybe this?
added: Should have checked supercurio's github
Samsung v1 GT-I9100 sources: [common] param.lfs/j4fs driver (communication with bootloader), now OpenSource, yay!
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
TRusselo said:
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
Click to expand...
Click to collapse
Sounds good to me.
Sent from my GT-I9000 using XDA Premium App
TRusselo said:
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
Click to expand...
Click to collapse
according to the post above you this may be the file system used for the bootloaders on the sgs2 so it would help those folks when hacking.
J4FS porting released
If someone is still interested I've just finished the porting of the J4FS on 3.1.x kernel adding support for normal "block device" (for loopback image mounting).
movitool.ntd.homelinux.org/trac/movitool/wiki/j4fs
Hope this can help...
Ceers
Nitro
And another tool (standalone) to extract j4fs/lfs images (eg. param.lfs).
Note: it only extracts - if you want to modify an image you'll have to use the kernel module from the post above (or a hexeditor and some cleverness).
https://github.com/ius/j4fs_extract
(for Googleability)
whiteguypl said:
http://romkitchen.org/sgs/?s=home
Someone care to explain the benefits, if any, of this? My understanding from what little i read is it will help with kernal development on a decent number of samsung devices.
Edit: as in should i be "super excited", "meh", or "cool beans".
Click to expand...
Click to collapse
dunno for what the driver/partition is used, had troubles (device freeze) with custom kernel an the original module from my GT-I9100 (ICS)
as note: device boots and working without the j4fs module in initramfs...
just for fun a little patch for kernel 3.0.15, just read operation tested.
Code:
Index: jv/llid_kernel.c
===================================================================
--- jv/llid_kernel.c (Revision 2075)
+++ jv/llid_kernel.c (Arbeitskopie)
@@ -95,7 +95,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->read() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->read() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
@@ -153,7 +153,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->write() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->write() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
Index: jv/j4fs_kernel.c
===================================================================
--- jv/j4fs_kernel.c (Revision 2075)
+++ jv/j4fs_kernel.c (Arbeitskopie)
@@ -10,7 +10,9 @@
* 2009.03 - Currently managed by SungHwan.yun <[email protected]> @[email protected]
*
*/
-#include <linux/smp_lock.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
#include <linux/time.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
@@ -53,6 +55,8 @@
#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)
+#define init_MUTEX(sema) sema_init(sema,1)
+
extern j4fs_device_info device_info;
extern unsigned int j4fs_traceMask;
extern unsigned int j4fs_rw_start;
@@ -234,7 +238,7 @@
T(J4FS_TRACE_FS, ("start j4fs_write_begin\n"));
if(to>PAGE_CACHE_SIZE) {
- T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%d,%d,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
+ T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%llu,%lu,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
j4fs_panic("page size overflow");
return -ENOSPC;
}
@@ -1221,7 +1225,7 @@
struct j4fs_sb_info * sbi;
struct j4fs_super_block * es;
struct inode *root;
- u32 tmp, len,ret;
+ u32 ret;
T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));
@@ -1322,11 +1326,11 @@
}
-int j4fs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *j4fs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
{
T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));
- return get_sb_bdev(fs_type, flags, dev_name, data, j4fs_fill_super, mnt);
+ return mount_bdev(fs_type, flags, dev_name, data, j4fs_fill_super);
}
struct kmem_cache * j4fs_inode_cachep;
@@ -1386,7 +1390,7 @@
struct file_system_type j4fs_fs_type = {
.owner = THIS_MODULE,
.name = "j4fs",
- .get_sb = j4fs_get_sb,
+ .mount = j4fs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
@@ -1416,9 +1420,16 @@
return -EINVAL;
}
-int j4fs_fsync(struct file *file, struct dentry *dentry, int datasync)
+static int j4fs_fsync(struct file *file, int datasync)
{
- return 0;
+ int rc = 0;
+
+ rc = generic_file_fsync(file, datasync);
+ if (rc)
+ goto out;
+ rc = vfs_fsync(file, datasync);
+out:
+ return rc;
}
int __init init_j4fs_fs(void)
Index: jv/j4fs.h
===================================================================
--- jv/j4fs.h (Revision 2075)
+++ jv/j4fs.h (Arbeitskopie)
@@ -167,6 +167,7 @@
#define J4FS_RECLAIM_RESET_UNUSED_SPACE
#define J4FS_TRANSACTION_LOGGING
+#undef T
#define T(mask, p) do { if ((mask) & (j4fs_traceMask | J4FS_TRACE_ALWAYS)) TOUT(p); } while (0)
#define POR(mask, p, q) do { if (((mask) & (j4fs_PORMask))&&!(--j4fs_PORCount)) {TOUT(p); while(1); }} while (0)
Index: jv/Makefile
===================================================================
--- jv/Makefile (Revision 2075)
+++ jv/Makefile (Arbeitskopie)
@@ -1,31 +1,5 @@
-##############################################################################
-# COPYRIGHT(C) : Samsung Electronics Co.Ltd, 2006-2011 ALL RIGHTS RESERVED
-# 2009.02 - Currently managed by JongMinKim <[email protected]> , SungHwanYun <[email protected]>
-##############################################################################
-# VERSION&DATE : Version 1.00 2009/02
-##############################################################################
+EXTRA_CFLAGS += -Wframe-larger-than=2048 -Wno-error=declaration-after-statement
-MOD_NAME = j4fs
+obj-$(CONFIG_J4FS) += j4fs.o
-ifneq ($(KERNELRELEASE), )
-
-EXTRA_CFLAGS += -I$(PRJROOT)/modules/include -I$(KDIR)/drivers/tfsr/Inc -I$(KDIR)/include -I$(KDIR)/include/linux -I$(KDIR)/include/asm -D__KERNEL
-
-obj-m := $(MOD_NAME).o
-
-$(MOD_NAME)-y := j4fs_kernel.o llid_kernel.o fsd_common.o
-
-else
-
-all:
- @$(MAKE) -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules
-
-clean:
- rm -f *.o *.ko *.mod.c *~ .*.cmd
-
-install:
- @$(MAKE) --no-print-directory -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules_install
-
-endif
+j4fs-objs := j4fs_kernel.o llid_kernel.o fsd_common.o

[Q] Compiling gcc and toolchain for use ON android device

Hello all. I have built the android-ndk-r9d toolchain on my Ubuntu machine, and it will compile a few things like nmap and perl just fine with some tweaking (I forgot the links but there are projects that give the options to use when compiling these). But I haven't seen any successful compilations of more recent versions of gcc with bionic.
I did some digging around in spartacus' terminal-ide project, the point of which is to have java, vim, gcc for use on the device itself, I found that gcc was version 4.4.0. I have tried to reach him via email to see what ./configure settings he used, but to no response.
Has anyone else attempted this, to build android gcc in versions more recent than 4.4.0 for compiling software on the device? What configure settings have you tried, and how much have you modified the gcc source code itself? Or is everyone content to build other projects using their regular Linux box?
My device in question is a nexus 5, which has more than enough CPU power to do this, to quell any concerns people will have to that end.
Well, I had a day free yesterday and tried everything again, and I believe I hit the same stopping point error after correcting several others. Only this time, I made an actual script and patchfiles to handle everything to make this more organized. Again has anyone attempted to do this?
First, the script.
Code:
#!/bin/bash
HOME_DIR=/home/jmanley
GCC_BUILD_DIR=$HOME_DIR/gcc-android-build
HOST=arm-linux-androideabi
CFLAGS='-Wall -O -mandroid -mbionic'
LIBCFLAGS='-O2 -mandroid -mbionic'
LIBCPPFLAGS='-O2 -mandroid -mbionic'
LIBCXXFLAGS='-O2 -mandroid -mbionic -fno-implicit-templates'
PREFIX=/data
TOOLCHAIN_DIR=$HOME_DIR/arm-linux-androideabi-4.8
SYSROOT=$TOOLCHAIN_DIR/sysroot
GCC_VERSION=4.9.0
MPFR_VERSION=3.1.2
GMP_VERSION=6.0.0a
RENAMED_GMP_VERSION=6.0.0
MPC_VERSION=1.0.2
LDFLAGS='-lc -ldl -lgcc -lm -static'
LIBS='-lc -ldl -lgcc -lm -lsupc++ -lgnustl_shared -lgmp'
CC=arm-linux-androideabi-gcc
CXX=arm-linux-androideabi-g++
LD=arm-linux-androideabi-ld
RANLIB=arm-linux-androideabi-ranlib
AR=arm-linux-androideabi-ar
STRIP=arm-linux-androideabi-strip
PATH=$TOOLCHAIN_DIR/bin:$PATH
cd $HOME_DIR
mkdir $GCC_BUILD_DIR
tar -jxf gcc-$GCC_VERSION.tar.bz2
cd $HOME_DIR/gcc-$GCC_VERSION
tar -jxf ../gmp-$GMP_VERSION.tar.bz2
mv gmp-$RENAMED_GMP_VERSION gmp
tar -jxf ../mpfr-$MPFR_VERSION.tar.bz2
mv mpfr-$MPFR_VERSION mpfr
tar -zxf ../mpc-$MPC_VERSION.tar.gz
mv mpc-$MPC_VERSION mpc
patch -Np0 -i $HOME_DIR/getpagesize-gcc.patch
patch -Np0 -i $HOME_DIR/mpfr-impl.patch
patch -Np0 -i $HOME_DIR/libcpp-files.patch
patch -Np0 -i $HOME_DIR/libcpp-macro.patch
cd $GCC_BUILD_DIR
../gcc-$GCC_VERSION/configure \
--prefix=$PREFIX --host=$HOST --disable-option-checking --disable-ld \
--enable-shared --enable-languages=c \
--disable-bootstrap -disable-gold --disable-fortran --disable-libssp \
--disable-libquadmath --disable-libquadmath-support --disable-libada \
--disable-multilib --disable-libgomp --disable-cloog --disable-werror \
--with-sysroot=$SYSROOT --disable-nls --disable-long-long
make
sudo make install
Second, the actual error in question.
Code:
../../../gcc-4.9.0/gmp/mpz/powm_ui.c:162: error: undefined reference to '__gmpn_invert_limb'
divrem_1.c:228: error: undefined reference to '__gmpn_invert_limb'
divrem_1.c:149: error: undefined reference to '__gmpn_invert_limb'
divrem_2.c:91: error: undefined reference to '__gmpn_invert_limb'
collect2: error: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/home/jmanley/gcc-android-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/jmanley/gcc-android-build'
make: *** [all] Error 2
Now, some of the patchfiles I made to fix previous errors. Is any of this recommended?
Code:
*** libiberty/getpagesize.c 2005-03-27 07:31:13.000000000 -0800
--- getpagesize.c 2014-07-13 14:59:40.270231633 -0700
***************
*** 60,71 ****
# endif /* PAGESIZE */
#endif /* GNU_OUR_PAGESIZE */
- int
- getpagesize (void)
- {
- return (GNU_OUR_PAGESIZE);
- }
-
#else /* VMS */
#if 0 /* older distributions of gcc-vms are missing <syidef.h> */
--- 60,65 ----
Code:
*** libcpp/files.c 2014-01-02 14:24:45.000000000 -0800
--- files.c 2014-07-13 19:09:23.685783988 -0700
***************
*** 716,726 ****
cpp_error (pfile, CPP_DL_WARNING,
"%s is shorter than expected", file->path);
file->buffer = _cpp_convert_input (pfile,
CPP_OPTION (pfile, input_charset),
buf, size + 16, total,
&file->buffer_start,
! &file->st.st_size);
file->buffer_valid = true;
return true;
--- 716,728 ----
cpp_error (pfile, CPP_DL_WARNING,
"%s is shorter than expected", file->path);
+ off_t ot = (off_t) file->st.st_size;
file->buffer = _cpp_convert_input (pfile,
CPP_OPTION (pfile, input_charset),
buf, size + 16, total,
&file->buffer_start,
! &ot);
! file->st.st_size = ot;
file->buffer_valid = true;
return true;
Code:
*** libcpp/macro.c 2014-02-18 22:05:55.000000000 -0800
--- macro.c 2014-07-13 19:55:27.751477291 -0700
***************
*** 250,256 ****
struct tm *tb = NULL;
struct stat *st = _cpp_get_file_stat (file);
if (st)
! tb = localtime (&st->st_mtime);
if (tb)
{
char *str = asctime (tb);
--- 250,260 ----
struct tm *tb = NULL;
struct stat *st = _cpp_get_file_stat (file);
if (st)
! {
! time_t tt = (time_t) st->st_mtime;
! tb = localtime (&tt);
! st->st_mtime = tt;
! }
if (tb)
{
char *str = asctime (tb);
Code:
*** mpfr/src/mpfr-impl.h 2013-03-13 08:37:36.000000000 -0700
--- mpfr-impl.h 2014-07-13 18:44:36.599599742 -0700
***************
*** 1135,1142 ****
#include <locale.h>
/* Warning! In case of signed char, the value of MPFR_DECIMAL_POINT may
be negative (the ISO C99 does not seem to forbid negative values). */
! #define MPFR_DECIMAL_POINT (localeconv()->decimal_point[0])
! #define MPFR_THOUSANDS_SEPARATOR (localeconv()->thousands_sep[0])
#else
#define MPFR_DECIMAL_POINT ((char) '.')
#define MPFR_THOUSANDS_SEPARATOR ('\0')
--- 1135,1142 ----
#include <locale.h>
/* Warning! In case of signed char, the value of MPFR_DECIMAL_POINT may
be negative (the ISO C99 does not seem to forbid negative values). */
! #define MPFR_DECIMAL_POINT ((char) '.')
! #define MPFR_THOUSANDS_SEPARATOR ('\0')
#else
#define MPFR_DECIMAL_POINT ((char) '.')
#define MPFR_THOUSANDS_SEPARATOR ('\0')

Please Help.. Uber Toolchain Setup.

All I am trying to do is simply get Uber Toolchain GCC 5.2 working on the ROM portion of a cm-12.1 build. I got it working on the kernel but every time I build the ROM I get an error. Posted below. Any help would be incredible. Thanks.
In file included from external/libcxx/include/algorithm:628:0,
from art/dalvikvm/dalvikvm.cc:21:
external/libcxx/include/memory: In member function 'virtual const void* std::__1::__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const std::type_info&) const':
external/libcxx/include/memory:3662:29: error: cannot use typeid with -fno-rtti
return __t == typeid(_Dp) ? &__data_.first().second() : 0;
^
external/libcxx/include/memory: In member function '_Dp* std::__1::shared_ptr<_Tp>::__get_deleter() const':
external/libcxx/include/memory:3942:73: error: cannot use typeid with -fno-rtti
{return (_Dp*)(__cntrl_ ? __cntrl_->__get_deleter(typeid(_Dp)) : 0);}
^
build/core/binary.mk:619: recipe for target '/home/zx64/android/system/out/target/product/bacon/obj/EXECUTABLES/dalvikvm_intermediates/dalvikvm..o' failed
make: *** [/home/zx64/android/system/out/target/product/bacon/obj/EXECUTABLES/dalvikvm_intermediates/dalvikvm..o] Error 1
make: *** Waiting for unfinished jobs....

GCC 5 for i9100/I9300/N7100

Hy guyz , i'm trying to compile ROM with uber 5.3.1 but it gave me this error:
Code:
target thumb C: libbacktrace <= system/core/libbacktrace/thread_utils.c
target StaticLib: libziparchive (/home/suzuki/cm13.0/out/target/product/i9300/obj/STATIC_LIBRARIES/libziparchive_intermediates/libziparchive.a)
target SharedLib: libexpat (/home/suzuki/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libexpat_intermediates/LINKED/libexpat.so)
target thumb C++: libui <= frameworks/native/libs/ui/Fence.cpp
frameworks/base/libs/androidfw/ResourceTypes.cpp: In member function 'android::status_t android::ResStringPool::setTo(const void*, size_t, bool)':
frameworks/base/libs/androidfw/ResourceTypes.cpp:571:28: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
^
cc1plus: all warnings being treated as errors
make: *** [/home/suzuki/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libandroidfw_intermediates/ResourceTypes.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/suzuki/cm13.0'
coul'd someone help me out with it? Thanks in advance
Edit: all i need is the files i need to change to make the toolchain work , i don't care how many they are
ok , so i found out that the error is in android_frameworks_base/libs/androidfw/ResourceTypes.cpp in the line
Code:
if ((mHeader->flags&ResStringPool_header::UTF8_FLAG &&
((uint8_t*)mStrings)[mStringPoolSize-1] != 0) ||
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
((uint16_t*)mStrings)[mStringPoolSize-1] != 0)) {
ALOGW("Bad string block: last string is not 0-terminated\n");
return (mError=BAD_TYPE);
can someone tell me how to fix it? thx in advance
Hello! I'm not much of a ROM Developer (I can only basically merge ROM sources and device-tree) but here's the original source code from AOSP, it might help :
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp
Line 561 onwards is where your error is
Hope I helped and again, I'm not a professional developer so don't expect too much from me
Jericho Arcelao said:
Hello! I'm not much of a ROM Developer (I can only basically merge ROM sources and device-tree) but here's the original source code from AOSP, it might help :
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp
Line 561 onwards is where your error is
Hope I helped and again, I'm not a professional developer so don't expect too much from me
Click to expand...
Click to collapse
Well it is the same line CM has to , but thanks anyway for trying at last
Most of the rom is compiling now by cherry-picking this , this and this, but now i'm stuck to this error
Code:
[COLOR="Green"]target SharedLib:[/COLOR] libhwconverter (/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/LINKED/libhwconverter.so)
/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/HardwareConverter.o:HardwareConverter.cpp:function HardwareConverter::HardwareConverter(): error: undefined reference to 'SecFimc::create(SecFimc::DEV, SecFimc::MODE, int)'
collect2: error: ld returned 1 exit status
make: *** [/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/LINKED/libhwconverter.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/rpdroky/cm13.0'
i guess this is the last one , hopefully someone can help me out with it
This is the problematic line is in /hardware/samsung/exynos4/hal/libhwconverter/HardwareConverter.cpp , if you remove this line , the rom will compile but i dont know if there are side efects by removeing it ...
Code:
{
SecFimc* handle_fimc = new SecFimc();
mSecFimc = (void *)handle_fimc;
if (handle_fimc->create(SecFimc::DEV_0, SecFimc::MODE_MULTI_BUF, 1) == false)
bHWconvert_flag = 0;
else
bHWconvert_flag = 1;
}
Edit: The camera is force closeing and some apps crash , all the rest works
Cheers :highfive:
Compile zimage gcc5-6
Compile zimage gcc5-6 n7100 Marshmalow
Build Omni Rom N7100 Marshmallow with ubergcc5.3.1 optimized
Kernel dtb.img for n7100 AOSP, CM13

Error while compiling Kernel from source (Mediatek)

So I was compiling kernel for my Meizu m2 note and I encountered this error :
Code:
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:99:26: warning: passing argument 1 of 'ioread32' makes pointer from integer without a cast
#define ISP_RD32(addr) ioread32(addr)
^
/home/suvam/RRMM/kernel/meizu/m2note/include/linux/printk.h:248:38: note: in expansion of macro 'ISP_RD32'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:87:37: note: in expansion of macro 'pr_debug'
#define LOG_DBG(format, args...) pr_debug(MyTag format, ##args)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:10828:3: note: in expansion of macro 'LOG_DBG'
LOG_DBG("0x%08X %08X", (unsigned int)(ISP_TPIPE_ADDR + 0x00a8), (unsigned int)ISP_RD32(ISP_ADDR + 0x00a8));
^
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: At top level:
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:175:22: warning: 'g_isp_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:176:22: warning: 'g_isp_inner_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_inner_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:177:22: warning: 'g_imgsys_config_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_imgsys_config_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'compat_put_isp_read_register_data':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:8407:6: warning: 'err' is used uninitialized in this function [-Wuninitialized]
err |= get_user(count, &data->Count);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_DONE_Buf_Time.isra.4':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:5522:49: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
pstRTBuf->ring_buf[i_dma].img_cnt = sof_count[out];
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_Buf_CTRL_FUNC':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:4447:34: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
deque_buf.sof_cnt = sof_count[out];
^
LD drivers/misc/mediatek/mach/mt6735/built-in.o
LD drivers/misc/mediatek/mach/built-in.o
make[4]: *** [drivers/misc/mediatek] Error 2
make[3]: *** [drivers/misc] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/suvam/RRMM/kernel/meizu/m2note'
make: *** [TARGET_KERNEL_BINARIES] Error 2
#### make failed to build some targets (09:32 (mm:ss)) ####
Can somebody please help me out ?

Categories

Resources