Related
I want to port cyanogenmod to archos
Are there any developers who know how to download the source of cnm and archos firmware
I'm a game developer and I have no experience with drivers but we can compare are achos devices with other cnm supported devices, the nexus s has the same processor, so we don't have to create a driver for that
Compare list (Update 24 June)
processor is the same as in the droid 2
touchscreen = ?
sound hardware =
screen hardware =
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
fisha21 said:
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
Click to expand...
Click to collapse
Yes, but I'm a newcomer and I can't post a replay there
coen22 said:
Yes, but I'm a newcomer and I can't post a replay there
Click to expand...
Click to collapse
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Lennb said:
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Click to expand...
Click to collapse
Thx, but what do think of my idea
coen22 said:
Thx, but what do think from my idea
Click to expand...
Click to collapse
Im happy, if anyone want to help, but
we need a guy who really have android developement knowledge
Anyone?
I still can't reply to the main thread of cyanogenmod [DEV]
The first thing we have to do is a hardware research
the archos gen8 devices have a
First
Processor: Arm cortex-A8 <-- same as galaxy s, and nexus s
Screen: <--- ?
Then
Touchscreen: <--- ?
Later
Camera: <--- ?
Camera A43: <--- ?
WiFi: <--- ?
Sound: <--- ?
Software buttons
I think we should first make the processor and the screen working, then we are able to debug the device using adb
And we are able to view debug codes on archos
Because all drivers are included in the kernel, what would be the outcome of running say AOSP gingerbread on top of the current kernel?
Archos didn't make much changes to the kernel and the system compared to other manufactures like HTC and it's Sense ROM.
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
wvl0 said:
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
Click to expand...
Click to collapse
Ho year sure, downloading sources for a supported device and building the entire thing is not rocket science and can be easily done by following the wiki.
But building one for an unsupported device is an other story.
It requires a good knowledge and a lot of spare time.
The knowledge can be learned online but it requires a lot more spare time too and many of us don't have that spare time, unfortunately.
do you?
I'm not here to lecture people on how they spend their time. I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
wvl0 said:
I'm not here to lecture people on how they spend their time.
Click to expand...
Click to collapse
I see , what are you here for ?
I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
Click to expand...
Click to collapse
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Hey guys, please join us at the Developer Thread.]
Its better to have only one thread
sibere said:
I see , what are you here for ?
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Click to expand...
Click to collapse
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
Click to expand...
Click to collapse
That looks very good
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Click to expand...
Click to collapse
This may be my misunderstanding but I thought this guide only teaches you how to compile your own cyanogen build for the Motorola Sholes. It even states that you need a sholes with a working copy of cyanogenmod installed. This guide will only work for devices which are already supported by the cyanogenmod team, and is not a guide to build for unsupported devices. At least, that was my understanding from spending most of a day crawling around the cyanogenmod wiki.
Part of the build process involves pulling proprietary system files from the device. I guess one starting point would be to work out which files these are, then obtain the files from the archos. However, this stuff takes time to learn and I have very little to spare, like most. But then, neither am I asking someone else to do it, or sitting waiting for it.
If it comes, it comes...
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
wvl0 said:
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
Click to expand...
Click to collapse
Thank, you guys!
Could you please joyn my Thread for CM Developement, so other guys could help?
One thread is better than two
Finally, guys with Knowledge work on a CM, how can i help?
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
wvl0 said:
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
Click to expand...
Click to collapse
Okey, i understand^^
Could you tell me a few steps to compile the CM ?, i think the drivers we'll do later
Part 4. A noob's Hope.
or, A noobs Kernel building guide for noobs by a noob.
Linux Gurus and Master Dev's, please feel free to point out any mistakes i make.
We've got lots of ROMs available and frankly, i think we've reached the limit of what could be done. Ofcourse, i could be wrong. we might have a special guy/girl out there who's just finishing off a port of icescream sandwich for the X8.
As it stands, instead of waiting for the latest ROM build, just choose what was best in your experience and stick to it, nothing would change much. I still use the old GX8 ;-)
But, first: let's take our hats off and and humbly give our thanks to those that have paved the way, the dev's that we've bugged (pun), cajoled, bribed (?) and outright threatened to put in into their (ROMs, Kernels,Modules etc) works what we like to have running on our X8's.
in Alphabetical order: (BTW, incase i miss anybody, pls point it out. we don't want any disrespect)
alfsamsung
AnDyx
Blagus
Dare-Devil Inside
Doixanh
DoomLoRd
FrogyFurnetal
FXP team
Master Shpit
Nobodyatall
Ponanovn
Racht
Velnens123
Well on with this simple tutorial:
What's a Kernel? (or, its KERNEL and NOT KERNAL) Simply put, it's the Software Layer in between the ROM and the Hardware. In this case it's Linux 2.6.29. The ROM "Android 'whatever'" is the interface between us users and our beloved X8.
Why 2.6.29 and not a more later kernel? since the Kernel is the go between hardware and the UI, ther drivers for the hardware are there. An analogy will be like Windows 98 drivers will not work (well, sometimes they do) on Windows7 and vice versa. Couple that idea with Google, hence Android, is branched off of the main Linux kernel. Infact, the entire Android kernel code was deleted from the main linux kernel tree.
Besides, look at the title, it's for noobs by a noob. as soon as i figure out how to go to Kernel 2.6.32 or something, i'll update.
Why build your own Kernel? because it's fun!
What you need:
1. Crash Helmet.
2. A desire to possibly brick your X8
3. A fast computer with atleast 20 GB of HD space
4. since you're a noob, you must be using a Windows OS of some sort. If it's still Win3.1 or even Win95 consider upgrading to a faster computer and a more modern OS.i use both a 3.2 Ghz Hexcore AMD with 8Gb of RAM and 2TB HD and a 3.0Ghz Intel Core2 4GB RAM and 500GB HD Both worked fine. I also used a 2.6Ghz Core2, 500GB HD 2GB RAM Laptop and that worked fine as well.
5. Linux based OS. You can have this loaded in your computer a myrad ways, but for us noobs, the easiest will be using Virtual Box (VirtualBox-4.1.6-74713-Win). And, for this tutorial, i set up virtual box with Ubuntu (ubuntu-11.10-desktop-i386). SO, go ahead and download both and install. If you don't know how to find those... you being a noob can only go so far... remember, google is your friend.
7. FXP Kernel Source. It's always a good idea to ask permission first and don't forget to say thanks. > https://github.com/freexperia/semc-kernel-msm7x27. click on the button which says zip.
8. Download this >> https://sourcery.mentor.com/sgpp/li...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
9. and this, http://dl-www.sonyericsson.com/cws/download/1/103/126/1/1316518401/E15i_eclair_2.1.1.A.0.6.tar.gz
So, see you Saturday.
Reserved
Part 5: The code strikes back!
What are those files we downloaded:
1. FXP Kernel Source for MSM7227
2. Linux-GNU compiler
3. SE 2.1.1.A.0.6 Kernel Source.
What do we do with it?
Assuming you've got your VMBox Ubuntu running,
1. Open Home. This is like windows File Explorer.
2. Make a Folder and call it "Kernel".
3. Copy all your downloaded files into the Kernel Folder.
4. Extract those 3 files by right clicking on the archive and select "Open with Archive Manager".
5. Select "Extract" in the upper part of the Archive Manager window. Click "extract" again on the lower right of the window that appears.
are you done extracting? well, if you are then:
6. let's make our lives a bit easier: Rename the arm-2010q1-202-arn-none-linux-gnueabi-i686-pc folder into just arm-2010q1.
7-8 do the same thing with the other two.... No, not the same name as arm2919q1(noob!) but, for the FXP kernel source folder just rename it to FXP and the original SE Kernel Source folder to SeX8.
9. OK. crash helmets ready? Open up Terminal....
(hint: see that wierd symbol above the Home icon in the taskbar? click on it and in the search space type "terminal")
(hint: you can click and drag the Terminal Icon into the task bar for easier use.)
10. type this in exactly but without the double qoutes, Linux is picky about cases. "sudo apt-get install git unrar libncurses5-dev qt3-dev-tools"
remember your homework?
sudo is a command that basically says "hey, i'ma supauser, do what i tell you!" which in this case is to download and install, git, unrar, ncurse libraries and QT3. To be honest, i haven't found much use for Qmake (QT3).
You might be wondering (especially the command line experts) as to why i switch back and forth between the command line and the Home browser. Well, for us noobs, i find it easier to go with the familiar and spend as little time as possible in a super user terminal. Lot's of things can go wrong with a mis-typed command. As for now twiddle your fingers while we wait for the download and install to finish.
Done?
11. OK. since we're gonna be doing kernel stuff lets get super user access. again enter this with no qoutes: sudo /bin/bash
enter your password. don't worry it won't show those loveable asterisks. press enter. if everything's ok we'll see the command prompt again with a difference of root access ;-)
12. next. let's get to our Kernel directory by : "cd ~/Kernel/FXP" (thanks to dioxanh for the correction)
13. Heres where the fun begins:
we set up the environment by entering the following in Termial(NO QOUTES):
"export ARCH=arm"
"export CROSS_COMPILE=/home/viper001/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi- "
BTW, change viper001 in the crosscompile to your user name
14. configuration definitions. this tells the compiler for what machine, what drivers to include, machine configuration etc to include into your kernel build.
so, if you want to see all the machines, for those with any machine with the MSM7227, (HEY, you with the E16) it is possible to compile a kernel for it also.
in this case, lets use the Home Folder explorer. and double-click on the following folders: Kernel >> FXP>> arch>> arm >> configs.
now we're in FXP's archive for the configuration of arm based machines. isn't it nicely logical.
of interest are two configs. fxp_shakira_defconfig and semc_shakira_defconfig. You can view them in gedit by double clicking. but please do not edit.
15. Back to the terminal. type in: "make fxp_shakira_defconfig"
did you see this after it was done? "# configuration written to .config". that means, so far so good.
16. let's see what we've got. This was the reason we downloaded ncurses. enter "make menuconfig"
Explore a bit, and see the settings, don't change any for now. once your done exit back to the terminal prompt.
17. type in: "make" and depending on your PC, it will take from 10 to 30 minutes. give or take a few hours on a pentium 1. (DIDn't i tell you to upgrade?)
18. If all went well, then in the Kernel >> FXP>> arch>> arm >> boot folder, you'll find the image and zimage files. congratulations, you've compiled your first kernel.
So, in summary once you've got all the stuff together you've got to:
sudo /bin/bash
to get superuser access
export ARCH=arm
ready your environment to compile for the arm based machione
export CROSS_COMPILE=/home/viper001/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
ready your environment by specifying the location of your compiler
make "defconfig, menuconfig, oldconfig"
make "defconfig": where defconfig is the default configuration file of a specific machine base on the archive as specified by ARCH.
make menuconfig: give us a pseudo graphical user interface. best used after a make defconfig to do those tweaks.
make oldconfig: you don't want to know. but if your curious just enter it and take a look and waste between 15 to 30 minutes of your life.
make: the final command to get your kernel image.
Here's a few helpfull commands after a failed compile:
make clean
make mrproper
Reserved
Part 6. Return of the Kernel Builder.
You now have the Kernel Image file. so, What do you do next?
Get the IMAGE file in the aforemention folder.
In windows:
Go to Blagus thread on Kernel building. >> http://forum.xda-developers.com/showthread.php?t=1254525
download the unlocking tool if you still don't have it. Don't forget to say Thanks.
download the attached FXPramdisk.zip and extract the ramdisk file inside.
put the image and the ramdisk file into the */sinTools folder of Blagus's utility. note: there's already an existing image and ramdisk in that folder. delete those or save them in another folder.
doubleclick on example_build.cmd and you'll get a result.zip file.
extract the result.elf.sin and rename to kernel.sin. YAY
Now, this is the dirty but most convenient way to wrap things up.
1. make a copy of a working kernel.ftf file.
2. in Blagus's utily, there is a folder called loader with a file inside called loader.sin
3. open up the kernel.ftf file with your favorite archiver. i use 7zip. delete the kernel.sin and loader.sin and then drag and drop your own kernel.sin and Blagus's loader.sin in that kernel.ftf and close.
4. use the flashtool utilty to flash into the X8.
After the flash and powering on, it is always a good idea to clear cache, dalvik cache and the battery stats.
If everything went well and booted to your ROM then you've got yourself the latest build of the FXP ROM.
BUT, HOLD ON!!!!
Don't get that far away look in your eyes as you whisper to yourself "then i am a kernel builder...."
I'll try to say this in my best yoda imitation. "hmmm, hehehehe *cough* *wheeez*.... WiFi, you must compile WiFi.... only then, a Kernel Builder will you be..."
.....
"There are also.... the modules...ramdisk editing..."
See you in Part 1. The Phantom Modules.
It will be very interesting
Thank you!
is there a E16i W8 firmware?
amnher said:
is there a E16i W8 firmware?
Click to expand...
Click to collapse
Check the se developer site. You might get lucky.
EDIT: I actually checked. And there is one for the E16i. The difference between the i and a versions is cdma or GSM. It could just be a matter of using the correct definitions during compile. Let's hope that a kind guru could shed light on this.
Oops. It is an i you're asking for. So go and download this http://developer.sonyericsson.com/wportal/devworld/downloads/download/e16ieclair211a46targz?cc=gb&lc=en
Sent from my TI99 4A
updated.
Part 1. The Phantom Modules
The the early days of the X8 rooting scene. we had two ROM Devs/Porters that gave us an option of going the CM route through MiniCM or the HTC/Motorla route. Now qui-gon and obi... urmm, Racht and Ponanovn did a splendid job in porting these ROMS, especialy since it freed us from Eclair.
But the users wanted more... we wanted multi-touch, we wanted overclock, we wanted netfilters.... heck, lets just say for the price of the X8, we wanted an X10.
Out of the SE deserted android scene, Dioxahn came out with back to back modules that enabled, empowered and brought balance to our X8. (too cheesy?)
But with the advent of X8 Kernel Building, where did these module go? we have to delete the modules from our lib/modules..,.. what happened?
Well, the code they had just went to where they're supposed to be.
It's a frustration that can heard in Dioxanhs words when people asks stuff like dual/multitouch on a synaptics X8 or overvoltage and the like when we can't understand his genius.
to be clear, first and foremost, the modules he made, hijacks and takes over the code built in kernel. Ex. the Kernel might need to know what speed the cpu should be, and there is a code for that, to simplify, as it ask for this code, the OC module intercepts this request and sends its own modified code as an alternative. confused? GOOD.
Overclock:
In ubuntu, go to Kernel >> FXP >> arch >> arm >> mach-msm
double click on acpuclock.c, you will not find the following code as is, since the FXP team disabled the OC from the Kernel. but do a search of :
static void acpuclk_set_div
and you should find a code similar to the OC code that follows but without the items in bold.
DO not modify anything yet. Unless you know what you're doing.
The code below is what enables overclock and is the same instructions inserted by the OC module, it is also the same as in the Google nexus, and alfasamsungs kernel.
static void acpuclk_set_div(const struct clkctl_acpu_speed *hunt_s) {
uint32_t reg_clkctl, reg_clksel, clk_div, src_sel, a11_div;
reg_clksel = readl(A11S_CLK_SEL_ADDR);
/* AHB_CLK_DIV */
clk_div = (reg_clksel >> 1) & 0x03;
/* CLK_SEL_SRC1NO */
src_sel = reg_clksel & 1;
// Perform overclocking if requested
a11_div=hunt_s->a11clk_src_div;
if(hunt_s->a11clk_khz>600000) {
a11_div=0;
writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);
udelay(50);
}
src_sel = reg_clksel & 1;
/*
* If the new clock divider is higher than the previous, then
* program the divider before switching the clock
*/
if (hunt_s->ahbclk_div > clk_div) {
reg_clksel &= ~(0x3 << 1);
reg_clksel |= (hunt_s->ahbclk_div << 1);
writel(reg_clksel, A11S_CLK_SEL_ADDR);
}
Over and under voltage:
Now, this is what im busy of at the moment. i'm trying to find the best PLL clock ratio for GPU to CPU stable speeds within the constraints of the voltage. the bold numbers are the voltage identifiers. since the MSM7227 has a range of 1.2 to 1.35 V operating voltage hence the values from 1 to 7. NO OVERVOLTAGE.
BTW, the part is located in the same file acpuclock.c and is at the begining and is also required to set the maximum CPU clock. The values after the 600Mhz are the values i'm playing with since i think FXP has already "tuned" the stock speed perfectly. In alfasamsungs kernel, he didn't include the scales between 600 and 729. which is very logical. why overclock if you ain't going to max,
/* 7x27 normal with GSM capable modem - PLL0 and PLL1 swapped */
static struct clkctl_acpu_speed pll0_960_pll1_245_pll2_1200[] = {
{ 0, 19200, ACPU_PLL_TCXO, 0, 0, 19200, 0, 0, 30720 },
{ 0, 120000, ACPU_PLL_0, 4, 7, 60000, 1, 3, 61440 },
{ 1, 122880, ACPU_PLL_1, 1, 1, 61440, 1, 3, 61440 },
{ 0, 200000, ACPU_PLL_2, 2, 5, 66667, 2, 4, 61440 },
{ 1, 245760, ACPU_PLL_1, 1, 0, 122880, 1, 4, 61440 },
{ 1, 320000, ACPU_PLL_0, 4, 2, 160000, 1, 5, 160000 },
{ 0, 400000, ACPU_PLL_2, 2, 2, 133333, 2, 5, 160000 },
{ 1, 480000, ACPU_PLL_0, 4, 1, 160000, 2, 5, 160000 },
{ 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 691200, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 710400, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 729600, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 748800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 768000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },
{ 1, 787200, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 },
{ 1, 806400, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 },
// { 1, 825600, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },
// { 1, 844800, ACPU_PLL_0, 4, 0, 211200, 3, 7, 122880 },
// { 1, 864000, ACPU_PLL_0, 4, 0, 216000, 3, 7, 122880 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0} }
};
One of the best things about this is that you can code and configure your "overclock" in acpuclock.c, set the default minmax speed to 122/600 in the defconfig during compile gaining a stock profile and go as high (or low) as you want in the ROM through the CM settings, SetCPU etc. You don't even have to "enable" overclock in the CMsettings.
At any rate, take a break and think about what our devs are doing before you noob them out. ok?
As a guide, i've included my acpuclock.c for your review and comparison to the original se Kernel.
Next. we'll tackle part 2. Touch Screen Wars.
or, they're on the same machine, they look the same... but, (gasps) they're not!!!
Part 2. Touchscreen Wars.
One of the silliest things you'll see on the X8 is the inconsistency in Hardware. We don't know whether it's for cost or different paces of manufacture or maybe parts availability. We even have 4 types of essentially the same machines the E15i and the cdma version E15a. then lately we have the W8 or E16i and E16a. to further compound the issue we even have different touchscreen controllers. And this is what we're gonna look at today.
So, you had fun compiling, played around with the defconfig yet?
well, if not let's take a look at one particular section:
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELAN_I2C_8232 is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI_4X=y
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_MSM_LEGACY is not set
# CONFIG_TOUCHSCREEN_CY8CTMA300 is not set
# CONFIG_TOUCHSCREEN_CY8CTMA300_SER is not set
CONFIG_TOUCHSCREEN_CYTTSP_I2C=y
CONFIG_TOUCHSCREEN_CYTTSP_CORE=y
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_GPIO=y
CONFIG_INPUT_KEYCHORD=y
# CONFIG_BMA150 is not set
I've extracted this from the semc_shakira_defconfig and you'll see that the synaptics and cyprus are enabled.
The question that comes to mind is why the cyprus have true dual while the synaptics X8 user stuck with only a fake? well, sadly the answer is in hardware. NO, it is not the controller... it is the screen, the touch screen sensor itself. like the synaptic advert says, the clearpad 1000 has 1touch + pinch.
What we can do however, especially if you're not planning to distribute your Kernel, is to disable the support for the driver you're not using.... think of it as payback.
To anybody interested to take a look. the touch screen drivers are located at (if you're using the format from the beginning of this tutorial) */FXP/drivers/input/touchscreen.
Files of interest are:
synaptics_i2c_rmi4.c
cyttsp_i2c.c
Well, it isn't much of a war...
Bring out the droids. or, semi-automating the process.
are you tired yet of entering those exports and stuff? well there's and easier way...
I've attached a file for your convenience (never say i didn't do you guys
favors.) called fxp2.txt. rename it to fxp2.bash and copy this into your Work directory. Which in this tutorial's case would be
/home/(your username/Kernel/FXP/
now, double click on this file from the home folders or type gedit fxp2.bash from terminal (be sure your in the working directory).
edit this file so that the paths are correct. save and close.
enter in terminal: "bash fxp2.bash"
cool, huh.
what did it do? first it cleaned up all the mess from previous compiles, then it set up the environment, then it made the .config and opened up the semi-GUI config editor. you can edit the configs as you want and when you exit the GUI, all you have to do is type in "make" et voila!!!
Speaking of the Configs. i'm sure that by now you've disregarded my warnings of not to change anything yet, and i'm very sure that by now you would have found that you can enable swap, setup support for ext234, set up driver support, net filters. etc. Heck, you might have even figured out how to make a kernel for the W8 by now.
But for the guys who did follow my warnings.... Why did you? That's why you want to compile the kernel... you want to be in charge, you want to be the boss of your own X8... the only thing stopping you is you didn't know how... NOW, YOU DO!!!
on the last chapter we'll be dealing with the Code's Revenge... the ramdisk.
part 3. Revenge of the Code
or that "insert profanity here" ramdisk!!!
Never before in the history of Noobiness has anything been more complicatedly crazy than the ramdisk. i mean, compiling the base kernel image is easy compared to this monster.
But we'll not let this stop us! Crash Helmets ON!!!!
What's the Ramdisk?
A ramdisk is basically a small filesystem containing the core files needed to initialize the system. It includes the critical init process, as well as init.rc, which is where you can set many system-wide properties. This is also where the chargemon (off-line charging) and the recovery systems are located.
we built our kernels using Blagus's ramdisk which is included with the bootloader unlock. so let's start with that:
1. get back to your Home folder. make a working folder for the ramdisk. lets call it "ramdisk" for the sake of this tutorial.
2. in the terminal, type "exit". it's a good idea now to get out of root access or we'll run into trouble later by having different access priorities as we switch between the GUI Home folder explorer and the Terminal based command line.
3. still in terminal, get into the ramdisk folder.
(hint: cd /home/(your username)/ramdisk)
4. copy Blagus's ramdisk into the ramdisk folder. you can rename it to ramdisk.cpio.gz or leave it as is.
5. let's upack the ramdisk by: gunzip -c ramdiskfilename | cpio -i
6. YAY!. now you can edit the ramdisk as you like it. I'll not go into this since it would take another tutorial in itself.
7. once you're done messing around with it. remove all the other stuff from the directory that you don't need, like the original ramdisk file.
re-pack the ramdisk with: find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz
you'll find the packed ramdisk.cpio.gz file in /Home.
8. rename this as ramdisk again and use as your ramdisk along with the kernel image you've compiled and make a kernel.sin as explained earlier in the tutorial.
We've now come full circle. Thank you for your time. i'll post more as i discover more and update the tutorial as i learn more.
Better yet, it would be great if you guys post something that would benefit all of us.
Additional Stuff that's good to know/have:
Well, that covers the basics of the kernel. but there's a few more things you might need. you know just in case.
Update your JAVA: you need these if your compiling for Froyo or later.
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
If your planning to build android rom, you'll need these:
(As noted by Dioxanh: for froyo and below, use a 32 bit system and a 64 bit system for gingerbread and above.)
32-bit linux installations:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils
64-bit linux installation:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
Tried to compile it but after make it says:
/bin/sh: /home/root/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
It's because Root home folder is not in /home/root/ it's in /root/
Great tutorial!
Sticky!
Megakaban_ said:
Tried to compile it but after make it says:
/bin/sh: /home/root/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
Click to expand...
Click to collapse
It simply mean that your crosscompile path is wrong. Check the location of arm-2010q1 via home folders explorer.
make mrproper
And start again from
export ARCH=arm
Sent from my TI99 4A
Now kernel compiled successfully and i tried to change initlogo.
As written here: http://forum.xda-developers.com/showpost.php?p=6775233&postcount=5 i've converted .rle to .bmp and edited it. Now when i converted back to .rle, i got just colour strips.
Megakaban_ said:
Now kernel compiled successfully and i tried to change initlogo.
As written here: http://forum.xda-developers.com/showpost.php?p=6775233&postcount=5 i've converted .rle to .bmp and edited it. Now when i converted back to .rle, i got just colour strips.
Click to expand...
Click to collapse
It's like the OP said, you're bound to lose something in the conversion. Try to search for superangga's init logo conversion thread in Google.
Sent from my TI99 4A
My nick is velnens123! I hate when people spell my nick wrong!
---------- Post added at 03:20 PM ---------- Previous post was at 03:08 PM ----------
Anyway good tutorial, will try it tommorow!
velnens123 said:
My nick is velnens123! I hate when people spell my nick wrong!
---------- Post added at 03:20 PM ---------- Previous post was at 03:08 PM ----------
Anyway good tutorial, will try it tommorow!
Click to expand...
Click to collapse
Oops. Sorry. Can I blame it on the x8 spell checker?
Corrected. ;-)
Sent from my TI99 4A
i've updated post #9, it's a simple look at the defconfig and a tip to make life a bit more easy. pretty sure some guys are already sick and tired of typing and retyping the same code. But hey, doing things repeatedly is a great way to learn. it also turns you into a zombie....
viper001, does your thread realy fits in General forum? I think not...
And your thread needs to be sticky!
velnens123 said:
viper001, does your thread realy fits in General forum? I think not...
And your thread needs to be sticky!
Click to expand...
Click to collapse
Actually, I couldn't decide between gen or dev. But, I'm not developing anything nor is it a question. Lol.
A sticky would be nice. ;-)
Sent from my TI99 4A
Can you please give me a hand with building my CM for the Nexus 7 GSM?
I have a number of problems.
When running "brunch tilapia" as specified in the CM tutorial for building for the Nexus 7 GSM, I get the following errors:
I don't get a zip file output in the "out" Directory
I am getting the following errors:
/bin/bash: flex: command not found
Warning: assignment from incompatible pointer type [enabled by deafult]
13: warning: extra tokens at end of #ifdef directive [enabled by default]
warning: 'fin' may be used uninitialized in this function [-Wmaybe-uninitialized
warning: implicit declaration of function 'read_all' [-Wimplicit-funtion-declaration]
You are attemtping to build with an unsupported version of java.
find: 'src' : no such file or directory
No private recovery resources for TARGET_DEVICE tilapia
Please help!
I tried wiping and re-installing, wiping the repo and re-initializing that.
I followed all the steps I believe, must just be unlucky.
Peace,
shandy1996
Perhaps you know this, but there is a thread for building cm10.1 for the n7 here: http://forum.xda-developers.com/showthread.php?t=1846651.
Some of the warnings you have listed are normal and are nothing to worry about. However, it looks like you are missing the package flex, so try 'sudo apt-get install flex', depending on what Linux distro you are using, then try again.
Thanks, but still one quiestion...
Why do I not get any .zip file output?
I am not sure as to why this is, but an answer would be much appreciated.
Thanks for you help, hopefully i can sort it out
Peace and thanks again,
shandy1996
It's because the build aborts as soon as it realizes that a required build package is missing. In a way it's kind of an all or nothing thing... you don't get a zip package until you have everything in place and set up properly.
Did you try installing the package 'flex' as suggested? I'm not positive, but that might be the issue, unless there are other errors or missing packages.
Also, have you posted in the thread on building cm10.1? You would probably get more help there!
I installed flex and it solved that error, but still no zip output.....
Ok ,what did it say at the end when it stopped? Also, what version of Linux are you using and what guide are you following? The guide linked in the other thread works great.
I used the guide on the CyanogenMod wiki for building for the Nexus 7 GSM.
I am running Ubuntu 12.10 64-bit.
The error i get at the end of the build process is:
Code:
make: *** No rule to make target 'vendor/asus/tilapia/proprietary/tf_daemone', needed by '/home/jacob/androis/system/out/target/product/tilapia/obj/EXECUTABLES/tf_daemon_intermediates/tf_daemon'. Stop.
ah ok, i had this exact same issue, i think it might be an internal thing, not your fault. for some reason the file tf_daemon seems to be missing, so someone suggested manually placing it in the proper place. i was directed to find the file here: https://github.com/AOKP/vendor_asus_grouper/tree/jb/proprietary/bin. so i downloaded it and put it in the folder /vendor/asus/tilapia/proprietary, and this problem was solved
LOLLIPOP!
This is a project thread to help out with getting Lollipop on our HDs !
this is the default manifest that you can put into your repo to make things more smooth for you:
https://www.androidfilehost.com/?fid=95784891001611544
Download Repo:
Code:
repo init -u [url]https://android.googlesource.com/platform/manifest.git[/url] -b android-5.0.0_r7
Then Run:
Code:
repo sync -j#
(#=6,8,16,32) depends on how well your pc can handle muliple projects at once
After sources have downloaded Run:
Code:
lunch
then choose device which is tate
then Run:
Code:
make -j8 otapackage
and itll start compiling
Sources have been bumped up to LRX21T 5.0.0_r7
CURRENT ERRORS AND TEMPORARY FIXES
ERROR #1
So it builds and then stops at netlink/genl/genl.h no such file...
to fix this error run:
Code:
cd external
then:
Code:
git clone https://android.googlesource.com/platform/external/libnl-headers
and then:
Code:
make -j8 otapackage
ERROR #2
Code:
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::configureOutputBuffersFromNativeWindow(OMX_U32*, OMX_U32*, OMX_U32*)':
frameworks/av/media/libstagefright/ACodec.cpp:627:11: warning: 'int native_window_set_buffers_geometry(ANativeWindow*, int, int, int)' is deprecated (declared at system/core/include/system/window.h:734) [-Wdeprecated-declarations]
err = native_window_set_buffers_geometry(
^
frameworks/av/media/libstagefright/ACodec.cpp:631:42: warning: 'int native_window_set_buffers_geometry(ANativeWindow*, int, int, int)' is deprecated (declared at system/core/include/system/window.h:734) [-Wdeprecated-declarations]
def.format.video.eColorFormat);
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::allocateOutputBuffersFromNativeWindow()':
frameworks/av/media/libstagefright/ACodec.cpp:779:5: error: 'mNumUndequeuedBuffers' was not declared in this scope
mNumUndequeuedBuffers = minUndequeuedBuffers;
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::allocateOutputMetaDataBuffers()':
frameworks/av/media/libstagefright/ACodec.cpp:848:5: error: 'mNumUndequeuedBuffers' was not declared in this scope
mNumUndequeuedBuffers = minUndequeuedBuffers;
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'void android::ACodec::waitUntilAllPossibleNativeWindowBuffersAreReturnedToUs()':
frameworks/av/media/libstagefright/ACodec.cpp:2969:48: error: 'mNumUndequeuedBuffers' was not declared in this scope
while (countBuffersOwnedByNativeWindow() > mNumUndequeuedBuffers
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::pushBlankBuffersToNativeWindow()':
frameworks/av/media/libstagefright/ACodec.cpp:3591:11: warning: 'int native_window_set_buffers_geometry(ANativeWindow*, int, int, int)' is deprecated (declared at system/core/include/system/window.h:734) [-Wdeprecated-declarations]
err = native_window_set_buffers_geometry(mNativeWindow.get(), 1, 1,
^
frameworks/av/media/libstagefright/ACodec.cpp:3592:39: warning: 'int native_window_set_buffers_geometry(ANativeWindow*, int, int, int)' is deprecated (declared at system/core/include/system/window.h:734) [-Wdeprecated-declarations]
HAL_PIXEL_FORMAT_RGBX_8888);
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'bool android::ACodec::BaseState::onOMXMessage(const android::sp<android::AMessage>&)':
frameworks/av/media/libstagefright/ACodec.cpp:3813:26: warning: NULL used in arithmetic [-Wpointer-arith]
if (mCodec->mNode == NULL) {
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'virtual void android::ACodec::UninitializedState::stateEntered()':
frameworks/av/media/libstagefright/ACodec.cpp:4406:19: warning: converting to non-pointer type 'android::IOMX::node_id {aka unsigned int}' from NULL [-Wconversion-null]
mCodec->mNode = NULL;
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'bool android::ACodec::UninitializedState::onAllocateComponent(const android::sp<android::AMessage>&)':
frameworks/av/media/libstagefright/ACodec.cpp:4477:5: warning: NULL used in arithmetic [-Wpointer-arith]
CHECK(mCodec->mNode == NULL);
^
frameworks/av/media/libstagefright/ACodec.cpp:4525:26: warning: converting to non-pointer type 'android::IOMX::node_id {aka unsigned int}' from NULL [-Wconversion-null]
IOMX::node_id node = NULL;
^
frameworks/av/media/libstagefright/ACodec.cpp:4544:14: warning: converting to non-pointer type 'android::IOMX::node_id {aka unsigned int}' from NULL [-Wconversion-null]
node = NULL;
^
frameworks/av/media/libstagefright/ACodec.cpp:4547:17: warning: NULL used in arithmetic [-Wpointer-arith]
if (node == NULL) {
^
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'bool android::ACodec::LoadedState::onConfigureComponent(const android::sp<android::AMessage>&)':
frameworks/av/media/libstagefright/ACodec.cpp:4693:5: warning: NULL used in arithmetic [-Wpointer-arith]
CHECK(mCodec->mNode != NULL);
^
make: *** [/home/android/lol/out/target/product/tate/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
Note: frameworks/base/cmds/am/src/com/android/commands/am/Am.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
#### make failed to build some targets (04:22 (mm:ss)) ####
to fix this error: download this ACodec.cpp and replace it with the one thats in frameworks/av/media/libstagefright
ERROR #3
Code:
bcmdhd-wifi/wpa_supplicant_8_lib/driver_cmd_nl80211.c:65: error: undefined reference to 'os_strncpy'
collect2: error: ld returned 1 exit status
to fix this error: download this driver_cmd_nl80211.c and replace it with the one thats in device/amazon/bowser-common/bcmdhd-wifi/wpa_supplicant_8_lib
NOTE: I got it to compile completely but just so your aware this is in no way good enough to flash as of yet!! Some things still need to be worked out before you can flash away!! YOUVE BEEN WARNED!!
Lollipop Compiled files
WARNINGHEREWARNING
Any Questions, Solutions, or Ideas post them here...
Did you already get past the camera and HardwareComposer issues?
r3pwn said:
Did you already get past the camera and HardwareComposer issues?
Click to expand...
Click to collapse
Yea I got past it using that default.xml. it compiled 95% but got stuck with the error in the op.
Sent from my Nexus 5 using Tapatalk
BuQQzz said:
Yea I got past it using that default.xml. it compiled 95% but got stuck with the error in the op.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Have you tried compiling CM12 yet? A lot of issues I was having with AOSP weren't there in CM.
I only had the CM12 sources downloaded, never got to compile it because my external hard drive gave out on me so I lost everything including the changes I made when compiling aosp! I'm waiting on a new hard drive to come in and then try again
Sent from my Nexus 5 using Tapatalk
Did you setup the device tree for CM12?
Sent from my Nexus 5 using Tapatalk
BuQQzz said:
Did you setup the device tree for CM12?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I did, but it never compiled all the way. I forget which error it's stuck on now...
Cleaned and updated op with latest repo, errors and temp fixes!
BuQQzz said:
Cleaned and updated op with latest repo, errors and temp fixes!
Click to expand...
Click to collapse
Glad you fixed the error! Will it compile all the way now? Im syncing the sources now
faZevoLv said:
Glad you fixed the error! Will it compile all the way now? Im syncing the sources now
Click to expand...
Click to collapse
It threw out another error with ACodec.cpp but what I did was delete some folders 1.kernel 2.build 3.out 4.vendor 5.device ... Repo sync, and it's been compiling good so far, I'd say about 2 hours in!
No go . stuck on ACodec.cpp errors, think it might have something to do with new 64bit support, need to do more research on this.
BuQQzz said:
No go . stuck on ACodec.cpp errors, think it might have something to do with new 64bit support, need to do more research on this.
Click to expand...
Click to collapse
Could you copy ajd paste the exact error you are getting please
I think this guy might have it fixed
https://github.com/mstorsjo/platform_frameworks_av/tree/master/media/libstagefright
faZevoLv said:
Could you copy ajd paste the exact error you are getting please
I think this guy might have it fixed
https://github.com/mstorsjo/platform_frameworks_av/tree/master/media/libstagefright
Click to expand...
Click to collapse
Nice find I'll take a look at it after work and edit the op with the error
faZevoLv said:
Could you copy ajd paste the exact error you are getting please
I think this guy might have it fixed
https://github.com/mstorsjo/platform_frameworks_av/tree/master/media/libstagefright
Click to expand...
Click to collapse
I looked at it but I see no workaround for our error, i posted it in the op so everyone can take a look at it, hope we can get around this soon!
Just fixed the ACodec.cpp, used a line of code from 4.4.4_r2.0.1
Caught another error with a WiFi driver, took care of that, I'll post everything in the op . got a successful build now!! Tried flashing the zip with system unmounted and flashed successfully...buttttt.... Screwed the hell out of the bootloader ! Haha. Note to self: check zip files before flashing ?. I'll be uploading the zip so we can debug this thing..
Good News!!
OP Updated with fixes for a complete build and compiled files to mess around with!
Uploads are hot and ready to go! ive been working on a flashable zip all night, i might have something to flash by tmm night, im exausted!
Again... a warning for those who dont know what theyre doing pleeeeease do not download and try flashing and end up with a pretty bad brick
:good:
BuQQzz said:
OP Updated with fixes for a complete build and compiled files to mess around with!
Uploads are hot and ready to go! ive been working on a flashable zip all night, i might have something to flash by tmm night, im exausted!
Again... a warning for those who dont know what theyre doing pleeeeease do not download and try flashing and end up with a pretty bad brick
:good:
Click to expand...
Click to collapse
So does the build flash and boot? or is it completely messed up? im trying to build omnirom and see if they have any fixes, im syncing te sources now so ill report back once ive started te build and if there are the same errors you have experienced!
And good job bro for getting the first build up for te Kindle!
faZevoLv said:
So does the build flash and boot? or is it completely messed up? im trying to build omnirom and see if they have any fixes, im syncing te sources now so ill report back once ive started te build and if there are the same errors you have experienced!
And good job bro for getting the first build up for te Kindle!
Click to expand...
Click to collapse
itll flash but not boot, instead itll bootloop on the orange kindle fire logo turning on and off. youd have to fastboot everything back. ive tried flashing the imgs aswell with same results... not sure what it is yet but im sure well get there!
BuQQzz said:
itll flash but not boot, instead itll bootloop on the orange kindle fire logo turning on and off. youd have to fastboot everything back. ive tried flashing the imgs aswell with same results... not sure what it is yet but im sure well get there!
Click to expand...
Click to collapse
hmmm i wonder wy that is, ill compile tis omnirom and see if i get the same results, i modified te manifest.xml with the missing repos from your manifest so it should work, sources are at 31% now so it sould be done in a couple of hours
i cant download your rom file, it says i dont have permission...
Hi,
This is a guide on compiling the latest (as of 2015-06-24) dropbear SSH daemon (2015.67) for the Nexus 7 2013 but should also work for other ARM architecture Android devices. The guide is mainly based off the work from the blog http://blog.xulforum.org/index.php?post/2013/12/19/Compiling-Dropbear-for-a-Nexus-7-tablet which is an excellent guide to getting an older version of dropbear running on ARM Android devices.
I've modified the patch made by the original author to work on the latest dropbear version. There are not much changes from ver 2013.58 to 2015.67. The main difference seems to be the support for Elliptical Curve encryption.
** START DISCLAIMER **
I did not write the original codes/patch myself and have not scrutinized it for any security issues. USE IT AT YOUR OWN RISK.
** END DISCLAIMER **
Here's the list of requirements :-
1) Dropbear 2015.67 source code - dropbear-2015.67.tar.bz2 (https://matt.ucc.asn.au/dropbear/releases/dropbear-2015.67.tar.bz2)
2) Patch to compile for Android - dropbear-v67-android-patch-20150630 (https://goo.gl/Obo6kT) OR alternatively, you can use the patch from user serasihay (https://goo.gl/ip6Tkb).
3) A recent Linux distro (I use Ubuntu 14.04.2 LTS).
4) Development tools i.e. C compiler, linker, etc... all the necessary tools to run configure, make, etc..
5) Android NDK (I'm using rev 10e) installed & setup on Linux.
Steps :-
(1) Extract the source code to a directory of its own :-
Code:
tar xjf dropbear-2015.67.tar.bz2
cd dropbear-2015.67
(2) Patch the source :-
Code:
patch -p1 < dropbear-v67-android-patch-20150630
(3) Run configure :-
Code:
./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi \
--disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog
(4) Edit config.h, search for USE_DEV_PTMX and add the following line after that :-
Code:
#define USE_DEV_PTMX 1
(5) Run make :-
Code:
STATIC=1 MULTI=1 SCPPROGRESS=0 PROGRAMS="dropbear dropbearkey scp dbclient" make strip
(6) You should end up with a single static binary "dropbearmulti" which you should link dropbear, dbclient/ssh, dropbearkey and scp to.
Code:
./dropbear -h
Dropbear server v2015.67 https://matt.ucc.asn.au/dropbear/dropbear.html
Usage: ./dropbear [options]
-A Android Mode, specify a user explicitly
-N Android Mode, user name
-C Android Mode, password
-R Android Mode, public key file (authorized_keys)
-U Android Mode, UID
-G Android Mode, GID
-b bannerfile Display the contents of bannerfile before user login
(default: none)
-r keyfile Specify hostkeys (repeatable)
defaults:
dss /etc/dropbear/dropbear_dss_host_key
rsa /etc/dropbear/dropbear_rsa_host_key
ecdsa /etc/dropbear/dropbear_ecdsa_host_key
-F Don't fork into background
-E Log to stderr rather than syslog
-m Don't display the motd on login
-w Disallow root logins
-s Disable password logins
-g Disable password logins for root
-B Allow blank password logins
-j Disable local port forwarding
-k Disable remote port forwarding
-a Allow connections to forwarded ports from any host
-p [address:]port
Listen on specified tcp port (and optionally address),
up to 10 can be specified
(default port is 22 if none specified)
-P PidFile Create pid file PidFile
(default /var/run/dropbear.pid)
-i Start for inetd
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive> (0 is never, default 0, in seconds)
-I <idle_timeout> (0 is never, default 0, in seconds)
-V Version
I will assume you know what to do with the binary file generated so will not elaborate on the process.
Hope it works for you guys. I'll be happy to help out anyone who needs more details.
NOTE: I have posted a similar guide for building dropbear for an x86 Android device in the Zenfone 2 forum (http://forum.xda-developers.com/zenfone2/general/compiling-dropbear-2015-67-zenfone-2-t3142222). The steps are mostly similar.
Cheers.
UPDATE: 2015-06-29
- I've updated the patch to fix dbclient/ssh client using password authentication.
UPDATE: 2015-06-30
- Reverted the patch for the dbclient fix as NDK does not have getpass() function. Looks like dbclient with password auth will seg fault until we can find an alternative to getpass().
UPDATE: 2015-06-30 (2)
- Uploaded yet another update to the patch to include a version of getpass(). Hopefully it works
UPDATE: 2015-07-02
- Added alternate dropbear patch by serasihay (Thanks!). Details of changes can be found here :- http://forum.xda-developers.com/showpost.php?p=61649194&postcount=14
Thank you for the guide, wolfdude!
I'm more interested in the client rather than the server, though.
Have you tried it? Does it work for you? For me, it doesn't.
I'm tying to connect to a remote host using the password authentication, but a segmentation fault occurs just after accepting the key of the remote host. It doesn't get to ask for the password.
The crosscompilation process goes without errors. I copy the binary to the Nexus, I do the symlinks in /system/xbin, etc.
I run the client from Terminal Emulator, and the remote host key is correctly stored in .ssh/known_hosts, inside the app's "app_HOME" directory found in /data.
On the remote server I can see that the connection request is received, the provided user is successfully identified as valid/existing; and the key algorithm exchange seems to succeed, too... But after that the connection is closed by the client... :-?
Hi serasihay,
Yes, I'm getting a Seg Fault too when I use the SSH client and using password auth. When I use an identity file, I don't get a SegFault and it connects successfully. I'm not sure what's causing the Seg Fault. When I get some time, I might have to run it through a debugger to find out. There might be more patches required to get the client working.
Cheers.
Thank you for confirming it, wolfdude.
I also think that there's more code to be patched.
I'm reading to learn how to debug the binary... Never done this on Android...
Thanks again for your time!
Hi Serasihay,
I've updated the patch to fix the seg fault issue. Turns out that the original patch commented out a chunk of code that was required for password authentication. Please test it out and hopefully this works well for you.
Cheers.
It looks like you've uploaded the old patch again by mistake... I diffed both files and they are exactly the same.
Yesterday I made good progress learning how to debug remotely a binary running on an Android device. I had to recompile the binary without striping the symbols, etc.
I'm a bit out of my depth here, but I'll continue trying to understand where's the flaw.
Code:
$ adb forward tcp:5039 tcp:5039
$ ./android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
[...]
(gdb) target remote :5039
(gdb) symbol-file dropbear-2015.67/dropbearmulti
Reading symbols from dropbear-2015.67/dropbearmulti...done.
(gdb) run
The "remote" target does not support "run". Try "help target" or "continue".
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x000527cc in strlen (s=0x0) at bionic/libc/arch-arm/bionic/strlen.c:62
62 bionic/libc/arch-arm/bionic/strlen.c: No such file or directory.
(gdb) backtrace
#0 0x000527cc in strlen (s=0x0) at bionic/libc/arch-arm/bionic/strlen.c:62
#1 0x0000aff0 in cli_auth_password ()
#2 0x0000a7ec in cli_auth_try ()
#3 0x0000f534 in cli_sessionloop ()
#4 0x000161a0 in session_loop ()
#5 0x0000f16c in cli_session ()
#6 0x0000d604 in cli_main ()
#7 0x00008228 in main ()
(gdb) frame 1
#1 0x0000aff0 in cli_auth_password ()
(gdb) info frame
Stack level 1, frame at 0xbecbf848:
pc = 0xaff0 in cli_auth_password; saved pc = 0xa7ec
called by frame at 0xbecbf860, caller of frame at 0xbecbf7d0
Arglist at 0xbecbf844, args:
Locals at 0xbecbf844, Previous frame's sp is 0xbecbf848
Saved registers:
r4 at 0xbecbf834, r5 at 0xbecbf838, r6 at 0xbecbf83c, r11 at 0xbecbf840, lr at 0xbecbf844
(gdb)
I guess the code commented out in the patch that you are referring to is the one that, in cli-auth.c, does the following aasignement:
Code:
password = getpass(prompt);
It makes sense, because from the debugging "session" I posted int my previous post, one could deduce that the problem is that a null string is passed to cli_auth_password ()...
But, unhappily, the function getpass is not provided by the Android C library (Bionic). If you try to build with a "corrected" patch, you end up with this error:
Code:
cli-auth.o:cli-auth.c:function getpass_or_cancel: error: undefined reference to 'getpass'
I'll try to find a workaround. Any help will be appreciated!
serasihay said:
I guess the code commented out in the patch that you are referring to is the one that, in cli-auth.c, does the following aasignement:
...
I'll try to find a workaround. Any help will be appreciated!
Click to expand...
Click to collapse
Hi serasihay,
You're on the right track That is indeed the function causing the seg fault. I've updated the post to have the correct URL to the CORRECT patch now. Please try again and let me know how it goes.
Cheers.
Hi wolfdude,
The corrected patch you've uploaded is like the one I already tried. As I was saying in my previous post:
serasihay said:
But, unhappily, the function getpass is not provided by the Android C library (Bionic). If you try to build with a "corrected" patch, you end up with this error:
Code:
cli-auth.o:cli-auth.c:function getpass_or_cancel: error: undefined reference to 'getpass'
Click to expand...
Click to collapse
So, in my opinion, it's a matter of finding an alternative to "getpass", or implementing a new one... I'm reading what would be the better solution.
Thank you again for your time!
Cheers.
Ahh... apologies for not reading correctly. I see what you meant now. I did my compile/build on an x86 android device and I assumed that it would also work for ARM using the NDK. Let us know how you go with the getpass() alternative.
Thanks.
Hi serasihay,
Ok... I've uploaded another patch this time to include a getpass() function which I pinched & modified from the GLIBC library. Hopefully it works as expected. Again... I didn't audit it for any security issues so use at your own risk
Cheers.
Thank you very much for your help and efforts, wolfdude.
I've taken my chances with your new patch... But the code doesn't compile, either.
Now the problem is with the "getline" function:
Code:
cli-auth.o:cli-auth.c:function getpass: error: undefined reference to 'getline'
I'll keep struggling with it as time allows...
Edit:
I've found a working getpass function. The code compiles and allows me to successfuly login to my remote machine!
https://github.com/CyanogenMod/android_external_dropbear/blob/cm-12.0/netbsd_getpass.c
When I get time I'll see if it is secure to include it and what would be the proper way to do so. I'm out of my depth here. Of course, feel free to make a new patch or whatever you consider appropriate, surely you're more experienced than I am!
Good to know you have it working now. I'm no developer too so can't really comment on which ever is better. As long as it works right
Cheers.
I've uploaded the patch that makes the dropbear client work for me.
https://goo.gl/ip6Tkb
Basically, it is the one you uploaded initially, but it corrects the problem with the getpass function by using the one implemented in the file netbsd_getpass.c.
To sum it up, my patch differs from your first one in that:
* Adds two new files, netbsd_getpass.h and netbsd_getpass.c.
* Modifies cli-auth.c to include the netbsd_getpass.h in order to use its getpass function.
* Modifies the Makefile.in so that the netbsd_getpass.c object is compiled and included into the dropbearmulti binary.
* Modifies options.h to change the path of the SSH which is used in scp.c to: _PATH_SSH_PROGRAM "/system/xbin/dbclient"; i.e.: it assumes that you do the appropiate symlink in /system/xbin...
Cheers!
Good stuff! I'll update the original post to have a link to your patch.
Thanks.
I'll be happy if it helps anyone.
Thank you!
If you have openssl ported to Android, there's a simple, useful patch that substitutes crypt with openssl's DES_crypt.
Link to the description (which contains a link to the patch) is here: http://www.gossamer-threads.com/lists/openssh/bugs/55836
Note: DES encryption isn't the best, but it's better than cleartext. I did look through the openssl headers/libs for an AES_crypt or 3DES_crypt but couldn;t find anything
static compile... 'No such file or directory" error
Excellent guide -- wolfdude & serasihay thank-you. I'm new to andriod and was clueless on how to do this.
I have the dbclient running, but only if I compile without the STATIC=1. Whenever I use static I get an "sh: ./dbclient: No such file or directory" error immediately upon execution. Any idea why this is happening?
I'm using a Motorola Moto G (the new Moto G sometimes called the Moto G2). As the non-static is quite a bit smaller and seems to run okay I'm wondering if not using static will bomb on other devices and I'm just lucky with the Moto G.
Hi,
No idea why you can't compile it as static... but if the dynamic executable works for you then it should be ok.
Cheers.
I have tried to compile dropbear with both patches. But everytime it shows ::
gcc -I./libtomcrypt/src/headers/ -I. -I. -Os -W -Wall -Wno-pointer-sign -DDROPBEAR_SERVER -DDROPBEAR_CLIENT -DDBMULTI_dropbear -DDBMULTI_dbclient -DDBMULTI_dropbearkey -DDBMULTI_dropbearconvert -DDBMULTI_scp -DDROPBEAR_MULTI -c -o netbsd_getpass.o netbsd_getpass.c
netbsd_getpass.c: In function 'getpass':
netbsd_getpass.c:68:18: error: '_PASSWORD_LEN' undeclared (first use in this function)
netbsd_getpass.c:68:18: note: each undeclared identifier is reported only once for each function it appears in
netbsd_getpass.c:68:14: warning: unused variable 'buf' [-Wunused-variable]
netbsd_getpass.c:114:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [netbsd_getpass.o] Error 1
Click to expand...
Click to collapse