[ROM][CM11][dev only] cm-11-UNOFFICIAL-d620 Alpha - LG G2 Mini

CyanogenMod 11 for the LG G2 mini D620r
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
All Credits so far go to Quarx and his project CM11 for LG L90
What i have done so far:
Setup Ubuntu on my Laptop
Installed CM dev environment like described here!
Made a new device folder following THIS guide and build some recoveries.
Took the sources from CM11 for LG L90 and integrated them to my build environment.
CM11 for LG L90 builds fine but i can not test it.
Took the files i thought we need from L90 and put them to my d620 tree.
Trial and error till it compiled for d620.
For the kernel i use original LG sources extracted to kernel/lge/msm8226.
Switched to kernel source from Quarx and tweaked it for d620.
Find sources i use here.
Unfortunately the kernel i have build leads to boot loops. (Yes i have wiped everything)
If i only install the system with the original LG stock kernel i get an security error.
How can i find out why the kernel boot loops?
(had to use the dt.img from stock kernel because mine didn't work, phone gets stuck in fastboot)
Kernel now boots with recovery.
Touch only works if i copy the FW to system folder.
CM11 now works quit well.
Known issues:
- NFC not working at all
- Vibration not working at all
- Back/Main camara has overexposure on bright scenes
- LTE can only be activated by adding quick setting for LTE
Testers welcome.
Video review from simo14
Alpha: Download
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Any help appreciated.

Port rom!!
Good job! I think You can port rom l90 for g2 mini. Read it: http://forum.xda-developers.com/showthread.php?t=2545618 (my English is bad, sorry!!)

I think we need a "extract-files.sh" to extract device proprietary files with connected and enabled usb debbuging. I do some research but didnt luck. My English is weak and i don't know how to do this script. I know its necesary for boot and compile with success.
Maybe Quarx can help us.
Probably kernel boot loops because you compile with CM source and that its not compatible with stock rom.
Regards.

this is great progress
im trying like hell to make a custom recovery.
take a look at this zaaap
http://forum.xda-developers.com/android/help/building-kernel-error-lg-g2-mini-t2853390
maybe you could help me out a bit?

I'm extracted a system folder from TWRP backup and try to port by paste>copy method. I need a META-INF folder for our phone. I don't know how to make it.
Ok i found it.
I make four builds with AndroidKitchen but its always a update-binary script error.
Any help?
make -j4 otatools give me that error.
/media/radek/bee9f4ae-71a6-4ed8-9153-7dd674ea803d/CM11/out/target/product/generic/obj/APPS/SignatureTest_intermediates
"ebtables is disabled on this build"
find: `src': Nie ma takiego pliku ani katalogu
grep: /build/target/board/generic/recovery.fstab: Nie ma takiego pliku ani katalogu
No private recovery resources for TARGET_DEVICE generic
build/core/tasks/kernel.mk:91: **********************************************************
build/core/tasks/kernel.mk:92: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:93: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:94: * BoardConfig.mk file *
build/core/tasks/kernel.mk:95: **********************************************************
make: Nie ma nic do zrobienia w `otatools'.
/build/target/board/generic/recovery.fstab exists in the directory.
When try to compile kernel:
*** Can't find default configuration "arch/arm/configs/w7ds_open_cis_defconfig"!
***
make[2]: *** [w7ds_open_cis_defconfig] Błąd 1
make[1]: *** [w7ds_open_cis_defconfig] Błąd 2
make: *** [w7ds_open_cis_defconfig] Błąd 2
That's mean the Quarx kernel should work for us?

partyzant_x said:
When try to compile kernel:
*** Can't find default configuration "arch/arm/configs/w7ds_open_cis_defconfig"!
***
make[2]: *** [w7ds_open_cis_defconfig] Błąd 1
make[1]: *** [w7ds_open_cis_defconfig] Błąd 2
make: *** [w7ds_open_cis_defconfig] Błąd 2
That's mean the Quarx kernel should work for us?
Click to expand...
Click to collapse
w7ds is an LG L90 dual sim.
Go to your kernel folder /arch/arm/configs and look for a g2m... ...defconfig where the name fits your device.
Try to compile with the g2m defconfig should work.
You might be missing touch and other hardware if you didn't get all property blobs needed for our device.
This is the point where I got struck at the moment.

/tmp/ccfkEagn.s: Assembler messages:
/tmp/ccfkEagn.s:166: Warning: swp{b} use is deprecated for this architecture
/tmp/ccfkEagn.s:192: Warning: swp{b} use is deprecated for this architecture
CC arch/arm/mach-msm/smd_private.o
CC arch/arm/mach-msm/smem.o
CC arch/arm/mach-msm/smd_init_dt.o
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/mach-msm/smd_init_dt.o] Błąd 1
make[1]: *** [arch/arm/mach-msm] Błąd 2
make: *** [zImage] Błąd 2
Click to expand...
Click to collapse
I'm try to compile the LG source with:
Run following scripts to build kernel
a) cd kernel
c) make ARCH=arm CROSS_COMPILE=../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g2m_global_com_defconfig zImage
Zaaap can you share your device tree?
Ok. I fixed the errors. Now I have "zImage" how flash that?

What did you do to fix the errors? And wich toolchain did you use?
The zimage comes with some .ko files? You have to make a .zip file of those and flash it through custom recovery or a flash app from market! Like rashr

I fixed the errors that occurred when compiling. Compile the source cm and lg according to instructions in the readme.txt from lg. Thanks Zaaap changed command from w7ds_open_cis_defconfig on g2m_global_com_defconfig. After compiling I received two files zImage and Image.

partyzant_x said:
I fixed the errors that occurred when compiling. Compile the source cm and lg according to instructions in the readme.txt from lg. Thanks Zaaap changed command from w7ds_open_cis_defconfig on g2m_global_com_defconfig. After compiling I received two files zImage and Image.
Click to expand...
Click to collapse
Don't flash the zImage as it is only a part of the needed boot.img.
There is a command like 'make boot.img'. I'll have to look for it.
I'll explain more later when I get to my laptop.

partyzant_x said:
I fixed the errors that occurred when compiling. Compile the source cm and lg according to instructions in the readme.txt from lg. Thanks Zaaap changed command from w7ds_open_cis_defconfig on g2m_global_com_defconfig. After compiling I received two files zImage and Image.
Click to expand...
Click to collapse
look at the last stages of this how to.
http://playfuldroidz.com/wiki/Compiling_a_Kernel#Making_a_Flashable_Zip

Now I'm trying to create a device tree manually. A bit of getting lost in this. Zaaap can share with your device tree. Rather than create new ones we can work on one and make any fixes.

partyzant_x said:
I fixed the errors that occurred when compiling. Compile the source cm and lg according to instructions in the readme.txt from lg. Thanks Zaaap changed command from w7ds_open_cis_defconfig on g2m_global_com_defconfig. After compiling I received two files zImage and Image.
Click to expand...
Click to collapse
where did you find the readme.txt where it said wich toolchain you should use?

invaderjohn said:
look at the last stages of this how to.
http://playfuldroidz.com/wiki/Compiling_a_Kernel#Making_a_Flashable_Zip
Click to expand...
Click to collapse
Give me: Error executing updater binary in zip.
Downloaded kernel source from lg site. Unpack it and there is two files readme.txt and packed kernel source, unpacked it copy kernel folder to cm source then cd kernel and:
make ARCH=arm CROSS_COMPILE=../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g2m_global_com_defconfig zImage
When I have error for example:
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/mach-msm/smd_init_dt.o] Błąd 1
make[1]: *** [arch/arm/mach-msm] Błąd 2
make: *** [zImage] Błąd 2
Click to expand...
Click to collapse
Then open smd_init_dt.c find line with smd_private.sh. Its look include <smd_private.sh> and change it to include "smd_private.sh".
Sorry for my English.

Make boot.img
Here you can find the official doc about making boot.img: HERE
I took the device tree from Quarx found here made a copy in a new folder 'd620' but i think 'g2m' would have been correct for phone.
Find my device folder here.
Find my vendor folder here.
The kernel source is located under kernel/lge/msm8226
I normaly compile a recovery and see if the kernel works with it.
Thus i don't risk a semi brick because if the kernel is bad, then recovery may not start but system will start and i can flash an other recovery with a new kernel.
If recovery boots, i can use adb to get dmesg.log and see what works and what not.
On my last try, touch didn't initialize complete.

Thanks Zaaap.
I broke something in the source of CM. I have to download again. Can someone check zImage which I compiled.

partyzant_x said:
Thanks Zaaap.
I broke something in the source of CM. I have to download again. Can someone check zImage which I compiled.
Click to expand...
Click to collapse
It boot, but takes long to do so and there is no touch.
This is the same problem i have.
We need to get the correct touch firmware + patch.
Find log attached.

Kernel boots with touch
Got touch working.
The firmware doesn't get copied to /system/lib/firmware.
When i copy the firmware in via AIK kernel boots fast and with touch.
Now i will investigate how to include the FW in compile process.

Very good news. I asked for help a member of XDA @ moonbutt74. I hope he will have the time and inclination to help us.

Zaaap72 said:
Got touch working.
The firmware doesn't get copied to /system/lib/firmware.
When i copy the firmware in via AIK kernel boots fast and with touch.
Now i will investigate how to include the FW in compile process.
Click to expand...
Click to collapse
partyzant_x said:
Very good news. I asked for help a member of XDA @ moonbutt74. I hope he will have the time and inclination to help us.
Click to expand...
Click to collapse
okay so root is good
look in /proc for
/proc/config.gz
it might be there it might not. i need the stock boot.img please. looking through source right now and unsure of which defconfig.
your modules also depend on libraries in system/vendor - you need that entire directory for your device tree. you may also need
manufacturer/device specific/proprietary libraries from system/lib
starting in /system/vendor type in terminal
strings [nameoflib].so | grep "\.so"
these will bring up a list of additional libraires needed. the ones you already have in vendor don't worry about. the ones you
will find in system/lib are the additional ones you need to get for your device tree. go to the thread i'm working in with restl3ss and read through the whole thing but please do not post any questions there. post here use the mention function @moonbutt74
or pm me or click reply button below any of my posts in this thread and i will know by email.
m
on defconfig readme suggests w7ds_open_cis_defconfig but will try g2m_global_com_defconfig

Related

[Q] Need help compiling / building own kernel (zImage)

Hello dev community
I am currently trying to build my own kernel / zImage, but for some reason it doesn't work, when I flash my zImage the SGS2 crashs at the bootscreen with the yellow triangle.
Not even the battery animation when charging while off works anymore *lol*
Here is what I did so far:
extracted a stock initramfs from a samsung stock kernel
got the Samsung kernel sources and extracted on my PC
got the codesourcery toolchain and installed it
edited the path to the toolchain into kernel/Makefile
ran
make c1_rev02_defconfig (as stated in the readme.txt of the src download)
set the path to the extracted iniramfs files in the config
ran
make zImage
It eventually tells me "kernel zImage ready at ...."
padded with 0x00s to the 8MiB size, .tar'ed and flashed via Odin
But it doesn't boot.
When I throw my zImage at the initramfs extractor script, I get the proper initramfs files dumped, so they seem to be fine.
Searched around this forums for two days now, found a few "zImage repacker scripts" but none work or clear up any of my questions.
Any hints on what I missed or did wrong are appreciated
And while we're at it, another question:
At new FW builds, does the actual kernel itself change too, or is it only changes in the initramfs? Because there is only one set of sources from Samsung.... so I assume the actual kernel stays the same and using the initramfs of the targetted FW will suufice?
Why did you pad it up to 8mb?
also, when setting the initramfs source, did you set these to you uid you are compiling with?
CONFIG_INITRAMFS_ROOT_UID=1000
CONFIG_INITRAMFS_ROOT_GID=1000
Hm, padded to 8MB as all kernels are (padded to) 8MB, aren't they?
Tried flashing an unpadded version too, still no go.
And yes, UID and GID are set to the ones my user is running as....
Close to the end of the compiler run, I get a "found 14 module section missmatches" kind of message - could that have something to do with my zImage not working? And how would I fix that?
Oh c'mon, it can't be that hard, so many people are making their own zImages.... what am I missing here.... :-/
First of all, you cant just use a stock initramfs image, shove it into another kernel and expect it to work. There are kernel modules in there which need to be updated first before you do the last "make zImage".
Try this:
0. make sure your config is correct. you should copy c1_rev02_defconfig from inside arm/ to source_root/.config and do a "make oldconfig". Then adjust your configs as necessary ("make menuconfig" etc)
1. "make modules"
2. "INSTALL_MOD_PATH=~ make modules_install"
3. goto your home dir and pick out the modules and put them into the path of your initramfs files (/lib)
4. finally, make zImage.
5. theres no need to pad to 8mb. that is an urban legend
OK, did all that.... still no go.... :-/
Try this script:
Code:
#!/bin/bash
# Set Default Path
TOP_DIR=$PWD
KERNEL_PATH=/home/neophyte-x360/kernel/GALAXYS2/2.6.35.7
# TODO: Set toolchain and root filesystem path
TAR_NAME=zImage.tar
TOOLCHAIN="/home/neophyte-x360/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
# TOOLCHAIN="/home/neophyte-x360/toolchain/bin/arm-none-eabi-"
ROOTFS_PATH="/home/neophyte-x360/kernel/GALAXYS2/initramfs-SGS2"
echo "Cleaning latest build"
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN -j`grep 'processor' /proc/cpuinfo | wc -l` clean
cp -f $KERNEL_PATH/arch/arm/configs/c1_rev02_defconfig $KERNEL_PATH/.config
make -j4 -C $KERNEL_PATH oldconfig || exit -1
make -j4 -C $KERNEL_PATH ARCH=arm CROSS_COMPILE=$TOOLCHAIN || exit -1
cp drivers/bluetooth/bthid/bthid.ko $ROOTFS_PATH/lib/modules/
cp drivers/net/wireless/bcm4330/dhd.ko $ROOTFS_PATH/lib/modules/
cp drivers/samsung/j4fs/j4fs.ko $ROOTFS_PATH/lib/modules/
cp drivers/samsung/fm_si4709/Si4709_driver.ko $ROOTFS_PATH/lib/modules/
cp drivers/scsi/scsi_wait_scan.ko $ROOTFS_PATH/lib/modules/
cp drivers/samsung/vibetonz/vibrator.ko $ROOTFS_PATH/lib/modules/
make -j4 -C $KERNEL_PATH ARCH=arm CROSS_COMPILE=$TOOLCHAIN || exit -1
# Copy Kernel Image
cp -f $KERNEL_PATH/arch/arm/boot/zImage .
cd arch/arm/boot
tar cf $KERNEL_PATH/arch/arm/boot/$TAR_NAME zImage && ls -lh $TAR_NAME
And try with other initramfs, maybe could be this.
PD: I forgot that with my script you have to select your initramfs inside .config
Very interesting thread!
Im about to study computer science and software engineering for 3 years in august.
Hoping/wishing/expecting to get into this eventually!
put this in your build script:-
export LOCALVERSION="-I9100XWKE7-CL215725"
this is just an example set its value to the same as the initramfs you used, e.g. the magicver in the modules.
sounds like your initramfs are incomplete...or more likely your toolchain is not quite right. even without recovery, your zimage should be 6-7mb...(no padding, and there is no need to)
OK, done a clean rebuild, taking care of everything you guys said:
made new initramfs dump from a stock zImage
make mrproper
make c1_rev02_defconfig
make menuconfig - set the paths/prefixes for toolchain, localversion and initramfs (also set my users UID and GID for mapping to UID/GUI 0) there, left everything else untouched and at defaults
make
copied the freshly built modules into my initramfs dir (checked with a hexeditor for the proper versionmagic, looks OK)
make zImage
resulting zImake size: ~5.7MB and no go, still doesn't boot.
I'll try now with another toolchain (using the last one available for d/l so far, just got the 2009-something one mentioned in the sources readme and going to try to use that one now) as well as different initramfs dumper....
I have not much hope this will change the outcome, but it's at least worth a try....
// EDIT (a few hours later xD)
SUCCESS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(anyone knows what the #9 is? where it comes from, what it says?)
I *finally* managed to get a completely self built kernel to boot \o/
So, what was it that played showstopper the whole time: THE TOOLCHAIN!
I had the latest (2011-something) version of the CodeSourcery toolchain installed - that does not seem to be a good idea.
Did exactely what I did before, but now with the 2009q3 version installed (like the readme of the source states) - and tadaa, it works!
// EDIT 2
Figured out the #9 as well, it's the build number / version; how many times I ran "make" since the last "make mrproper"
LET THE MODDING BEGIN (now the fun starts)
Glad to see someone's happy. I'm also trying to compile a kernel from source. However, mine's an I9100G. Managed to compile, flash and boot up my phone, but battery status and Wifi don't work. After looking through the dmesg log, apparently the battery driver is not being initialised. I wonder if anyone can help me? Maybe someone with knowledge of the OMAP platform?
aidfarh said:
Glad to see someone's happy. I'm also trying to compile a kernel from source. However, mine's an I9100G. Managed to compile, flash and boot up my phone, but battery status and Wifi don't work. After looking through the dmesg log, apparently the battery driver is not being initialised. I wonder if anyone can help me? Maybe someone with knowledge of the OMAP platform?
Click to expand...
Click to collapse
You can give me initramfs?
I cqn give it a try.
Sent from my GT-I9100
How to
HellcatDroid said:
Hello dev community
I am currently trying to build my own kernel / zImage, but for some reason it doesn't work, when I flash my zImage the SGS2 crashs at the bootscreen with the yellow triangle.
Not even the battery animation when charging while off works anymore *lol*
Click to expand...
Click to collapse
Could you please give a few mn to write a min How To? I would like to build my own, but as a noob, I am a litle lost in all the info I gathered.
It would be nice to profit from your experience.
Or maybe do you have any good links?
TY
netchip said:
You can give me initramfs?
I cqn give it a try.
Sent from my GT-I9100
Click to expand...
Click to collapse
Well, if you think it can help, here's the download link for my initramfs:
http://dl.dropbox.com/u/13796854/initramfs.zip
It's for an I9100G, though. Do you have one to test with?
aidfarh said:
Well, if you think it can help, here's the download link for my initramfs:
http://dl.dropbox.com/u/13796854/initramfs.zip
It's for an I9100G, though. Do you have one to test with?
Click to expand...
Click to collapse
I haven't one for testing.
I am a kernel developer here for SGS2, check the development part.

[Q] Can't compile Heimdall

Hello, I'm trying to follow Cyanogen's wiki to install CWM.
The steps are: 1) download zImage, 2) download heimdall, 3) flash zImage. I'm stuck at number 2.
I tried with the suggested heimdall_v1.4rc1_mac.zip (sorry I can't post outside links), but the kext inside does not load correctly.
So now I'm trying to compile it myself. I git cloned the repo, installed dependencies, successfully made libpit. Going on with Heimdall.
Code:
cd heimdall
./configure
make
[...]
cc1plus: error: unrecognized command line option "-std=c++0x"
I don't know exactly what this means, but I edited Makefile and substituted every g++ (i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)) occurrency with clang -v.
Now I'm stuck on:
Code:
[...]
Undefined symbols for architecture x86_64:
"std::string::find_first_of(char const*, unsigned long, unsigned long) const", referenced from:
[...]
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [heimdall] Error 1
make: *** [all] Error 2
If it helps you, there are a lot of:
Code:
ignoring nonexistent directory "/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64"
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/i686-apple-darwin8/"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
Running on MacBookPro7,1, Lion 10.7.5, Xcode 4.5.1
EDIT: I also tried installing heimdall 1.3.1 dmg, but installation failed (kernel module couldn't be installed).
bump
bump
bump
what compiler are you using? If GCC what version of GCC are you using? c++0x / c++11 support has only been added starting with gcc v4.3
Plod72 said:
what compiler are you using? If GCC what version of GCC are you using? c++0x / c++11 support has only been added starting with gcc v4.3
Click to expand...
Click to collapse
GCC appears only in CCDEPMODE and CXXDEPMODE. For the rest I'm using clang.
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Click to expand...
Click to collapse
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
Click to expand...
Click to collapse
bump
bump
bump
Why dont you flash a custom kernel? They have cwm preinstalled... or.. maybe im missing something?
Sent from my GT-I9100 using xda app-developers app
Spiralzz said:
Why dont you flash a custom kernel? They have cwm preinstalled... or.. maybe im missing something?
Click to expand...
Click to collapse
Don't I need heimdall to flash a kernel?
vipervault said:
Don't I need heimdall to flash a kernel?
Click to expand...
Click to collapse
Use odin. Very easy and simple.
Sent from my GT-I9100 using xda app-developers app
Lol, you guys been at it since 1/25.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from the little guy
I can't use odin, I don't have Windows.
vipervault said:
I can't use odin, I don't have Windows.
Click to expand...
Click to collapse
No need to compile heimdall.
Download heimdall from here: http://www.glassechidna.com.au/products/heimdall/
The normal heimdall uses a terminal I believe. The frontend one has a gui like Odin and should be easy to use.
Edit: Don't download the latest (1.3.2). Download the previous version, since it is stated that the latest one broke compatibility. Ive never used heimdall though, so I cant guide you further.
Sent from my GT-I9100 using xda app-developers app
I know there are prebuilt heimdall but the kernel module inside does not work.
That's why I'm compiling it. Is there anybody that can help me on that?
vipervault said:
I know there are prebuilt heimdall but the kernel module inside does not work.
That's why I'm compiling it. Is there anybody that can help me on that?
Click to expand...
Click to collapse
Just use another PC. You're going through a lot of hassle. Or simply download Mobile Odin (pro) app to flash. That's easiest and safe to use.
Sent from my GT-I9100 using xda app-developers app
Thank you guys I know how to flank this problem. I'd just like to receive your help to solve this compilation issue.
vipervault said:
Hello, I'm trying to follow Cyanogen's wiki to install CWM.
The steps are: 1) download zImage, 2) download heimdall, 3) flash zImage. I'm stuck at number 2.
I tried with the suggested heimdall_v1.4rc1_mac.zip (sorry I can't post outside links), but the kext inside does not load correctly.
So now I'm trying to compile it myself. I git cloned the repo, installed dependencies, successfully made libpit. Going on with Heimdall.
Code:
cd heimdall
./configure
make
[...]
cc1plus: error: unrecognized command line option "-std=c++0x"
I don't know exactly what this means, but I edited Makefile and substituted every g++ (i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)) occurrency with clang -v.
Now I'm stuck on:
Code:
[...]
Undefined symbols for architecture x86_64:
"std::string::find_first_of(char const*, unsigned long, unsigned long) const", referenced from:
[...]
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [heimdall] Error 1
make: *** [all] Error 2
If it helps you, there are a lot of:
Code:
ignoring nonexistent directory "/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64"
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/i686-apple-darwin8/"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
Running on MacBookPro7,1, Lion 10.7.5, Xcode 4.5.1
EDIT: I also tried installing heimdall 1.3.1 dmg, but installation failed (kernel module couldn't be installed).
Click to expand...
Click to collapse
Hi,
you have probably solved it already, but when I got such error messages the solution was to set certain environment variables before calling ./configure
export CC=clang
export CXX=clang++
export CFLAGS="-I/usr/include/ -I/sw/include/"
export LDFLAGS="-L/usr/lib -L/sw/lib/"
I used fink to download and compile libusb1 (with version 1.0.8) prior to compile heimdall. In case you use macports, use the correct include and lib dirs instead of /sw/include and /sw/lib. In my case I didn't have to change anything in the original Makefile.
The only frustration with this heimdall was that the --primary-boot option did not work properly, so I had to skip --repartition and rewriting the primary boot partition with boot.bin.
you need a newer GCC to get it use Macports. if you do not have it install it. after that the command for the newer version is
Code:
sudo port install gcc47
if you want gcc 4.7
after you have the new version you need to set it to default and hope that heimdall compiler choose it! to do so you have to do so:
Code:
port select --list gcc
Available versions for gcc:
gcc42
llvm-gcc42
mp-gcc47
none (active)
if you have more than one gcc then you have more then one version of gcc from xcode. the mp-gccxx is the macports version. now we will set itto default:
Code:
sudo port select --set gcc mp-gcc47
Password:
Selecting 'mp-gcc47' for 'gcc' succeeded. 'mp-gcc47' is now active.
now you should had setted as default the gcc47 and compiling heimdall should work!
edit: i tried. i get all the way to
Code:
sudo make install
but then get:
Code:
cc1plus: error: unrecognized command line option "-std=c++0x"
probably benjamin setted the source to always use xcodes version of gcc that do not suport it.

[Dev][OV5693] Backcam fix

So,
the G Pad (v500) comes with in two versions.
One version has the S5K4E5YA as back camera.
Other version hast the OV5693 as back camera.
As we know the S5K4E5YA already has support in AOSP and CM ROMs and kernels.
So I tried to add the missing files and references to the CM kernel.
https://github.com/drbeat/kernel_lge_v500/commit/7c9beb4a27fc65b60786616c5c966e53632dfc5d
These are changes I picked out from the "V50020D" kernel sources.
In compiling I get this error
Code:
drivers/media/video/msm/eeprom/ov5693_eeprom.c:68:2: error: extra brace group at end of initializer
{FALSE, 0, 0, 1},
^
drivers/media/video/msm/eeprom/ov5693_eeprom.c:68:2: error: (near initialization for ‘ov5693_calib_supp_info’)
drivers/media/video/msm/eeprom/ov5693_eeprom.c:68:2: warning: excess elements in struct initializer
drivers/media/video/msm/eeprom/ov5693_eeprom.c:68:2: warning: (near initialization for ‘ov5693_calib_supp_info’)
drivers/media/video/msm/eeprom/ov5693_eeprom.c:82:27: error: invalid application of ‘sizeof’ to incomplete type ‘struct msm_calib_id’
{&ov5693_id_data, sizeof(struct msm_calib_id)}, /* */
^
drivers/media/video/msm/eeprom/ov5693_eeprom.c: In function ‘ov5693_format_iddata’:
drivers/media/video/msm/eeprom/ov5693_eeprom.c:88:2: error: invalid use of undefined type ‘struct msm_calib_id’
ov5693_id_data.sensor_id= (uint16_t)ov5693_idcalib_data;
^
drivers/media/video/msm/eeprom/ov5693_eeprom.c:88:2: warning: statement with no effect [-Wunused-value]
make[5]: *** [drivers/media/video/msm/eeprom/ov5693_eeprom.o] Error 1
make[4]: *** [drivers/media/video/msm/eeprom] Error 2
make[4]: *** Waiting for unfinished jobs....
LD drivers/media/video/msm/gemini/built-in.o
make[3]: *** [drivers/media/video/msm] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
Am I missing some changes?
Maybe someone know how this can be fixed so everyone gets the same experience.
EDIT:
OK I got it compiling.
https://github.com/drbeat/kernel_lge_v500/commit/7fce6ccd0c82fcdb17c22f4053db4d6703f1c436
Now I need someone with OV5693 to test it out
EDIT 2:
The binaries may be lacking.
I will look into that
EDIT 3:
So I have made a ZIP containing binaries and a kernel with ov5693 drivers
I need someone to test it out
DOWNLOAD: removed!
will upload a new version soon
EDIT 4:
DOWNLOAD: https://www.androidfilehost.com/?fid=95897840722648539
I thought ov5663 was the one that does not work. Here is a log for a ov5693 working with stock AOSP.
http://forum.xda-developers.com/showpost.php?p=57338503&postcount=5
Deltadroid said:
I thought ov5663 was the one that does not work. Here is a log for a ov5693 working with stock AOSP.
http://forum.xda-developers.com/showpost.php?p=57338503&postcount=5
Click to expand...
Click to collapse
there is no "ov5663"
the back camera which is not working is "ov5693"
Then I'm curious why the person who posted that log says his cameras are working.
Deltadroid said:
Then I'm curious why the person who posted that log says his cameras are working.
Click to expand...
Click to collapse
so to clear it up for you
front cam is always "IMX119"
back camera is either "S5K4E5YA" or "OV5693"
there is no "OV5663"
that guy posted dmesg before he flashed AOSP
since his back camera is working he has a "S5K4E5YA" module
just ask him to do another dmesg now. you will see that his results will be IMX119 and S5K4E5YA since AOSP and CM dont support OV5693
Thanks for clearing that up. I'm sure lots of others were/are confused too.
I bet of you changed the title of this thread to something like "fix for back camera" then people would understand the purpose of this thread better and offer to test.
Deltadroid said:
I bet of you changed the title of this thread to something like "fix for back camera" then people would understand the purpose of this thread better and offer to test.
Click to expand...
Click to collapse
i still have to find the right binaries to make a working zip
I have a 50020D, I'll take it for a spin and report back later.
UPDATE: I got stuck at boot logo after flashing, but I managed to restore from my backup.
To tell the truth I'm not using stock CM, but a Team Vanir/Commotio ROM. Although they supposed to be using the same kernel and device tree as CM.
Munszu said:
I have a 50020D, I'll take it for a spin and report back later.
UPDATE: I got stuck at boot logo after flashing, but I managed to restore from my backup.
To tell the truth I'm not using stock CM, but a Team Vanir/Commotio ROM. Although they supposed to be using the same kernel and device tree as CM.
Click to expand...
Click to collapse
thx for reporting
do you have a backcam which is not working?
ckret said:
thx for reporting
do you have a backcam which is not working?
Click to expand...
Click to collapse
Yeah, I do.
It's only working on stock ROMs, so I guess its the same.
If you can tell me how, I can send you a log or something to help you.
uploaded a new zip
this one doesnt give bootloop.
still do a backup and report back please
ckret said:
uploaded a new zip
this one doesnt give bootloop.
still do a backup and report back please
Click to expand...
Click to collapse
I've tried and the tablet booted up well this time, but the fix didn't work unfortunately.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
can some one that has ov5693 please test this zip and see if the cam works
it uses the same kernel that ckret has in his zip file
the only thing I added was more of the camera binaries from 20d
make sure you back up first
https://www.mediafire.com/?gx83ty2ytxdc2wt
I tried it but it got me into a boot loop.
I hope you figure it out \o
PS: Using Mahdi's Kit Kat Rom.
thanks for testing, sorry about the loop
since I dont have this phone, I dont think I will be able to help much more, sorry
hroark13 said:
can some one that has ov5693 please test this zip and see if the cam works
it uses the same kernel that ckret has in his zip file
the only thing I added was more of the camera binaries from 20d
make sure you back up first
https://www.mediafire.com/?gx83ty2ytxdc2wt
Click to expand...
Click to collapse
its not that simple.
i am writing exams right now so i dont have time look into the problem
ckret said:
its not that simple.
i am writing exams right now so i dont have time look into the problem
Click to expand...
Click to collapse
I looked at your kernel commit and that looked to be right
those files I have in that zip are the correct libraries
what it is probably missing is a key in the lib camera client
there is most likely a message in the logcat that says it could not load camera.msm8960.so because it could not find a key
usually these keys could be added to
frameworks/av/camera/CameraParameters.cpp
and
frameworks/av/include/camera/CameraParameters.h
but then you would have to build cm11 again
I am pretty sure the only way you are going to get the back cam to work is with those libraries
if you grep for ov5693 in the original files / libraries it probably will not be found, if you grep the 20d files, you should find it listed in the mm-qcamera-daemon, liboemcamera.so and the 3 chromatix files
hroark13 said:
I looked at your kernel commit and that looked to be right
those files I have in that zip are the correct libraries
what it is probably missing is a key in the lib camera client
there is most likely a message in the logcat that says it could not load camera.msm8960.so because it could not find a key
usually these keys could be added to
frameworks/av/camera/CameraParameters.cpp
and
frameworks/av/include/camera/CameraParameters.h
but then you would have to build cm11 again
I am pretty sure the only way you are going to get the back cam to work is with those libraries
if you grep for ov5693 in the original files / libraries it probably will not be found, if you grep the 20d files, you should find it listed in the mm-qcamera-daemon, liboemcamera.so and the 3 chromatix files
Click to expand...
Click to collapse
its propably selinux and permission related
this most time cause bootloops
ckret said:
its propably selinux and permission related
this most time cause bootloops
Click to expand...
Click to collapse
idk
would need to see a logcat to be sure

can't build the kernel

I have been trying to compile the remix OS kernel, downloaded from their github repo
Code:
CHECK usr/include/linux/wimax/ (1 files)
CHECK usr/include/linux/ (411 files)
./usr/include/linux/if_pppox.h:26: included file 'linux/if_pppolac.h' is not exported
./usr/include/linux/if_pppox.h:27: included file 'linux/if_pppopns.h' is not exported
scripts/Makefile.headersinst:120: recipe for target 'usr/include/linux/.check' failed
make[4]: *** [usr/include/linux/.check] Error 123
scripts/Makefile.headersinst:127: recipe for target 'linux' failed
make[3]: *** [linux] Error 2
Makefile:1080: recipe for target 'headers_check' failed
make[2]: *** [headers_check] Error 2
any ideas?
I'm using the command "make -j 3 deb-pkg" to build.
speculatrix said:
I have been trying to compile the remix OS kernel, downloaded from their github repo
Code:
CHECK usr/include/linux/wimax/ (1 files)
CHECK usr/include/linux/ (411 files)
./usr/include/linux/if_pppox.h:26: included file 'linux/if_pppolac.h' is not exported
./usr/include/linux/if_pppox.h:27: included file 'linux/if_pppopns.h' is not exported
scripts/Makefile.headersinst:120: recipe for target 'usr/include/linux/.check' failed
make[4]: *** [usr/include/linux/.check] Error 123
scripts/Makefile.headersinst:127: recipe for target 'linux' failed
make[3]: *** [linux] Error 2
Makefile:1080: recipe for target 'headers_check' failed
make[2]: *** [headers_check] Error 2
any ideas?
I'm using the command "make -j 3 deb-pkg" to build.
Click to expand...
Click to collapse
No but i will go down to to same road so i can enable my wifi, maybe i find something!
Why are you using make -j 3 deb-pkg, should it not be ¨make arch=x86_64¨ ?
just copy the default config first to somewhere else, like cp arch/x86/android-x86_64_defconfig /work/config/,config
Then make -o /work/config/.config xconfig
make -j4 -o work/config/.config
TerrorToetje said:
No but i will go down to to same road so i can enable my wifi, maybe i find something!
Click to expand...
Click to collapse
Kernel compiled fine here, however I forgot https://github.com/jide-opensource/remixos-kernel/tree/jide_x86_lollipop/android/configs;)
TerrorToetje said:
Why are you using make -j 3 deb-pkg, should it not be ¨make arch=x86_64¨ ?
just copy the default config first to somewhere else, like cp arch/x86/android-x86_64_defconfig /work/config/,config
Then make -o /work/config/.config xconfig
make -j4 -o work/config/.config
Click to expand...
Click to collapse
I must be doing somethign wrong, I did that, using the config file arch/x86/configs/android-x86_64_defconfig
Code:
CC [M] drivers/staging/rtl8723bs/hal/odm_RTL8723B.o
LD [M] drivers/staging/rtl8723bs/r8723bs.o
LD [M] drivers/staging/xgifb/xgifb.o
LD drivers/staging/built-in.o
Makefile:947: recipe for target 'drivers' failed
make: *** [drivers] Error 2
[code]
TerrorToetje said:
No but i will go down to to same road so i can enable my wifi, maybe i find something!
Click to expand...
Click to collapse
Yes, it's because I want to build the wifi myself from this repo:
https://github.com/hadess/rtl8723bs
speculatrix said:
Yes, it's because I want to build the wifi myself from this repo:
https://github.com/hadess/rtl8723bs
Click to expand...
Click to collapse
They write;
For older kernel than 4.3, you might also need this patch applied: https://git.kernel.org/cgit/linux/k.../?id=d31911b9374a76560d2c8ea4aa6ce5781621e81d
Maybe this ?,
My module rtl8188EU was already in the /stage i just enabled it.
TerrorToetje said:
They write;
For older kernel than 4.3, you might also need this patch applied: https://git.kernel.org/cgit/linux/k.../?id=d31911b9374a76560d2c8ea4aa6ce5781621e81d
Maybe this ?,
My module rtl8188EU was already in the /stage i just enabled it.
Click to expand...
Click to collapse
I thought I would start by trying to build the kernel exactly as published, and then start patching it. thanks for the suggestion.
TerrorToetje said:
Why are you using make -j 3 deb-pkg, should it not be ¨make arch=x86_64¨ ?
Click to expand...
Click to collapse
p.s. I build the kernel as a debian package on my debian dev box, which is a VM on qemu/kvm, and then boot the kernel on that dev box to check it works.
https://groups.google.com/forum/m/#!topic/Remix-OS-for-PC/dv3XYXCSYvU
speculatrix said:
https://groups.google.com/forum/m/#!topic/Remix-OS-for-PC/dv3XYXCSYvU
Click to expand...
Click to collapse
Funny thats my topic
TerrorToetje said:
Funny thats my topic
Click to expand...
Click to collapse
I've managed to build a kernel. It doesn't boot on my VM, but I will now "dismantle" the RemixOS usb image, and try copying in the extra kernel modules from my build.
I also need to load in a terminal app and root the remixos image so's I can do useful things when its booted.
Let me know how you got the modules, i'm to be hon-nest i have no clue how to get those modules. How did you found out how they build-ed the USB kernel?
I wan't to have the exact same kernel options as there USB image... and then start to change some things
TerrorToetje said:
Let me know how you got the modules, i'm to be hon-nest i have no clue how to get those modules. How did you found out how they build-ed the USB kernel?
I wan't to have the exact same kernel options as there USB image... and then start to change some things
Click to expand...
Click to collapse
so when I got it to build, I did "make modules_install" and then looked in /lib/modules and found it.
meanwhile, I unzipped RemixOS usb stick image (EFI) and mounted the nested file systems like this
Code:
unzip release_Remix_OS_for_PC_64_B2016020201_Alpha_EFI.zip Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img
mount -o loop,offset=1048576 Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img /mnt/remix
cd /mnt/remix
mkdir /mnt/remix-sfs
mount -o loop system.sfs /mnt/remix-sfs
cd /mnt/remix-sfs
mkdir /mnt/remix-sfs-system
mount -o loop system.img /mnt/remix-sfs-system
speculatrix said:
so when I got it to build, I did "make modules_install" and then looked in /lib/modules and found it.
meanwhile, I unzipped RemixOS usb stick image (EFI) and mounted the nested file systems like this
Code:
unzip release_Remix_OS_for_PC_64_B2016020201_Alpha_EFI.zip Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img
mount -o loop,offset=1048576 Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img /mnt/remix
cd /mnt/remix
mkdir /mnt/remix-sfs
mount -o loop system.sfs /mnt/remix-sfs
cd /mnt/remix-sfs
mkdir /mnt/remix-sfs-system
mount -o loop system.img /mnt/remix-sfs-system
Click to expand...
Click to collapse
Okay i managed the same, but also not booting. at least i can see that here is full gui support now, but again i only get a shell.
speculatrix said:
so when I got it to build, I did "make modules_install" and then looked in /lib/modules and found it.
meanwhile, I unzipped RemixOS usb stick image (EFI) and mounted the nested file systems like this
Code:
unzip release_Remix_OS_for_PC_64_B2016020201_Alpha_EFI.zip Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img
mount -o loop,offset=1048576 Remix_OS_for_PC_64_B2016020201_Alpha_EFI.img /mnt/remix
cd /mnt/remix
mkdir /mnt/remix-sfs
mount -o loop system.sfs /mnt/remix-sfs
cd /mnt/remix-sfs
mkdir /mnt/remix-sfs-system
mount -o loop system.img /mnt/remix-sfs-system
Click to expand...
Click to collapse
Do you know if there is any way to capture the current kernel config from the running android machine?, i tried to see if there was a config in /proc but no..
The thing is to nail this down you can do two things, either dmesg and see whats going wrong or capture a working config and build on top of that one.
TerrorToetje said:
Do you know if there is any way to capture the current kernel config from the running android machine?, i tried to see if there was a config in /proc but no..
The thing is to nail this down you can do two things, either dmesg and see whats going wrong or capture a working config and build on top of that one.
Click to expand...
Click to collapse
Like you, I tried the same... there's nothing in /boot, and the kernel doesn't provide a /proc/config.gz
I tried the "contact us" on the jide website to ask about building the kernel and didn't get a response. I've not seen any jide people respond to discussions on google groups.
It does seem Jide want to act in good faith:
http://liliputing.com/2016/01/jide-releases-remix-os-source-code-to-comply-with-gpl-apache.html
speculatrix said:
Like you, I tried the same... there's nothing in /boot, and the kernel doesn't provide a /proc/config.gz
I tried the "contact us" on the jide website to ask about building the kernel and didn't get a response. I've not seen any jide people respond to discussions on google groups.
It does seem Jide want to act in good faith:
http://liliputing.com/2016/01/jide-releases-remix-os-source-code-to-comply-with-gpl-apache.html
Click to expand...
Click to collapse
Maybe i should write them aswell, would be nice if they enabled the .config option in there Alpha releases
speculatrix said:
Like you, I tried the same... there's nothing in /boot, and the kernel doesn't provide a /proc/config.gz
I tried the "contact us" on the jide website to ask about building the kernel and didn't get a response. I've not seen any jide people respond to discussions on google groups.
It does seem Jide want to act in good faith:
http://liliputing.com/2016/01/jide-releases-remix-os-source-code-to-comply-with-gpl-apache.html
Click to expand...
Click to collapse
Okay, I sended a support ticket aswell did you make any progression in the meantime?
I manged to compile the kernel and make it work!, if you need more details let me know
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Help building LineageOS for LeEco (LeTV) LeMax 1 (X900/Max1) CN

If you're in a hurry and just want to know the latest news, follow this link:
https://forum.xda-developers.com/showpost.php?p=80393641&postcount=58
Keep reading for some background info.
Hi there!
So... I'm trying to port LineageOS (version 15.1) from OnePlus - OnePlus2 device to the LeEco LeMax 1 phone.
Why I've chosen this device to port from?
It has the MSM8994 (Qualcomm Snapdragon 810) SoC, which is the same as Max1, so (supposedly) a kernel compile would not be too much hassle. Besides it also has many similarities in terms of hardware.
What I did for device dir:
I took the tree from https://github.com/LineageOS/android_device_oneplus_oneplus2 and modified it to meet max1 requirements.
Current tree: https://github.com/alexsmithbr/android_device_letv_max1
What I did for vendor dir:
I compared the tree with Max1 tree, excluding everything that was not found in Max1. The plan is to add more vendor stuff if necessary.
Current tree: https://github.com/alexsmithbr/android_device_letv_max1
What I did for kernel dir:
I downloaded Le_Max_OpenSource.zip from opensource.le.com (in fact, as the site is down, I got a copy from http://web.archive.org/web/20180626053054/http://opensource.le.com:80/ and, from there, I found the file I needed was named Le_Max_OpenSource.zip. I got it from here.
The kernel config in this zip file is exactly the same I get from the device itself, with adb pull /proc/config.gz.
Current tree: https://github.com/alexsmithbr/android_kernel_letv_max1
Interesting related threads:
https://forum.xda-developers.com/showpost.php?p=78690008&postcount=7
https://forum.xda-developers.com/le.../cm-14-1-android-7-1-unofficial-letv-t3530173
Other possibly useful resources:
http://web.archive.org/web/20180626053054/http://opensource.le.com:80/
https://forum.xda-developers.com/showpost.php?p=78676206&postcount=2402
These are thanks to @rico69310, specifically this post:
https://www.mediafire.com/folder/ff7hbpa62ivsg/
https://yadi.sk/d/RPfdh3glmhzarw
https://cloud.mail.ru/public/GP9g/cWpyeYbuK/
Another useful resource, in case you brick your X900. This is thanks to @Phsh:
https://forum.xda-developers.com/showpost.php?p=75157516&postcount=2375
Current status
I can build LineageOS 15.1 completely, but, once flashed, the kernel doesn't boot and phone enters bootloader (the penguin screen) and stay there.
What I need
It's pretty obvious I need the ROM working...
But the focus now would be to have a working boot.img. I really don't know what I'm doing wrong.
I can't get any logs, as LeEco patched the kernel so that we don't have a last_kmsg. Instead, they apparently put last_kmsg into another partition in /dev/block/platform/soc.0/f9824900.sdhci/by-name/letvconfig2. You can check this in the kernel, file kernel/printk/last_kmsg.c, line 124:
Code:
#define DEFAULT_KERNELLOG_FILENAME "/dev/block/bootdevice/by-name/letvconfig2"
char *kernlog_file = DEFAULT_KERNELLOG_FILENAME;
Well, I tried to give an overview of all steps I took. Please feel free to ask anything or give hints.
Together we can make LeEco LeMax 1 live longer!
Thought it would be nice to describe my build process.
Basically I'm following these instructions: https://wiki.lineageos.org/devices/oneplus2/build
Of course these instructions are for oneplus2, but the step-by-step is pretty much the same for any device.
I'm using Ubuntu 18.04.1 LTS, in which I created a user specifically for building LineageOS.
I followed all steps on the above link until breakfast oneplus2, since, at this point, I had to create my own device/vendor/kernel tree, so that I can breakfast it.
To do this, I did:
Code:
# clone max1 device
cd ~/android/lineage/device
mkdir letv
cd letv
git clone https://github.com/alexsmithbr/android_device_letv_max1.git max1
# clone max1 vendor
cd ~/android/lineage/vendor
mkdir letv
cd letv
git clone https://github.com/alexsmithbr/android_vendor_letv_max1.git max1
# setup kernel
cd ~/android/lineage/kernel
mkdir letv
cd letv
# change <path_to_file> to the correct path to Le_Max_OpenSource.zip
# you downloaded from the link on the previous post.
unzip <path_to_file>/Le_Max_OpenSource.zip -d max1
# as the zip has unnecessary subfolders, I just moved them
# to their correct names and deleted other rubbish.
mv max1/LeMax_kernel/kernel/ max1/msm8994
rm max1/LeMax_kernel/ -R
In the end, you need a structure like this:
Code:
~/android/lineage/device/letv/max1
~/android/lineage/vendor/letv/max1
~/android/lineage/kernel/letv/msm8994
Finally, put config.gz in its dir:
Code:
adb pull /proc/config.gz /tmp
gunzip /tmp/config.gz -c > ~/android/lineage/kernel/letv/msm8994/arch/arm64/configs/msm8994-max1-perf_defconfig
Okay, now everything is set up for the build to start.
Code:
source build/envsetup.sh
breakfast max1
export USE_CCACHE=1
ccache -M 50G
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
croot
Just before start building, I choose which kind of build I want:
Code:
choosecombo
Build type choices are:
1. release
2. debug
Which would you like? [1] 1
Which product would you like? [lineage_max1]
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]
Now, if you want a normal build, you can enter:
Code:
brunch max1
But, if you want a really verbose log (very useful to debug build errors), you can enter:
Code:
mka -j 4 showcommands
Note that -j 4 means 4 simultaneous jobs. You can specify another number. A rule of thumb is to use <number_of_cpus> * 2.
Now the system should build...
At this point:
https://github.com/alexsmithbr/andr...tree/0f9134dd09c269b2da9008c5598060b9d19ac2ef
https://github.com/alexsmithbr/andr...tree/9ece561a945867ab2af733c5ef890b6df5438a8b
The system builds and mka -j 4 showcommands bacon will build flashable lineage-15.1-20190128-UNOFFICIAL-max1.zip.
Unfortunately, when flashing this zip, and restarting the phone, it will vibrate twice when showing the LeEco first screen, then it vibrates twice again and shows me the penguin screen (bootloader).
No luck up to now.
Keep up with the good work... I hope you get the kernel working.
Spunkination said:
Keep up with the good work... I hope you get the kernel working.
Click to expand...
Click to collapse
Me too!
It's so hard to get any help... I've been to freenode as well and nobody wanted to help there. :/
So it feels like a very lonely path. But I'm still on to it.
Currently I'm recompiling everything, now getting "my" tree a bit closer to @ABM30 tree, adapted to LineageOS, instead of CyanogenMod.
Let's see what happens next.
No luck. Boots to penguin (bootloader) screen again.
---------- Post added at 09:37 AM ---------- Previous post was at 09:33 AM ----------
I'm cheering for you. I would very much like 8.1 Good luck ! Good work!
htimsxela said:
Me too!
It's so hard to get any help... I've been to freenode as well and nobody wanted to help there. :/
So it feels like a very lonely path. But I'm still on to it.
Currently I'm recompiling everything, now getting "my" tree a bit closer to @ABM30 tree, adapted to LineageOS, instead of CyanogenMod.
Let's see what happens next.
No luck. Boots to penguin (bootloader) screen again.
Click to expand...
Click to collapse
Hope you are good friend?
How is the build going?
I updated the git repositories. The current version compiles as well and I get a ROM at the end, but unfortunately it doesn't boot. I'm probably missing something in the kernel build. I'm still investigating, but I don't even get to the LineageOS logo. When I turn on the phone, it goes straight to bootloader (penguin) screen.
I'll keep trying. Since a build involves a lot (really!) of variables, there's always something new to try.
And it's good that we keep this thread active. Maybe someone with more knowledge shows up and is able to help.
My biggest issue is I can't find a way of seeing what's wrong, since LeEco patched the kernel in a way there is no /proc/last_kmsg file, nor /sys/fs/pstore/console-ramoops. LeEco implemented it in a way the logs would be written to a partition called letvconfig2, but even there I cannot see any logs.
I read another way of seeing kernel logs would be to use the phone's serial port, but then I'd have to reach its main board, which is not an option currently, since this is my only phone.
In other words, my options now resume to keep trying.
Tomorrow I expect to have some time to resume the work. Will give it some more tries. I'm even thinking about checking out a previous version of LineageOS (when it was still called CyanogenMod), then, once I get it working, try to make my way to newer versions.
Stay tuned!
And again: any hints are more than welcome!
I really believe this thread may become kind of a roadmap to compile android for any unsupported device.
Update: by looking at recovery.img and comparing to the recovery partition on device, I noticed the kernel being built by LineageOS doesn't contain any DTBs. Without DTBs, the kernel won't be able to identify the phone's hardware.
How I checked this:
Code:
$ mkdir /tmp/boot
$ cd /tmp/boot
$ unpackbootimg -i ~/android/lineage/out/target/product/max1/recovery.img -o .
BOARD_KERNEL_CMDLINE console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-5 androidboot.selinux=permissive buildvariant=userdebug
BOARD_KERNEL_BASE 00000000
BOARD_PAGE_SIZE 4096
$ split-appended-dtb-master/split-appended-dtb recovery.img-zImage
ERROR: Appended Device Tree Blob not found!
I'll try to find out how to automatically add DTBs to the images.
I know there was a variable called TARGET_KERNEL_APPEND_DTB, which should be set to true on older (cyanogenmod) versions, but it is now deprecated. So deprecated that even the "deprecated" messages have been removed by now.
As far as I could figure out, now the action of appending/not appending DTBs to the kernel image is guessed by variable BOARD_KERNEL_IMAGE_NAME. For example:
To add dtb to kernel image, one would do:
Code:
BOARD_KERNEL_IMAGE_NAME := Image-dtb
To don't add dtb to kernel image, one would do:
Code:
BOARD_KERNEL_IMAGE_NAME := Image
I was hoping this would change something, as for me that variable was defined without the -dtb suffix, but I figured out I broke the kernel build:
Code:
make[1]: *** No rule to make target 'Image-dtb'. Stop.
I guess this is because the original kernel is too old (3.10.84) and it's AndroidKernel.mk still relies on TARGET_KERNEL_APPEND_DTB, as we can see on line 68:
Code:
ifeq ($(TARGET_KERNEL_APPEND_DTB), true)
$(info Using appended DTB)
TARGET_PREBUILT_INT_KERNEL := $(TARGET_PREBUILT_INT_KERNEL)-dtb
endif
Patch the kernel? Wow! This is going deep...
* unpackbootimg is part of the android_bootimg_tools. I got it from here: wget https://storage.googleapis.com/goog...d-serialport-api/android_bootimg_tools.tar.gz
* split-appended-dtb is this tool: https://github.com/dianlujitao/split-appended-dtb
Turns out there are two ways of adding DTBs.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
By checking my current recovery partition, I noticed DTBs are attached to partition, not to kernel. I also noticed it is not using a compressed kernel. So I'll configure BoardConfig.mk as:
Code:
BOARD_KERNEL_IMAGE_NAME := Image
If I wanted it gzipped, I'd make it Image.gz. If I wanted the DTBs attached to kernel (not to image), I'd do Image.gz-dtb.
Apparently no kernel patch will be needed... Anyway I created a git repository for it, just in case I need to change something.
Again, the build works, but it doesn't boot.
As I'm focusing on testing the kernel, I'm using the recovery partition.
I just dumped a copy of it with:
Code:
host$ adb shell
phone$ su
phone# cp /dev/block/bootdevice/by-name/recovery /sdcard
phone# exit
phone$ exit
host$ adb pull /sdcard/recovery
and I'm flashing it over and over to test.
To do this, I do
Code:
host$ adb reboot bootloader
# phone reboots
host$ fastboot flash recovery /path/to/recovery.img
# it flashes, then, holding volume-up, I type:
host$ fastboot reboot
Phone will reboot into recovery and test my image (up to now, I only get back to penguin screen (bootloader)).
To flash back my working recovery image, I do the same as above, just changing the path to recovery image.
Bless you and your work
Dude, I would definitely-definitely liked to help; I understand and root for your hard work. But unfortunately I don't possess any knowledge in this area. Yeah, I can flash using manual, but I'm lamer in terms of programming, not even close to IT.
htimsxela said:
Hi there!
Click to expand...
Click to collapse
I rarely meet such wonderful and persistent people like you. I sincerely hope you will succeed and achieve your goal! :good:
Santey Maas said:
Dude, I would definitely-definitely liked to help; I understand and root for your hard work. But unfortunately I don't possess any knowledge in this area. Yeah, I can flash using manual, but I'm lamer in terms of programming, not even close to IT.
Click to expand...
Click to collapse
Thanks, mate! I didn't give up yet. Each try brings more knowledge and I hope I'm able to share all I'm learning. Sort of paving the road for newcomers.
Tircon said:
I rarely meet such wonderful and persistent people like you. I sincerely hope you will succeed and achieve your goal! :good:
Click to expand...
Click to collapse
Thanks! My hope is that - if I succeed - more people can benefit from my work and give these phones a longer life.
LeEco Le Max (max1/x900) Secret Codes
A bit off-topic, but here it goes... While looking for a way to debug kernel boot, I came across those famous secret codes you can type on phone screen to access secret/test menus... This site, for example, says you can use code *#*#76937#*#* to have access to a menu where you can enable/disable some log, debug and AT commands options. I tested and it worked with my phone. Not happy enough, I did a
Code:
grep 76937 / -rl
on the phone and found out system/app/LetvDebugUtil/oat/arm64/LetvDebugUtil.odex was the only place where it occurred. Inspecting the file, I found, right next to the occurrence, the code 9439. Just to test, I entered *#*#9439#*#* on the phone and got to a Chinese menu (see attached picture). The translation of these Chinese stuff is "Launch China Telecom Network (CDMA)". I didn't check that box to see what happens.
Current known codes
*#*#76937#*#* - Menu where you can enable/disable some log, debug and AT commands options.
*#*#9439#*#* - Launch China Telecom Network (CDMA)
*#*#8888#*#* - Advanced settings. Here you can turn on logging of App, Modem, Net, Kernel, Bluetooth, GPS and WiFi. Logs are stored in /sdcard
*#0000# - About phone. Information about each card slot.
*#06# - MEID & IMEI numbers.
If you're having this error while trying to build LineageOS:
Code:
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/android_build/android/lineage/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/android_build/android/lineage'
You're probably having the same issue I'm having with Flex. The easiest option is to recompile it. And it's easy.
Code:
$ cd prebuilts/misc/linux-x86/flex
$ mkdir flex-2.5.39-src
$ cd flex-2.5.39-src
$ tar zxvf ../flex-2.5.39.tar.gz
$ ./configure
$ make
$ cp flex ../flex-2.5.39
$ cd ..
$ rm flex-2.5.39-src -R
The above commands will recompile Flex for your architecture and everything should be fine (with Flex).
Some news regarding the overall progress with LineageOS.
I checked out the repo from cm-14.1 (cyanogenmod 14.1) and am now trying to build for it. If it builds, at least we'll have Android 7.1.x running on device. And - I believe - it could bring some light to start a port to a newer version (Lineage 15.1).
Up to now, I faced the same compile errors I got when compiling for 15.1, so it's being straight forward. I'm anxious to see if it'll boot. :fingers-crossed:
As usual, I'll keep you posted.
htimsxela said:
Some news regarding the overall progress with LineageOS.
I checked out the repo from cm-14.1 (cyanogenmod 14.1) and am now trying to build for it. If it builds, at least we'll have Android 7.0.1 running on device. And - I believe - it could bring some light to start a port to a newer version (Lineage 15.1).
Up to now, I faced the same compile errors I got when compiling for 15.1, so it's being straight forward. I'm anxious to see if it'll boot. :fingers-crossed:
As usual, I'll keep you posted.
Click to expand...
Click to collapse
Thanks for your effort!
This phone is great and it's pity that it was left without support..
htimsxela said:
Some news regarding the overall progress with LineageOS.
I checked out the repo from cm-14.1 (cyanogenmod 14.1) and am now trying to build for it. If it builds, at least we'll have Android 7.0.1 running on device. And - I believe - it could bring some light to start a port to a newer version (Lineage 15.1).
Up to now, I faced the same compile errors I got when compiling for 15.1, so it's being straight forward. I'm anxious to see if it'll boot. :fingers-crossed:
As usual, I'll keep you posted.
Click to expand...
Click to collapse
BTW if someone is curious out there, here's the CyanogenMod 14.1 branch I'm working on: https://github.com/alexsmithbr/android_device_letv_max1/tree/cm-14.1
It was based on CyanogenMod 12.1 and the code is almost three years old (last commit), so I'm spending some time updating obsolete code, etc.
Donnie2Darko said:
Thanks for your effort!
This phone is great and it's pity that it was left without support..
Click to expand...
Click to collapse
Yeah, let's see if I can help changing this scenario.

Categories

Resources