From: Mike Viau on 10 Aug 2010 23:10 > On Wed, 11 Aug 2010 08:45:04 +0800 <alex(a)samad.com.au> wrote: > > [snip] > >>> > >>> I did trying using the packages for 2.6.35, but you can't install the > >>> headers because the linux-kbuild-2.6.35 is there > >> > >> Why do you want to install the headers if you already have the whole > >> kernel source code? What are you trying to accomplish besides > >> building a custom kernel? > > > > I wanted the header file, so I could build the intel i915 modules, I > > was planning on taking the modules source that belong to that and try > > to compile against a debian kernel. > > okay here is the problem with this, there are some extra steps needed > to use the kernel-source > > so I installed the linux-image and the kernel-source package, boots up > great - but.... I can't compile my vb kernel modules - no header files > - I point it to /usr/src/<..> (unpacked kernel-source), doesn't > work... > > What do I need to do :) > Maybe this will help... The "make headers_install" command exports the kernel's header files in a form suitable for use by userspace programs. The kernel header files can be generated from the kernel sources. Define INSTALL_HDR_PATH= for output location. http://www.mjmwired.net/kernel/Documentation/make/headers_install.txt > >>>> A Debian source package for 2.6.35 is also > >>>> available in experimental: linux-source-2.6.35. > [snip] > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org > Archive: http://lists.debian.org/AANLkTi=+BsE_C9PcXxEGWGPmTZX1P0BS9ZÿrqN1T(a)mail.gmail.com >
From: Alexander Samad on 11 Aug 2010 06:20 [snip] >> What do I need to do :) >> > > Maybe this will help... > > The "make headers_install" command exports the kernel's header files in a > form suitable for use by userspace programs. > > The kernel header files can be generated from the kernel sources. > > Define INSTALL_HDR_PATH= for output location. > > http://www.mjmwired.net/kernel/Documentation/make/headers_install.txt > so for clarity install linux-image-2.6.35-trunk-amd64 & linux-source-2.6.35 tar jxf /usr/src/linux-source-2.6.35.tar.bz2 cp /boot/config-2.6.35-trunk-amd64 /usr/src/linux-source-2.6.35/.config make oldconfig make headers_install should have me done :) > >> >>>> A Debian source package for 2.6.35 is also >> >>>> available in experimental: linux-source-2.6.35. -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/AANLkTinLNucex7a+49F33XVhX1Q0ZpvhX7SujaR-2WiP(a)mail.gmail.com
From: Stephen Powell on 11 Aug 2010 10:40 On Tue, 10 Aug 2010 16:43:04 -0400 (EDT), Arthur Machlas wrote: > > A less religious explanation, from Greg Kroah-Hartman, author of The > Linux Kernel in a Nutshell, and well-known kernel hacker. > > "This warning is the most important thing to remember while working through the > steps in this book. Everything in this bookâdownloading the kernel source code, > uncompressing it, configuring the kernel, and building itâshould be done as a > normal user on the machine. Only the two or three commands it takes to install a > new kernel should be done as the superuser (root). > There have been bugs in the kernel build process in the past, causing > some special > files in the /dev directory to be deleted if the user had superuser > permissions while > building the Linux kernel.* There are also issues that can easily > arise when uncompressing > the Linux kernel with superuser rights, as some of the files in the kernel > source package will not end up with the proper permissions and will cause build > errors later. > > * This took quite a while to fix, as none of the primary kernel > developers build kernels as root, so > they did not suffer from the bug. A number of weeks went by before it > was finally determined that > the act of building the kernel was the problem. A number of kernel > developers half-jokingly suggested > that the bug remain in, to help prevent anyone from building the > kernel as root, but calmer > heads prevailed and the bug in the build system was fixed." - Linux > Kernel in a Nutshell, p. 4 Thanks, Arthur. I actually do agree with Greg from a philosophical point of view that it is better to do as much as possible as a non-root user. It is pragmatic, rather than philosophical reasons that cause me to build the kernel as root. I believe all the bugs mentioned above have been fixed now. And building the kernel as a non-root user adds extra complications. For example: (1) I believe that "aptitude install linux-source-x.x.xx", as with any package installation, requires root privileges. (2) By default, "aptitude install linux-source-x.x.xx" installs the ..tar.bz2 file in /usr/src. My non-superuser self does not have write permissions to that directory; so it cannot be uncompressed in place. It has to be moved somewhere else, such as a directory off of my home directory. And then I have to use chown and chgrp on it to assign the ownership of the file to my non-superuser self. (3) If I am using out-of-kernel-source-tree module source packages, I have to copy them too. By default, the source code installs to /usr/src/modules, I think. All the same issues arise here. And then I have to use the $MODULE_LOC environment variable to tell make-kpkg where to find the module source code. More overrides. It's just simpler to be root and do everything in its default location. If I were experiencing the problems that Greg describes above, it would be worth doing the extra steps to avoid them. But all those problems have been fixed, it seems. Still, since there are many people who feel strongly about this issue, perhaps I should consider revising my kernel building web page to address this subject in more detail. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/1851191283.11027.1281537217247.JavaMail.root(a)md01.wow.synacor.com
From: Bob Proulx on 11 Aug 2010 17:40 Stephen Powell <zlinuxman> wrote: > (1) I believe that "aptitude install linux-source-x.x.xx", as with any > package installation, requires root privileges. Yes, but that isn't the only way to get the source. There are many ways of getting linux kernel source that don't involve installing packages. > (2) By default, "aptitude install linux-source-x.x.xx" installs the > .tar.bz2 file in /usr/src. My non-superuser self does not have > write permissions to that directory; so it cannot be uncompressed > in place. It has to be moved somewhere else, such as a directory off > of my home directory. And then I have to use chown and chgrp on it > to assign the ownership of the file to my non-superuser self. If it is your own machine then you should certainly be in the 'src' group and then you would have access to /usr/src as your own normal user self. And if you don't know about src then you probably don't know about 'staff' and 'adm' either. The staff group gets you access to /usr/local and adm gets you read-only browsing capability to /var/log/*. You probably want all three. $ sudo adduser zlinuxman adm $ sudo adduser zlinuxman src $ sudo adduser zlinuxman staff Then log out. At login you will be set to those additional groups. With those in place you can work as yourself in those areas. Safer than using root since as yourself you can't smash anything in the system directories /etc or /bin or /var or other system locations. This makes installing local software through 'make install' much safer and more contained when not done as root. If one were to crawl out of /usr/local for example you would see the failure. If you were running as root then you would not. Bob
From: Stephen Powell on 12 Aug 2010 09:50
On Wed, 11 Aug 2010 17:33:12 -0400 (EDT), Bob Proulx wrote: > > If it is your own machine then you should certainly be in the 'src' > group and then you would have access to /usr/src as your own normal > user self. And if you don't know about src then you probably don't > know about 'staff' and 'adm' either. The staff group gets you access > to /usr/local and adm gets you read-only browsing capability to > /var/log/*. You probably want all three. > > $ sudo adduser zlinuxman adm > $ sudo adduser zlinuxman src > $ sudo adduser zlinuxman staff > > Then log out. At login you will be set to those additional groups. > With those in place you can work as yourself in those areas. Safer > than using root since as yourself you can't smash anything in the > system directories /etc or /bin or /var or other system locations. > This makes installing local software through 'make install' much safer > and more contained when not done as root. If one were to crawl out of > /usr/local for example you would see the failure. If you were running > as root then you would not. I do know about groups, but I don't necessarily know the intended purpose of all of the pre-defined groups in a Linux system. Where can I find documentation for that? Still, I should have noticed that the /usr/src directory was owned by user root and by group src. For some reason, I never made that connection. That's a great tip, thanks. I will have to play around with this. If I can get everything to work, then the next revision of my kernel building web page will be revised accordingly. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/399638650.38733.1281620510281.JavaMail.root(a)md01.wow.synacor.com |