update-script after a fresh build: - G1 Android Development

After I download the source for android, update with the local_manifest, and then repo sync to 1.5r2 and build (just to get a vanilla rom together) I'm running this to make my update-script:
Code:
./make-update-script /home/android/mydroid/out/target/product/dream/system/ /home/android/mydroid/out/target/product/dream/android-info.txt > update-script
For some reason no matter what I do with the update script it constantly Errors out at:
E:Can't symlink /system/bin/setprop
E:Failure at line 16
symlink toolbox SYSTEM:bin/setprop
Installation aborted.
Click to expand...
Click to collapse
Am I missing a step somewhere?

mianosm said:
After I download the source for android, update with the local_manifest, and then repo sync to 1.5r2 and build (just to get a vanilla rom together) I'm running this to make my update-script:
Code:
./make-update-script /home/android/mydroid/out/target/product/dream/system/ /home/android/mydroid/out/target/product/dream/android-info.txt > update-script
For some reason no matter what I do with the update script it constantly Errors out at:
Am I missing a step somewhere?
Click to expand...
Click to collapse
Where can I download make-update-script? I am having the same symlink issue when using other peoples update-script with my custom ROM too.

After you run make:
Code:
./out/host/linux-x86/obj/EXECUTABLES/make-update-script_intermediates:
make-update-script
make-update-script.o
make-update-script.P
make-update-script
make-update-script_intermediates

mianosm said:
After you run make:
Code:
./out/host/linux-x86/obj/EXECUTABLES/make-update-script_intermediates:
make-update-script
make-update-script.o
make-update-script.P
make-update-script
make-update-script_intermediates
Click to expand...
Click to collapse
Can you provide me a download link.

Here is the source:
http://source.android.com/download
After you've downloaded the source, you will need to update your local_manifest in your .repo directory:
http://source.android.com/documentation/building-for-dream
Then you can modify the source as you see fit, run make, and let me know how the make-update-script works out for you. ; )

Related

[DEV GUIDE] Build CM7 from source in its current state. Updated: 2011/05/16-23:52

PLEASE READ THIS BEFORE CONTINUING:
We are changing to a new build system which will result in an updated but VERY different ROM underneath the hood. There is a HIGH POSSIBILITY that building in the current state could BRICK your device, potentially PERMANENTLY. PLEASE DO NOT FLASH unless you are HIGHLY confident you know what you're doing.
For kernel building, see post #2.
For known issues and changelog, see post #3.
Kanged from the CM-Wiki. Yes it's a wiki, yes I could have created an epic page, but we aren't official yet.
Install ADB
Install the Android SDK.
Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/EpicCM/android.git -b teamhacksung-merge
repo sync -j16
Download RomManager and Google Files
NOTE: This only needs to be done when an update to RomManager or GoogleApps is released. If you are up-to-date, you may skip to Building CyanogenMod.
Code:
cd ~/android/system/
./build.sh prepare
Building CyanogenMod
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the epic.
Code:
cd ~/android/system/
. build/envsetup.sh
./build.sh epic
Build failed? Check post #3 for common problems and solutions.
Install
1. The build system should create a flashable zipfile. Place it on the root of your sdcard.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
2. Boot into a custom recovery like ClockworkMod Recovery and flash the CM7 update.zip. Then flash google apps if you like.
Please don't flash yet, unless you want an expensive doorstop.
This section of the guide will inform you on how to build a CM7-compatible kernel using our github sources.
Download the Code
Due to the way the new build system works, you'll need the entire CM source to build a proper kernel. (Sorry)
Follow the steps in post #1 to initialize and download our entire CM source repository.
Keeping your code up-to-date:
Code:
cd ~/android/system
repo sync
Toolchain setup
The new build system automatically utilizes the toolchain included in CM7 source.
Prepare to build
The kernel build script requires a few environment vars be set by the CM build system.
Code:
cd ~/android/system/
. build/envsetup.sh
lunch cyanogen_epic-eng
Compile the kernel
Code:
cd ~/android/system/kernel/samsung/2.6.35/
./build.sh epic
cd ~/android/system/releasetools/
./kernel.sh epic
You should now have a flashable zip in out/target/product/epic/
Please don't flash yet, unless you want an expensive doorstop.
This is also incompatible with stock roms, and unless you're amazing, never will be compatible.
KNOWN BUILD-TIME ISSUES
WARNING: These fixes may cause your repo to become out-of-sync from the official repo. Make sure you know how to revert these changes so repo sync doesn't fail.
Error: New build does not boot.
Fix: Working on it
KNOWN RUN-TIME ISSUES
Will update this when it runs.
GUIDE CHANGELOG:
20110516-2352: New build system from teamhacksung.
20110506-1842: Switched to our forks of teamhacksung work.
CODE CHANGELOG:
Available at each of our repositories:
https://github.com/EpicCM
Love seeing these types of posts; makes a pathway for new developers to learn =)
XtaC318 said:
Love seeing these types of posts; makes a pathway for new developers to learn =)
Click to expand...
Click to collapse
I agree! Time to start playing!
Cool guide, makes it easy for the new guys.
Sent from my SPH-D700 using Tapatalk
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
smeyerhuky said:
getting same error. edited make file and tried to remove the samsung/device/crespo device.mk overlap but still a no-go
Code:
build/core/base_rules.mk:479: warning: overriding commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/epic/recovery/root/sbin/tune2fs'
build/core/base_rules.mk:162: *** device/samsung/epic/libs3cjpeg: MODULE.TARGET.SHARED_LIBRARIES.libs3cjpeg already defined by device/samsung/crespo/libs3cjpeg. Stop.
Click to expand...
Click to collapse
yes, that's something that we can't easily fix in our own device repo. you could always remove the crespo folder as a temporary fix, but we need to push a patch upstream that fixes crespo makefiles. I will be adding this to known issues shortly.
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
sent by an Epic4g through the cosmos
raiderep said:
So my windows seven crashed on me and I'm gonna go with Ubuntu 10.10 for now
I can play with this on that Linux install, correct?
Click to expand...
Click to collapse
Yes, it's mentioned in the instructions.
Alternatively, you can use VMWare to do compiling from Windows. That's how I'd set up my old development system. There are tons of free Ubuntu 10.10 vm images.
Updated. Sorry for the mistake in Copy Proprietary Files. That should fix a compile error related to libcamera.
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
dreamsforgotten said:
Any clue what causes a build to fail due to unable to dopen system/lib/egl/libandroid_servers.so. When I build with boardconfig has generic audio I'm fine, when I set has galaxys audio it fails
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Audio in and out works if you leave it at default values.
If you absolutely want to compile with galaxys audio, it looks like ./extract-files.sh might not be pulling that file? Check ~/android/system/vendor/samsung/epic/proprietary/lib/egl/ for that file.
Thanks for the heads up, no the fileisn't in egl and from what I can tell its not supposed to be.
Sent from my SPH-D700 using Tapatalk
Fix: Open up Context.java, find the three chunks of WimaxManager JAVADOC in comments. Delete JUST the commented stuff that's related to WiMax.
Click to expand...
Click to collapse
Can anyone please elaborate, I don't understand wat exactly to be done. Even though I deleted commented lines I still receive errors
Thanks
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!
So for kernel compilation I received and error
fs/binfmt_aout.c: In function 'load_aout_binary':
fs/binfmt_aout.c:271: error: 'SEGMENT_SIZE' undeclared (first use in this function)
Click to expand...
Click to collapse
And I had to update a line in Makefile
from
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
Click to expand...
Click to collapse
to
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -Dlinux
Click to expand...
Click to collapse
Still nearly at the end of compile I receive
samsung-kernel-epic/scripts/mksysmap: line 44: arm-none-eabi-nm: No such file or directory
Click to expand...
Click to collapse
I'll see if I can cream system.map from vmlinux and report again
The kernel compilation issue was discussed here: http://forum.xda-developers.com/showthread.php?t=825611
I needed to do
make update-api
Click to expand...
Click to collapse
After removing those comments
it went ahead now the next place I'm stuck is
CameraService.cpp:1478: error: undefined reference to 'openCameraHardware'
Click to expand...
Click to collapse
Any ideas?
Thanks
\m/ I got cm7 compiled
So here are nullghosts instructions:
open android/system/device/samsung/epic/full_epic.mk for editing and
replace any instance of SPH-D700 to epic
Click to expand...
Click to collapse
Then open extract-files.sh for editing and make sure Copy Files (from mid to bottom) list is same as files list (at top)
add these 2 lines to
FILES="
Click to expand...
Click to collapse
section of extract-files.sh
bin/netcfg
lib/libQmageDecoder
Click to expand...
Click to collapse
If you have any other file missing read below:
head -197 extract-files.sh > files may come in handy to compare 2 files
vendor/samsung/__DEVICE__/proprietary/bin/netcfg:system/bin/netcfg
vendor/samsung/__DEVICE__/proprietary/lib/libQmageDecoder.so:system/lib/libQmageDecoder.so
Click to expand...
Click to collapse
are the 2 lines in copy files which did not have corresponding files
Now need to zip it and see if I can get kernel compiled
Can anyone that has it compiled post a zip? I dont wanna download lile 10gb of stuff.
Sent from my SPH-D700 using XDA App

HOWTO: Compile your own kernel from source (WIP)

Updated. You can find an easier to use and more up to date version here:
http://rootzwiki.com/topic/8824-howto-compile-your-own-kernel-v-01/
Hey folks,
Figured I would throw this out there for those who may want to know just what goes into compiling a kernel, and possibly, doing it themselves. This is a WIP, and is more about how to compile, than how to make changes to source or customize your own kernel.
Needed:
Linux. For this case, we will assume Ubuntu 10.10, 64 bit. This can be done with 32 bit as well, but you will need a different cross compiler.
Download | Ubuntu
dsixda's kitchen. So that we can easily split and repack kernels.
https://github.com/dsixda/Android-Kitchen/archives/master
Source. You can use mine. Its fairly heavily tweaked, and compiles without any modifcations.
https://github.com/adrynalyne/kernel_htc-mecha
A cross compiler toolchain. Because I use 64 bit linux, I use a 64 bit cross compiler.
http://rapidshare.com/files/394529815/HikaRi_toolchain_4.4.4.tbz2
(Credit adwinp from XDA)
Introduction
First, we install Ubuntu. I won't be going through that, however. So, assuming we have Ubuntu already installed, and working, we are ready to dive right in.
First, we need a tool Ubuntu does not install by default. This is called git. From a terminal:
Getting Source Code
sudo apt-get install git
Once git is installed, we can grab our source. Using a terminal:
[[email protected] ~]$
code
Code:
mkdir android
cd android
mkdir kernels
cd kernels
git clone git://github.com/adrynalyne/kernel_htc-mecha.git
Depending on your connection, this could take a while.
This will create a kernel_htc-mecha directory under your /home/username/android/kernels folder.
Grabbing Toolchain
Now we will grab the toolchain. Download it, decompress it, and just leave it in the 4.4.4 directory. Move it to your android directory.
Grabbing and setting up the kitchen
Download the kitchen from the link given above, and decompress it. Rename it to kitchen. Move it to your android directory. Then from a terminal:
code
Code:
cd ~/android/kitchen
chmod 755 menu
./menu
This installs the kitchen and starts it up. Now the first thing we need to do is setup a working directory. Take a rom, any rom, and copy it to the ogiinal_update folder inside the kitchen. You can then setup your working folder.
Inside the working folder, delete boot.img. Grab, one of say, my kernels, and extract it. Take boot.img from the extracted contents and copy to the kitchen.
To split the initramfs (ramdisk) from the kernel, simply choose 0 from the menu, then 20. Hitting w will extract the kernel to a BOOT-EXTRACTED directory inside the kitchen (not working folder). Inside that folder, you will find the ramdisk and a zImage. The zImage is the kernel. We will stop there for now.
Compiling the kernel
First, we move to the kernel directory.
code
Code:
cd ~/android/kernels/kernel_htc-mecha
To compile the kernel, first we must have a configuration file ready. To do this:
code
Code:
make mecha-lte_defconfig
It will configure the system for compiling.
Now to compile the kernel:
code
Code:
make -j5 ARCH=arm CROSS_COMPILE=/home/username/android/4.4.4/bin/arm-none-eabi-
Where username is your, well, username and the number after j (thats a J) is the number of cpus +1.
Depending on the speed of your system. a zImage should be created within 3-30 minutes.
Packing the kernel
The zImage will be located under ~/android/kernels/kernel_htc-mecha/arch/arm/boot directory.
We will copy that zImage into the BOOT-EXTRACTED directory of the kitchen. Then, back at our menu for the kitchen, we hit 'b' to build the kernel. Within seconds, there is a new boot.img inside our Working folder. Now, remember my kernel package you downloaded? Well, time to kang the installer! The directory you unzipped contains a META-INF and system directory. You need both of those. Copy the boot.img in with those two folders.
So, our directory layout currently looks like so:
META-INF
system
boot.img
We need one more file, the wifi driver, from our compiled source.
Under ~/android/kernels/kernel_htc-mecha/drivers/net/wireless/bcm4329_204 you will find a file named bcm4329.ko. Copy this into system/lib of your new kernels installer directory.
Zip these three folders and give it a name. Now its ready to install.
A couple of things of note:
You almost always have to match the wifi driver with the kernel.
make clean mrproper will clean all the precompiled and temp fikes out of your source. This is recommended when making major source changes. Don't forget to remake your configuration after running it though.
Troubleshooting
There may be some files not found errors. Please be careful with these commands.
If the files not found are libcloog.so.0 and/or libmpfr.so.1, take a look below.
Code:
sudo ln -s /usr/lib/libcloog-debian.so.0 /usr/lib/libcloog.so.0
sudo ln -s /usr/lib/libmpfr.so.4 /usr/lib/libmpfr.so.1
Very nice write up, I've been looking into this for a while so its nice someone put it all together in one thread.
Sent from my NookColor using XDA Premium App
Nice Adrynalyne
Sent from my Thunderbolt using XDA Premium App
I love learning new things... Thanks for sharing knowledge!
For those of us that play in a Virtual Box, any notes about issues that may come up? I used to dual boot but decided that a vb is more time efficient for me.
Thanks a lot, i was wondering about this too.
Sent from my ADR6400L using Tapatalk
I'm really glad you've posted this. Time to play for those of us who are lazy (or busy)!
awesome. I love the android community's open-ness. Not only do you post your source, but you tell people how to use it...
Thank you so much for spending the time to write this, i have been googleing this and your write up is the best ive found.
I know this is a work in progress, but some ideas for future revisions, at least things that I have been wondering,
The files tweaked for overclocking, undervolting, and maybe some explanations on what goes into this.
Important files and maybe files we should not touch, (if there are any).
Just things I have wondered.
Thank you again!!!
Wow. Thank you for taking the time to write this up. Some of us really do appreciate it!
You sir, are a gentleman and a scholar.
You really are amazing at what you do. Sometimes I wonder when you sleep..
Uggg, I am running Ubuntu 10.10 64bit.
I have followed this step by step but I am getting the following error:
/home/scott/android/4.4.4/bin/../libexec/gcc/arm-none-eabi/4.4.4/cc1: error while loading shared libraries: libcloog.so.0: cannot open shared object file: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
What package am I missing? I apt-get installed libcloog-ppl0.
Any help is appreciated.
Scott
UPEngineer said:
Uggg, I am running Ubuntu 10.10 64bit.
I have followed this step by step but I am getting the following error:
/home/scott/android/4.4.4/bin/../libexec/gcc/arm-none-eabi/4.4.4/cc1: error while loading shared libraries: libcloog.so.0: cannot open shared object file: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
What package am I missing? I apt-get installed libcloog-ppl0.
Any help is appreciated.
Scott
Click to expand...
Click to collapse
Go to /usr/lib and tell me what the name of libcloog.so.? Is. There are bound to be growing pains with this, as I originally used Fedora 64 bit when I did this. Still, its doable on Ubuntu, because I have this same toolchain on Arch as well.
Let me know what the name of that file is. I will help all I can.
Sent from my ADR6400L using XDA App
adrynalyne said:
Go to /usr/lib and tell me what the name of libcloog.so.? Is.
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
Adrynalyne,
In my /usr/lib I have the following libcloog files:
libcloog.a
libcloog.so
libcloog-debian.a
libcloog-debian.so
libcloog-debian.so.0
libcloog-debian.so.0.0.0
libcloog-ppl.a
libcloog-ppl.so
libcloog-ppl.so.0
Hope this helps.... It has been a long time since I messed with Linux
Again, I am Ubuntu 10.10 64bit
Thanks again.
sudo ln -s /usr/lib/libcloog-debian.so.0 /usr/lib/libcloog.so.0
sudo ln -s /usr/lib/libmpfr.so.4 /usr/lib/libmpfr.so.1
Trying to run kitchen , when trying to setup working folder it doesnt appear to do anything, I hit 1 and it just sits there. I hit 0 for advanced options and it just sits there.
I have a rom in the right folder as a zip and extracted.
edit: guess you cant extract in windows and copy the files over .
happimeal said:
Trying to run kitchen , when trying to setup working folder it doesnt appear to do anything, I hit 1 and it just sits there. I hit 0 for advanced options and it just sits there.
I have a rom in the right folder as a zip and extracted.
Thanks
Click to expand...
Click to collapse
You arent supposed to extract the rom. The kitchen needs to.
Yes..
all the way to the make and got some errors
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 1: ELF: not found
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 2: @: not found
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 3: Syntax error: ")" unexpected
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 1: ELF: not found
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 2: @: not found
/home/jroncalli/android/4.4.4/bin/arm-none-eabi-gcc: 3: Syntax error: ")" unexpected
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
Any ideas.
You need the lib32 stuff installed for Ubuntu. Not sure why, as its a 64 bit toolchain. I'm using full 64 bit Arch Linux and don't need to.
adrynalyne said:
You need the lib32 stuff installed for Ubuntu. Not sure why, as its a 64 bit toolchain. I'm using full 64 bit Arch Linux and don't need to.
Click to expand...
Click to collapse
Hmm, probably easier to just install 64 bit version, ....... doing that now.
Thank You.
Where was this guide all weekend lol
been waiting for this thanks bro
now if only i can find a guide to creating flashable .zips hmm
Sent from my ADR6400L using XDA Premium App

[DEV][REF]▓Compile your own Kernel From The Samsung Sources:Quite easy to follow!▓

[DEV][REF]▓Compile your own Kernel From The Samsung Sources:Quite easy to follow!▓
I want this guide to be n00b friendly...so lets start!
1)Install Ubuntu 10.10 or later(virtual distro may work too!)
Use this for samsung devices:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
3)Open terminal and download the the necessary tools:
For 32/64 bitsi use this)
Code:
apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
For 64 bits ONLY:
Code:
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
4)Download the code soucery toochain:Toolchain
ur machine is good to GO!
The Main Thing
Ok,so i assume u have set up your machine
Now,all of the files should be placed in ~/Downloads (for my convinience to explain!but u may put it anywhere)
extract the sources and everything else u downloaded....then go into the top directory
Code:
cd Kernel
u enter into the root of the kernel directory with this
then type :
Code:
gedit Makefile
The Make file will open.........look out for this and change CROSS_COMPILE= "your toolchain path" and EXTRAVERSION="current kernel version"
This will open up the Makefile in a gedit,and the changed values will correspond to wherever u placed your toolchain................the EXTRAVERSION refers to current sub-version of your linux kernel version on ur phone
Get the config from your phone..Type:
Code:
adb pull /proc/config.gz
This will fetch a working config from the current kernel on your phone....u can alternatively make a new one with "make menuconfig"
Then gunzip it and copy it to to ur kernel source root:
Code:
gunzip config.gz
rename to .config
Now,make the necessary changes in your source.When you are done,type:
Code:
make -jX
,where X=no.op cpu threads multiplied by 1 or 2.
Sit down and have a smoke!
The resulting kernel will be in Kernel/arch/arm/boot/zImage
Bind the zImage with the ramdisk with the help of unpacker-repacker tools by Skin1980 and voila!flash it as pda in odin
Happy Flashing!
Guide still to be full completed!
last one ffffffjjjj
Why using a tar archive when there is now a GIT repository for the sources?
Sine. said:
Why using a tar archive when there is now a GIT repository for the sources?
Click to expand...
Click to collapse
bcoz:
i want this guide to be n00b frienly...u cant expect them to sync sources when downloading a tarball is much simpler!
has anyone tried this guide?
i hoped it would help people
Pl post the link for Codesourcery tool chain. All links are reaching dead end.
edited OP with link
I get this message:
Firefox can't find the server at sourcery.mentor.com.
ganeshbiyer said:
I get this message:
Firefox can't find the server at sourcery.mentor.com.
Click to expand...
Click to collapse
strange............i m able to download it and so is shriomman
Could u upload to multiupload.com.
It will be easier to download from there.
Its is ok Now.
Downloading with Google Chrome.
Don't know what the problem is with firefox.
gedit makefile command gives me a blank window
btw @ sak- post in the op that u have to copy the kernel directory to the home page or else it wont b found right ? i copied ther by readin it from the source readme
edit- got this from google http://kibyegon.wordpress.com/2010/05/13/how-to-install-git-on-ubuntu-lucid-10-04/
!! when i use make command it shows error
[email protected]:~/Downloads/git-1.7.7.3$ make
GIT_VERSION = 1.7.7.3
* new build flags or prefix
CC daemon.o
In file included from daemon.c:1:0:
cache.h:19:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [daemon.o] Error 1
Source code For ICS released ???
http://source.android.com/
chack the news part
shriomman said:
gedit makefile command gives me a blank window
btw @ sak- post in the op that u have to copy the kernel directory to the home page or else it wont b found right ? i copied ther by readin it from the source readme
edit- got this from google http://kibyegon.wordpress.com/2010/05/13/how-to-install-git-on-ubuntu-lucid-10-04/
!! when i use make command it shows error
[email protected]:~/Downloads/git-1.7.7.3$ make
GIT_VERSION = 1.7.7.3
* new build flags or prefix
CC daemon.o
In file included from daemon.c:1:0:
cache.h:19:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [daemon.o] Error 1
Click to expand...
Click to collapse
did u use the config and was path of toolchain correctly specified in makefile?
sakindia123 said:
did u use the config and was path of toolchain correctly specified in makefile?
Click to expand...
Click to collapse
aaaa... i dono :\ doesnt this thing have a remote assistance ?? :\
screenshot
check this out :\ i dono whats wrong there :|
shriomman said:
check this out :\ i dono whats wrong there :|
Click to expand...
Click to collapse
r u sure there's a makefile in Kernel?try opening it via the gui and check if it is empty
They are all silly mistakes, not knowing how to use linux. (Read some basic manual)
sudo gedit Makefile (Capitalization matters)
to install software from sources ... (git,...)
(install additional compilers .., typical (gcc. ..)
. / configure
make
good luck!
haha lol shriom................that was too stupid a mistake to be spotted!

[INCOMPLETE HOW TO] Reconstruct Mi 4c kernel source

I'm writing this incomplete instruction for my friend @emfox based on the instruction I used to reconstruct Redmi 2 kernel source http://forum.xda-developers.com/and.../how-to-convert-qualcomms-dtb-to-dts-t3221223 Unfortunately I couldn't finish this instruction without Mi 4c device. This is just a quick look, short information, to check the possibility to reconstruct an open source kernel based on CAF project. It's will be hard but not impossible.
1. Clone MSM8992 vanilla kernel source, LA.BF64.1.2.2-02940-8x92.0 release for Marshmallow 6.0.1 (release LA.BF64.1.2.1.c1-05410-8x92.0 branch LA.BF64.1.2.1.c1_rb1.38 for Lollipop 5.1.1) https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/?h=LA.BF64.1.2.2_rb4.22
Code:
git clone git://codeaurora.org/quic/la/kernel/msm-3.10 -b LA.BF64.1.2.2_rb4.22
2. Stock 4c kernel was compiled without CONFIG_IKCONFIG, vanilla kernel config libra_defconfig attached
3. Attached 3 dts file from stock kernel, msm8992-mtp-0xc.dts seem compatible to emfox device (qcom,board-id = <0xc 0x0>; )
4. Attached a vanilla dts file for MSM8992 MTP msm8992-mtp.dts as a result of LA.BF64.1.2.2_rb4.22 built
You can compare msm8992-mtp-0xc.dts to msm8992-mtp.dts using a diff tool (i.e. Kompare app) and start creating device tree source for Mi 4c: msm8992-mtp-libra.dts, msm8992-mtp-libra.dtsi, batterydata-itech-3020mah.dtsi, dsi-panel-sharp-rsp61322-1080p-video.dtsi, dsi-panel-auo-nt35596-1080p-video.dtsi, dsi-panel-lgd-nt35596-1080p-video.dtsi, dsi-panel-sharp-nt35595-1080p-video.dtsi, dsi-panel-jdi-nt35595-1080p-video.dtsi, msm8992-camera-sensor-mtp-libra.dtsi, etc. You can use https://github.com/kumajaya/android...mmit/3de4f3564a82f44049a8664d4383c6d3ed43cb47 as a reference. Mi 4c based on same board platform as LG G4 or Nexus 5X. Good luck!
How to build kernel outside Android source tree:
I assume your home directory is /home/user, kernel source inside /home/user/android/libra/kernel, Android source tree inside /home/user/android/system-13.0
1. Create an environtment text file, save it as /home/user/android/build-arm64.env (change CROSS_COMPILE to point to your toolchain):
Code:
export CROSS_COMPILE='/home/user/android/system-13.0/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-'
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm64
export ARCH=arm64
2. Import environtment file above, create a build directory outside the kernel source tree (to keep the kernel source clean):
Code:
$ cd /home/user/android/libra/kernel
$ source /home/user/android/build-arm64.env
$ mkdir -p /home/user/android/libra/kernel-out
$ make O=/home/user/android/libra/kernel-out mrproper
3. Import the kernel config file, change the kernel configuration (if needed) and start the building process:
Code:
$ make O=/home/user/android/libra/kernel-out libra_defconfig
$ make O=/home/user/android/libra/kernel-out menuconfig
$ make O=/home/user/android/libra/kernel-out
4. Copy the resulting kernel and modules (if available) to a binary directory:
Code:
$ mkdir -p /home/user/android/libra/kernel-bin
$ mkdir -p /home/user/android/libra/kernel-bin/modules
$ cp /home/user/android/libra/kernel-out/arch/arm64/boot/Image /home/user/android/libra/kernel-bin/
$ find /home/user/android/libra/kernel-out/ -type f -name *.ko -exec cp {} /home/user/android/libra/kernel-bin/modules/ \;
Creating a boot image:
Remember, this is incomplete guide
Roger that! I thought you have bought xiaomi 4c several days ago.
You're so kind to provide this tutorial. Since I know nearly nothing about kernel development, I'll start learning it step by step.
Thanks for the instruction.
Also @ekkilm / Teamsuperluminal might be able to help :fingers-crossed:
Autines said:
Roger that! I thought you have bought xiaomi 4c several days ago.
Click to expand...
Click to collapse
No, too expensive and my main device still in very good condition :laugh:
emfox said:
You're so kind to provide this tutorial. Since I know nearly nothing about kernel development, I'll start learning it step by step.
Click to expand...
Click to collapse
No problem, you also helped me a lot.
kevinnol said:
Thanks for the instruction.
Also @ekkilm / Teamsuperluminal might be able to help :fingers-crossed:
Click to expand...
Click to collapse
You're welcome.
OK, I've gone through the buiding kernel outside android tree steps, and now am trying to build MSM8992 vanilla kernel source from inside cm13 source directory.
command is 'source build/envsetup.sh &&breakfast libra && mka bootimage', but always got a command not found error, don't know what is missing...
Code:
<manifest>
<remote name="ghub" fetch="git://github.com/"/>
<project name="xiaomi-dev/android_device_xiaomi_libra.git" path="device/xiaomi/libra" remote="ghub" revision="cm-13.0"/>
<project name="AndropaX/proprietary_vendor_xiaomi_libra" path="vendor/xiaomi/libra" remote="ghub" revision="master"/>
</manifest>
and put kernel source to kernel/xiaomi/libra.
The error is
Code:
host C++: libc++_static <= external/libcxx/src/strstream.cpp
host C++: libc++_static <= external/libcxx/src/system_error.cpp
host C++: libc++_static <= external/libcxx/src/thread.cpp
host C++: libc++_static <= external/libcxx/src/typeinfo.cpp
host C++: libc++_static <= external/libcxx/src/utility.cpp
host C++: libc++_static <= external/libcxx/src/valarray.cpp
host StaticLib: libc++abi (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/libc++abi.a)
host StaticLib: libmincrypt (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: libhost (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
Building kernel...
/bin/bash: line 1: @: command not found
Export includes file: system/core/libcutils/Android.mk -- /home/emfox/android/system-13.0/out/host/linux-x86/obj/SHARED_LIBRARIES/libcutils_intermediates/export_includes
make[1]: Entering directory '/home/emfox/android/system-13.0/kernel'
make[1]: *** No rule to make target 'libra_defconfig'. Stop.
make[1]: Leaving directory '/home/emfox/android/system-13.0/kernel'
make[1]: Entering directory '/home/emfox/android/system-13.0/kernel'
make[1]: *** No rule to make target 'headers_install'. Stop.
make[1]: Leaving directory '/home/emfox/android/system-13.0/kernel'
kernel/xiaomi/libra/AndroidKernel.mk:110: recipe for target '/home/emfox/android/system-13.0/out/target/product/libra/obj/KERNEL_OBJ/.build_stamp' failed
make: *** [/home/emfox/android/system-13.0/out/target/product/libra/obj/KERNEL_OBJ/.build_stamp] Error 2
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/emfox/android/system-13.0'
#### make failed to build some targets (01:41 (mm:ss)) ####
Hi @emfox, i would gladly help you since i just finished cm12.1 build with device tree (i made a thread, with prebuilt kernel of course) and I'd like to start with cm13.
If you open source kernel has compiled correctly, can you do a "kernel_xiaomi_libra" github repository?
alterbang said:
Hi @emfox, i would gladly help you since i just finished cm12.1 build with device tree (i made a thread, with prebuilt kernel of course) and I'd like to start with cm13.
If you open source kernel has compiled correctly, can you do a "kernel_xiaomi_libra" github repository?
Click to expand...
Click to collapse
no, not really. I haven't finished the source.
I have little kernel hacking knowledge, so I'd like to set up and working environment first, then I'll go to deal these *dts files.
Ok, sorry then. I thought "'I've gone through the buiding kernel outside android tree steps," meant you had already finished
Maybe when I'll have some free time in the next days i will give the entire process a try!
alterbang said:
Ok, sorry then. I thought "'I've gone through the buiding kernel outside android tree steps," meant you had already finished
Maybe when I'll have some free time in the next days i will give the entire process a try!
Click to expand...
Click to collapse
oh, that would be great. I'm a developer but just on web and application domain, and have no much time to dig into kernel deeply. But I am learning
@emfox Don't forget copy libra_defconfig to arch/arm64/configs/
ketut.kumajaya said:
@emfox Don't forget copy libra_defconfig to arch/arm64/configs/
Click to expand...
Click to collapse
yes i have copied, or the error msg will be 'cannot found kernel configuration ...blabla'
emfox said:
yes i have copied, or the error msg will be 'cannot found kernel configuration ...blabla'
Click to expand...
Click to collapse
Please recheck your device board config, you can use LG G4 config as a reference https://github.com/CyanogenMod/andr...mon/blob/cm-13.0/BoardConfigCommon.mk#L49-L61
don't understand a thing from the coding but from what i have learned, kernel source would be awesome to develop more for the 4c. keep up the good work!
Yea would be really awesome, too bad xiaomi doesn't release it themself
Well there are a lot of crazy guys here on xda so there's still hope
Thinking to help @emfox to create a such template for 4c but no much free time here, just a short free time between my workload and no much interest without the device
ketut.kumajaya said:
Thinking to help @emfox to create a such template for 4c but no much free time here, just a short free time between my workload and no much interest without the device
Click to expand...
Click to collapse
yes, a working building directory structure will help me start the porting.
but no need hurry, we now have cm from www.teamsuperluminal.org. although it's close-sourced and use prebuilt kernel, still much better than miui.
Hi, anyone can give some more info how to build AOSP from nexus 5X?
am i alone like Taylor?
Looks like the kernel source will be released soon: http://en.miui.com/thread-235127-1-1.html

Kernel-Source_Nokia_1

Kernel Source of Nokia 1
(TA-1047/TA-1060/TA-1056/TA-1079/TA-1066)
LINK > https://github.com/DhirajSurvase/Kernel_Nokia_1_MT6737​
Instructions >
clone the source code
go to kernel dir
run "bash build.sh" command
ur compiled kernel will be under out/arch/arm/*
Official release of Nokia 1 Kernel sources available at https://www.nokia.com/en_int/phones/opensource
Hi,
We tried the official kernel and built it. After flashing the kernel, phone boot and it asked for a password. We gave password "1234" and it reboots and went in recovery.
Its always rebooting in recovery. We flashed the original boot image. Behavior did not change.
Is there any other recovery image we can use and flash the original boot image and bring the phone to working condition?
Thank You!
Mayur
DhirajMS said:
Kernel Source of Nokia 1
(TA-1047/TA-1060/TA-1056/TA-1079/TA-1066)
LINK > https://github.com/DhirajSurvase/Kernel_Nokia_1_MT6737​
Instructions >
clone the source code
go to kernel dir
run "bash build.sh" command
ur compiled kernel will be under out/arch/arm/*
Click to expand...
Click to collapse
Everyone, help me compile kernel from this source please. I can't do it, because i'm noobie for compile any sources.
ntnamkg said:
Everyone, help me compile kernel from this source please. I can't do it, because i'm noobie for compile any sources.
Click to expand...
Click to collapse
just clone it..
and hit "bash build.sh"
Thanks for respond. But, it is fail, below (some text):
make[1]: *** [scripts] Error 2
make[1]: Leaving directory `/home/namnt/Nokia1/Kernel_Nokia_1_MT6737-master/out'
make: *** [sub-make] Error 2
make: Leaving directory `/home/namnt/Nokia1/Kernel_Nokia_1_MT6737-master'
Click to expand...
Click to collapse
I try build on Ubuntu 14.04, 16.04 and Manjaro linux, all get this notice.
Ok
build.sh: line 35: make: command not found
build.sh: line 39: make: command not found
Click to expand...
Click to collapse
After run bash build get above notice. How to fix it? Thanks
ntnamkg said:
After run bash build get above notice. How to fix it? Thanks
Click to expand...
Click to collapse
apt-get install build-essential
would install make, gcc and other required tools.

Categories

Resources