[Q] Missing Repo for Android-NGK??? - General Questions and Answers

Tried to post this in the developer's forum, but apparently I don't have enough posts to do that. I'm trying to install the android-ndk platform on Debian Linux. It worked perfectly until I started downloading the toolchain sources.
Code:
# ./build/tools/download-toolchain-sources.sh /home/myusr/ndk-work/android-toolchain-src –verbose
Using git clone prefix: https://android.googlesource.com/toolchain
downloading sources for toolchain/binutils
Using sources for date '2011-02-23': toolchain/binutils revision a4316ba2b7698435a68e9826cabd87ae43dad182
downloading sources for toolchain/build
Using sources for date '2011-02-23': toolchain/build revision 2037ad5fa2969e0e77142548feb8cf54dc7b0a04
downloading sources for toolchain/gcc
ERROR: Could not clone https://android.googlesource.com/toolchain/gcc.git ?
I found the problem was my /tmp folder filled up and there was no more room to download anything. I saw 7 wasn't stable and I tried it do the same thing with version 6.
Code:
# ./build/tools/download-toolchain-sources.sh /home/ph33r/myusr/android-toolchain-src –verbose
Using git clone prefix: git://android.git.kernel.org/toolchain
downloading sources for toolchain/binutils
ERROR: Could not clone git://android.git.kernel.org/toolchain/binutils.git ?
This time /tmp was not even close to full. I am beginning to question if some of these repos aren't dead. Can anyone give me any advice or tips installing android-ndk?

i go back. lets go

i go back. lets go
Click to expand...
Click to collapse
What does that even mean?
This was the only response?

Related

[Q] Best way to cherry pick changes from the CyanogenMod code review?

So I set up a chain of scripts to build, package, and deploy CyanogenMod kang builds on Ubuntu 11.04 according to the guide in this thread: http://forum.xda-developers.com/showthread.php?t=1067519
Now that I can successfully build CyanogenMod, I'm wondering what the best (quickest, easiest, etc.) way is to cherry pick changes from the CyanogenMod code review which is found here: http://review.cyanogenmod.com/#q,statuspen,n,z
For example, if I wanted to allow the user to choose whether or not to show the "Hold" button in calls, I would need to pull this change: http://review.cyanogenmod.com/#change,6104. What would be the best way of doing this?
Thanks in advance for any help!
When I try to use the git cherry-pick command found on the commit page, I get this error: "fatal: You do not have a valid HEAD"
hmmm I would
Code:
cd android/system/packages/apps/Phone/
and then do
Code:
git pull http://review.cyanogenmod.com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
but I'm pretty new on this too.
I've been building from source for a couple of weeks now and just finished my first kernel from source but I'm having problems pulling commits.
Whenever I try to pull or cherry-pick I get
Code:
fatal: Not a git repository (or any of the parent directories): .git
Were you actually able to pull the commit? I'm doing this from android/system. Should I be in a different folder?
Try this little tutorial. ^_~
http://forum.xda-developers.com/showpost.php?p=23527685&postcount=29
The important part that I was missing was to be in the correct directory based on the patch.
For instance
Code:
cyanogenmod dot com/p/CyanogenMod/android_packages_apps_Phone refs/changes/04/6104/1
would have to be in android/packages/apps/Phone
and
Code:
cyanogenmod dot com/p/CyanogenMod/android_frameworks_base refs/changes/29/11129/8 && git checkout FETCH_HEAD
would be in android/frameworks/base
Thanks for the help on this

[Guide] How to build CM10.1 (Android 4.2.1) for the Galaxy R I9103

Note:
1. This is extension to the Karthik's Guide with Adam's Repo's...
2. Based on my experience i have created this Guide, I have successfully compiled the Build and sharing this with you so some one can try it...
Preparing the system:
Follow this Link until step 4.4 (i.e. 4.4 - Initialize Repository & Sync)
Start with sources:
Code:
cd ~/android/system/
Initialize Repo for Android CM10.1 (Android 4.2.1):
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
and enter your credentials if needed.
Download the sources:
Code:
$ repo sync -j4
Wait until it's finished (takes a lot of time!).
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync -j4
Initialize the environment
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j4/16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.
Wait until it's finished (takes a lot of time!).
VERY IMPORTANT: Now, Lets add the device specific tree..
1) Open your File Browser,
2) Press Ctrl+H (to show hidden files/directories)
3) Navigate to android/system/.repo/manifest.xml
(Right Click & open the XML file in text editor)
4) Add
Code:
<project path="device/samsung/galaxyr" name="Adam77Root/android_device_samsung_galaxyr" remote="github" revision="jellybean"/>
BEFORE the manifest closing tags (</manifest>).
5) Save & Close the File.
Run another
Code:
$ repo sync
Get Device Specific Repos:
Code:
. build/envsetup.sh
Extract files from phone:
NOTE: You need to have cm10 installed on the phone.
Code:
cd ~/android/system/device/samsung/galaxyr/
./extract-files.sh
Code:
~/android/system/vendor/cm/get-prebuilts
Important Things to be taken care before Building ROM:
1. Add these line in Boarconfig.mk
Code:
TARGET_ARCH := arm
BOARD_EGL_NEEDS_LEGACY_FB := true
2. Change the below line.
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 5242880
to
Code:
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 7242880
3. Delete Overlay folder.
4. Go to build/tools/releasetools and open file "ota_from_target_files" and replace the whole code with this code from this link.
Ok, You are done Now...
Building the ROM:
Code:
brunch cm_galaxyr-eng
it will take around 2 - 3 Hours....
Congrats you are done
Now Go to ~/android/system/out/target/product/galaxyr/cm-10.1-XXXXXXXXX-UNOFFICIAL-galaxyr.zip copy it to mobile and flash it on your mobile..
*********************************************************************************​
Updating the Build:
Code:
cd android/system
repo sync -j1
make installclean
brunch cm_galaxyr-eng
Big Thanks to Adam for his Efforts and Device tree..
Friends if i've missed some things please correct me ...
Gr8 mj! It will be better if u post ur error and how u solved.. By that it help others...
Sent from my GT-I9103 using xda app-developers app
Waiting for cm10.1 ROM now. Using Cm 10 and it is great
Sent from my GT-I9103 using xda app-developers app
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
wow that's cool buddy...
Adam77Root said:
I will start building 10.1 today.
Edit: This is my 500th post.
Sent from my CM10-powered GT-I9103
Click to expand...
Click to collapse
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
vipul12389mehta said:
adam wat abt cm10 ?? will u abonden it ??
Sent from my GT-I9103 using Tapatalk 2
Click to expand...
Click to collapse
Not yet. The first builds will be only previews. If 10.1 gets as stable as 10 now is, I'll change to it. But there is work to be done on 10 as well and better to do it on a working build first. But I'm also very excited to see 10.1, so will definitely work on it.
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
sarun_biotech said:
Mj, before running the get-prebuilts command, should I run extract-files.sh first to get the vendor/cm directory as mentioned in karthick's tut for CM10 ?
I'm studying through your's, karthick's, and PA's compiling guides to get to know about compiling roms and trying to understand every step.
Click to expand...
Click to collapse
Yes buddy you need to run it...
Friends updated the Guide with all the details and problems i have faced, so now you can simply follow the steps and build CM 10.1...
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
I used wubi... dual boot...
sarun_biotech said:
Ran in to trouble right in the beginning. My process does not support virtualization (not a n option in BIOS too) and so cannot install 64 bit Ubuntu on VM player.
Do you guys have any alternate suggestions or is it possible to use 32 bit Ubuntu to compile ?
Click to expand...
Click to collapse
Even i also faced this problem, so i need to install the Ubuntu through the CD in different partition so that i have both Windows 7 and Ubuntu 12.10 64 Bit...
If you have any problem just PM me...
Cm10 official
Is there a official CM10 for galaxy r. If yes plz snd the link.
akirockstarr said:
Is there a official CM10 for galaxy r. If yes plz snd the link.
Click to expand...
Click to collapse
CM 10 & 10.1 are official for Galaxy R users and Unofficial from CM Team point of view...
1. CM 10 Thread.
2. CM 10.1 Thread.
Guys Check out xda-university.com An answer to all our development questions. :thumbup:
Everything at a single place.
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Code:
[email protected]:~/mydev/cm10.1/device/samsung/galaxyr$ ./extract-files.sh
remote object '/system/etc/wifi/bcm4330_mfg.bin' does not exist
remote object '/system/etc/wifi/nvram_mfg.txt' does not exist
remote object '/system/bin/wlandutservice' does not exist
remote object '/system/bin/macloader' does not exist
remote object '/system/bin/mfgloader' does not exist
remote object '/system/bin/nv_hciattach' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/wlandutservice': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/macloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/mfgloader': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/nv_hciattach': No such file or directory
remote object '/system/bin/brcm_patchram_plus' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/brcm_patchram_plus': No such file or directory
remote object '/system/bin/drexe' does not exist
remote object '/system/bin/npsmobex' does not exist
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/drexe': No such file or directory
chmod: cannot access `../../../vendor/samsung/galaxyr/proprietary/npsmobex': No such file or directory
Why are we extracting files from phone? The device tree should be holding them right?
kishoreinme said:
I am trying to build CM 10.1 by your instructions and while extracting files from phone (cm10.1 beta 2.2) few "not found" & chmod errors occur. Logs (only error lines) following. Sorry I could'nt attach as file.Is it fine?
Click to expand...
Click to collapse
Not an issue you can proceed with next command, it will take care of these files.....

[GUIDE] How to Build and Package a Kernel [D2]

This thread aims to be a comprehensive guide to building and packaging kernels for US Variant Samsung Galaxy SIIIs
In my opinion, a kernel is a great way to get into building things for your device and its pretty easy to do too.
Intro
What is a kernel?
http://en.wikipedia.org/wiki/Kernel_(computing)
This guide is for US SGSIII's (d2att,d2cri,d2mtr,d2spr,d2tmo,d2usc,d2vzw,others?)
It may be possible to adapt this to other devices, but I am not responsible for anything that happens should you try to do this.
This guide assumes you have a general knowledge of the Linux operating system. If you've never used it, you might consider playing around
with it for awhile before attempting this guide.
Click to expand...
Click to collapse
Prerequisites
On all devices you must be rooted, on Verizon SGS3 (d2vzw) you must also have the unlocked (VRALE6) bootloader installed.
This is not the thread for figuring out how to do this. You can use the forum's search function to figure out how to do this on your device.
You'll need a computer or a virtual machine running ubuntu. You may be able to figure out how to get this working on other distributions,
but since ubuntu is generally the most accepted distribution to use for building android things, I'll stick to using that here.
At the time of this writing, I'm using ubuntu 12.10, 64-bit.
You'll need to install some packages on your ubuntu machine:
Code:
sudo apt-get install build-essential git zip unzip
On 64-bit you'll also need some multilib and 32-bit compatibility packages:
Code:
sudo apt-get install gcc-multilib g++-multilib lib32z1-dev
Click to expand...
Click to collapse
Setting up the Build Environment
Next, you'll need a toolchain which is used to actually build the kernel. You may download one of these:
GCC 4.4.3: Download || Mirror
GCC 4.6: Download || Mirror
GCC 4.7: Download || Mirror
If you aren't sure, go for 4.4.3 or 4.6.
4.7 requires some code changes to work. The original kernel developer may or may not have made these changes.
Here is what I needed to do in order for 4.7 to build, boot and have wifi work:
https://github.com/invisiblek/linux-msm-d2/commit/f8d7199d37cfbfa1bcb6b4bcae3fc15ae71fbdea
https://github.com/invisiblek/linux-msm-d2/commit/ea58076501e5874db7b934c215c4dae81ddfd0a6
The toolchains are also available in the android NDK.
*** There are many toolchains out there, some of you may know of the Linaro toolchain which is aimed to optimize your binary even further ***
*** If you choose to use a different toolchain, that is fine. Keep in mind that you may run into issues depending on the toolchain you use ***
You can check what your currently running kernel was built with by issuing these commands:
Code:
adb root
adb shell cat /proc/version
It should return something like:
Linux version 3.4.0-cyanogenmod-gc4f332c-00230-g93fb4aa-dirty ([email protected]) (gcc version 4.7 (GCC) ) #134 SMP PREEMPT Thu Feb 28 00:22:41 CST 2013
Click to expand...
Click to collapse
This shows my particular kernel here was built with GCC 4.7
You can use wget to download one of the links from above, in this instance we'll download version 4.4.3 from the first link:
Code:
wget http://invisiblek.org/arm-eabi-4.4.3.tar.bz2
Extract this to somewhere you will remember, probably your home directory.
Code:
mkdir arm-eabi-4.4.3
tar -xf arm-eabi-4.4.3.tar.bz2 -C arm-eabi-4.4.3/
Click to expand...
Click to collapse
Obtaining Source
Find someone's source to use as a base. This can be a source archive from Samsung, a kernel tree from CyanogenMod, or any other developer around that makes kernels for your device.
TIMEOUT
This is a good spot to stop and take note that the Linux kernel is licensed under the GNU General Public License (GPL): http://www.gnu.org/licenses/gpl-2.0.html
What does this mean you ask? It means that if you plan to share your kernel with the community (if it's good, please do so!) then you MUST share your
source code as well. I am not liable for what you choose to do once you start building kernels, but know this: if you share your kernel and do not
provide source code for it, you will get warnings from XDA for a determined amount of time, after that you may have your threads closed, deleted and
possibly your user account terminated. This is extremely important!
Also, you may run into more problems than just XDA. There are organizations out there that do take action if you consistently refuse to comply with the GPL.
I recommend you read this: http://www.gnu.org/licenses/gpl-2.0.html so that you are familiar with what legalities you are getting yourself into.
The main thing to remember is to share your source code if you decide to share your built kernel.
Click to expand...
Click to collapse
In this instance, we will use CyanogenMod's kernel source for the US Galaxy S3's. You may browse the source code here:
https://github.com/CyanogenMod/android_kernel_samsung_d2
You'll notice that the branch there is cm-10.1
This is the default branch of this repository on github. This means that if you intend to build this branch, you'll need to use it on CM version 10.1. Most
likely it will not function on another version.
To obtain the source code:
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_d2
This will take a little while, be patient.
When done, you'll have a directory called android_kernel_samsung_d2, cd into this directory.
Code:
cd android_kernel_samsung_d2
Next, you'll need to set up a couple environment variables. These tell the system two things:
1. What CPU architecture to build for, in this case arm
2. Where to find the toolchain we downloaded earlier, so that the system can cross compile for arm
Code:
export ARCH=arm
export CROSS_COMPILE=~/arm-eabi-4.4.3/bin/arm-eabi-
You'll need to set these variables on each new session. You can modify your Makefile in the root of your kernel tree in order to have these set permanently.
Click to expand...
Click to collapse
Building
At this point you can make any changes to the source code that you want. If this is your first time, I recommend not making any changes and make sure you have a
sane build environment before adding any complications.
When you build a kernel, you need to choose a defconfig. This is a specialized configuration file, specifically tailored for your device.
CyanogenMod names their defconfigs for their devices like so: cyanogen_<device>_defconfig and they are located in arch/arm/configs/
Code:
ls arch/arm/configs/cyanogen*
In this example, we will build for d2vzw.
Set up your tree to build for the d2vzw:
Code:
make cyanogen_d2vzw_defconfig
(do this in your kernel's root directory, in this example it was android_kernel_samsung_d2/ )
Now you are ready to build:
First, determine how many cpu's your computer has. You'll use this number to determine how many jobs the compiler command will use. The more jobs you can use, the more
cpu threads the compile will take advantage of, thus you'll get faster builds. If you don't know, just assume you'll use the number 2. We'll use 2 as an example here.
Code:
make -j2
Where 2 is the number of CPU cores your build system has.
And now we wait...until it's done compiling...
You'll know it successfully compiled when you have this line when it stops:
Kernel: arch/arm/boot/zImage is ready
Click to expand...
Click to collapse
PROTIP:
If it stops somewhere other than "zImage is ready" then you had build errors. Try running the 'make' command with no options after it. This will run the compile on a single thread
and will cause it to stop compiling as soon as it hits an error. When you run it on multiple threads, it definitely goes much faster, but if an error occurs, the console doesn't stop
until it finishes all of its threads. Causing you to have to scroll up and search around for an error
Click to expand...
Click to collapse
Now, assuming the build completed successfully, you have two things you are concerned with: A zImage (the kernel binary itself) and your kernel modules, which get built based
on what was configured in your defconfig.
You'll find your zImage at: arch/arm/boot/zImage
Code:
ls arch/arm/boot/zImage
The modules are scattered all over the place, depending on where the source existed that they were compiled from. We can easily search for them using this command:
Code:
find . -name "*.ko"
If both of the previous commands completed, you are now ready to package your kernel up for testing.
Move up a directory before continuing.
Code:
cd ..
Click to expand...
Click to collapse
Packaging
You may know of an awesome developer by the name of koush.
Well, once upon a time, koush created a rather simple zip, called AnyKernel, that would flash a kernel on a device, regardless of what ramdisk the kernel has on it.
I've taken his zip and modified it for d2 devices and to work with the newer recoveries out there.
This has a script in it that will dump your current boot.img (kernel+ramdisk), unpack it, replace the kernel, repack it and flash it.
It'll also copy any modules to the proper directory (/system/lib/modules) and set permissions appropriately.
You can get a zip here: Download || Mirror
(You can get it here as well: https://github.com/invisiblek/AnyKernel )
(Everyone is invited to use this zip, it'll probably make your life easier to not have to worry about the ramdisk. Enjoy!)
IMPORTANT
This AnyKernel package is for US variations of the Galaxy S3.
NOT the international (I9300) or any other device.
There are checks in the updater-script that will ensure you are running a d2 device before it does anything.
If you were to remove these checks, and not modify the partition that it flashes to later, you could end up with a brick.
If you intend to adapt this package for another device (please, do this! its a very handy script!), make sure you know it well, or ask someone to help you determine your device's
partition scheme before using it.
The risk here is due to the fact that the script doesn't know your device's partition scheme. It is configured specifically for the d2 devices. Flashing it on something else, who's boot
partition is somewhere else, might cause a bad flash to the bootloader partition (bad bad news if this happens).
Just be careful if you want to use this on another device. You won't run into problems if you use this on a d2 device.
EDIT: I made modifications that should make this less likely, but please, if you intend to use this on a different device (which is completely fine!) make sure you configure
the scripts to flash to the proper partitions.
Click to expand...
Click to collapse
Download and extract one of the above, we'll again use the first link for this example:
Code:
wget http://invisiblek.org/AnyKernel_samsung-d2.zip
unzip AnyKernel_samsung-d2.zip -d AnyKernel/
Now we'll copy our newly compiled zImage (still referring to the same kernel directory we used above, your repo might be called something different)
Code:
cp android_kernel_samsung_d2/arch/arm/boot/zImage AnyKernel/kernel/
cp `find android_kernel_samsung_d2 -name "*.ko"` AnyKernel/modules/
Finally we are ready to zip this up and test out flashing it.
Code:
cd AnyKernel
zip ../MyAwesomeKernel.zip -r *
cd ..
You'll now have a file named MyAwesomeKernel.zip which you should be able to flash via custom recovery (TWRP or CWM)
Click to expand...
Click to collapse
Extra Credit/Protips
Learn to use git. It's very powerful and great way to store your code.
Learn to use adb. It's an invaluable tool for any android developer.
Touchwiz and AOSP-based kernels are different. This means you cannot take CyanogenMod's source, build a kernel and expect it to work on a Touchwiz-based ROM.
Build a ROM next: http://wiki.cyanogenmod.org/w/Build_for_d2vzw
Crackflash your own stuff!
ALWAYS NANDROID!
Click to expand...
Click to collapse
Source code for all of my projects can be found here: http://github.com/invisiblek
FAQ
Q: How do I update my source tree to the latest that is available from where I downloaded it?
A: This can be handy if, for instance, you are building a CyanogenMod kernel and they added some patches, after you downloaded the source, that you want to include in your next build. You'll want to cd to your kernel tree and issue a git pull:
Code:
cd android_kernel_samsung_d2
git pull
You may then continue with the building instructions.
This may, however, have other problems if you've made changes to files. You might run into conflicts. I won't cover fixing any of this here, its not in the scope of this thread.
Q: I'm using X as a kernel base, but Y has a patch that I really like. How do I get it in my kernel easily?
A: I'll let you check Google for this answer, but I'll give you a hint use: git cherry-pick
Nice tutorial bro! Always good to learn something new everyday
Really is a good thread,thanks
This guide would have made things too easy for me.
Too easy, indeed. haha
Great job, invisiblek! AnyKernel is the beez neez.
Ok so this is a noob question but I gotta ask anyway lol. Ok so I cloned the kernel source, I made my edits, now how do I push all this to my github?
I already have a github account, I already made a new repo for the kernel. Here's a link to my github if you need it...
https://github.com/ghicks12/d2vzw_kernel.git
spc_hicks09 said:
Ok so this is a noob question but I gotta ask anyway lol. Ok so I cloned the kernel source, I made my edits, now how do I push all this to my github?
I already have a github account, I already made a new repo for the kernel. Here's a link to my github if you need it...
https://github.com/ghicks12/d2vzw_kernel.git
Click to expand...
Click to collapse
git remote add origin git_location_you_created_on_github.git
git push -u origin somebranch
The -u is for first time run only, you can just git push afterwards.
Sent from my SCH-I535
GideonX said:
git remote add origin git_location_you_created_on_github.git
git push -u origin somebranch
The -u is for first time run only, you can just git push afterwards.
Sent from my SCH-I535
Click to expand...
Click to collapse
Thanks! When I run
Code:
git remote add origin https://github.com/ghicks12/d2vzw_kernel.git
I get this back:
Code:
fatal: remote origin already exists.
I'm editing a CM based kernel, not sure if that matters or not?
That just means you added the remote already. Just issue the push command then.
Sent from my SCH-I535
Why is this happening? I don't know what i did wrong
[email protected]:~/cm$ make VARIANT_DEFCONFIG=cyanogen_d2att_defconfig
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/media/video/msm/Kconfig:123:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:128:warning: choice value used outside its choice group
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/cm$
Hey. I'm having some problems with some GIT terminology and procedures. I'm a .NET developer and I use TFS and SVN on a daily basis. Forgive me if this is complete off basis from what you'd do with GIT.
What I want to do is merge one branch into another branch. In other words I want to take the latest kernel source from my favorite dev and merge in the latest from cyanogen's 4.3 d2 branch. Is this a rebase thing? It doesn't seem like cherrypicking to me.
I have successfully compiled kernel and made modules.I inserted zImage and modules inside any kernel updater,flashed via TWRP.When reboot stuck in odin and it says could not do normal boot.

[GUIDE] Build Rom from Source For Tissot

What is ?
Android is the open-source operating system used for smartphones. Full Freedom for people using it
What is Source Code?
Android is an open-source software stack created for a wide array of devices with different form factors. The primary purposes of are to create an open software platform available for carriers, OEMs, and to make their innovative ideas a reality and to introduce a successful, real-world product that improves the mobile experience for users.The result is a full, production-quality consumer product with source code open for customization and porting.
So basically Allows to customize the things you like and make new things without any Restrictions. Cool isn’t it?
What is ROM ?
The ROM is the operating system. This is the User interface (Sense UI in HTC phones) and the file system for maintaining contacts etc. It is composed of a Linux kernel and various add-ons to achieve specific functionality.
What does a Rom Contain ?
Basically a Rom Contains following main things :
· Kernel
· Bootloader
· Recovery
· Radio
· Framework
· Apps
· core
· -runtime,Etc
Some Basics About Above Terms
Kernel :
A kernel is critical component of the and all operating systems. It can be seen as a sort of bridge between the applications and the actual hardware of a device. devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of specific code built in, and Google's kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software. So basically if any instruction is given to mobile it first gives the command to kernel for the particular task execution.
Bootloader :
The bootloader is code that is executed before any Operating System starts to run. Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. Think of the bootloader as a security checkpoint for all those partitions. Because if you’re able to swap out what’s on those partitions, you’re able to break things if you don’t know what you’re doing. So basically it commands the kernel of your device to Boot the Device properly without any issues. So careful with bootloader since it can mess things very badly.
Recovery :
Recovery is defined in simple terms as a source of backup. Whenever your phone firmware is corrupted, the recovery does the job in helping you to restore or repair your faulty or buggy firmware into working condition. It is also used for flashing the Rom’s , kernel and many more things.
Radio
The lowest part of software layer is the radio: this is the very first thing that runs, just before the bootloader. It control all wireless communication like GSM Antenna, GPS etc.
What you’ll need
A relatively recent 64-bit computer (Linux, OS X, or Windows)(Virtual Machine will work as well) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives.
A decent internet connection & reliable electricity
Some familiarity with basic operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with recovery. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
Install the SDK
If you haven’t previously installed adb and fastboot, you can download them from Google. Extract it running:
Code:
unzip platform-tools-latest-linux.zip -d ~
Now you have to add adb and fastboot to your PATH. Open ~/.profile and add the following:
Code:
# add SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
Then, run source ~/.profile to update yur environment.
Install the build packages
Several packages are needed to build LineageOS. You can install these using your distribution’s package manager.
To build LineageOS, you’ll need:
bc bison build-essential curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
For Ubuntu versions older than 16.04 (xenial), substitute:
libwxgtk3.0-dev → libwxgtk2.8-dev
Java
Different versions of LineageOS require different JDK (Java Development Kit) versions.
LineageOS 14.1: OpenJDK 1.8 (install openjdk-8-jdk)
LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
https://askubuntu.com/questions/761127/how-do-i-install-openjdk-7-on-ubuntu-16-04-or-higher
Create the directories
You’ll need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~//lineage
Install the repo command
Enter the following to download the repo binary and make it executable (runnable):
Code:
curl [url]https://storage.googleapis.com/git-repo-downloads/repo[/url] > ~/bin/repo
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing):
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Then, run source ~/.profile to update your environment.
Initialize the LineageOS source repository
Code:
cd ~//lineage
repo init -u [url]https://github.com/LineageOS/.git[/url] -b lineage-15.1
Download the source code
Code:
repo sync -c -f --force-sync --no-clone-bundle --no-tags --optimized-fetch --prune
Prepare the device-specific code
Code:
git clone [url]https://github.com/TheScarastic/android_device_xiaomi_msm8953-common[/url] -b lineage-15.1 device/xiaomi/msm8953
git clone [url]https://github.com/TheScarastic/android_device_xiaomi_tissot[/url] -b lineage-15.1 device/xiaomi/tissot
git clone [url]https://github.com/TheScarastic/proprietary_vendor_xiaomi[/url] -b lineage-15.1 vendor/xiaomi
git clone [url]https://github.com/Tissot-Development/android_kernel_xiaomi_tissot[/url] -b 8.1 kernel/xiaomi/msm8953
Turn on caching to speed up build
Code:
export CCACHE_DIR=./.ccache
ccache -C
export USE_CCACHE=1
export CCACHE_COMPRESS=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Configure jack
Jack is the new Java compiler used when building LineageOS 14.1. It is known to run out of memory - a simple fix is to run this command:
Code:
export _JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
Make Clean Build
Code:
make clean
Initialize the build command
Code:
source build/envsetup.sh
Start Build
Code:
croot
brunch tissot
For More info:
https://source..com/source/requirements
https://wiki.lineageos.org/devices/cheeseburger/build
Thanks bro..
DGEEEK said:
Thanks bro..
Click to expand...
Click to collapse
Thany you for this guide! Will try this!
saski4711 said:
Thany you for this guide! Will try this!
Click to expand...
Click to collapse
:good:
Thanks for guide, btw what's the size of source code ?
prabhjot-singh said:
Thanks for guide, btw what's the size of source code ?
Click to expand...
Click to collapse
Around 20-25GB I think
Followed the above steps to the letter but I get an error right at the beginning:
Code:
ninja: error: 'kernel/xiaomi/msm8953/arch/arm64/configs/lineage_tissot_defconfig', needed by '/home/rossi/android/lineage/out/target/product/tissot/obj/KERNEL_OBJ/.config', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/rossi/android/lineage'
Current git broken? Any idea?
saski4711 said:
Followed the above steps to the letter but I get an error right at the beginning:
Code:
ninja: error: 'kernel/xiaomi/msm8953/arch/arm64/configs/lineage_tissot_defconfig', needed by '/home/rossi/android/lineage/out/target/product/tissot/obj/KERNEL_OBJ/.config', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/rossi/android/lineage'
Current git broken? Any idea?
Click to expand...
Click to collapse
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
black_arashi said:
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
Click to expand...
Click to collapse
Thanks for the info. I'm now past the error. Will take some time though since I'm building on my laptop :cyclops:
saski4711 said:
Thanks for the info. I'm now past the error. Will take some time though since I'm building on my laptop :cyclops:
Click to expand...
Click to collapse
Between 3 to 5h in modern pc, probably you will need between 7 to 10h in a laptop, depends on Nº of Cores and RAM, anyway, good luck in your first compilation :good:
black_arashi said:
Between 3 to 5h in modern pc, probably you will need between 7 to 10h in a laptop, depends on Nº of Cores and RAM, anyway, good luck in your first compilation :good:
Click to expand...
Click to collapse
Thx m8. Still no error. Compiling over night on single core to avoid throttling / overheating. :highfive:
saski4711 said:
Thx m8. Still no error. Compiling over night on single core to avoid throttling / overheating. :highfive:
Click to expand...
Click to collapse
Probably you will se a lot of "warning" don't apologice, it's normal, these warning issues is being solved during the compilation. Some info just in case
saski4711 said:
Followed the above steps to the letter but I get an error right at the beginning:
Current git broken? Any idea?
Click to expand...
Click to collapse
Rename tissot_defconfig to lineage_tissot_defconfig in arch/arm64/configs
Nice share brotherr :good:
Keep mia1 like the sky full of stars, so many custom rom :highfive::laugh:
Sent from my Xiaomi Mi A1 using XDA Labs
-Rhoby|™-Bugs said:
Nice share brotherr :good:
Keep mia1 like the sky full of stars, so many custom rom :highfive::laugh:
Click to expand...
Click to collapse
Thanks
Hello and thanks for the guide.
I am trying to build Dirty Unicorns 7.1.2 for tissot. I have downloaded kernel, vendor and device and repo synced DU n7x branch. I have also downloaded device_qcom_sepolicy and changed some files in device/xiaomi/tissot folder in order for the build to start normally. After 1.30 minutes of building i get this error
Code:
ninja: error: '/home/manoskav/du-tissot/out/target/product/tissot/obj/STATIC_LIBRARIES/bootctrl.msm8953_intermediates/export_includes', needed by '/home/manoskav/du-tissot/out/target/product/tissot/obj/EXECUTABLES/update_engine_sideload_intermediates/import_includes', missing and no known rule to make it
make: *** [build/core/ninja.mk:167: ninja_wrapper] Error 1
Maybe should i try n7x-caf branch or n7x is ok for tissot? Can anyone help me with the building process?
Thanks in advance.
mparmpas122321 said:
Hello and thanks for the guide.
I am trying to build Dirty Unicorns 7.1.2 for tissot. I have downloaded kernel, vendor and device and repo synced DU n7x branch. I have also downloaded device_qcom_sepolicy and changed some files in device/xiaomi/tissot folder in order for the build to start normally. After 1.30 minutes of building i get this error
Maybe should i try n7x-caf branch or n7x is ok for tissot? Can anyone help me with the building process?
Thanks in advance.
Click to expand...
Click to collapse
Hmm but seriously it's tougher bro because its bootctrl it need more configuration
I tried building for Tissot but I'm having this issue.
[email protected]:~/dos$ . build/envsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/discovery/vendorsetup.sh
[email protected]:~/dos$ brunch tissot
including vendor/discovery/vendorsetup.sh
build/core/product_config.mk:236: *** Can not locate config makefile for product "tissot". Stop.
build/core/product_config.mk:236: *** Can not locate config makefile for product "tissot". Stop.
No such item in brunch menu. Try 'breakfast'
[email protected]:~/dos$
Click to expand...
Click to collapse
Can anyone please help me out?
black_arashi said:
Hello,
Don't use that kernel, as actually don't work properly in Xiaomi Mi A1. This error is caused because the file "lineage_tissot_defconfig" it's not named like that, exactly it's name is "tissot_defconfig", for your first build with lineage I recommend you to use the following sources, because are adapt for Lineage. Don't forget to use superuser privileges to compile, it avoids a lot of possible errors with normal user.
Device tree
Vendor
Kernel
Give thanks to user @ghpranav for sources :good:
Regards
Click to expand...
Click to collapse
@black_arashi
Oh so ghpranav's repo has LOS source added into it? If so is there any Android Stock for all these?
Thanks

[SOLVED] dts not found

Hello.
Been working on how to get a device kernel from source for the Mi note 10 pro (Mi CC9 Pro). I have gotten up to the point where it builds but fails due to dts folder is not found.
I need an example of what goes in DTC_EXT=
All I see on the net is DTC_EXT=dtc
Please help.
I use the kbuild/clang system that has a config that I can run.
I have CC, aosp toolchain, build-tools, qcom 8.0 llvm as real_cc. All linked, the only thing that fails is the dts files not being found
this is the issue i have
find: ‘arch/arm64/boot/dts/’: No such file or directory
terminal below
Spoiler: Terminal
Setting up for build
+ cd xsource
+ make CC=/home/avm/android/xkernel/prebuilts-master/clang/host/linux-x86/clang-r353983c/bin/clang HOSTCC=/home/avm/android/xkernel/prebuilts-master/clang/host/linux-x86/clang-r353983c/bin/clang O=/home/avm/android/xkernel/out/android-4.14/xsource mrproper
make[1]: Entering directory '/home/avm/android/xkernel/out/android-4.14/xsource'
find: ‘arch/arm64/boot/dts/’: No such file or directory
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN .config
Used config
Spoiler: Build config
ARCH=arm64
SUBARCH=arm64
BRANCH=K4.14Q
CLANG_TRIPLE=aarch64-linux-gnu-
CROSS_COMPILE=~/android/xkernel/tsource/toolchains/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
CROSS_COMPILE_ARM32=~/android/xkernel/tsource/toolchains/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-
KBUILD_DEFCONFIG=~/android/xkernel/tsource/arch/arm64/configs/tucana_user_defconfig
DEFCONFIG=tucana_user_defconfig
POST_DEFCONFIG_CMDS=""
DTC_EXT=dtc
DTC_PREBUILTS_BIN=/scripts/dtc
KBUILD_OUTPUT=out
HOSTCC=gcc
CC=clang
AS=clang
AR=ar
CLANG_PREBUILT_BIN=/toolchains/clang/host/linux-x86/clang-r353983c/bin
BUILDTOOLS_PREBUILT_BIN=/toolchains/build-tools/linux-x86/bin
FILES="
arch/arm64/boot/Image.gz
vmlinux
System.map
"
Found out it has something to do with the arch folder itself.
I replace it with the arch folder in the AOSP-kernel folder and it does not show up saying its not found.
Still crashing due to a new error about the include folder and a file or 2 that is in it. still trying my best to get it working.
SOLUTION to DTS MISSING:
Replace the makefile in the boot directory of your ARCH= type for the device. with the make files in aosp kernel same location.
Just want to point out that you may not need to do any of this and it is normal for the build not to find anything due to it, needing to be created during the kernel build process. the Make file that is located in boot under the ARCH type has some settings in it if you are using a device source other then google devices which contains information that i think the build needs, in order to be made.
After everything I said above, further investigation has proven that the Make file in {ROOT}/arch/arm64/boot is incorrect based off the one in aosp-coral-4.14 correct config is below. copy and replace the whole thing in the file.
Spoiler: Correct Make file config
#
# arch/arm64/boot/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies.
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 2012, ARM Ltd.
# Author: Will Deacon <[email protected]>
#
# Based on the ia64 boot/Makefile.
#
include $(srctree)/arch/arm64/boot/dts/Makefile
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo dtbo.img
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))
ifneq ($(DTB_NAMES),)
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
else
DTB_LIST := $(dtb-y)
endif
DTB_OBJS := $(shell find $(obj)/dts/ -name \*.dtb)
DTBO_OBJS := $(shell find $(obj)/dts/ -name \*.dtbo)
# Add RTIC DTB to the DTB list if RTIC MPGen is enabled
ifdef RTIC_MPGEN
DTB_OBJS += rtic_mp.dtb
endif
rtic_mp.dtb: vmlinux FORCE
$(RTIC_MPGEN) --objcopy="${OBJCOPY}" --objdump="${OBJDUMP}" \
--binpath="" --vmlinux="vmlinux" --config=${KCONFIG_CONFIG} \
--cc="${CC} ${KBUILD_AFLAGS}" --dts=rtic_mp.dts && \
$(DTC) -O dtb -o rtic_mp.dtb -b 0 $(DTC_FLAGS) rtic_mp.dts
$(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/Image.bz2: $(obj)/Image FORCE
$(call if_changed,bzip2)
$(obj)/Image-dtb-hdr: $(obj)/Image FORCE
echo -n 'UNCOMPRESSED_IMG' > [email protected] && \
$(call size_append, $(filter-out FORCE,$^)) >> [email protected]
$(obj)/Image-dtb: $(obj)/Image-dtb-hdr $(obj)/Image $(DTB_OBJS) FORCE
$(call if_changed,cat)
$(obj)/Image.gz: $(obj)/Image FORCE
$(call if_changed,gzip)
$(obj)/Image.lz4: $(obj)/Image FORCE
$(call if_changed,lz4)
$(obj)/Image.lzma: $(obj)/Image FORCE
$(call if_changed,lzma)
$(obj)/Image.lzo: $(obj)/Image FORCE
$(call if_changed,lzo)
$(obj)/Image.gz-dtb: $(obj)/Image.gz $(DTB_OBJS) FORCE
$(call if_changed,cat)
$(obj)/Image.lz4-dtb: $(obj)/Image.lz4 $(DTB_OBJS) FORCE
$(call if_changed,cat)
$(obj)/dtbo.img: $(DTBO_OBJS) FORCE
$(call if_changed,mkdtimg)
install:
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)"
zinstall:
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image.gz System.map "$(INSTALL_PATH)"
All this does is fix the build saying dts not found.
***UPDATE 2022***
You require dtc binary file from AOSP prebuilts/misc/dtc
Copy it to the devices kernel folder in scripts/dtc. Was able to build kernel (not sure if it works)
Does it come from any commit of git hub, could you give me the link, mine arch/arm... makefile is similar to your old but it compile with no error. so strange
namhoang235 said:
Does it come from any commit of git hub, could you give me the link, mine arch/arm... makefile is similar to your old but it compile with no error. so strange
Click to expand...
Click to collapse
From my understanding you want the link to the makefile I got. Unfortunately it has been so long I am unable to remember where I got it from. But as a helpful tip. I searched Google for (device name) makefile and searched through links. I also tried. Device tree, build files. Hope that helps.
I gave up on building it because Xiaomi did not release any build files or device tree for Xiaomi CC9 PRO. Only released source files for it. So from my understanding. You would have to edit a pre existing one and match it to the device. Doing that is well above my knowledge.
In order to get at least a template for the CC9 device. You can get the template from Using Qualcomms AOSP builder which has the SM160 device in the list. It is seperate from Google's AOSP and requires a seperate download.
Also I would like to know how you managed to get the makefile working maybe I missed something and can go back fix it. May solve my problem I had.
Squida said:
From my understanding you want the link to the makefile I got. Unfortunately it has been so long I am unable to remember where I got it from. But as a helpful tip. I searched Google for (device name) makefile and searched through links. I also tried. Device tree, build files. Hope that helps.
I gave up on building it because Xiaomi did not release any build files or device tree for Xiaomi CC9 PRO. Only released source files for it. So from my understanding. You would have to edit a pre existing one and match it to the device. Doing that is well above my knowledge.
In order to get at least a template for the CC9 device. You can get the template from Using Qualcomms AOSP builder which has the SM160 device in the list. It is seperate from Google's AOSP and requires a seperate download.
Also I would like to know how you managed to get the makefile working maybe I missed something and can go back fix it. May solve my problem I had.
Click to expand...
Click to collapse
yeah, your experiment is very useful for me, i am in these trouble you 've met yesterday.i help me a lot. thank again
i really dont want to edit makefile as i see many source have the same make file, so it is a compiler tool with some another input file for it to make, so i only edit makefile when it got error itsefl, if it is the path error, then i really dont want to edit it,
Squida said:
From my understanding you want the link to the makefile I got. Unfortunately it has been so long I am unable to remember where I got it from. But as a helpful tip. I searched Google for (device name) makefile and searched through links. I also tried. Device tree, build files. Hope that helps.
I gave up on building it because Xiaomi did not release any build files or device tree for Xiaomi CC9 PRO. Only released source files for it. So from my understanding. You would have to edit a pre existing one and match it to the device. Doing that is well above my knowledge.
In order to get at least a template for the CC9 device. You can get the template from Using Qualcomms AOSP builder which has the SM160 device in the list. It is seperate from Google's AOSP and requires a seperate download.
Also I would like to know how you managed to get the makefile working maybe I missed something and can go back fix it. May solve my problem I had.
Click to expand...
Click to collapse
can you give me a hint?
my kernel can make standarlone with bash script, but when compile with rom it make tons of errors about path, so which file i need to puth something like cc=clang,.... to make it pass when build rom
namhoang235 said:
can you give me a hint?
my kernel can make standarlone with bash script, but when compile with rom it make tons of errors about path, so which file i need to puth something like cc=clang,.... to make it pass when build rom
Click to expand...
Click to collapse
A hint. Sir I would tell you exactly if I knew how. I myself have failed to be able to get a working kernel let alone a rom running. When flashing a kernel that fails and it's supposed to be from the phone. So that tells me the device tree is incomplete and thus if it is, it fails the build as well as the kernel. I know of Qualcomm's own device builder but I am unable to get that working due to it, unable to locate clang for build. No matter how much I try and set a path I get errors using Qualcomm's builder. AOSP won't build the rom for the device because AOSP does not have the device tree or build files required to build it. You get a template from Qualcomm's builder. Though I can never get it to build. It's all because Xiaomi have not released the device tree or build files. And the people who have gotten it working are probably using someone else tree and build files or has edited their own. That is also why some features of ROMs do not work. It's due to missing info on device tree. Hope this all gives you a better understanding why it's hard for beginners to build a rom for this phone. Because Xiaomi does not have the files on their open source repo.
Squida said:
A hint. Sir I would tell you exactly if I knew how. I myself have failed to be able to get a working kernel let alone a rom running. When flashing a kernel that fails and it's supposed to be from the phone. So that tells me the device tree is incomplete and thus if it is, it fails the build as well as the kernel. I know of Qualcomm's own device builder but I am unable to get that working due to it, unable to locate clang for build. No matter how much I try and set a path I get errors using Qualcomm's builder. AOSP won't build the rom for the device because AOSP does not have the device tree or build files required to build it. You get a template from Qualcomm's builder. Though I can never get it to build. It's all because Xiaomi have not released the device tree or build files. And the people who have gotten it working are probably using someone else tree and build files or has edited their own. That is also why some features of ROMs do not work. It's due to missing info on device tree. Hope this all gives you a better understanding why it's hard for beginners to build a rom for this phone. Because Xiaomi does not have the files on their open source repo.
Click to expand...
Click to collapse
i built for ginkgo (superior rom) it have enough compile source, device, kernel, vendor (vendor is fine), but device and kernel not come from official source tree, maybe it have conflict and have to fork to edit mysefl. very hard for beginer
namhoang235 said:
i built for ginkgo (superior rom) it have enough compile source, device, kernel, vendor (vendor is fine), but device and kernel not come from official source tree, maybe it have conflict and have to fork to edit mysefl. very hard for beginer
Click to expand...
Click to collapse
Yeah building from a custom rom is easier then building from AOSP. Especially if the files for the device are available for building. Usually that's why you see ROMs that say unofficial and official ROMs. Unofficial is usually a modified version of another custom rom for another device to suit your own. Heavily modified. I could be wrong but this is how I took it.
Squida said:
Yeah building from a custom rom is easier then building from AOSP. Especially if the files for the device are available for building. Usually that's why you see ROMs that say unofficial and official ROMs. Unofficial is usually a modified version of another custom rom for another device to suit your own. Heavily modified. I could be wrong but this is how I took it.
Click to expand...
Click to collapse
they put tons of personal stuff without a comment, and some source are not update even they release rom once a week, they fear of clone their source while they clone from git too, they are destroy the ideal of open source itself
@Squida sir, do you meet this, i have gcc 9.3.0 by default and prebuilt gcc in source are updated, so what path i need to config for this can recognize my gcc
error Sorry, your version of GCC is too old - please use 5.1 or newer
In file included from /root/super/kernel/xiaomi/ginkgo/include/linux/compiler_types.h:58:0,
from /root/super/kernel/xiaomi/ginkgo/include/linux/kconfig.h:74,
from <command-line>:0:
/root/super/kernel/xiaomi/ginkgo/include/linux/compiler-gcc.h:159:3: error: #error Sorry, your version of GCC is too old - please use 5.1 or newer.
# error Sorry, your version of GCC is too old - please use 5.1 or newer.
Click to expand...
Click to collapse
namhoang235 said:
@Squida sir, do you meet this, i have gcc 9.3.0 by default and prebuilt gcc in source are updated, so what path i need to config for this can recognize my gcc
error Sorry, your version of GCC is too old - please use 5.1 or newer
Click to expand...
Click to collapse
Make sure no other versions of gcc are being detected. Probably have more then one.
Also could be it may not be set as default.
Type gcc --version in terminal to check what is installed
Squida said:
Make sure no other versions of gcc are being detected. Probably have more then one.
Also could be it may not be set as default.
Type gcc --version in terminal to check what is installed
Click to expand...
Click to collapse
[email protected]:~/super# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.3.0-1ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-S4I5Pr/gcc-10-10.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-S4I5Pr/gcc-10-10.3.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04)
[email protected]:~/super#
Click to expand...
Click to collapse
This is a nut with me now.
namhoang235 said:
This is a nut with me now.
Click to expand...
Click to collapse
Lol yeah no idea. That's a lot of info for just doing a version check. If you don't want to uninstall and reinstall Linux. I would Google on how to set gcc xxx as default and see if that helps maybe even seeing if there is an automated .sh you can run so it installs and fixes the problems. I would do a search in the Linux repo on gcc and have a look for anything that says default. Usually those installers will also set it to default for you automatically. I myself am not good with Linux. So that's about as far as I could help on this situation you are in.
The gcc you may need is this https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/

Categories

Resources