Kernel/Compile - Community Help Wiki. Disclaimer. Building and using a custom kernel will make it very difficult to get support for your system. While it is a learning experience to compile your own kernel, you will not be allowed to file bugs on the custom- built kernel (if you do, they will be Rejected without further explanation). Note: This page would need significant cleaning. You may want to refer to Kernel/Build. Your. Own. Kernel page in Ubuntu wiki instead which is a cleaner and more up- to- date guide to (simple) kernel building. If you have a commercial support contract with Ubuntu/Canonical, this will void such support. Also note that this page describes how to do things for the Edgy (2. Until this kernel source, we did not have any mechanisms in place that would allow people to build their own kernels easily. This page does NOT describe how to build upstream kernels from kernel. This is how to rebuild the actual Ubuntu kernel starting from source. Reasons for compiling a custom kernel. You are a kernel developer. HOWTO: Set Up A Private Git Server. By Ted Felix November 2013. As the company I worked for started growing, we needed to set up a version control server to make it easier for our geographically dispersed developers to. You need the kernel compiled in a special way, that the official kernel is not compiled in (for example, with some experimental feature enabled). You are attempting to debug a problem in the stock Ubuntu kernel for which you have filed or will file a bug report. You have hardware the stock Ubuntu kernel does not support. I am running this in ubuntu server installation: sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i. Problem: apt-get-repository Command is Missing I was trying to install the latest version of git from the Ubuntu Git Maintainers Team and I needed to add a Personal Package Archive (PPA) to the Software Sources. Building and using a custom kernel will make it very difficult to get support for your system. While it is a learning experience to compile your own kernel, you will not be allowed to file bugs on the. I am trying to install git. I run the following command: sudo apt-get install git-core git-gui git-doc But receive the following error: sudo: apt-get: command not found What should I do? Please read this before you start. This page documents how to get started using OpenKinect. The libraries are very much in flux and this won't be the final process. This also means these instructions might be out of date with. You love computers and are curious and interested in hacking on your own GNU/Linux system to learn more about how it works (with the understanding that you'll need to fix anything you break). Reasons for NOT compiling a custom kernel. You merely need to compile a special driver. For this, you only need to install the linux- headers packages. You have no idea what you are doing, and if you break something, you'll need help fixing it. Depending on what you do wrong, you might end up having to reinstall your system from scratch. You got to this page by mistake, and checked it out because it looked interesting, but you don't really want to learn a lot about kernels. If you want to install a new kernel without compilation, you can use Synaptic, search for linux- image and select the kernel version you want to install. An easier way is to click on System > Administration > Update Manager, then click on the Check button, and finally click on Apply all updates including the kernel. To start, you will need to install a few packages. Use a following command line to install precisely the packages needed for the release you are using: Hardy (8. Note: The package makedumpfile is not available in Hardy. For your information, detailed instructions on it can be found in the Kernel Git Guide. The git repository does not include necessary control files, so you must build them by: fakeroot debian/rules clean. Option B) Download the source archive. Download the source archive - This is for users who want to rebuild the standard Ubuntu packages with additional patches. Note that this will almost always be out of date compared to the latest development source, so you should use git (option A) if you need the latest patches. Use a follow command to install the build dependencies and extract the source (to the current directory): sudo apt- get build- dep - -no- install- recommends - -only- source linux. Ubuntu modules source may also be needed if you plan to enable PAE and 6. Gi. B support in the kernel for 3. Hardy (8. 0. 4). The Ubuntu supplied modules may not be compatible with a PAE enabled kernel. Ubuntu Karmic Koala (9. The source will be downloaded to the current directory as a trio of files (for Lucid, at least) (. For instance, if uname - r returns 2. Again, this will not be the most up- to- date (use Option A/git if you need the latest source). Please be aware this is NOT the same as Option B/Download the source archive. Modify the source for your needs. For most people, simply modifying the configs is enough. If you need to install a patch, read the instructions from the patch provider to learn how to apply it. The stock Ubuntu configs are located in debian/config/ARCH/ where ARCH is the architecture you are building for (Starting with Jaunty this is debian. ARCH/). In this directory there are several files. The config file is the base for all targets in that architecture. Then there are several config. FLAVOUR files that contain options specific to that target. For example, here are the files for 2. If you do not find the config files under debian/config, you may find them in your /boot directory (for instance, /boot/config- 2. If you need to change a config option, simply modify the file that contains the option. If you modify just the config file, it will affect all targets for this architecture. If you modify one of the target files, it only affects that target. After applying a patch, or adjusting the configs, it is always best to regenerate the config files to ensure they are consistent. There is a helper command for this. To regenerate all architectures run: debian/rules updateconfigs. If you just want to update one architecture, run: debian/scripts/misc/oldconfig ARCHNote: If you don't have the debian/ directory after using apt- get source, use dpkg- source - x *dsc to extract the sources properly. For these two commands to work, you need to give the scripts in the debian/scripts/misc and debian/scripts directories execute permission with the following command: chmod - R u+x debian/scripts/*Build the Kernel(s)There are two listed ways to build the Ubuntu kernel: Build Method A: Build the kernel (when source is from git repository, or from apt- get source)To build the kernel(s) is very simple. Depending on your needs, you may want to build all the kernel targets, or just one specific to your system. However, you also want to make sure that you do not clash with the stock kernels. Note: Though these outside instructions include making a separate and unique branch of the kernel, unlike here, they include thorough explanations of all necessary steps from start to finish. These instructions are specific to the git- tree and for the source downloaded via apt- get source, not when downloading the linux- source package from kernel. Use this command to build all targets for the architecture you are building on: fakeroot debian/rules clean. AUTOBUILD=1 fakeroot debian/rules binary- debsdebian/rules clean creates debian/control, debian/changelog, and so on from debian.< branchname> /* (e. It is necessary in git trees following git commit 3ebd. The AUTOBUILD environment variable triggers special features in the kernel build. First, it skips normal ABI checks (ABI is the binary compatibility). It can do this because it also creates a unique ABI ID. If you used a git repo, this unique ID is generated from the git HEAD SHA. If not, it is generated from the uuidgen program (which means every time you execute the debian/rules build, the UUID will be different!). Your packages will be named using this ID. For example, fakeroot debian/rules clean. DEB. The debs are placed in your the parent directory of the kernel source directory. If needed, the Ubuntu modules source for Hardy (8. However it can be a little complex for ordinary users. If you don't need the latest development sources, there is a simpler way to compile your kernel from the linux- source package. As suggested above, all you need for this is: sudo apt- get install linux- source device- tree- compiler # device- tree- compiler is only needed if you are targeting the Power. PC architecture. mkdir ~/src; cd ~/src. The last command in the sequence brings you into the top directory of a kernel source tree. If you wish to re- use the configuration of your currently- running kernel, start with cp - vi /boot/config- `uname - r` . Before you run make menuconfig or make xconfig (which is what the next step tells you to do), make sure you have the necessary packages: sudo apt- get install qt. If you would like to see what is different between your original kernel config and the new one (and decide whether you want any of the new features), you can run: make oldconfig. Since the 2. 6. 3. Then, regardless of whether you're re- using an existing configuration or starting from scratch: make menuconfig # or . To turn this off, go into the config's . Now you can compile the kernel and create the packages: make clean # only needed if you want to do a . Try 1+number of processor cores, e. On a newer kernel, if you only need binary packages and want several builds (while editing the source) to not cause everything to be rebuilt, use: make - j. The *. deb packages will be created in the parent directory of your Linux source directory (in this example, they would be placed in ~/src because our Linux source directory is ~/src/linux- source- < version- number- here> ). Install the new kernel. If you want to see the Ubuntu splash screen (or use text mode) before you get to X instead of just a black screen, you'll want to make sure the framebuffer driver loads: echo vesafb . Note: In response to the various comments in the remainder of this section: On Ubuntu Precise (1. DOES take care of the initramfs stuff. After installing the package my new kernel booted just fine without following any of the methods below. Someone please correct me if I'm mistaken. Since Ubuntu Lucid (1. Instead, there are example scripts provided that will perform the task. These scripts will work for official kernel images as well. For example: sudo cp /usr/share/doc/kernel- package/examples/etc/kernel/postinst. Note: I couldn't get the above scripts to help in generating an initrd for the kernel - and so the built kernel couldn't boot; the only thing that worked for me was the recommendation in http: //www. How. The make- kpkg option is - -overlay- dir. By default, make- kpkg uses /usr/share/kernel- package as an overlay directory, which contains the default, uncustomised scripts for a Debian distribution, and not the ones needed for building a Ubuntu kernel. The following instructions are based on this link: http: //crashcourse. Cygwin install tips using cyg- apt. I recently got a new computer at work and needed to reinstall Cygwin. Here is my install procedure using the very nice cyg- apt script. It's like Debian's apt- get for Cygwin! Note, this install process assumes that I have all my init files backed up and can copy them over to my new machine. Run the Cygwin setup program and install the default packages plus wget and python. Set the Windows user environment variable HOME to c: \home\sofeng. Note, I tried it with forward slashes, but then it doesn't work in my Windows batch file. Start the Cygwin bash shell. Change the cygdrive prefix: mount - s - -change- cygdrive- prefix /If you don't have admin privileges: mount - u - -change- cygdrive- prefix /Copy over my init files and startup scripts: ~/bin/startxwin. This is the Windows batch file that I use to start my Cygwin/X environment. It does the following: Adds ~/bin to my PATHcds to my HOME directory. Starts the ratpoison window manager with a urxvt terminal running screen~/. Xdefaults. Sets the colors, font, and scrolling behavior for urxvt.~/. Sets the PS1 (prompt), EDITOR, http. However, I later found out that this step is not needed. It is generally bad practice to add c: /cygwin/bin to the Windows path. Instead, I added the required code in my . See http: //cygwin. I used to keep my http proxy server information in ~/. I store it in the http. I don't know why this is.).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2017
Categories |