Tag Info

New answers tagged

1

If you are using Buildroot, select a uImage kernel output file (BR2_LINUX_KERNEL_UIMAGE=y). Compile normally and Buildroot will also create a vmlinux file in an intermediate step. While the vmlinux file is not copied to the /output/images directory it can be found in ./output/build/linux-custom/(or by running find . -name "vmlinux").


0

You have to make sure the toolchain is aware of the kernel source tree you're working with. You have to set the environment variable KERNEL_TREE to the directory where your sources are. See http://unix.stackexchange.com/a/147700/37538 for reference.


2

You could use make oldconfig. After you copy the 2.6 .config file, this make option will prompt to you for options in the current kernel source that are not found in the file. However, you will have to deal with choosing options out of the context, being difficult to give the right answer Further reading: What does “make oldconfig” do exactly - Linux ...


1

Officially that is not recommended but you can do it and that's what I do. You have to go through the build menus very carefully. Things change (especially from 2.6 to 3.2), and without review you might end up with a lot of features and drivers you don't need. I don't know of a migration guide but for kernel tweaking you may want to look at Linux Kernel ...


1

Despite what file says, it turns out to be debugging symbols after all. A thread about this on the LKML led me to try: make INSTALL_MOD_STRIP=1 modules_install And low and behold, a comparison from within the /lib/modules/x.x.x directory; before: > ls -hs kernel/crypto/anubis.ko 112K kernel/crypto/anubis.ko And after: > ls -hs ...


0

After your make oldconfig, do a make vmlinuz. I think you'll find that the pre-compiled kernel is a "executable bzImage", which means it's compressed on-disk. If you watch boot messages closely, you'll see it uncompressing the kernel very early on in the process.


0

As derobert pointed out, hda -> sda is an expected change since a long time. The raid array name change was weird, but it resolved itself in the end. I tried to boot from a live cd distribution, mount the raid array, mount the boot partition, then apt-get install the new kernel. This procedure produced an error because I didn't know that I should have ...


1

kernel.org has some excellent documentation on Applying Patches to the Linux Kernel. Essentially, you use the patch command. Once you have acquired the patch (here called patchfile), place it in your build directory and then issue the command: patch -p <num> < patchfile where <num> is the number of leading slashes to remove from the ...


1

the new ATA driver in the kernel use /dev/sda, the old drivers are still supported but you will have to edit your kernel by chrooting into you system using a livecd. Device drivers ---> <*> ATA/ATAPI/MFM/TLL support (deprecated) <*> Serial ATA and Parallel ATA drivers ---> For chrooting I always use the gentoo minimal installation cd ...


0

In reality, nearly each Linux distribution maintains its own kernel The Kernels maintained by distro's are "flavoured" versions of the vanilla kernel (kernel.org). This means the programmers working on the distro added their own code and fixes for modules, but it really is just the same kernel underneath. For distributions, it is dangerous to ...


1

Compression algorithms are declared in lib/decompress.c. Gzip is defined in lib/decompress_inflate.c and doesn't get any special status; it'll only be there if CONFIG_DECOMPRESS_GZIP is y when the kernel is compiled. The list of available compression algorithms is the compressed_formats structure. Since it's defined as static, it isn't available in other ...


0

Is is as simple as comparing /proc/filesystems with lsmod? No: $ comm -31 <(lsmod | awk 'NR!=1 {print $1}' |sort) \ <(</proc/filesystems awk '{print $NF}' |sort) | fmt anon_inodefs autofs bdev cgroup cpuset debugfs devpts devtmpfs ext2 ext3 fuseblk fusectl hugetlbfs mqueue nfs4 pipefs proc pstore ramfs rootfs rpc_pipefs securityfs ...


1

The documentation for the pam_loginuid PAM module gives a pretty good hint: The pam_loginuid module sets the loginuid process attribute for the process that was authenticated. This is necessary for applications to be correctly audited. This PAM module should only be used for entry point applications like: login, sshd, gdm, vsftpd, crond and atd. ...


2

You might see some information from here. Generally, a file descriptor is an index for an entry in a kernel-resident data structure containing the details of all open files. In POSIX, this data structure is called a file descriptor table, and each process has its own file descriptor table. The user application passes the abstract key to the kernel through a ...


3

A FILE structure in C is typically called the file handle and is a bit of abstraction around a file descriptor: The data type FILE is a structure that contains information about a file or specified data stream. It includes such information as a file descriptor, current position, status flags, and more. It is most often used as a pointer to a ...


1

Ok, so here's the way the boot process works: firmware > bootloader maybe > kernel ${parameters} > initramfs > userspace maybe On a redhat installation disk their dracut system of scripts is what builds and constitutes initramfs and their anaconda installation system constitutes the final userspace. It is udev that handles the device setup - as in, it ...


2

go into the BIOS of the host and rearrange the order of the hard drives and removable drives. This will adjust the order as it appears to the Linux kernel.


2

Try this from the Ask Ubuntu section: http://askubuntu.com/questions/318583/how-can-i-solve-fixed-channel-1-mon0-is-on-channel-1-issue-when-using-airo The lastest dev version has the --ignore-negative-one option. Obtain the lastest dev version from subversion: Install Subversion: On Debian/Ubuntu: sudo apt-get install subversion Then, obtain it via svn. ...


2

I want to add these file into my kernel such way that when kernel start this hello.o file execute and run What you are trying to achieve shouldn't be made through kernel edition. Executing a program at boot time can be handled in much simpler ways, without need for kernel programming experience. You can: Execute it when your shell starts: Write ...


15

SCSI and ATA are entirely different standards. They are currently both developed under the aegis of the INCITS standards organization but by different groups. SCSI is under technical committee T10, while ATA is under T13.1 ATA was designed with hard disk drives in mind, only. SCSI is a broader standard, capable of controlling mass storage devices, tape ...


3

Varnish appears to use a plain memory-mapped file for its shared memory (instead of, e.g., POSIX shm_open). From the source: loghead = mmap(NULL, heritage.vsl_size, PROT_READ|PROT_WRITE, MAP_HASSEMAPHORE | MAP_NOSYNC | MAP_SHARED, heritage.vsl_fd, 0); On BSD, MAP_NOSYNC requests that the kernel not write the shared data to disk unless forced ...


1

Or should I simply ignore it? Unused variables could be an indication of a coding mistake. If you are satisfied this is not the case and want to suppress the warning for a particular variable, you can use a (GCC specific) __attribute__ tag, e.g.: /* Unused parameter (in definition, not declaration): */ void somefunc (int x __attribute__ ((unused))) { ...


1

"Variable set but not used" warnings are informational. According to the official documentation, -Wunused-but-set-variable controls the behavior of: Warn[ing] whenever a local variable is assigned to, but otherwise unused (aside from its declaration). This warning is enabled by -Wall. The purpose is to catch situations where the programmer assigns a ...


0

I haven't looked in detail. The defconfig file was last editer 4 years ago; it's quite possible that some options have changed in the kernel source and nobody bothered to update this particular file. Try looking in the kernel logs to see if these options have disappeared. Compare with other msm*_defconfig, which have been updated more recently. The readme ...


0

There are two things here: If zypper in ncurses-devel fails, something is wrong with your system - do you have any repositories enabled at all? What SUSE based distribution are you using? To compile the kernel you don't need ncurses at all (it would be a pretty silly requirement for such a low-lewel piece of software). You need ncurses (and its devel ...


0

There is both user and kernel virtual memory in Linux that is mapped to physical memory. There can be physical memory allocated that is not mapped from the User or Kernel virtual spaces. For example, the page tables that map virtual -> physical. There can by physical memory that is not available to the OS, the BIOS provides a map of available memory at ...


0

Try setting one of these in /etc/grub: iommu=memmaper iommu=soft vga=normal vesa=0 I have new AMD 64bit system and found that Linux has trouble with Nvidia and DMA setting caused by iommu settings in BIOS, so setting these in grub fixed it for me. Read this for more detail.


3

Linux uses RAM in a different way from what other operating systems do. Rather than sitting there with unused RAM, Linux stores data that it thinks might be used in RAM-any applications may be cached here, files, etc. As a result, Linux RAM usage is higher than what is used by running applications. This extra usage is buffered to be sued by other things. ...


0

It is due to some file descriptors still open though the app is stopped. You can list the open file descriptors using the techniques mentioned here. If you need to close the file descriptors without rebooting, you can follow the approach mentioned by Graeme here.However, you need to be aware of the file descriptors that you are closing as highlighted by ...


14

First of all, nobody "gets the kernel from Linus". Yes, Linus is still actively involved in the kernel's development and has final say in any disputes but he most certainly does not write it alone! The wikipedia page on the Linux kernel is quite good on the subject: The kernel changes made in year 2007 have been submitted by no less than 1900 developers ...


17

The distro kernels are all compiled from the official source, with distro specific patches applied. These patches are relatively minor compared to the scope of the kernel itself. As long as you know what you are doing, you can substitute a custom kernel into any of the mainstream distros, although this is discouraged since it may cause a mismatch with ...


0

Here's a pretty nice guide to get started with; http://www.thegeekstuff.com/2013/07/write-linux-kernel-module/ The makefile didn't work for me (nothing to be done for 'all'), but just running the kernel make command directly works fine; user@gauss:~/a$ make -C /lib/modules/$(uname -r)/build M=$PWD modules make: Entering directory ...


3

No. The kernel is specifically designed to disallow user mode code from running in ring 0. In order to do this, you will have to write a kernel module, and then talk to your module through some method (perhaps ioctl) from your user mode program. Writing a kernel module does not require patching the kernel, but the kernel module must be written very ...



Top 50 recent answers are included