yashsingh1/xdaforums huggingface dataset:
[Atrix 4G General] marcovrv:
Getting Linaro toolchain on Ubuntu 11.04 and later

According with Linaro wiki, the recommended way to get the toolchain on Ubuntu 11.04 and later is:

$ sudo apt-get install gcc-arm-linux-gnueabi

This gets a smaller download than the toolchain.zip in the OP and gets it installed in standard places (adjusting PATH variables, etc) and in an "updateable" form (since they are coming from standard repositories).

The EXPORT variable must be adjusted accordingly (don't forget the last dash):

$ export CROSS_COMPILE=arm-linux-gnueabi-

I used this on a clean Ubuntu 13.04 install and worked great. However, do take in account that I also installed all AOSP recommended packages before compiling since I want to compile CM10 too (repo sync'ing right now), so I don't know if all of them are required for kernel compiling or just the ones indicated in the OP.

HTH. Marco.
[Atrix 4G General] atrix4g18:
The toolchain can just be used as is. The smaller download is nice, but this is the simplest way.

Now, if you link me to a download of that that I can repackage as a smaller zip but keep the same folder structure, I will.
[Atrix 4G General] dontremember:
I think it's related to the way the zip file was assembled. I just zipped up a copy of the linaro directory, then checked the zip listing for that lib32 directory:

zip -r linaro-new.zip linaro

unzip -l linaro-new.zip | grep linaro/arm-unknown-linux-gnueabi/lib32

0 04-27-2013 00:10 [B]linaro/arm-unknown-linux-gnueabi/lib32/[/B]
30442 04-11-2013 16:05 linaro/arm-unknown-linux-gnueabi/lib32/libnss_compat-2.17.so
1432019 04-11-2013 16:21 linaro/arm-unknown-linux-gnueabi/lib32/libgcc_s.so.1
78184 04-11-2013 16:05 linaro/arm-unknown-linux-gnueabi/lib32/libnsl-2.17.so
----- snip a bunch of lines -----

which tells me that when you unzip it, the linaro/arm-unknown-linux-gnueabi/lib32 directory gets created, then a bunch of stuff is dropped in there. The original linaro.zip has it the other way around:

unzip -l linaro.zip | grep linaro/arm-unknown-linux-gnueabi/lib32

----- snip a bunch of lines -----
643232 04-11-2013 16:21 linaro/arm-unknown-linux-gnueabi/lib32/libsupc++.a
18 04-25-2013 22:03 linaro/arm-unknown-linux-gnueabi/lib32/libpthread.so.0
0 04-11-2013 15:36 linaro/arm-unknown-linux-gnueabi/lib32/ldscripts/
3 04-25-2013 22:02 [B]linaro/arm-unknown-linux-gnueabi/lib32[/B]

unzip will create whatever directory structure it needs to place the files it extracts, so as long as you don't do a 'rename', you should be able to ignore the error messages.

---------- Post added at 01:44 PM ---------- Previous post was at 01:31 PM ----------

I just looked at the "menu" script - if you edit it and comment out the "$KITCHEN in the last line, you don't need to press "Ctrl+C". All that last line does is restart the menu script from the top, which is not necessary as you're breaking out anyway. And then it becomes possible to put all of the above command lines into a script and run it all in one go...
[Atrix 4G General] atrix4g18:
It is almost like you are predicting the future. Something special is coming before 3.
[Atrix 4G General] dontremember:
I just do a lot of Linux scripting. "./menu" runs several other scripts, so it ought to be possible to mash them together into one parent script. What I have so far:

#!/bin/bash

# All credit goes to [B]atrix4g18[/B] - http://xdaforums.com/showthread.php?t=2251988

# Need to remove "$KITCHEN" from the last line of the "./menu" script for this to work

export CROSS_COMPILE=${HOME}/olympus/linaro/bin/arm-unknown-linux-gnueabi-

if [ -n "$1" ]; then
CMVER=$1
else
CMVER="10"
fi

CMVER=CM${CMVER}

cd ${HOME}/olympus/android_kernel_motorola_olympus/
git remote update
make clean && make mrproper
make -j2 ARCH=arm mrom_defconfig
make -j2 ARCH=arm
cp ${HOME}/olympus/android_kernel_motorola_olympus/arch/arm/boot/zImage ${HOME}/olympus/kitchen/kernel-tools/input/

cp ${HOME}/olympus/misc/${CMVER}/boot.img ${HOME}/olympus/kitchen/kernel-tools/input/
cd ${HOME}/olympus/kitchen/kernel-tools/
./menu
cp ${HOME}/olympus/kitchen/kernel-tools/output/bootimg-contents/initrd.img ${HOME}/olympus/kitchen/kernel-tools/input
cd ${HOME}/olympus/kitchen/kernel-tools/
./menu
cp ${HOME}/olympus/kitchen/kernel-tools/output/boot.img ${HOME}/olympus/kernel-working/
find ${HOME}/olympus/android_kernel_motorola_olympus/drivers/ -name *.ko -exec cp -f {} ${HOME}/olympus/kernel-working/system/lib/modules/ \;
cd ${HOME}/olympus/kernel-working/
zip -r ${CMVER}_new_kernel.zip *

mv ${CMVER}_new_kernel.zip ~
[Atrix 4G General] atrix4g18:
Sorry you did all that. I have made a new thread with an automatic script made by the amazing mapkel.

Check it out: http://xdaforums.com/showthread.php?p=40778514
[Atrix 4G General] tpr0:
Guyz, does this work with CM10.1?

Thanks :cowboy:

EDIT: Just finished creating the boot.img, works perfect with MROM9, tried CM10 preset with epinter cm10.1, not working :/. Downloading CM10 epinter, though should I download CM10 with those libs?
[Atrix 4G General] atrix4g18:
You will need to build CM10.1 from source. Wi-Fi doesn't work though and it is not worth it.

*********

I have created a new thread with a script to build the kernel. Full credit for the script goes to the amazing mapkel. Without him there would be no script.

This is beyond simple. Anyone can build this, but please read the thread carefully and understand the risks.

[Script] Build ICS/JB Kernel

For those who can't click: http://xdaforums.com/showthread.php?t=2253529

Keep in mind this will be compatible with the public alpha that is soon to be released.

This will let you get the latest kernel changes and some experience, so it is not taking away from the public alpha, merely complimenting it.
[Atrix 4G General] dontremember:
No worries!! I just ran through your method once, saved my history, then edited out the irrelevant bits. Maybe 30 minutes total.
[Atrix 4G General] marcovrv:
You could get the .deb package from the ubuntu repositories but there is one different for each supported release (at least the last four), too many complications, if you ask me, its far easier to "sudo apt-get install" it; you would get the right one for your distribution.

The point is that with those commands, the toolchain.zip (and the toolchain folder) seems unnecessary. At least, I don't have it and the kernel compiles just fine. I do package the flashable kernel zip manually, but I use/need nothing on the toolchain for that, just bootimgutils from this thread; not as nice as your menu driven method, but suits me.

BTW, I did find your kernel-working.zip really useful, because I was flashing the whole CM9 because I didn't find a suitable CM9 standalone kernel zip.

Regards, Marco.
[Atrix 4G General] atrix4g18:
Check out the post above for the Script thread. No issues there.
[Atrix 4G General] odystyle:
there are issue on that script ( bandwidth error)....

anyway i usae ubuntu 12.04 LTS to compile this kernel and i got this when pack the kernel

ody@ubuntu:~/olympus/kernel-working$ zip -r new_kernel.zip *

adding: boot.img (deflated 1%)

adding: META-INF/ (stored 0%)

adding: META-INF/CERT.SF (deflated 61%)

adding: META-INF/CERT.RSA (deflated 33%)

adding: META-INF/MANIFEST.MF (deflated 61%)

adding: META-INF/com/ (stored 0%)

adding: META-INF/com/android/ (stored 0%)

adding: META-INF/com/android/metadata (deflated 8%)

adding: META-INF/com/google/ (stored 0%)

adding: META-INF/com/google/android/ (stored 0%)

adding: META-INF/com/google/android/updater-script (deflated 59%)

adding: META-INF/com/google/android/update-binary (deflated 36%)

adding: system/ (stored 0%)

adding: system/lib/ (stored 0%)

adding: system/lib/modules/ (stored 0%)

adding: system/lib/modules/evfwd.ko (deflated 68%)

adding: system/lib/modules/rng-core.ko (deflated 62%)

adding: system/lib/modules/bcm4329.ko (deflated 58%)

adding: system/lib/modules/rmnet2_drv.ko (deflated 63%)

adding: system/lib/modules/scsi_wait_scan.ko (deflated 67%)

adding: system/lib/modules/rmnet3_drv.ko (deflated 63%)

adding: system/lib/modules/rmnet0_drv.ko (deflated 63%)

adding: system/lib/modules/rmnet1_drv.ko (deflated 63%)

But when i flash the kernel it not booting up...can somebody explain me what i done wrong
[Atrix 4G General] atrix4g18:
I'm a little confused. If you are using the script that command shouldn't exist.

The script makes a "/home/kernel" folder while the step by step makes a "/home/olympus" folder.
[Atrix 4G General] odystyle:
sorry about the confusion. i was tell that the script made by mapkel... when i fetch the file from dropbox...i got an bandwidth error.

for the second of my post im using your kernel step and i get that kind of massage on the terminal

sorry for my bad english
[Atrix 4G General] quetzalcoatl2435:
Free Dropbox accounts have very limited traffic limits. I suggest OP to upload the script somewhere else. :)
[Atrix 4G General] atrix4g18:
In what order did you flash?

Look inside your .zip and make sure there are the following: "meta-inf", "system" and "boot.img"
[Atrix 4G General] odystyle:
all in the zip file...nothing missing i have been trying to make this kernel countless time

i dont know what else i can do. as i mention im using ubunte 12.05 LTS and my PC processor intel pentium dual core e6200 got 6GB ram
[Atrix 4G General] atrix4g18:
Wrong thread to keep talking about the script but I will do that tomorrow.

Can anyone or everyone list sites that work with a direct link.

That means I go to www.sitename/filename.zip and it starts downloading.
[Atrix 4G General] atrix4g18:
You chose CM9?

Flashed on top of MROM CM9?

If not please let me know and specify the order in which you flashed.
[Atrix 4G General] odystyle:
yes im using MROM CM9 the latest bulid

i follow all the stage 2 guide

I have a question do i need to skip the cm9 to cm10(for CM10) coz i i just want to use CM9
[Atrix 4G General] atrix4g18:
This will be your command:

cp ${HOME}/olympus/misc/CM9/boot.img ${HOME}/olympus/kitchen/kernel-tools/input/

So you wiped, then flashed MROM CM9 first then the kernel then rebooted?
[Atrix 4G General] odystyle:
i will try to bulid it again

i will report
[Atrix 4G General] r.sorujlall:
Does it have to be a Ubuntu 12.04 64bit? I have a Ubuntu 13.04 32bit partition that I never use. Can that work too? I'm new to Linux and it doesn't help that my laptop hardware isn't fully compatible with Linux
[Atrix 4G General] Xerox98:
Use DevHost, I know it doesn't have what you are looking for, but it always has provided a fast speed and has minimal ads.

http://d-h.st/
[Atrix 4G General] ravilov:
You tell us. 12.04/64bit is the tested and thus recommended environment, doesn't mean it won't work on something else. Best way to find out is to try.
[Atrix 4G General] phooeyllama:
13.04 64 bit works for sure. However 32 bit didn't work for me since linaro had problems
[Atrix 4G General] delewer:
I have build CM10 kernel with succes, but Paranoid ROM don't want to boot...

Someone can tell how to do that ?

CM10 kernel is compatible with paranoid ?

THX for kernel devs and for the compil process :p
[Atrix 4G General] quetzalcoatl2435:
You need a ROM that was built around the leak kernel & leaked libs.
[Atrix 4G General] pspgarret:
Which CM10?

I tried epinters cm10 from the website(linuxmobile.org) with no evail. Boots on dual core screen forever.

Which roms work with CM10 options, and which roms work with CM9 option? you guys who have a good understanding of which roms work and which dont should to make a full list so people like me who search all over without finding a good answer with links to back it up stop asking stupid questions and bloating the threads with dumb posts about things that are common knowledge (for some-.-). I have tried mrom 9 and thats the only one that works fully so far. I compiled all the assorted kernels with jesus's ./script (thanks bro, you are praised) but out of all the kernels i built, only the morom 9 works... thanks for your work bros
[Atrix 4G General] atrix4g18:
That is the only CM9 ROM.

Try CM10 with leaked kernel and libs.

http://www.mediafire.com/?p3cl9j16v828i6y
[Atrix 4G General] pspgarret:
why, thank you(:

thanks(: also are you saying mrom is the ONLY CM9 rom for atrix? or the only compatable rom for 3.1.0 atm? cause right now i have a build on my phone that works great on 2.3.idc kernel but is not mrom and is not working with current 3.1.0 kernel
[Atrix 4G General] atrix4g18:
Only compatible CM9 ROM for this kernel.
[Atrix 4G General] todobarato:
Hello,

I have compiled and packed for CM10, installed over the CM10-leaked libraries and now works all, inclusive the Wi-Fi, probably was my fault by packing it in CM9-MROM, when the Wifi was not working.

Anyway my question is related to the ram-fix, now I have 791mb, it was in the leaked 849mb(I am not shore but was over 791).

How is the value in your tests?

Is one new ram-fix for the new kernel?

or is in the kernel itself the fix?

Best regards,

Ferenc.
[Atrix 4G General] atrix4g18:
Don't use the ramfix.

Leave it with less RAM.

The devs posted about this a while ago. There is a reason for it being less.
[Atrix 4G General] quetzalcoatl2435:
Leak had 778/784 MB free with ramfix. 855 MB was a very special case for which most of us had to apply a very specific ramfix. I still have my screenshots to prove it.
[Atrix 4G General] odystyle:
time to wait pubilc release

after been trying bulid countless time with the step by step tutorial or the script still not booting up :(

mybe my atrix not support ics kernel....but when use MROM ICS my phone boot up properly but screen problem still the same... at least it boot up :victory: but i will continue to learn about bulid rom and kernel :fingers-crossed: thanks for all the knowledge
[Atrix 4G General] lonjaylove:
Hi,atrix4g18

when I run

unzip ${HOME}/Downloads/linaro.zip -d ${HOME}/olympus/

How can I choose？

run

make clean && make mrproper

An error:cannot execute binary file

How to solve？

Thanks。:)
[Atrix 4G General] atrix4g18:
Replace all.

I'm not exactly sure what the issue is. Make sure all files are in the correct place and the command export ran correctly.

I suggest you use the script: http://xdaforums.com/showthread.php?t=2253529
[Atrix 4G General] lonjaylove:
Thanks.:good:

But Yesterday ,in China,Can't Download.:(

Must use 64-bit?

I used ubuntu 12.04（32-bit）.
[Atrix 4G General] atrix4g18:
Yes, must use 64-bit.

Goodluck.
[Atrix 4G General] quetzalcoatl2435:
So I finally finished building from source.

The phone doesn't overheat, but it does stay warm to the touch. And I'm still getting random reboots although not as frequent as with someone's CM10 or the leak kernel. Battery drain isn't excessive either. Not CM7 levels, but definitely much better than the leak kernel.

Definitely an improvement, but it's not ready to be a daily driver yet.

I'm gonna wait for an update before trying/testing again.
[Atrix 4G General] Nolaan:
Some issues

There some issues with the script here's the diff:

44c43

< *) echo "invalid option";;

---

> *) invalid option;;

110c109

< *) echo "invalid option";;

---

> *) invalid option;;
[Atrix 4G General] imarmand:
Finally i compiled.. all working (wifi, calls, gps, sound, usb, etc).

The only thing missing is camera, but it is a matter of time!:)
[Atrix 4G General] atrix4g18:
The camera works, they disabled it to save battery.

The only real issue is battery.
[Atrix 4G General] kidqian:
any ideas??

just don't why.

never happened to me before.

i'm a at&t,btw.
[Atrix 4G General] atrix4g18:
What ROM did you use?
[Atrix 4G General] quetzalcoatl2435:
Looks like the dreaded screen shake from the leak kernel...
[Atrix 4G General] BigJeff:
When I rotated the screen in certain apps it would give me graphical glitches, not as severe, in mrom+kernel. However it now works fine with newer kernel and cm10.1. On the leaked kernel I never had those issues.
[Atrix 4G General] odystyle:
not all atrix support this kernel

lucky you could boot it up, like me it dosen't boot up at all
[Atrix 4G General] mchinand:
Wait for the public beta, that will be easier for all to install. Unless you are an expert at building/installing Android kernels, I would be hesitant to proclaim that a kernel is not compatible with a particular phone. I have not seen this stated elsewhere
[Atrix 4G General] odystyle:
what i mean not all atrix support this alpha kernel.

but the leak kernel boot up very well except the screen problem
[Atrix 4G General] kidqian:
i tried new kernel in cm9,cm10 and mroms

they all like this.

but it never happend before when i flashed the leaked ics.
[Atrix 4G General] vikernes7:
hey, after I saw this post from Krystianp

I decided to compile the kernel and try changing this value, however I could not find how to do that and change this value, since the script doesn't have an option to modify this specifically
[Atrix 4G General] quetzalcoatl2435:
You need to find the file, open it in a text editor, and edit it manually before compiling.
[Atrix 4G General] atrix4g18:
The file will be in the source which is downloaded by the script. It syncs the github repo. Locate the file within the downloaded repo and make changes.
[Atrix 4G General] kingbobski:
How would I go about building it for CM10.1 ? does the script have an option for this ?
[Atrix 4G General] nlabrad:
Dont use the script. Follow the step by step guide and after syncing with the git repo you can browse to the file and change it.
[Atrix 4G General] vikernes7:
Thank you all, I was able to find the archive I needed to modify and then tried to compile the kernel, first using this guide and then using the script (because I was unable to follow all instructions, specially this one cp ${HOME}/olympus/android_kernel_motorola_olympus/arch/arm/boot/zImage ${HOME}/olympus/kitchen/kernel-tools/input/), now with the script I have an output kernel but with no libs inside, I mean when I open the zip, it does not look like any other kernel, it does have a boot.img but flashing this kernel I cant boot normally (the same screen glitch I had before).

Am I doing something wrong? I tried to push the libs I found in a working kernel, with no success on boot.
[Atrix 4G General] dennis789:
Someone can tell how to do that ?

CM10 kernel is compatible with paranoid ?
[Atrix 4G General] atrix4g18:
It requires a different framework. So yes it is possible but PA would likely need to be built. I was considering compiling the kernel for CM10, but at this stage it isn't worth it.

Once the ROMs with the kernel can last through the day more people will be building different ROMs.
[Atrix 4G General] i525354:
Thanks for the tutorial,I was the first to use Ubuntu and this tutorial.

I can not build the kernel,terminal gives two error when I run to “make -j2 ARCH=arm”.

I am in the company now, so unable to view detailed error information, I will see the detailed error information on my computer and posted up when I go home at night.

Sorry for my bad English.

Gfan's user syl1234 said he also encountered problems in compilation of source code,he said there are some mistakes in the source code and he has been fixed and compiles successfully.
[Atrix 4G General] mchinand:
Someone might be able to help you if you provide those errors.
[Atrix 4G General] atrix4g18:
My best advice is to get a clear understanding of what each step does.

Understanding these processes will help you better understand the issue. You need to use the correct defconfig and you need to make sure it is there after your latest repo sync.
[Atrix 4G General] i525354:
Error message

Error message:

CC kernel/posix-cpu-timers.o

arch/arm/mach-tegra/board-olympus-panel.c:338:3: error: expected identifier before ‘.’ token

arch/arm/mach-tegra/board-olympus-panel.c:339:3: error: expected ‘}’ before ‘.’ token

arch/arm/mach-tegra/board-olympus-panel.c:181:29: warning: ‘dsi_olympus_init_cmd’ defined but not used [-Wunused-variable]

arch/arm/mach-tegra/board-olympus-panel.c:221:29: warning: ‘dsi_suspend_cmd’ defined but not used [-Wunused-variable]

make[1]: *** [arch/arm/mach-tegra/board-olympus-panel.o] error 1

make: *** [arch/arm/mach-tegra] error 2

make: *** Waiting for unfinished tasks
[Atrix 4G General] atrix4g18:
What defconfig did you use?

Have you confirmed that all files are present?
[Atrix 4G General] quetzalcoatl2435:
There's a typo in arch/arm/mach-tegra/board-olympus-panel.c that prevents it from compiling.

Find ".//" and change it to "//." (without quotes).

Also please note that compiling from the latest sources will cause problems. You need to revert a few commits.
[Atrix 4G General] atrix4g18:
Good to know. Thank you.
[Atrix 4G General] atrix4g18:
mapkel released an update to his script.

Check it out here: http://xdaforums.com/showpost.php?p=43419784&postcount=45
[Atrix 4G General] i525354:
Thank you, can be compiled after decompression and replace?
[Atrix 4G General] atrix4g18:
I'm not exactly sure what you mean.

Can you elaborate?
[Atrix 4G General] kingbobski:
I think he means how you can download a ZIP of the source on git and replace the file.
[Atrix 4G General] atrix4g18:
Yes you can do that or report sync.

When I first compiled the kernel I didn't know about report syncing so I just downloaded the zip.
[Atrix 4G General] kingbobski:
I just cloned the git then built from there, Don't forget to change the file in arch/arm/mach-tegra as stated by quetzalcoatl2435 if not, you won't be able to compile correctly!
[Atrix 4G General] i525354:
Yes，kingbobski is right. I got it,thanks!

Sorry for my bad English.
[Atrix 4G General] fengyr:
Thank you?
[Atrix 4G General] andresrivas:
Hi!

This procedure is valid to compile new kernel from source?

And what do i should change to make it boot on AtrICS?
[Atrix 4G General] palmbeach05:
Yes and build cm9 and flash via cwm
[Atrix 4G General] tonglebeak:
Hmm, do I see updated BT patches? Guess I'll have to build this for cm10.1
[Atrix 4G General] andresrivas:
Yes, that was one of the fixes, as i recall krystianp commented that earlier this morning (at least for me, was morning :p )
[Atrix 4G General] andresrivas:
Hi!

When compiling and following each step, i get this error:

the kernel compiled without error, it is just that there is no zimage in the whole directory:

I'm on Linux Mint Olivia (Ubuntu 13.04) x64

On debian wheezy x64 it wont compile (wrong glibc version)

EDIT: A closer look at the output, i found these error lines:

make[2]: *** No hay ninguna regla para construir el objetivo «net/bluetooth/amp.o», necesario para «net/bluetooth/bluetooth.o». Alto.

make[2]: *** Se espera a que terminen otras tareas....

CC net/bluetooth/l2cap_sock.o

CC drivers/scsi/scsi_ioctl.o

make[1]: *** [net/bluetooth] Error 2

make: *** [net] Error 2

make: *** Se espera a que terminen otras tareas....

after thar, make continues as if nothing where wrong...
[Atrix 4G General] ravilov:
If there's no zImage, the kernel did not compile successfully.

Can you pastebin the output of the whole compilation process?
[Atrix 4G General] andresrivas:
indeed, the error is:

make[2]: *** No hay ninguna regla para construir el objetivo «net/bluetooth/amp.o», necesario para «net/bluetooth/bluetooth.o». Alto.

there is no rule to biuld the objective «net/bluetooth/amp.o», which is needed by «net/bluetooth/bluetooth.o». Stop

make[2]: *** Se espera a que terminen otras tareas....

Waiting to other task finish

CC net/bluetooth/l2cap_sock.o

CC drivers/scsi/scsi_ioctl.o

make[1]: *** [net/bluetooth] Error 2

make: *** [net] Error 2

make: *** Se espera a que terminen otras tareas....

Waiting to other task finish

the translation is poorly done by me :)
[Atrix 4G General] ravilov:
...There is translation? :confused:

You should probably refer to other kernel-related threads, there's been some talking about a missing amp.h.
[Atrix 4G General] palmbeach05:
Run the git remote update command and recompile the kernel, it should fix it
[Atrix 4G General] andresrivas:
I've tried today, after krystianp uploaded a new commit adding amp.c but it fails at the exact same point, it is like there is no "instructions" on the Makefile to build amp.o...
[Atrix 4G General] palmbeach05:
Does anyone know what amp.o is or does? I would like to help on this matter but i just had a motherboard failure on my laptop which puts me out of commision for the moment.