LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Patching kernel, Wifi, and No Sound with Flash+Firefox+Linux (https://www.linuxquestions.org/questions/linux-newbie-8/patching-kernel-wifi-and-no-sound-with-flash-firefox-linux-734831/)

Chief Fox 06-22-2009 03:21 PM

Patching kernel, Wifi, and No Sound with Flash+Firefox+Linux
 
I'm fairly new to Linux, been using the Mint Gloria distro which works off of Ubuntu framework I believe. Anyway, I have a few issues I need to kink out at the moment.

1. No sound in Flash 10, Firefox 3.0.11. I am using Gnome, if that matters. Linux Mint 7 running w/ Kernel: 2.6.28-13-generic.
I downloaded the file: libflashsupport_1.0~2219-2.tar-1
I'm unsure how to move it in commands properly, and install it.

2. I need help upgrading my kernel to a version I got downloaded, Linux Kernel 2.6.30. I don't know how to move the file to my source directory with commands, it says I don't have permission?! Weird, because I am using sudo root before using the command MV or CP. I have two files in my user name's folder, "/home/fox".
  1. linux-2.6.30.tar.bz2
  2. patch-2.6.30.bz2

3. I need help with wireless card driver and a .patch file. I don't understand how to once again move the file to usr/src, then I do a cd linux, and should be able to apply my patch with a command..? I'm a little confused and need help. The files I need to patch are:
  1. b43-injection-2.6.24.4.patch
  2. mac80211_2.6.24.4_frag.patch

GlennsPref 06-22-2009 04:27 PM

Hi, Welcome to LQ.

LQ has a fantastic search function (with over 3 million posts @LQ) that may save you time waiting for an answer to a popular question.

here is a cheat sheet for popular console commands (print this .pdf) from fosswire.com
http://fosswire.com/post/2007/08/uni...d-cheat-sheet/

It contains the bzip2 and tar commands you need.

Next the kernel, patching a kernel is relatively easy, it (patch >) uses the diff command to find the differences between 2 files and update one of them with information from the other.

If you use the kernel........1. linux-2.6.30.tar.bz2
You won't need this patch....2. patch-2.6.30.bz2
(same version, this would be to patch a 2.6.29.x kernel to 2.6.30)

But you may require this kernel for the device patches. (guess)
The versions of the patches usually coincide with the kernel version...
Code:

      1. b43-injection-2.6.24.4.patch
      2. mac80211_2.6.24.4_frag.patch

they may not be optimised for 2.6.30

There should be directions to help you do this in the files, use a text editor to view them for info, usually in the first few lines.

When you have unpacked the kernel tar file....

sudo tar cjf linux-2.6.30.tar.bz2 /usr/src/linux-2.6.30 (guessing here....)

Then make a static link to /usr/src/linux for a working directory.

ln -s /usr/src/linux-2.6.30 /usr/src/linux

cd to it to make sure it's there and ls (list the files)

ls /usr/src/linux (it should be the same as /usr/src/linux-2.6.30)

save a backup copy of /boot/.config to /boot/.config.bak

cp /boot/.config /boot/.config.bak

Before you apply the patches, configure the kernel based on the old one (it works, right?)

cd /usr/src/linux

make oldconfig (this will apply the old .config file to the new Makefile)

You may get questions about any new stuff in the kernel, it's generally best to follow the defaults, unless you recognise something.

Now you can apply the patches following those directions you have, I hope.

generally this means copying the patch to a directory, then patch > patch.file.name

Once the patches have been applied, (oh yeah, no news is good news with linux)

then you are ready to compile the kernel.

You may require the dev packages to do this, but unless you want to customise it further, you can probably skip the config part. (make xconfig, or menuconfig)

make all && make modules_install && make install.

If all goes well you should be able to boot into the new kernel just by rebooting.

If you see errors, and make stops, post those here for us to check. Don't reboot if you get errors, it may break your system!

Generally there are warnings, but rarely do they compromise the system, they are just messages.

There may be an easier way to do this with your distro, but the directions above should work.

See how you go, regards Glenn

NeddySeagoon 06-22-2009 04:41 PM

Chief Fox,

Welcome to LQ. First a few basics. I'll use the kernel as a worked example.
Today you are using the 2.6.28-13-generic kernel. Notice the numbers that are important.
Thats a version 2.6.28 kernel.
You have sources for a more recent 2.6.30 kernel which will replace your 2.6.28-23.and a patch of unknown functionality that appears as if it should apply to 2.6.30.

Patches are made against specific versions of packages. They may or may not apply to other versions. They may not even be required (because they are already included) in later versions.

Its very unlikely that b43-injection-2.6.24.4.patch mac80211_2.6.24.4_frag.patch will apply to your 2.6.30 because the patches are intended for a much older kernel. As I said, they may be in 2.6.30.

With that, one final piece of advice while you still have a lot to learn is to work on one problem at a time. This prevents you getting confused over what action fixed what problem. When that happens, the learning gets difficult.

Make up your mind which is the most pressing problem and post back

Chief Fox 06-23-2009 10:01 AM

Good idea. Thanks for your guys' advice. My biggest issue right now in order would be the sound in Firefox Flash.
Then my wifi card. The only reason I needed to patch this driver is to support packet injection. I highly doubt the linux kernel includes this in the 2.6.30 version, because it's a special driver for my card I found online.

I just figured I needed to update my kernel for security reasons, or updates. But if it's no big deal then I won't even bother with it.

Really I just wanted the flash sound to be fixed and then my wifi card. My kids are upset all their Flash games have no sound.

Chief Fox 06-23-2009 10:36 AM

OK this is strange. 1. My flash sound seems to work fine now.?! Okay. And also, when I try to kill processes in System Monitor, I don't know if this is normal but it will close the window and on the start panel, it says "Starting Administrative Application" after the prompt "are you sure you want to end process?" So it closes my System Monitor, and doesn't open it again. I'm not sure if that was normal, but it definitely is not killing processes, or ending processes.

Notice this image below:

http://farm3.static.flickr.com/2444/...d0a279a2_o.png

NeddySeagoon 06-23-2009 12:51 PM

Chief Fox,

I use a terminal, the command [CODE]ps -Alf[/COD]to discover the ID of the process I want to kill, then the
Code:

kill <PID>
command. Thats a nice polite kill, it asks the process to please terminate normally by sending it a SIGTERM signal.

If that fails
Code:

kill -9 <PID>
is the next one to try. Thats a "go fo jail, go directly to jail, do not pass go, do not collect 200 <insert local currency>" sort of kill. It instructs the kernel to kill that task, the task cannot tidy up before it exits. On occasions even that fails. The next step is to kill the parent process. If the parent process is PID 1, you must reboot. PID 1 is always init. Its a really bad idea to kill that.

Note that tasks flagged as Zombies cannot be killed. They have already died and almost all the memory they used has been freed, its just that their parents have not collected the return values yet.
If you have persistent zombie tasks, you must kill their parents.

Read
Code:

man kill
to know more

Chief Fox 06-30-2009 11:48 AM

Thanks Neddy for the process info. What's weird about the flash sound, that one post I said it worked, so I rebooted and it's back to the same old no sound in flash. I'm not sure what I did differently to make it work. I still have no clue how to patch my wifi driver to support packet injection...

Chief Fox 07-01-2009 11:11 AM

In terminal, I copied my new kernel (linux-2.6.30.tar.bz2) to folder (/usr/src/linux-source-2.6.28).
Then I change directories (cd /usr/src/linux-source-2.6.28) and do command "make", and it runs through that I'm guessing fine.
Then I command to (make install) and it returns to me this: (sh /usr/src/linux-source-2.6.28/arch/x86/boot/install.sh 2.6.28.9 arch/x86/boot/bzImage System.map "/boot")
I'm not quite sure what that means this is my first kernel patching. I rebooted and command in terminal, (uname -r) to get my kernel version and it says still, (2.6.28-13-generic). Shouldn't it be 2.6.30? Maybe I'm not doing something properly here.

Any ideas?

GlennsPref 07-01-2009 11:24 AM

please see my post (#2) about the kernel install

Please don't copy it to an old directory, make a new one.

please see my post (#2)
Quote:

When you have unpacked the kernel tar file....

sudo tar cjf linux-2.6.30.tar.bz2 /usr/src/linux-2.6.30 (guessing here....)

Then make a static link to /usr/src/linux for a working directory.

ln -s /usr/src/linux-2.6.30 /usr/src/linux

cd to it to make sure it's there and ls (list the files)

ls /usr/src/linux (it should be the same as /usr/src/linux-2.6.30)

save a backup copy of /boot/.config to /boot/.config.bak

cp /boot/.config /boot/.config.bak

Before you apply the patches, configure the kernel based on the old one (it works, right?)

cd /usr/src/linux

make oldconfig (this will apply the old .config file to the new Makefile)
If it refuses to create the link (ln -s file....to link...)
you may need to remove the old 2.6.28/9 kernel "link" first.

as root (sudo or su (and enter password)then

rm -rf /usr/src/linux

then go back to the linking stage and begin again.

Also there are modules and other files linked to and from the sources.

It's better not to mix up the versions.
Code:

/lib/modules/2.6.29.5-1.rt22.1mdv_MusicBox
ardour@MusicBox:~$ uname -a                                  (02-07 01:40)
Linux MusicBox.GlennsPref.net 2.6.29.5-1.rt22.1mdv #1 SMP PREEMPT RT Wed Jun
 24 04:41:52 EDT 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
 GNU/Linux

;-)

Regards Glenn

Chief Fox 07-01-2009 12:27 PM

Following your directions, I command:
sudo tar cjf linux-2.6.30.tar.bz2 /usr/src/linux-2.6.30
And it returns:
tar: Removing leading `/' from member names
Then when I "ln -s /usr/src/linux-2.6.30 /usr/src/linux" to static link, it returns:
ln: creating symbolic link `/usr/src/linux/linux-2.6.30': File exists
So then I "ls /usr/src/linux"
and please see link below..


Check out this screenshot I took for you to look at: http://farm3.static.flickr.com/2472/...dc7b75e8_o.png

"cp /boot/.config /boot/.config.bak" returns to me:
cp: cannot stat `/boot/.config': No such file or directory
Not sure what I'm doing wrong, I'm following your directions.

Chief Fox 07-01-2009 12:57 PM

Quote:

Originally Posted by GlennsPref (Post 3593162)

If it refuses to create the link (ln -s file....to link...)
you may need to remove the old 2.6.28/9 kernel first.

as root (sudo or su (and enter password)then

rm -rf /usr/src/linux

then go back to the linking stage and begin again.

Also there are modules and other files linked to and from the sources.

It's better not to mix up the versions.

I went ahead and did the "rm -rf /usr/src/linux" command, and then went back to your directions to static link and that worked. checked both directories and they are now the same. But I notice there is not a "boot" folder, therefore when I command to "cp /boot/.config /boot/.config.bak" to make a backup it returns again,
(cp: cannot stat `/boot/.config': No such file or directory)

GlennsPref 07-01-2009 11:05 PM

Hi, you need to be root to save a file there (/boot)

sudo or su to root, then

cp /boot/config /boot/.config-old

That will make a hidden file called config-old,
remove the dot to make it visible instead, if you require.

Sorry I missed that step.

regards Glenn

Chief Fox 07-02-2009 12:28 AM

Quote:

Originally Posted by GlennsPref (Post 3593742)
Hi, you need to be root to save a file there (/boot)

sudo or su to root, then

cp /boot/config /boot/.config-old

That will make a hidden file called config-old,
remove the dot to make it visible instead, if you require.

Sorry I missed that step.

regards Glenn

Indeed, I was in su root. Notice in the screenshot the "mint" is red. which happens when using "su". Still tells me that,
cp: cannot stat `/boot/config': No such file or directory

GlennsPref 07-02-2009 08:11 AM

Hi you'll probably need to unpack the kernel (as above) to the correct directory.

sorry I missed the pic.
Code:

cp: cannot stat `/boot/config': No such file or directory
You're in the wrong directory.

The kernel should be unpacked at....
/usr/src/linux-2.6.3xyz (same name as the kernel tar package, or rpm, deb, etc....

then a link is made from there to the same parent directory but with a common name....
ln -s /usr/src/linux-2.6.30 /usr/src/linux

create the link from / (type cd (enter))

From posts 2 and 9...as below...

cd to /usr/src/linux

From posts 2 and 9...
Quote:

When you have unpacked the kernel tar file....

sudo tar cjf linux-2.6.30.tar.bz2 /usr/src/linux-2.6.30 (guessing here....)

Then make a static link to /usr/src/linux for a working directory.

ln -s /usr/src/linux-2.6.30 /usr/src/linux

cd to it to make sure it's there and ls (list the files)

ls /usr/src/linux (it should be the same as /usr/src/linux-2.6.30)

save a backup copy of /boot/.config to /boot/.config.bak

cp /boot/.config /boot/.config.bak

Before you apply the patches, configure the kernel based on the old one (it works, right?)

cd /usr/src/linux

make oldconfig (this will apply the old .config file to the new Makefile)

Chief Fox 07-02-2009 02:09 PM

maybe it's because I'm new to Linux, or maybe there's a communication gap from AUS to US, but you are confusing me! I thought I already did that, but maybe if I go get some fresh air and come back to this, it might make more sense to me. Thanks for your advice!


All times are GMT -5. The time now is 09:34 PM.