[Q] Cross-compiling Percy .cc files for Android phone - Android Software/Hacking General [Developers Only]

Hi,
I am struggling cross-compiling the Percy++ (percy.sourceforge.net/readme.php) for android phones that mainly require some other libraries to be included i.e. libgcrypt, socket++ etc. I can create the toolchain using android NDK with the following options 'android-17', 'ARM-based', 'linux-x86_64', and 'arm-linux-androideabi-4.8'. After I try to compile one of the required libraries, it gives me the following error:
arm-linux-androideabi-gcc --sysroot=/path-to-built-toolchain/sysroot
-I../include
-I. -march=armv7-a -c MakeDescAux.c
-I. -march=armv7-a -march=armv7-a -o MakeDesc MakeDesc.c MakeDescAux.o
-lm
./MakeDesc
./MakeDesc: 1: ./MakeDesc: Syntax error: word unexpected (expecting ")")
make[1]: *** [setup1] Error 2
make[1]: Leaving directory 'src'
> make: *** [all] Error 2
The reason that during the compilation, it creates some .exe files that are run during the compilation time on the desktop machine and they simply do not run, since these files have been compiled for another target i.e. android phone.
I want to create the .exe file out of the Percy installation. My question is; do I need some different linker or different linker settings, different LDFLAGS/CFLAGS/CPPFLAGS etc.? Is there any other way to compile the Percy without cross-compiling the required libraries? although I have tried with statically including the required libraries using the 'LOCAL_STATIC_LIBRARIES' option, but that also does not work. I think that the required libraries should be compiled before they are statically included to your main installation software. Any help in this regard is highly appreciated. Thanks.

Related

Empty output jar error?

For some strange reason, whenever I compile CyanogenMod I run into this error: Error: The output jar is empty. Did you specify the proper '-keep' options?
This is the terminal output from above that:
Code:
target Dex: DeskClockTests
Copying: out/target/common/obj/APPS/DeskClockTests_intermediates/progaurd.classes.dex
target Package: DeskClockTests (out/target/product/sunfire/obj/APPS/DeskClockTests_intermediates/package.apk)
'out/target/common/obj/APPS/DeskClockTests_intermediates//classes.dex' as 'classes.dex'...
Copying: out/target/common/obj/APPS/DockAudio_intermediates/emma_out/lib/classes-jarjar.jar
Proguard: out/target/common/obj/APPS/DockAudio_intermediates/proguard.classes.jar
ProGuard, version 4.4
Reading program jar [/home/mike/android/system/out/target/common/obj/APPS/DockAudio_intermediates/classes.jar]
Reading library jar [/home/mike/android/system/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar]
Reading library jar [/home/mike/android/system/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar]
Reading library jar [/home/mike/android/system/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar]
Reading library jar [/home/mike/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar]
Error: The output jar is empty. Did you specify the proper '-keep' options?
make: *** [out/target/common/obj/APPS/DockAudio_intermediates/proguard.classes.jar] Error 1
From what I understand, it is an issue with ProGuard not knowing what to do with an empty .jar file? Does anyone know a way I can bypass this, by either telling ProGuard to skip it or just not compiling that file?
bump... i really need help with this and Google can't help me out.
In the Android.mk file for that project, add "LOCAL_PROGUARD_ENABLED := disabled" to prevent ProGuard from optimizing it.

[Q] conflict between android and linux "chroot' kernel

Hi its me again
I try to install my wireless key "based chipset RTL8187" under backtrack "chroot", but without success, believe in me, I had to go and solve a lot of problems in the "chroot" although I'm almost nil in linux, but now I'm stuck with this problem for several days, following a lot of tutorials here and elsewhere, I show you a few lines of command to develop;
[email protected]:~# modprobe rtl8187
FATAL: Could not load /lib/modules/3.1.10-10.6.1.15.3/modules.dep: No such file or directory
Click to expand...
Click to collapse
trying to install the driver
ifconfig wlan0 down
rmmod r8187 rtl8187 2>/dev/null
wget http://dl.aircrack-ng.org/drivers/rtl8187_linux_26.1010.zip
unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.27.patch
wget http://patches.aircrack-ng.org/rtl8187_2.6.32.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.27.patch
patch -Np1 -i rtl8187_2.6.32.patch
make
make install
make -C /lib/modules/3.1.10-10.6.1.15.3/build M=/sdcard/BT5/rtl8187L_linux_1041.0209.2012/rtl8187 CC=gcc modules
make[1]: Entering directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make: *** [modules] Error 2
make -C /lib/modules/3.1.10-10.6.1.15.3/build M=/sdcard/BT5/rtl8187L_linux_1041.0209.2012/rtl8187 CC=gcc modules
make[1]: Entering directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make: *** [modules] Error 2
Click to expand...
Click to collapse
when I search for Linux realise
[email protected]:~# uname -a
Linux localhost 3.1.10-10.6.1.15.3 #1 SMP PREEMPT Wed May 1 13:26:11 CEST 2013 armv7l GNU/Linux
Click to expand...
Click to collapse
when I search for Linux headers
[email protected]:~# dpkg -l |grep header
ii foremost 1.5.7-bt0 A console program to recover files based on their headers, footers, and internal data structures.
ii libpcap0.8-dev 1.0.0-6 development library and header files for libpcap0.8
ii libssl-dev 0.9.8k-7ubuntu8.6 SSL development libraries, header files and documentation
ii linux-headers-2.6.31-607-imx51 2.6.31-607.13 Linux kernel headers for version 2.6.31 on I.MX51-based systems
ii linux-headers-2.6.32-204 2.6.32-204.16 Header files related to linux-mvl-dove kernel version 2.6.32
ii linux-headers-2.6.32-204-dove 2.6.32-204.16 Linux kernel headers for version 2.6.32 on dove-based systems
ii linux-headers-2.6.33-500 2.6.33-500.6 Header files related to linux-ti-omap kernel version 2.6.33
ii linux-headers-2.6.33-500-omap 2.6.33-500.6 Linux kernel headers for version 2.6.33 on OMAP3-based systems
ii linux-headers-dove 2.6.32.204.7 Generic Linux kernel headers
ii linux-headers-imx51 2.6.31.607.8 Linux kernel headers for imx51 machines
ii linux-headers-omap 2.6.33.500.2 Linux kernel headers -- omap
Click to expand...
Click to collapse
but there is no linux-headers-3.1.10-10.6.1.15.3
Also i installed module-assistant_0.11.6_all.deb and ran this command:
[email protected]:~# su -c 'm-a update && m-a prepare'
Updated infos about 42 packages
Getting source for kernel version: 3.1.10-10.6.1.15.3
apt-get install linux-headers-3.1.10-10.6.1.15.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package linux-headers-3.1.10-10.6.1.15.3
apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
Click to expand...
Click to collapse
but no luck
I know that 3.1.10-10.6.1.15.3 kernel comes from the android Os, so it doesn't exist in the image of backtrack,
what can I do please !! and is there any way to get it work under Android instead of internal wifi ....thanks
what a deception

[Q] [Q&A]problems when build android-5.1.1_r2

Hello, everyone,
I'm using Ubuntu14.0.4 virtualbox virtual machine, the memory size is set as 2G. I set two more virtual disks(/disk_2nd for source code download, /disk_3rd for build output and the directory is android_out).
Java version is openjdk7 as required by android official website.
Git was rebuilt for openssl because of gnutls_handshake error during downloading source code.
I had met the problem caused by small swap so that I already set a new 8G swap partion(not swapfile).
Now I meet two problems during build the android-5.1.1_r2. I searched from web but can't find answer(looks someone met same problem but no answer). If someone can help, it will be very great. Thank you very much.
--------------------------------------------------------------------------------------------------------
1.
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: /disk_3rd/android_out/androidsource/host/linux-x86/obj32/SHARED_LIBRARIES/libjavacore_intermediates/luni/src/main/native/android_system_OsConstants.o: file is empty
libcore/luni/src/main/native/Register.cpp:36: error: undefined reference to 'register_android_system_OsConstants(_JNIEnv*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2.
target Strip: libwebviewchromium (/disk_3rd/android_out/androidsource/target/product/generic/obj/lib/libwebviewchromium.so)
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-strip:/disk_3rd/android_out/androidsource/target/product/generic/symbols/system/lib/libwebviewchromium.so: File format not recognized
make: *** [/disk_3rd/android_out/androidsource/target/product/generic/obj/lib/libwebviewchromium.so] error 1
make: *** Waiting for unfinished work .....( It could be not exact the same words because I translate it from Chinese)

[GUIDE] How to compile kernel for Xperia E3.

This guide is focused on xperia e3 but for other devices process will be simler too.
This guide is not in good shape now i will keep improving it and making it easier and better.
if xperia e3 don,t have too many developers then become one.
Requirements
linux os. -recommended ubuntu 14.04 LTS
(you can install ubuntu on virtualbox or dual boot ubuntu with windows)
cross compiler tool chain -recomended Linaro GCC 4.9.3 optimized for arm-cortex_a7
kernel source code. download it from sony or you can compile my nitrogen kernel only if you have D2212/02 recomended.
unlocked bootloader
tools for building boot.img Download HERE
Sony Kernel
D2202/12 DOWNLOAD
D2203/06/43 DOWNLOAD
Nitrogen Kernel
D2202/12/03/06/43 DOWNLOAD
config for lte varriants is not uploaded but u may find it in your device /proc/config.gz
extarct config from config.gz and rename it to Nitrogen_lte_defconfig and put it in
<kernel source folder>/arch/arm/config/<here>
Setting up Environment in Ubuntu.
boot up ubuntu and open Home directory.
create two new folder.
one with name "toolchain"
one with name "build"
now extract your toolchain to toolchain folder it must contain these folders
Code:
arm-cortex_a7-linux-gnueabihf
bin
include
lib
libexec
share
(depends on toolchain you have)
Extracting Nitrogen source code
if you downloaded zip then extract that zip home dir.
then rename flamingo-kernel folder to kernel
else you can use these commands
Code:
sudo apt-get update
sudo apt-get install git
then
Code:
git clone https://github.com/vinay94185vinay/Flamingo-kernel.git
after that rename flamingo kernel to kernel.
How to extract sony source code
open terminal type
Code:
tar -xjvf
then drag n drop source code file
then hit enter. (it will extract files in home firectory)
open your firmware number folder. eg: 18.5.C.0.19
delete extarnal folder then move/copy "kernel" folder to home dir.
and then extract build tools to build folder.
Compiling.
open an terminal (CTRL+ALT+T) and type
Code:
cd Kernel
(this will change directory to kernel folder.)
then type
Code:
export CROSS_COMPILE=[COLOR="Green"]~/toolchain/bin/[/COLOR][COLOR="Red"]arm-cortex_a7-linux-gnueabihf-[/COLOR]
(red line depend on tool chain and green line on it,s location)
how to find correct red line for toolchain.
open toolchain folder
then bin
in my case it contains files like
arm-cortex_a7-linux-gnueabihf-addr2line
arm-cortex_a7-linux-gnueabihf-ar
arm-cortex_a7-linux-gnueabihf-as
see all files contains that red line.
now you must understood how to know that line.
for sony kernel source code type
For D2202 and D2212
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8226ds_dp_defconfig[/COLOR]
For D2203 and D2206 and D2243
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8926ss_dp_defconfig[/COLOR]
"RED" line make sure that you compile kernel for arm based cpu that is in your android device
if you remove this line you will end up making a kernel for your pc.
"GREEN" is to load an preset default configuration for compiling kernel
it contains what thing,s has to be compiled in this kernel.
for nitrogen kernel source code type
D2202 and D2212
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
D2203 and D2206 and D2243
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_lte_defconfig
Now type for dualcore cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE [COLOR="red"]-j3[/COLOR]
"red" -j3 tell,s compiler to make 3 job,s which is good for intel dual core cpu.
if you have dual core amd cpu it should be better for you to have 2 job,s mean -j2
and -j4 for quard core.
for quard core cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j5
(do it like this cores + 1)
now wait for untill your kernel get compiled.
it may take long time. depend on how fast and how many cores your cpu have.
if you don,t get any error then
you have compiled your kernel :good:.
building boot.img
copy zimage from kernel/arch/arm/boot folder.
to build/msm8226_flamingo/<zimage>
now in msm8226_flamingo folder.
open new_stock_files/<according to your device>/
copy ramdisk. and dt.img to msm8226_flamingo folder.
now open terminal (CTRL+ALT+T) and type
Code:
cd build/msm8226_flamingo/
then
Code:
./makeit.sh
(don,t forget dot.)
now you can see boot.img in build/msm8226_flamingo folder.
now you can flash boot.img with fastboot or flashtool.
feel free to ask if you don,t understand or have error in any step.
RESERVED
adding features.
adding your and kernel name in kernel version.
adding kernel name
in kernel folder you will see Makefile open and edit it.
find these lines.
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=Red]EXTRAVERSION = [/COLOR]
NAME = Saber-toothed Squirrel
write name of kernel next to extraversion (highlited in red)
like this
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=red]EXTRAVERSION = -My_Kernel[/COLOR]
NAME = Saber-toothed Squirrel
adding your name.
open kernel/scripts
edit file called mkcompile_h
find lines like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]build_admin`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=green] ubuntu_builder`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
change red one to your name and green one to your host it will look like this in kernel version.
build_admin@ubuntu_builder
change it like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]my_name`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=red] i_compiled_on[/COLOR]`
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
adding governors and i/o sheduer
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
fixing error.
#1
if you get error with line
Code:
[-Werror=implicit-function-declaration]
like this one
Code:
CC drivers/video/msm/mdss/mdss_dsi_host.o
CC drivers/video/msm/mdss/mdss_dsi_cmd.o
CC drivers/video/msm/mdss/mdss_dsi_panel.o
drivers/video/msm/mdss/mdss_dsi_panel.c: In function ‘mdss_dsi_panel_reset’:
drivers/video/msm/mdss/mdss_dsi_panel.c:291:3: error: implicit declaration of function ‘mdss_dsi_request_gpios’ [COLOR="Red"][-Werror=implicit-function-declaration][/COLOR]
rc = mdss_dsi_request_gpios(ctrl_pdata);
^
cc1: some warnings being treated as errors
make[4]: *** [drivers/video/msm/mdss/mdss_dsi_panel.o] Error 1
make[3]: *** [drivers/video/msm/mdss] Error 2
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
then open makefile in kernel folder and find line
Code:
CFLAGS_KERNEL =
and make it like this
Code:
CFLAGS_KERNEL = -w
then save and exit you will not see that error again.
I will try it
Thanks bro
arpit.j said:
I will try it
Thanks bro
Click to expand...
Click to collapse
export command was incorrect.
i fixed it and added details of it.
hi,
guy,s some info here.
if you compile nitrogen kernel from source code it will give you some extra features that i added in source code after release of Nitrogen 4.1.
nitrogen kernel source code have
- prima wifi drivers
- headset in high performance mode
- zzmove governor
- 30% faster input output
- enhance power efecency with series of NVIDIA patches
- some tweaks for ASoc
- Enabled TCP Congestions like high speed,westwood etc.
if you want these features then compile kernel from source.
i will keep adding features to source code
only D2202 and D2212 is supported.
Don,t forget the poll at top of thread.
any on making any kernel.
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
pjk11 said:
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
Click to expand...
Click to collapse
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
vinay said:
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
Click to expand...
Click to collapse
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
pjk11 said:
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
Click to expand...
Click to collapse
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
vinay said:
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
Click to expand...
Click to collapse
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
pjk11 said:
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
Click to expand...
Click to collapse
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
vinay said:
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
Click to expand...
Click to collapse
Thank you very much, Vinay.
Regards
guide updated.
added link to a guide about adding features to your kernel
if you wan,t to learn anything more just ask me..
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
himfa71 said:
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
Click to expand...
Click to collapse
nothing will happen after that command actually it tells terminal $CROSS_COMPILE is equal to home/username/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
himfa71 said:
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
Click to expand...
Click to collapse
did you used git clone or downloaded zip.
TRY
Code:
chmod -R 777 ~/kernel
and ~/kernel is path to folder which contains kernel source code.
i downloaded the zip, and after this "chmod -R 777 ~/kernel" command im still getting same error,
thanks vinay for help, but now im leaving this kernel compiling, thanks.

Issues with building a kernel

I'm trying to build a kernel with the CONFIG_USB_SERIAL_CH341 driver for my Xiaomi Redmi 6 running LOS, but I'm having troubles doing so. My best guess would be that I have the wrong toolchain? I would like to ask for help, any pointers, guides, reading material, etc. If you have any questions, requests for logs, ask and I'll try to hastily respond.
Linux 5.15.7
gcc (GCC) 11.1.0
arm-none-eabi-gcc (Arch Repository) 11.2.0
Target kernel
cd android_kernel_xiaomi_mt6765/
export ARCH=arm & export SUBARCH=arm
echo 'CONFIG_USB_SERIAL_CH341=y' >> arch/arm/configs/cereus_defconfig
make clean
make mrproper
make cereus_defconfig
make -j$(nproc)
Returns: 'Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler'.
After commenting out the stackprotector from the defconfig and making again... returns:
'/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
HOSTLD scripts/genksyms/genksyms
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:110: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:648: scripts/dtc] Error 2
make: *** [Makefile:560: scripts] Error 2'
I tried removing the yylloc lines from the dtc related files, but only to watch even more bizarre errors being thrown at me... From what I searched prepending the line with the 'extern' modifier was a common fix, but in the source code it was already defined as extern YYLTYPE yylloc;
I would be very grateful for any help.

Categories

Resources