Quote:
I'm not really familiar with how firmware gets loaded and I didn't realise it was udev that does it - I always assumed it was the kernel itself - which has now left me wondering how systems without udev manage to do it. Might have to look into this. |
I have a newbie question (or stupid, if you want to be honest about it). On another tutorial, the person has you move vmlinuz to the /boot directory instead of bzImage. What's the difference between the two files? What I mean is in this tutorial, you have
cp -v arch/x86/boot/bzImage /boot/vmlinuz-linux3.3-rc6, and in the other tutorial (he's compiling the 3.0 kernel), he has mv /boot/vmlinuz /boot/vmlinuz-3.0.0 I realize that he messed up and moved his 2.6.37.6 kernel to the 3.0 kernel's image. My point is that he's moving the vmlinuz file instead of the bzImage file. The other tutorial can be found at http://standardcode.eu/blog/linux/co...slackware.html (not pushing his site, just clarifying what I'm talking about). Have a great day:) Patrick. P.S. On a side note, I'm thinking that I can fix my issue with his compilation by moving the appropriate files (/usr/src/arch/x86/boot/bzImage and /usr/src/arch/x86/boot/System.map to the /boot directory). |
"mv /boot/vmlinuz /boot/vmlinuz-3.0.0" should be a typo.
Better follow Building a Kernel from Source from Alien Bob. |
Quote:
From Alien Bob's tutorial, I got my answer. bzImage is compressed, and vmlinuz is uncompressed. But, they are both the same file essentially. So, I have another question (or two). I'm making my kernel in /root/kernel352/ (as it's the 3.5.2 version). If I need to get to the source code, do I have to point to that location, or will it automatically point there? And, if I wanted to copy the sources over to /usr/src after I'm done, what's the best way to do it? I'm figuring it's either run make mrproper in the kernel352/linux-3.5.2 directory (as I only want the source code), and copy the directory over to /usr/src, or copy the .tar file over to /usr/src and untar it there. Have a great weekend.:) Patrick. |
I won't elaborate, but you should better follow Alien Bob's tutorial.
And remember that if you apply a guide blindly (i.e., not understanding what is the purpose and will be the effect of each and every proposed command), sooner or later expect troubles. |
For preparing kernel sources for permanent storage you should issue `make clean`, not `make mrproper` (see `make help` in the kernel source directory for information). If you want to move kernel sources, you can just move them -- but you will have to correct the symlinks (build and source) in /lib/modules/`uname -r`/, which should point to the top directory of the kernel sources. This allows you to build as a normal user in a home directory, for example, with the ability to relocate the sources to a proper system directory (/usr/src/linux-`uname -r`). I don't run any kernel commands as root (I build as a user and install as a user, passing DESTDIR and INSTALL_MOD_PATH where needed [again, see `make help`] and then chown/package the result as root). However, the best kernel guide remains Alien Bob's, so unless you understand what you're doing and what each command does, it is probably easier to build as root as suggested by Alien Bob.
|
Quote:
All of this is also why I'm doing this in a virtual machine. Until I get everything perfected (including the understanding of what I'm doing), I don't want to trash my computer. Once I've perfected it, I'll do everything on a live system, so I can verify that everything really works (going on the theory that something might work on a virtual machine, but not in a live system--and vice versa). It's also why I'm stepping out of my comfort zone, and using Slackware. If I wanted to do this in Ubuntu (which is my distribution of choice), I'd have to jump through hoops just to get the kernel to boot. And if I wanted to do it in a Linux From Scratch system, I'd have to learn how to resolve circular dependencies and a whole bunch of other issues, just to get the base system ready for the development--let alone what I'd have to do each time I tried to compile a new kernel. Anyhow, thanks for any information that you do provide me. And have a great day.:) Patrick. |
To do driver development you will among other things need to know how-to:
0) Use the linux commands (see http://tldp.org) 1) Program in the C language 2) Use Makefiles to compile, link and install C programs 3) Find you way in the kernel source tree and insert your driver in it (to begin with, read the Makefile at the root of the kernel source tree) That needs a lot of reading and doing exercises, certainly not limited to reading and following one page tutorials. Other than that, as you are using Slackware, again take the time to read Alien BOB's tutorial as it is adapted to Slackware. Whether you should put the kernel source in /usr/src or elsewhere to experiment, that doesn't matter at all for Slackware are explained by Alien Bob in his tutorial. All you have to know is that you should issue the "make" command from the root of the kernel source tree, wherever it be. "man make" to know more, and "make help" when at the root of the kernel source tree to know all the options to configure and compile the kernel. To find your way in the Linux kernel in the perspective of writing a driver, see http://kernelnewbies.org |
All times are GMT -5. The time now is 05:16 AM. |