For ease of examination I forked the kernel repo and stored the distinct changes I made to the config here. After making tweaks with make menuconfig , I copied. To build the boot image I ran the following set of commands which I put in a bash script:.
Note that I do not use mka. Some of the android build manuals recommend mka , but I found it was much less reliable than regular make , so I abandoned it. This was not only the scariest, but most frustrating part of the whole process. Anyway PsychoI3oy on cyanogenmod-dev mentioned that heimdall would be the easiest way to install the ROM.
Unlike Ye Olde Odin, heimdall is open source and thus is happily in the Ubuntu repos. Read them carefully, as they tell you what this is all about, explain how to install the kernel, and what to do if something goes wrong.
Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and multistack networking including IPv4 and IPv6. Linux has also been ported to a number of architectures without a PMMU, although functionality is then obviously somewhat limited.
Linux has also been ported to itself. Please read the Changes file, as it contains information about the problems, which may result by upgrading your kernel. These guides can be rendered in a number of formats: PostScript.
After installation, "make psdocs", "make pdfdocs", "make htmldocs", or "make mandocs" will render the documentation in the requested format. This area has a usually incomplete set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be.
Patches are distributed in the traditional gzip and the newer bzip2 format. To install by patching, get all the newer patch files, enter the top level directory of the kernel source linux If there are, either you or me has made a mistake. Unlike patches for the 2. Alternatively, the script patch-kernel can be used to automate this process.
It determines the current kernel version and applies any patches found. Patches are applied from the current directory, but an alternative directory can be specified as the second argument. For example, if your base kernel is 2.
Similarly, if you are running kernel version 2. Availability of official CM builds for MI devices isn't guaranteed see note at the end because the individual maintainers usually put bug fixing at priority and keep other factors e.
This is the same for almost all devices - who doesn't want a fully functional ROM before anything else? As long as the build itself works fine, the only things you need to worry about it are 1 what extras are added in the build e. As for the kernel When the issue isn't resolved in the original build, it's rare that a custom kernel can remedy that or why wouldn't the developer of the original build merge it?
You will get kernel updates separately from the kernel developer - flash every update manually. Also, every time the ROM itself gets updated, the custom kernel will be overwritten, so you need to flash the kernel at that point, too. Talking about security, if you could trust the dev of your CM build, there's no reason you can't trust the dev of the kernel - they're on the same tier and are equally likely to compromise your security. For the last part, IMO, a good kernel combines stability, performance e.
All other features are just icing on the cake. Note : Official Lineage OS Sign up to join this community. Try to stop the process as less as possible. To resume from where it left, run the repo sync command again.
Anytime you want to get the latest source code available, you can just re-run the repo sync command. CyanogenMod team is actively developing for fixing bugs, so be sure to report them if you find any. The download can take many hours. There's nothing you can do about it. To watch the progress of the syncing, look at the properties of the folder "system. If you have already downloaded another CyanogenMod branch or Android kernel and firmware in general, a lot of files and dependencies are going to be exactly the same.
If you make some changes to the source code and want to check the differences between the original source tree and the current one, use repo status. More repo tips and tricks at XDA-University.
In case you need the source code for any other device, although I'm not going to talk about them throughout the guide, here it is where you can find it for Samsung , HTC , and Nexus.
Once we have the CyanogenMod source code, we still need to download some specific files, applications, and kernel configurations for your device. This can be done trough a special bash file that contains some useful scripts. To include this scripts in your terminal, type:. Where codename is the codename of your device.
For example, since I'm compiling for Galaxy S5, I will type breakfast klte. If the download complains about "vendor makefiles," skip this step, do the next one, and retry this one. A download should now start, but don't worry, it will take far less time than the first repo sync.
In order to compile the ROM correctly, you will need specific files from your vendor, too. This can be accomplished in two ways:. Make sure you choose the right branch. Then, you can delete all the other ones for other devices if you don't need them.
Note: if you are not interested in editing the kernel configuration, you can skip this step and start compiling the ROM. Here we are. The part that took me forever to figure out. It's actually easy, but tricky. Follow me and you won't get lost.
As you know, to compile source code on Linux, the main tools come from the GNU project. The main utility is called " make ," which is "a tool which controls the generation of executables and other non-source files of a program from the program's source files.
Since a source code can be very chaotic and should be modified only by someone who has been working on it and knows every detail, "make gets its knowledge of how to build your program from a file called the makefile, which lists each of the non-source files and how to compute it from other files. When you write a program, you should write a makefile for it, so that it is possible to use Make to build and install the program. This is true for every source code you want co compile.
However, when compiling a kernel, we must be aware of another type of configuration that gets involved. We must specify what features should be built into the kernel. The Linux kernel configuration is usually found in the kernel source in the hidden file ".
CyanogenMod is organized in a way that it has a folder which contains the files to build the kernel while the other folders are all dependencies for the system and the interface of the ROM. However, if we enter that directory and select "show hidden files," there still is no.
So how does "make" get the configuration of the kernel? And how can we add features to it? Clearly, there must be some differences between users of different countries that use different communication protocols, providers, services servers, etc. And most important of all, Android uses ARM architecture, so we need special rules for that, too.
That's why there is no. The differences would be too big to use only one configuration file. However, these files are not called ". Let me elaborate. To edit a. So we need to have a. Which is the right one to pick up? Anyway, at this point you can't just take the defconfig file, rename it, and place in the kernel folder, otherwise you would be missing important features.
In order to generate the. For example, for me it is:. You might not have to use a variant defconfig, so if you can't find it as a variable in the BoardConfig files, try not to include it in the command. At this point, we have our. The "curses" GUI will open. Usually, you should never edit a kernel configuration if you don't know what to do. A message will tell you that the new configuration has been written to the file ". During the compilation, the scripts will do basically the same thing that we've done in the first part, generating a.
This will start compiling the source code. The compilation can take up to 2 hours or more, but if you recompile it again, it will speed up to 30 minutes or even less. If you get any error, Google them, and the XDA forum probably has an answer. At the end, you should see a blue line telling you that a. And if anything breaks up, you now know how to restore from backup or flash a working version of CyanogenMod.
If all went fine, you should be able to use the wireless adapter in a chrooted Linux environment at this point. If you are able to see "wlan1," very well, mission accomplished!
At this point, you can act as if you were using your computer:. Make sure you first installed Aircrack-ng via apt-get. To get iwconfig utility, install the package "wireless-tools. I can conclude it was worth the try.
Walltext again, sorry people, I can't hold myself. I want everything to be as clear as possible.
0コメント