PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Android On TP2 (http://forum.ppcgeeks.com/forumdisplay.php?f=179)
-   -   How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Beginners (http://forum.ppcgeeks.com/showthread.php?t=136054)

natemcnutty 10-27-2010 08:33 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Thanks for the feedback guys! Really glad I could help :)

Most of this is derived from the scripts in tinboot which I modified, cleaned up, and compiled into one script. I'm hoping to have a chance to finish the tinboot section and start on the rootfs section later tonight.

Lmiller1708 10-27-2010 08:53 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Quote:

Originally Posted by natemcnutty (Post 1982537)
Try make clean, then do the defconfig one more time, then the last make. Also, double check and make sure the arm-eabi-gcc is there. If not, do a git pull in the prebuilt directory.

Ok did that but It still didn't work. :(
The prebuilt directory was up to date and the file is there too...

Is this working for everyone else?

Maybe it's in this step:
Code:

make ARCH=arm htc_msm_nand_defconfig
Here is my output:
Code:

  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:306: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#


natemcnutty 10-27-2010 09:13 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Quote:

Originally Posted by Lmiller1708 (Post 1982747)
Ok did that but It still didn't work. :(
The prebuilt directory was up to date and the file is there too...

Is this working for everyone else?

Maybe it's in this step:
Code:

make ARCH=arm htc_msm_nand_defconfig
Here is my output:
Code:

  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:306: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#



That looks perfect. I just reverted to my original snapshot, so let me take another look at it from before I've even done the defconfig.

OK, I just ran each command exactly in order (I made the guide as I built it too), and everything worked by copy/pasting from the first post. There are two things that I can think of. First, there was an extra space between ARCH=arm and CROSS_COMPILE in the first post (which I just fixed), but I didn't remove it when I just now compiled and everything worked just fine. The second thought is, you didn't run Terminal as root or do sudo on the git clone did you? You could try typing !! and hit enter after it fails and see if it works elevated. If that's not it, I would go into android, type sudo rm -rf prebuilt, then close Terminal, open a new Terminal making sure you are not root, and clone prebuilt again :(

Lmiller1708 10-27-2010 11:04 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Quote:

Originally Posted by natemcnutty (Post 1982755)
That looks perfect. I just reverted to my original snapshot, so let me take another look at it from before I've even done the defconfig.

OK, I just ran each command exactly in order (I made the guide as I built it too), and everything worked by copy/pasting from the first post. There are two things that I can think of. First, there was an extra space between ARCH=arm and CROSS_COMPILE in the first post (which I just fixed), but I didn't remove it when I just now compiled and everything worked just fine. The second thought is, you didn't run Terminal as root or do sudo on the git clone did you? You could try typing !! and hit enter after it fails and see if it works elevated. If that's not it, I would go into android, type sudo rm -rf prebuilt, then close Terminal, open a new Terminal making sure you are not root, and clone prebuilt again :(

Ok! I had my Android Folder on my desktop and not in the home folder...:spin:

This allowed the make command not to fail right away...

Update:
It WORKS! User Error... Must have been something with ROOT. Sorry to bother!:toothy10:

natemcnutty 10-27-2010 11:52 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Quote:

Originally Posted by Lmiller1708 (Post 1982835)
Ok! I had my Android Folder on my desktop and not in the home folder...:spin:

This allowed the make command not to fail right away...

Update:
It WORKS! User Error... Must have been something with ROOT. Sorry to bother!:toothy10:

Ahh, glad you were able to get it going. I try not to use root whenever possible :)

Was gonna say that if you put it on your desktop, you would need to change the CROSS_COMPILE path too :p

pts69666 10-28-2010 09:01 AM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Because I'm a complete and total noob, I'm going to ask what certian things are just because I like seeping through code and learning a little. I've been outta school forever and never really did anythign with OS development, so this is all way over my head, but I'm going to try to understand it all. =P

First question in a series of quests would have to be what is an XIP. I read something about it being execute in place for a kernel. So it doesn't even have to load it into RAM or decompress. Is this the same thing? I know tinboot is a bootloader and what I read about XIP was for linux kernel.


Another question would have to be why is it that we are importing a blank image into the OS.nb file? Couldn't we put the rootfs.img into there instead? That way, it would be on the NAND and not the SD card. IDK, I'm kinda noob at this. I'm sure there's a reason, im just asking for all the different meathods to the madness. =P Just trying to learn. xD

Also, if it turns out that we are able to put the rootfs.img into the OS.nb, could we also put the modules in there? Again, I've never built ROM's for phones before, so I don't understand how this all works. =P I'm just looking for a way to possibally make SD card hot swappable.

imnuts 10-28-2010 11:14 AM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
As far as I know, the reason that stuff still has to be on the SD card is that they still haven't figured out how to get the internal storage to be recognized within Android. It prevents putting much of anything onto the internal flash storage and forces everything to still be on the SD card pretty much.

Lmiller1708 10-28-2010 02:41 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
SUCCESS!

I used your build script on the second post. I did have to modify this line:

DIRECTORY=$(cd `dirname $0` && pwd)
To:
DIRECTORY=$ANDROID/tinboot-linux-msm/

Thanks for all your help on this!

Now lets see what i can do... :evil4:

natemcnutty 10-28-2010 08:00 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
Quote:

Originally Posted by Lmiller1708 (Post 1983201)
SUCCESS!

I used your build script on the second post. I did have to modify this line:

DIRECTORY=$(cd `dirname $0` && pwd)
To:
DIRECTORY=$ANDROID/tinboot-linux-msm/

Thanks for all your help on this!

Now lets see what i can do... :evil4:

Ahhh, that makes sense. Glad you were able to figure it out. I need to fix the script so it doesn't even use that :)

Edit: Fixed it up so it just uses the variable TINBOOT instead of DIRECTORY. Makes it better for those who launch scripts from a different directory than the script :)

coolsilver 10-28-2010 11:53 PM

Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin
 
HAHA Last time I built a kernel I downloaded the entire Android source from google then the haret git..... OMG did it take a while. :D


All times are GMT -4. The time now is 08:21 AM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0