From: Hans-Ulrich J. <han...@t-...> - 2011-02-24 21:31:50
|
Hi Stewart, Stewart Millen worte: > Hi all, > > I'd like to try to compile SD4L from source. I figure it's time given > the fact that now every time there's even a minor update to the kernel, > it breaks SD4L. (This would be for Ubuntu 10.04, 2.6-32-28 kernel. I > know I can install it from the recent .deb file release if everything > else fails, but I'd hate to bug Hans-Ulrich every time there's a kernel > update). *And*, if there's an easy way for me to do so while doing all > this, I could make the corresponding .deb files for distribution. > > I've been looking at the Scramdisk documentation, and this: > > https://help.ubuntu.com/community/CompilingEasyHowTo > > https://help.ubuntu.com/community/Kernel/Compile > > The latter because apparently I have to need the kernel sources to > compile scramdisk. > > I've installed gcc and g++ via Synaptic. As I currently run scramdisk, I > would suppose that I have no dependency issues to resolve (the libraries > being already in-place, right?). I've also installed the Ubuntu packages > build-essential and checkinstall. > > Question 1: But should I also install the following, which is > recommended by the page on kernel source building? > > sudo apt-get install fakeroot build-essential crash kexec-tools > makedumpfile kernel-wedge > sudo apt-get build-dep linux > sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev > no you don't need this packages for building scramdisk. > > > Question 2: I read also in the Scramdisk documentationo that I need to > obtain the source code for 2.6.32-28. This would be: > > sudo apt-get build-dep --no-install-recommends linux-image-2.6.32-28 > apt-get source linux-image-2.6.32-28. > > Right? (The Ubuntu help page recommends using the "git" command as preferable but the above seems simpler). > And what directly will this source code be downloaded to? > On Ubuntu linux-headers-2.6.32-28 suffices. If you install the meta-package linux-headers-generic the above package is always updated along with your kernel, so call apt-get install linux-headers-generic > > Question 3: As I understand it, then I create a directory usr/src/linux and give my user account privileges to it: > > sudo chown $USER /usr/src/linux > sudo chmod u+rwx /usr/src/linux > > Then I put the linux kernel source code I've downloaded into that (along with the file /boot/config-Version) and issue the commands: > > cd /usr/src/linux > make oldconfig > > Is this right? > With the linux-headers package on Ubuntu you don't need this step. > > Question 4: Then I unpackage the Scramdisk tarball into the directory /usr/src/linux. (That creates the subdirectory /usr/src/linux/Scramdisk-2.1, right?). > > Then I do the following: > > cd /usr/src/linux/ScramDisk-2.1 > make > sudo make install > > (or would sudo checkinstall be preferable for the last step?). > > Please clear up any misconceptions I have displayed. I have read the > documentation, and I'm murky on some things. I've not done this before, > but I'm sure once I do it successfully it will be easy. Also, if there's some way (as a friend has told me) to make the corresponding .deb package for distribution while doing this I'd be happy to do so. He says it would be simple, but the documentation I've seen indicates otherwise. > > Stewart > You need some other packages for building scramdisk: * qt3-dev-tools * qt3-linguist * ghostscript * texlive-base * texlive-lang-german The latter three are for building the scramdisk documentation. As there is an english and a german documentation you need the german language package for that. As scramdisk up to now is based on Qt3 you need the qt3 packages and *not* the qt4 packages. After cd /usr/src/linux/ScramDisk-2.1 and make you have two possibilities: Either you call sudo make install which installs this bypassing your systems package management. Or you call make deb by which a debian package ScramDisk_2.1-0_2.6.32_amd64.deb is built. If your system is a 32 bit system the architecture part of the name would be i386 instead of amd64. Then you can install this with sudo dpkg -i ScramDisk_2.1-0_2.6.32_amd64.deb which installs scramdisk with your systems package management. Best regards Ulrich |