[REF] Compiling CM6 for Milestone XT720 - Milestone XT720 Android Development

First, follow these instructions to get your system setup for build:
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
You'll need at least 15GB of disk space. Once you've got all the prerequisites installed:
Code:
mkdir ~/android
cd ~/android
repo init -u git://github.com/Mioze7Ae/android.git -b froyo
repo sync -j 2
. build/envsetup.sh
lunch cyanogen_sholest-eng
vendor/cyanogen/get-rommanager
make -j 2 bacon
If everything goes well, the update package will be something like out/target/product/sholest/update-cm-6.1.2-0.10-11.08.08-MilestoneXT720-signed.zip
This is my current understanding of the voodoo:
repo init : sets up your repository and downloads a manifest file that identifies other repositories
repo sync : downloads all the repositories and checks out a working copy
. build/envsetup.sh : parses all the makefiles and such to create a menu of available devices to build
lunch : configures the source tree to build a specific device (run lunch with no arguments to get a menu)
get-rommanager : apparently needed for some reason
make bacon : actually builds everything and creates the ota package. You may want to consider something like "make -j 8 bacon >build.out 2>build.err"
repo sync takes either metric or imperial eons (whichever is larger) (-j N can help by opening multiple concurrent downloads if you have a fast uplink). On a dual AMD Opteron 248 machine with 6GB build takes about 3 hours (Ubuntu 11.04 64-bit). On a dual Xeon [email protected] (8 cores total) with 16GB RAM running debian lenny 64-bit, build takes ~15 min. You want to pick the -j to be 1-2 times the number of CPUs (I used -j 2 on the AMD and -j 8 on the Xeon). The android build system does a pretty good job at pegging your CPUs.
I don't currently know how to tag the state of the entire tree, so when nadlabak or milaq or anyone else updates repositories that I didn't fork, there's a chance it may break things from time-to-time. I'm currently waiting for a build from a fresh checkout to complete. Hopefully it's not broken...
Edit: Fresh compile succeeded, update applied and booted. Happy hacking!
Feel free to peruse my repositories at http://github.com/Mioze7Ae
See also: http://android.doshaska.net/cm6build
Thanks: nadlabak, milaq, stlifey, #milestone-modding

Thanks, will add cm6 to mine build server. =)
Maybe we should make todo list and make changes that we need?
Then move it to main build tree?

fjfalcon said:
Thanks, will add cm6 to mine build server. =)
Maybe we should make todo list and make changes that we need?
Then move it to main build tree?
Click to expand...
Click to collapse
Im on it.. flashing once i have finished uploading XT720 XDA Special Hellmonger Edition, il collect data and proc

i was able to compile configs.ko
so we can dump the config of the running moto kernel
Code:
insmod configs.ko
zcat /proc/config.gz
attached is tar with module and dumped config from Central Europe kernel...
so may be finally we will be able to "debug" why on the singapore kernel it is stated that tvout works, and did not work on other kernels....
So please do:
Code:
adb push configs.ko /tmp
adb shell
/system/bin/insmod /tmp/configs.ko
exit from adb shell
Code:
adb pull /proc/config.gz
and post
Which Kernel (e.g. Central European, Korean, Singapore, Cincinaty etc....) is used
and the corresponding config.gz
edit: forget to attache
badly.... it is not the runing kernel config, but the config i have compiled.... sorry

du -h .repo - how much it has?

fjfalcon said:
du -h .repo - how much it has?
Click to expand...
Click to collapse
$ du -hs .repo
4.2G .repo
$ du -hs .
12G .

FYI, I just merged updates from milaq's repo and broke the build. Will update when I get it sorted again.

Mioze7Ae said:
FYI, I just merged updates from milaq's repo and broke the build. Will update when I get it sorted again.
Click to expand...
Click to collapse
It's working again. I'm still getting the hang of this repo/git stuff. What appears to have happened is that when I first forked milaq's repo a few weeks ago I happened to fork after the first part of a two-part commit. So, now the tree is sync'd up with milaq's latest (0.12--screenshot in powermenu, w00t!). It installs and boots but it's minimally tested.

Maybe you can archive android dir and paste it to some speed hosting?
Cause i still getting it at build server at mine work that currently free....

fjfalcon said:
Maybe you can archive android dir and paste it to some speed hosting?
Cause i still getting it at build server at mine work that currently free....
Click to expand...
Click to collapse
Hmm. I'm I'll see about that, but .repo is 4GB... and android is 12GB... that's going to be slow nomatter what... and those stupid rapid/multi/whatevers don't seem to handle resume... after the initial repo sync, the next sync is much faster.

Is repo sync still down? Or rather, is android.git.kernel.org still down? I tried repo syncing from RC2 to RC3, so I could implement a patch for Exchange security features (more on this later, I will update when I get it working).
For now, I will try the compile on RC2.

I do know it was down last Friday, but I haven't had a chance to try more recently.

Related

Build CM7 Kernel from Source: Compile Fails (REPOSTED FROM DEV)

THIS HELP REQUEST WAS ORIGINALLY POSTED IN THE DEV FORUM, BUT IT WAS "SUGGESTED" THAT IT BELONGS HERE INSTEAD.
Hi,
I'm trying to build CM7 Kernel from source. I've followed "Building_Kernel_from_source" in CM Wiki exactly. Executed yes "" | make oldconfig. I still get fatal script & compile errors. First was "usr/galaxysmtd_initramfs.list" not found. Created an empty one to get past this temporarily. Next got FIQ_START undefined. Tried manually fixing this (and others errors) to no avail. I think I'm missing some basic point. Can anyone offer any advice? Am I missing some patch? Is this a .config issue? Something else?
Thanks
Background (What I did):
dev machine: Ubuntu 10.04LTS
installed CM7.2 on phone.
installed development support tools and checked versions.
set up repo, downloaded from git://github/CyanomodGen/android.git -b gingerbread and repo sync.
set CCOMPILER.
checked that ARM EABI installed (Ok).
cloned kernel from git://github.com/CyanogenMod/cm-kernel.git.
adb pull config.gz from phone.
gzip -d -c > .config
Executed yes "" | make oldconfig (looked Ok)
Tried to build: make ARCH=arm CROSS_COMPILER=$CCOMPILER -j4
Got fatal script and compile errors (arrrgh).

[NEED HELP] There are some problems in using "config.sh"

Hi,
I'm going to port Firefox OS to my I9082 but I have some problems after "./config.sh i9082".
It can't get some repositories from android.git.linaro.com and after that it stuck at "Fetching objects: 25% (20/78)" and after this, I waited for 8 hours!!!!! :crying:
after this, i closed the terminal.
I tried again using "repo sync" to continue but there is a new problem! It says that some of repos not found! for example i can't get "platform/external/freetype" and "platform/external/dbus" from linaro git.
Can anybody help me?
Delete broken projects and sync again
DataUnit said:
Hi,
I'm going to port Firefox OS to my I9082 but I have some problems after "./config.sh i9082".
It can't get some repositories from android.git.linaro.com and after that it stuck at "Fetching objects: 25% (20/78)" and after this, I waited for 8 hours!!!!! :crying:
after this, i closed the terminal.
I tried again using "repo sync" to continue but there is a new problem! It says that some of repos not found! for example i can't get "platform/external/freetype" and "platform/external/dbus" from linaro git.
Can anybody help me?
Click to expand...
Click to collapse
Delete all folder expect .repo and start over.
arky_r said:
Delete all folder expect .repo and start over.
Click to expand...
Click to collapse
I did this action 4 times and when I executed the command again, it will stop at another project! :crying:
DataUnit said:
I did this action 4 times and when I executed the command again, it will stop at another project! :crying:
Click to expand...
Click to collapse
Did you reading the repo tips at xda-universityDOTcom ?
Syncing a full new source tree in minutes!
Time might come when you’ll need to work with several full source trees. For example, you may want to have an AOKP source tree as well as a CM tree.
Obvisouly, you could repeat the same steps, to repo init and then repo sync -j 8 -c for both. But that would be twice as time consuming.
There is an alternative that should be much faster. Lets say that you have already initialized and synced a CM source tree, in ~/android/cm.
Now, we will prepare a new repo for AOKP tree, in ~/android/aokp. Here comes the trick: We will use the --reference flag of repo init to indicate to repo that we already have a local repository that it can take information from, instead of downloading everything from Internet again:
mkdir ~/android/aokp cd ~/android/aokp repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb
1
2
3
mkdir ~/android/aokp
cd ~/android/aokp
repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb
You should notice a big time diference, from hours for a full repo sync, down to minutes using this trick!

[DEV] Docker template for building CyanogenMod

Docker template for building CyanogenMod​
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/
How to run:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
repo sync
source build/envsetup.sh
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
see https://github.com/stucki/docker-cyanogenmod/blob/master/CHANGELOG.md
Questions and Answers:
see http://forum.xda-developers.com/android/help/qa-docker-template-building-cyanogenmod-t3173025
Any feedback is welcome. Enjoy!
michael_ch said:
Docker template for building CyanogenMod​
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename> # example: breakfast grouper
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
Code:
2014-02-16
* Initial release
Any feedback is welcome. Enjoy!
Click to expand...
Click to collapse
seems interesting!!!!
Awesome !!! Thanks a lot OP
michael_ch said:
Docker template for building CyanogenMod​
Click to expand...
Click to collapse
:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..
There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Wow. This is superb. ! This will really reduce our most of the work. Thanks op
Dark Wraith said:
:good: nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
Click to expand...
Click to collapse
32bit libraries are installed on the system. Just try it out, I successfully built images for i9100 and grouper without specifying this line...
Dark Wraith said:
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
Click to expand...
Click to collapse
Again, I don't get those errors. Anyone else encountering these problems?
Dark Wraith said:
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..
There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Click to expand...
Click to collapse
Thank you! I will do my best...
I get this error when running
"./build.sh"
./build.sh: 10: ./build.sh: docker: not found
Dasmikko said:
I get this error when running
"./build.sh"
./build.sh: 10: ./build.sh: docker: not found
Click to expand...
Click to collapse
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.
Sorry, I thought it's clear. But I will update the post accordingly...
very interesting. will try
ubuntu 32 bit not works for this???
michael_ch said:
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.
Sorry, I thought it's clear. But I will update the post accordingly...
Click to expand...
Click to collapse
Works now
So does this create a local_manifest.xml(which is needed) for you if you're trying to build for an unsupported device
sent from my JEDI ELITE Note 3
for best xda results, click to enlarge ?
http://img268.imageshack.us/img268/9564/searchitnoob.gif
markbencze said:
So does this create a local_manifest.xml(which is needed) for you if you're trying to build for an unsupported device
Click to expand...
Click to collapse
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.
I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom
Code:
# see https://github.com/razrqcom-dev-team/android_local_razrqcom
mkdir .repo/local_manifests
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
curl -L -o .repo/local_manifests/msm8226.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/msm8226.xml
curl -L -o .repo/local_manifests/vendor.xml -O -L https://raw.github.com/razrqcom-dev-team/android_local_razrqcom/msm8226-kk/vendor.xml
# after that, sync all repositories
repo sync
# start building falcon (that's the codename for the Moto G)
source build/envsetup.sh
brunch falcon
Kudos for this goes to @dhacker29 and his team!
michael_ch said:
Nope, the manifest is created by running the "breakfast" command. Check the 1st post for more info.
I have also used this box to successfully build an image for the Motorola Moto G. As this is not part of the CyanogenMod project yet, I had to install the manifest using the steps described on the following Github page: https://github.com/razrqcom-dev-team/android_local_razrqcom
Click to expand...
Click to collapse
Ok well maybe I'll give it a whirl then. I was trying to build beanstalk for the n3 and I init the repo referencing the cm repo I already had synced, then sunced repo etc. When I tried breakfast there was no option to choose my device.
So by using this tool and following your directions will it allow me to do so then?
sent from my JEDI ELITE Note 3
for best xda results, click to enlarge ?
http://img268.imageshack.us/img268/9564/searchitnoob.gif
Is this only cyanogenmod restricted or we can use on other ROMs also?
Sent from my GT-I9100 using XDA Premium 4 mobile app
I get permission denied?
safariking said:
I get permission denied?
Click to expand...
Click to collapse
Run with sudo
markbencze said:
So by using this tool and following your directions will it allow me to do so then?
Click to expand...
Click to collapse
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.
koolkunz said:
Is this only cyanogenmod restricted or we can use on other ROMs also?
Click to expand...
Click to collapse
Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment
In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.
michael_ch said:
This is not a tool, it is just a script which creates a virtual machine with all that is needed for building CyanogenMod.
Looking at the build requirements for OmniROM, I think it will also work for other ROMs: http://docs.omnirom.org/Setting_Up_A_Compile_Environment
In case that something is missing, just update the Dockerfile and run build.sh to rebuild the image.
Click to expand...
Click to collapse
OK..thanks...I wanna build omni
Sent from my GT-I9100 using XDA Premium 4 mobile app
I just did a build for grouper, but I can't find the builded file.. Where does it go? and does it output a zip file?
michael_ch said:
Docker template for building CyanogenMod​
Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.
Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.
NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/
How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename> # example: breakfast grouper
brunch <device codename> # example: brunch grouper
Download:
Github URL: https://github.com/stucki/docker-cyanogenmod
ChangeLog:
Code:
2014-02-16
* Initial release
Any feedback is welcome. Enjoy!
Click to expand...
Click to collapse
bro can this be used to make unofficial ports too???

[GUIDE] Android Repo Mirroring

I assume you already have all your build packages installed. This guide is merely showing how to obtain a mirror copy of the android source for local purposes.
I will be using OmniRom for the duration of this guide, but for those who use CM or other projects, the concept should remain the same.
I do not expect this guide to be useful for everyone but there will be many who are going to be thankful that did not initially know this could be done.
Due to the rapid development, I ran into a huge issue pretty quickly when having to nuke/resync the various repos for building. The total space required for a full omni source is roughly 508,334 items, totaling 14.4 GB based on today from branch android-5.1 and requires pulling from a massive number of git repos online. So if bandwidth is an issue then constantly syncing after nuking the source could become an issue for you real quick. Not to mention the time it takes just to pull all of this data from the internet onto your computer.
However, by creating a Mirror of the source and its numerous git repos, the source is roughly 19,696 items, totalling 16.5 GB based on today from branch android-5.1.
Now, for those asking, why do a mirror? It is relatively simple. When using several sources, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire content, and to sync from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two sources, while containing more information.
These instructions assume that the mirror is created in /path/to/home/android/mirror. The first step is to create and sync the mirror itself.
Code:
mkdir -p ~/android/mirror
Code:
cd ~/android/mirror
Code:
repo init -u https://github.com/omnirom/android.git -b android-5.1 [COLOR="Red"]--mirror[/COLOR]
Code:
repo sync -j# -f --no-clone-bundle
Basically this allows you to initialize a local mirror of an android repo (--mirror) and then later allow you to point subsequent repo pulls to that local copy which will be explained further into this guide. The mirror looks nothing like the actual source used to make builds.
Once the mirror repo has synced, then we are ready to establish the actual source in another directory that will pull directly from the mirror locally.
Code:
mkdir -p ~/android/omni
Code:
cd ~/android/omni
Code:
repo init -u git://github.com/omnirom/android.git -b android-5.1 [COLOR="Red"]--reference=/path/to/home/android/mirror/[/COLOR]
Code:
repo sync -j# -f --no-clone-bundle
Note the use of the ‘–-reference’ parameter. This uses my local mirror of the android sources instead of pulling across the network again.
Now I can pull one of the various repos, using that same ‘--reference’ parameter (pointed at my local omni mirror) and profit!
From here on out, should I want to update the omni source with the latest changes I just go to the mirror directory and run:
Code:
repo sync
Then, I switch over to the omni directory and run the same command to pull those changes from the local directory.
Even further, should I nuke something in the omni directory, I can simply delete it and run repo sync to pull from the local mirror to fix the problem and never have to worry about pulling data from the network itself.
Here is an example for a clearer picture:
I make changes in /android/omni/bootable/recovery
I do not like the changes I have made
I delete /android/omni/bootable recursively
I run repo sync to restore /android/omni/bootable
The sync pulls from the local mirror instead of downloading the repo from the internet.
Time for syncing is cut in half if not more
Everything is still intact
Thanks for that bro us Linux noobs will find it very useful

Debian Buster WSL2 Kernel / ROM Builder [replaces VM]

Okay I don't have enough time to update this whole description, no one volunteered to host the VM so now I only have a Debian Buster WSL2 (Windows 10 latest) build environment. You can make kernels and ROMs from it. It has a built in XFCE4 and all the features listed below. It will build kernels for you from source and place them in AnyKernel3 zip files ready for flashing in the ~/ directory. Build scripts are provided for Op8T 5G custom and GPUOC RadioActive Kernels from my GitHub (modded for performance + battery). You can use this guide and get full audio and a GUI and all you need to build.
Try out this build for Debian Buster for WSL2:
First you need to ensure you are on a recent build of Windows, go to windows Updates in settings and download the latest.
Next open a Powershell Command Prompt in Admin mode. Type:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Restart your PC, then get back into an Admin Powershell prompt and type:
wsl --set-default-version 2
Next you can download this tar.gz distribution, it's quite big (6GB zipped -> 14GB unzipped). Apparently you can import a tar.gz directly, so I changed it from a .zip file to .gz: https://mega.nz/file/DkARXIjD#hGu8TjxaA__YrRsfqfWJw9-2ViyyntyK5U8JdClor6A
Easily move WSL distributions between Windows 10 machines with import and export!
wsl --import <DistributionName> <InstallLocation> <Full path to .tar/.tar.gz FileName>
After import, you should type: login: user password: user (also the sudo password) change the Global Git settings to your own email and username.
Open the command line.
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "[email protected]"
Then if you want to set up SSH between your WSL2 instance and NoMachine, download NoMachine here for your host PC: https://www.nomachine.com/download/download&id=8 then follow the steps to generate an SSH key, which will be located at ~/.ssh.
ssh-keygen -m PEM -t rsa -b 4096
Use the directory default ~/.ssh/
Then copy this file: ~/.ssh/id_rsa.pub to ~/.nx/config/authorized.crt
In the NoMachine GUI, you should select Configuration, Use a key based authentication key which you provide, then provide the path to the private key \\wsl$\debian\home\user\.ssh\id_rsa and check the box Import the key to the connection file.
To get to the XFCE4 GUI, you should type login: user password: user, then run /.nomachine.sh
It will post the IPV6 address you need to enter into the configuration into NoMachine on Windows 10. It changes every time you open it (WSL2 problem).
Now you should be able to connect to the GUI and use all the dev tools built in. Or you can just use the command line if you're more comfortable there. You'll probably need to do some more Googling to get everything setup the way you like. There are 2 examples in this file for an Op8T RadioActive modded kernel from my GitHub repos with a ./Build-Clang12.sh script you can use to see how to build a kernel. It it fully automatic. It will generate the zip specified in that file in the ~/ directory which can be flashed to a device via EX Kernel Manager or FK Kernel Manager. Best of luck!
Great job mate. I hope this is the kick off and boost up kernel development on the MI9 ??
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
kickassdave said:
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
Click to expand...
Click to collapse
Thanks Dave - this is the absolute easiest way to build a kernel. Yes it took forever to get working, a lot had to do with bad Xiaomi source code and Android 9 package requirements for building kernels. You can simply download, install, click Goto Build, click on QClang8_Build, copy/paste it's text from Geany into the open terminal, sit back and wait for the build to finish. Then once it completes, you click on Built Kernels and you have your image ready. A few more steps obviously outlined in the post to transfer to the host machine (cp Image-dtb /media/sf_VMxfer) and pack via Android Image Kitchen, copy to the device, and flash via TWRP. Most features require Magisk patching as well to enable altering in a kernel manager. The mentioned repo (mrslezak) has Fsync toggle, 830GPU overclock, and F2FS file system support (Mauro TWRP has just enabled it, so I'm using it now). I should note as well that this kernel has only been tested on MIUI and Xiaomi.eu builds thus far (anything based on Xiaomi MIUI should work - MIUI Global Dev, China Dev, Xiaomi.eu, MiGlobe, RevolutionOS, etc. as long as it is Android Pie).
I'm waiting on others to jump on board!!!! Hopefully it happens
Excellent guide, will work for almost all pie devices!
Great work OP :highfive:
Regards,
acervenky
Hi, @mslezak @acervenky Can you help me to build kernel for Stock Miui 10 for K20/Mi9t . I followed your guide setup all requirement i just changed the device code name from cepheus to davinci everything went well kernel complied and also created the boot.img with AIK but after flash it is through back me to recovery.
Can you Please help me with this.
@acervenky fixed that by applying the patch in the Desktop Mi9_Build_Tools/Required_Patches_to_Compile_Xiaomi_Source/cosmin_kernel-module.c copy that to /kernel/module.c, he can chime in here. Or check out his repo he has one on Github that compiles already QUAX kernel I believe with a bunch of stuff added already over stock.
Good job. Compiled a kernel for mi9t pro (raphael) with your detailed guide.
Can you help with "make modules" command?
I need to make xt_HL.ko module, but it not compiling ((
Not needed anymore, made it successfully.
Can you compile q kernels with this?
asgardpark said:
Can you compile q kernels with this?
Click to expand...
Click to collapse
Yes! Just don't replace .dtsi and module.c files for now.
Regards,
acervenky
New Q build VM coming soon. GCC10 x64 and Arter97 GCC9 x32 toolchain.
Just a notice here I have a VM almost ready to upload that can build Mi9 source. It's a ton of patches to stock code but I'll setup a repo with them already applied.
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Yes AnyKernel3 is the easiest
asgardpark said:
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
Click to expand...
Click to collapse
Sure AnyKernel3 is easy, take someone's kernel zip, insert your Image-gz.dtb or Image-dtb into the root of the zip, delete the other kernel, and you should be able to flash it.
got some compile errors today when i tried your wm
/home/user/toolchains/aarch64-linux-elf/bin/aarch64-linux-elf-ar: kernel/resource.o: No such file or directory
I'd first try a: make clean; and: make mrproper;....
But here's more info:
Double click the GoTo Build icon, a terminal will open in the source directory. Then in the terminal: cp /home/user/Desktop/Build GCC10 Cepheus.sh .; chmod +x "Build GCC10 Cepheus.sh"; ./"Build GCC10 Cepheus.sh"; Once done the kernel will be in /home/user/Cepheus-Raphael-Q-GCC10/out/arch/arm64/boot/Image.gz-dtb. /out9TP/ for Raphael, just substitute the build script you need.
If it then still won't build, you'll have to grab the repo again. Type: git pull
Or the safest is a complete re-download: cd ..; rm -rf Cepheus-Raphael-Q-GCC10; git clone --depth=1 https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10.git and repeat the prior copying of the build script to the source directory.
I tested this last night and it worked. If I tried to just drag the script into a terminal window it failed. There could be some dirty files in there not sure how that happened, but deleting and cloning again definitely works. I built both Cepheus and Raphael kernels last night in the VM off a fresh clone of the repo. I'd update I but it literally takes 6hrs + since the files are huge and take forever to compress and upload to Mega. And I have to delete so much off my VM and SSD just to do it. This way you learn something too
I first drag n dropped the file when i got the error, then i remembered when i compiled kernels for my raspberry pi's it also failed if i draged n dropped my build script so i did it the proper way and it worked
Thanks for your WM it's working great
mslezak said:
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Click to expand...
Click to collapse
Could you upload the VM to Google Driver? Thank you!
q659503934 said:
Could you upload the VM to Google Driver? Thank you!
Click to expand...
Click to collapse
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
mslezak said:
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
Click to expand...
Click to collapse
Do you have WSL2 tar file that can build Kernel?

Categories

Resources