Building your own ROM

mrg666

Well-known member
Jul 16, 2011
730
1,067
0
Visit site
Unfortunately android.git.kernel.org/repo is still down.

With the latest changes, syncing works without any complication/modification. I did not have any problem with syncing with the following sequence.
- create another android directory
- go into that directory and issue the following command
repo init -u http://github.com/inferiorhumanorgans/android/ -b gingerbread
- then, do
repo sync

Building is the same, i.e.

source build/envsetup.sh
lunch 4 (VM670 is now item 4 in the lunch menu)
make bacon

I have attached the latest repo here. I hope these work for you as well.
 
Last edited:
  • Like
Reactions: JerryScript

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
That's how I've been doing it the past few days, no problems at all.

One note- If you're using a Wubi install of Ubuntu, I highly recommend you reboot before building. The number one cause of build failures for me seems to be with running out of memory, and this usually occurs when I try to build after doing a previous build or a fresh repo sync. Rebooting solves the issues for me. ;)
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Any kernel builders care to share a quick rundown of how to build for the OV? I've been itching to get into the kernel, and I'm finally comfortable enough with building a ROM to try it out. Any insights into issues I might face building for the OV would be appreciated!
 

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
- go into that directory and issue the following command
repo init -u http://github.com/inferiorhumanorgans/android/ -b gingerbread
That is a different command than we need. That is the same as the old one, and probably works fine. The issue is step 9.

You can't get past the curl command if you are building fresh. Step 9 fails because of it, and without it, you can't get further.

As a replacement I believe Jerry was using:
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo

Is that still the case?
When I used that, my install went from a 20gb drive being plenty to needing a 30gig and still lacked the VM files.
 
Last edited:

asadullah

Well-known member
Oct 23, 2010
480
182
0
Visit site
I'll haven't built one in a while but I wrote a guide here

It's for the optimus m but it works for the v. One thing to note is to use the config.gz from a stock rom


Any kernel builders care to share a quick rundown of how to build for the OV? I've been itching to get into the kernel, and I'm finally comfortable enough with building a ROM to try it out. Any insights into issues I might face building for the OV would be appreciated!
 
Last edited:
  • Like
Reactions: JerryScript

mrg666

Well-known member
Jul 16, 2011
730
1,067
0
Visit site
You started from a working system from before though correct?
There is a config file that you have to get while using that command.

No, for the last build I have completely deleted the build directory,initialized and synced from scratch as I have posted earlier. I had to add my settings/changes again in the downloaded files. I started fresh since I had diverged from the IHO repo while I was adding the CM changes myself with a modified manifest to bypass kernel.org when IHO repo was not in sync with CM for several weeks.
 

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
No, for the last build I have completely deleted the build directory,initialized and synced from scratch as I have posted earlier. I had to add my settings/changes again in the downloaded files. I started fresh since I had diverged from the IHO repo while I was adding the CM changes myself with a modified manifest to bypass kernel.org when IHO repo was not in sync with CM for several weeks.

Did you skip that step or use a different one? Sorry, I don't quite understand.
 

mrg666

Well-known member
Jul 16, 2011
730
1,067
0
Visit site
Did you skip that step or use a different one? Sorry, I don't quite understand.

If you mean bypassing the kernel.org, there is no need to do anything special about it anymore. Just three steps to build pure IHO starting from scratch.

- initialize repo in an empty directory
repo init -u http://github.com/inferiorhumanorgans/android/ -b gingerbread
- sync repo
repo sync
- build
source build/envsetup.sh
lunch 4
make bacon

That is all you need if you have all of the required build tools/libraries installed in your Linux system. Since you were building before, those should already be there. The repo script is in my previous post.
 

BobZhome

Well-known member
Mar 27, 2011
296
627
0
Visit site
Any kernel builders care to share a quick rundown of how to build for the OV? I've been itching to get into the kernel, and I'm finally comfortable enough with building a ROM to try it out. Any insights into issues I might face building for the OV would be appreciated!

I'll haven't built one in a while but I wrote a guide here

It's for the optimus m but it works for the v. One thing to note is to use the config.gz from a stock rom

Jerry, how did you make out with the guide asadullah posted?
Let me know if you get stuck anywhere.
Bob
 
  • Like
Reactions: JerryScript

BobZhome

Well-known member
Mar 27, 2011
296
627
0
Visit site
Any thing you wanna add like adding modules or the other menu I've read about would be a great addition.
I use the following command to build my kernel and modules:
Code:
make ARCH=arm CROSS_COMPILE=~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- INSTALL_MOD_PATH=~/android/modules zImage modules -j4

I'm not sure what you mean by "other menu".
 
  • Like
Reactions: asadullah

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
I haven't had the time yet, plan on getting into it over the weekend. I'm happy with the currently available kernels, yours, blarf's, xionia, so it's really just my desire to learn about it that has me looking into this. I doubt if I can improve the kernel much, but would like to be able to add modules as requested from time to time by the forum users, even if just for personal builds.

The one place I'm convinced there could be improvement is the startup. Boot times on my cheapo Coby Kyros 7022-4g tablet are 1/3 that of the OV, and shut down is 1/5 the time or less, even with a virtual mirror of CM7 and apps on both. Of course it doesn't have a phone, bluetooth, or gps to initialize, but that doesn't account for the large difference in boot times. Might be a red herring, but I'm going to look into it.
 

asadullah

Well-known member
Oct 23, 2010
480
182
0
Visit site
I think it was the menu x config i had seen it somewhere. About the kernel modules I never really knew how or where people were getting these modules or it's either too simple or too hard I don't know.

Anyways I don't know where to put this but I wanted to share it. Lately I've been wiping my laptop like my phone and I've been working on this script.
what it does hopefully :
installs the androidsdk, java flash everything you need when you redo your computer. I tested this before I added the expect so if things don't go right just remove that. The expect function is supposed to stop you from having to answer any questions like the java license.

How to work it just create two documents one named firstboot and another in the same folder called 51-android.rules and copy all this to the respective docs.
Then open terminal and type chmod a+x firstboot
sh firstboot

firstboot

Code:
#! /bin/bash/expect -f


sudo add-apt-repository ppa:ferramroberto/java
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
sudo apt-get update
mkdir -p ~/android
mkdir -p ~/android/system
mkdir -p ~/bin
sudo mv 51-android.rules /etc/udev/rules.d
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
## uncomment the next line when kernel.org is fixed
##curl "http://android.git.kernel.org/repo" > ~/bin/repo 
chmod a+x ~/bin/repo
## add repo to bashrc
echo 'export PATH="~/bin:${PATH}"' >> ~/.bashrc
sudo apt-get install ubuntu-restricted-extras 
##installs real java and possibly sends yes using expect function 
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts sun-java6-jdk
expect "[y/n]"
sleep 1
send "y\r"
sudo /usr/share/doc/libdvdread4/install-css.sh
wget http://dl.google.com/android/android-sdk_r13-linux_x86.tgz
tar -zxvf android-sdk_r13-linux_x86.tgz
mv android-sdk-linux_x86 ~/android/sdk
mkdir -p ~/android/sdk/platform-tools
## add tools and platform-tools to basrc
echo 'export PATH="~/android/sdk/tools:${PATH}"' >> ~/.bashrc
echo 'export PATH="~/android/sdk/platform-tools:${PATH}"' >> ~/.bashrc
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
## comment out the next line if you don't want compiz or right click terminal
sudo apt-get install nautilus-open-terminal ccsm nautilus-gksu
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev eclipse
## this gets rid of open jdk and it's components
sudo apt-get remove icedtea-netx icedtea6-plugin icedtea-plugin openjdk-6-jre-lib openjdk-6-jre-headless openjdk-6-jre icedtea-6-jre-jamvm icedtea-6-jre-cacao
cd ~/android/system
repo init -u git://github.com/inferiorhumanorgans/android.git -b gingerbread
repo sync -j16 
## this next line makes fastboot and moves it to the correct directory
make fastboot
mv out/host/linux-x86/bin/fastboot ~/android/sdk/platform-tools

51 android rules

Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="618e", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="d00d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="d00d", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
 
Last edited:
  • Like
Reactions: bigsupersquid
Feb 19, 2011
1,971
284
0
Visit site
I didn't have the time this past weekend to dive into the kernel, hopefully next weekend.

Till then, any of you kernel builders ever see this?
Android Blog: How to get LG headset sources compile in to kernel module(.ko).
I'm wondering if it might help us get the headset buttons to work properly?

the gt540 looks like a first cousin to the ov, the code might work.
not sure how much it'd matter that it's a msm7227 instead of msm7627...
you could maybe change the makefile line from
obj-m = board-swift-headset.o // replace obj-y to obj-m //
to
obj-y = board-swift-headset.o // replace obj-m to obj-y //
if you wanted to avoid the insmod/lsmod bit and just build it into the kernel.
it doesn't seem like the kernel size would increase much.
 
Last edited: