That is the format users must use when using the cross-compiler as a parameter. Notice that the cross-compiler is missing the "gcc-" at the beginning and ends in a dash. The "ARCH=arm" refers to the target's processor type and "CROSS_COMPILE" declares the cross-compiler. The specific command used to cross-compile for ARM systems is "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-". Generally, the developer can do a search in their package manager or Google for the proper/best cross-compiler for their needs. For example, to cross-compile for ARM systems, users will need gcc-arm-linux-gnueabi on the host system. Make sure that the host system has the proper compilers. The "Target" is the system that will receive the new kernel. "Host" is the system performing the compilation. When cross-compiling, their are two terms to be familiar with. Make sure that when the kernel was configured, that it was configured with cross-piling in mind. ![]() Configure the kernel for the intended system. Then, compile and install the kernel as you normally would.Ĭross-compiling is slightly different. This file is to be placed in the Linux kernel directory and allow it to replace the current file. Remember to type where you want ".config". The "zcat" command uncompresses the data and places it in the file ".config". ![]() This file may not exist, if so, you may be able to ask the developers of your distro/kernel for the file. To compile a newer kernel with the same features as your current kernel, then type this command "zcat /proc/config.gz >. For those that like to have the documentation installed, type this line where version is the kernel version - "install -d /usr/share/doc/linux-VERSION & cp -r Documentation/* /usr/share/doc/linux-VERSION" (VERSION is the kernel's version number). Some Linux users like to have the documentation installed as well, but this is not required. NOTE: The best way to repair such a system is to use a live Linux distro to remove the new/broken kernel and then manually fix (or paste a backup) Grub's files. If all else fails, compile the kernel again and make sure you installed the kernel as Root or used "sudo". If the system does not boot or does not boot-up enough to produce logs, use a live Linux disc to perform diagnostics and repairs. ![]() Look for any errors, warnings, or unexpected results. "dmesg" is a command that prints the kernels logs to the screen. The best way to start finding the source of the issue is to look at the systems logs (if the system boots up enough to produce logs). Either the bootloader was improperly setup, feature/configuration conflict, compilation error, improperly installed, or some other reason. If the system fails to boot or uname reports a different version number than expected, the issue may be due to one of many issues. Once that process is complete, the user can ensure the kernel was installed by restarting the system and typing "uname -r" in a terminal when the system is back on. The modules must also be installed by typing "make modules_install". Bootloaders like BURG may need to be manually configured. The kernel installer can configure the Grub, LILO, and SysLinux bootloader automatically. However, some other bootloaders may need to be manually configured. "config" is the configuration file for the kernel. These are global variables and functions used in the kernel's code. The "System-map" contains a list of kernel symbols. "initrd" is the temporary RAM-based filesystem that is placed in memory and used during boot-up. The "vmlinuz" (or some similar name) is the kernel itself. This will place some files in the /boot/ directory. In the same terminal, after compilation, type "make install". Once the compilation has finished successfully, we can then install the kernel to the local system (I will explain how to install the kernel on other systems in a moment ). Remember to set the original file permissions and executable bits. FAT32 does not store permissions, so it will be easier to use a live disk to copy the files back. This helps to repair the system if the installation fails. ![]() Be sure to make a copy of /boot/ onto a FAT32 memory card. WARNING: Before you install a kernel, backup all of the important data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |