Is there no kernel-devel package for ydl 6.2?

All kernel questions! 2.4 or new 2.6 kernel, compiling, modules, panics, etc.

Is there no kernel-devel package for ydl 6.2?

Postby ZeroMemory » 26 Feb 2010, 07:30

hi,

I have written my own module for remote login on fedora 11 on my desktop pc and its working fine there.Now when i try to load it on yellow dog linux 6.2 on ps3 i didnt find any kernel devel package for ydl 6.2.

Can somebody tell me where i can find kernel devel package for ydl 6.2?

Thanx
Talha
ZeroMemory
ydl newbie
ydl newbie
 
Posts: 3
Joined: 26 Feb 2010, 07:07

Re: Is there no kernel-devel package for ydl 6.2?

Postby ZeroMemory » 18 Mar 2010, 21:05

I google around a week to search for kernel devel package for yellow dog linux then finally come to the conclusion that there is no devel package available for ydl 6.2 and most probably there is not any for any version of yellow dog linux.

Dont know the reason behind the unavailability of devel package for ydl may b coz ydl is still in the growing stage .

Finally i have to compile the kernel again just to build my small module.

For those who want to build modules on ydl there is good guide avalaible on ydl.net to compile kernel

http://www.yellowdoglinux.com/support/s ... nels.shtml

and there is good short book on compiling the kernel if someone get stuck while compiling the kernel can go through it.

http://www.kroah.com/lkn/

Thanx
Talha
ZeroMemory
ydl newbie
ydl newbie
 
Posts: 3
Joined: 26 Feb 2010, 07:07

Re: compiling yellow dog linux 6.2 kernel

Postby ZeroMemory » 06 Jun 2010, 15:57

As my final year project is completed now during which i started this post.I have included the compilation of yellow dog linux in the appendix of my fyp report.I think i should share it here so if anybody has to compile it dont face problems.Although it is mainly comprised of the article given on ydl.net "building the custom kernel" whose link in the above post.I have explained and simplified it with the specific case of yellow dog linux with the addination feature of how to dual boot the ydl 6.2 with the existing kernel.i have highlighted the portion added me.

Compiling Kernel

Introduction

This topic covers how to compile your own kernel, based on a configuration customized to your system, and how to install it and how to dual boot your system with your compile kernel and existing kernel on yellow dog linux. It also will be useful for anyone who wishes to try a newer kernel version than one available in pre-compiled form.Although this manual can be used to compile any kernel of your choice I will explain it with the specific case of compiling yellow dog linux kernel .


How to

The process of compiling your own kernel involves three general steps:

1. getting the kernel source code;
2. configuring and compiling the kernel; and
3. installing the kernel.


1. Get the kernel source code


In case of yellow dog linux kernel source code can be get from the following link

http://ftp.osuosl.org/pub/ydl/releases/ ... 6.2/SRPMS/


Above kernel source will be in the rpm package.Download it anywhere you like.


1b.After getting the kernel source code


To unpack the source and set up for compiling, use the following commands as root:

cd /usr/src

You can unpack the kernel source anywhere you like then /lib/modules/2.6.29.3/build/ will be symlink to that place which is inappropriate so it is better to unpack the package where it is meant to be in the linux file system.

(if this directory doesn't exist, create it; if it does exist and contains a symbolic link called 'linux', delete that link, or if it contains another directory called 'linux', rename or delete that)

copy or move the rpm package to /usr/src directory using cp or mv command and extract it there.

You should end up with a /usr/src/linux-2.X.X directory in case of yellow dog linux 6.2 kernel end up with usr/src/linux-2.6.29-3


2. Configure and compile the kernel


2a. Start the configuration tool

Before you can compile the kernel, it must be configured. First,

cd /usr/src/linux

to get to the directory in which the kernel source code was unpacked. Then, start the configuration process, which can be done in a few different ways. The most useful way is probably this way:
make menuconfig

(may be at first it will prompt something is missing and need to install.Dont get worried and just install the missing package as it is the best option to configure the kernel and it is the best option because it let you enable ur desire settings while keeping the default settings)

This displays a nicely organized screen of the kernel options; navigate using the up and down cursor keys, and select items using the space bar; also, use the left and right cursor keys with the return key to use the buttons at the bottom of the screen (the 'help' button usually brings up information about the selected option, which can be very useful). The 'menuconfig' will work just fine in a text terminal, too, so you don't need to be running X.

Alternatively, if you're running an X session and would rather point and click, you can use
make xconfig
which will give a GUI version of the menuconfig screen.

Another option is what might be called 'the old-fashioned way':
make config
This will go through the kernel configuration by giving you a series of questions and answers. Although this option is available but don’t try to use it. Because in case of series of question and answer you can change the kernel default settings resulting in a kernel in which your configure settings are available but some necessary settings are disable which can result in errors during compilation or if get compiled resulting in troubles afterwards.

2b. Configure

Kernel options can be set to one of two, and sometimes three, different values:

* selected, or 'y', means you want the option compiled into your kernel;
* not selected, or 'n',means the option will not be compiled into your kernel;
* 'm' means the option will be compiled as a module, which can be loaded or unloaded while the system is running (not all options can be compiled as a module).

In the 'menuconfig' method of kernel configuration, options that can be only 'y' or 'n' have [ ] next to them, while options that can also be compiled as a module have < > next to them.

For an option you want to include and that can be compiled as module, do you want to compile it as a module, or just compile it into the kernel? As a rule of thumb, if you definitely need a feature most of the time you're using your machine, just compile it into your kernel. If it's a feature you only need occasionally, compiling it as a module will do. And, if you definitely don't need a feature (as is often the case with drivers for devices you don't have, or features you never intend to use), you don't need to include its option at all.

If you're using 'make menuconfig' or 'make xconfig', it is an excellent idea to take the time to look at all the categories in the kernel configuration, and use the help to get information about an option if necessary. Often, the help will say, "if you're not sure, say Y" or something similar, which can be very helpful, indeed!


If, even after checking the configuration help, you're not sure whether or not you need a particular driver or feature, there are three good sources of information:

* the 'dmesg' command, which will output the kernel's boot messages, which include messages from the kernel's detection of devices on your machine;
* the /var/log/messages file (or one of its archived versions in /var/log), which includes the same information, written every time the computer boots;
* the /proc filesystem (if you have one), in particular, /proc/pci and /proc/bus/usb/devices (viewable like ordinary text files, with 'cat' or 'more').

These things can tell you which devices you have, and for which you will need drivers in the kernel.

When you're finished selecting the configuration options you want, exit the configuration tool; you'll be asked whether you want to save your configuration: say yes! The configuration will be saved to a file called /usr/src/linux/.config -- if you think you might compile this kernel again, it's a good idea to save a backup of this file somewhere else. It's a plain text file, so you can view it if you want to check to see what options you chose, or even use it again when compiling a new kernel. On the other hand, if you compile a much newer version of the kernel than the one that you last configured, it's probably a good idea to go through the configuration process again, rather than use an old config file, since the newer kernel may have newer options that are better for you to use.


2c. Compile the kernel

As root,
cd /usr/src/linux
make dep
which the kernel configuration program probably told you to do when you saved your configuration. It may have also told you to 'make clean' after 'make dep', which you should do if it told you to. When that's done,
make vmlinux
You'll see lots of messages fly by as the kernel is compiled. Depending on the speed of your machine and the options you chose, this might take a little while or even a long time. It's a good time to step away from your computer and take a break!

With luck, the kernel will compile without error; most stable kernels should. Although odd number kernels are considered as unstable but if you are compiling yellow dog linux kernel 2.6.29 it will compile easily if you compile it using menuconfig option.

If you do get errors, and the compilation stops before it finished compiling the kernel, try 'make vmlinux' again -- the compiler will pick up where it left off; sometimes this works. If you still get errors, it's possible that there are problems with something in your kernel source code (if it's with a particular driver, try doing the config again and remove all unnecessary drivers or select those drivers as modules -- it might help, as might searching the web for the error messages you're getting), or with your hardware (you may not have enough memory; or, since compiling a kernel is a very taxing process for your machine, there could be problems with your memory or something else that don't normally cause problems under lighter load -- this often exhibits itself as a 'signal 11' error from the compiler). And, of course, if your kernel source code was not marked 'stable', that could be the problem!

When it does compile, unless you want to do kernel debugging,
strip vmlinux
Strictly speaking, this isn't necessary, but it removes the debugging information from the kernel, and makes it a smaller file.


2d. Compile the kernel modules

As root,
cd /usr/src/linux
make modules
This will do the compilation for those things that were set to 'm' (module) in your kernel configuration.

3. Install the kernel


3a. Dual boot the new kernel with existing kernel

The Linux kernel is kept in /boot and in case of yellow dog linux yaboot boot loader is used instead of grub which is used in ubuntu and fedora.Yaboot use the file yaboot.conf place in /boot/etc.In order to dual boot what you have to do is to place your newly compile vmlinux image and system.map file in the /boot.Existing kernel vmlinux and system.map is also there make sure your new vmlinux and system.map is different from them.After that make their corresponding entries in the yaboot.conf file system will be dual booted.

Snapshot of single booted yaboot.conf


`-6# yaboot.conf generated by anaconda



boot=/dev/ps3da

init-message=Welcome to YDL!\nHit <TAB> for boot options



partition=1

timeout=80

install=/usr/lib/yaboot/yaboot

delay=5

enablecdboot

enableofboot

enablenetboot

nonvram

mntpoint=/boot/yaboot

usemount



default=linux



image=/vmlinux-2.6.29-3.ydl61.3

label=linux

read-only

initrd=/initrd-2.6.29-3.ydl61.3.img

append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"

in order to dual boot you have to add another entry of vmlinux image.For example I have change the name of vmlinux to vmlinux-2.6.29-3.ydl61.3
d and place it there in /boot folder and correspon
system.map file and after adding new vmlinux image entry in the yaboot.conf it look like this
`-6# yaboot.conf generated by anaconda



boot=/dev/ps3da

init-message=Welcome to YDL!\nHit <TAB> for boot options



partition=1

timeout=80

install=/usr/lib/yaboot/yaboot

delay=5

enablecdboot

enableofboot

enablenetboot

nonvram

mntpoint=/boot/yaboot

usemount



default=linux



image=/vmlinux-2.6.29-3.ydl61.3

label=linux

read-only

initrd=/initrd-2.6.29-3.ydl61.3.img

append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"



image=/vmlinux-2.6.29-3.ydl61.3d

label=linux-default

read-only

initrd=/initrd-2.6.29-3.ydl61.3.img

append="video=ps3fb:mode:3 rhgb quiet root=LABEL=/"

Note that another entry of vmlinux image is added.Previous initrd image can be used for dual boot no need to change that field.

3b. Install the modules

Kernel modules are kept in /lib/modules/2.X.X , where 2.X.X is the kernel version number for which the modules were compiled. In case of ydl 6.2 it is /lib/modules/2.6.29-3 .To install them, as root:
cd /usr/src/linux
make modules_install
(note that mistake made here by me is that it order to dual boot the system I change the name of vmlinux image in the usr/src/linux directory and copy it to /boot directory and than I give the command make modules_install result in when I boot new compiled kernel modules were not installed.so b cautious and don’t do that mistake).


That's it. You may, however, also need to edit /etc/modules.conf if your new kernel includes some things 'built-in' that were compiled as modules for your old kernel, or if you want certain modules to load at boot time ('man modules.conf' for information about this file and its format). After booting, modules can be loaded manually, using /sbin/modprobe or /sbin/insmod; use /sbin/lsmod and /sbin/rmmod (or modprobe with the appropriate options) to list or remove modules, respectively.
ZeroMemory
ydl newbie
ydl newbie
 
Posts: 3
Joined: 26 Feb 2010, 07:07


Return to Kernel

Who is online

Users browsing this forum: No registered users and 4 guests