You are not logged in.

#1 2011-05-25 02:35:27

rodrigian
Member
Registered: 2011-05-25
Posts: 3

Permission problem when trying to patch the kernel

Hello, my name is Rodrigo and I have a VAIO laptop. The problem with it is that it has soo many privative components that are very hard to get to work under Linux. Fortunately, I found a project http://code.google.com/p/vaio-f11-linux/, which aims to provide full suport to VAIOs in Linux.

In order to do this I had to patch the Kernel http://code.google.com/p/vaio-f11-linux … nelSupport

So I started to follow the instructions.

1) I downloaded from kernel.org the lastest stable release (2.6.39)
2) I made cd /usr/src/linux and unpacked the tar contnents from the kernel file into this directory
3) I made "sudo curl http://www.absence.it/vaio-acpi/source/ … 6.39.patch | patch p1" and I got this:

patching file include/linux/sonypi.h
patch: **** Can't rename file /tmp/poSN3DW6 to include/linux/sonypi.h : Permission denied

I don't know if I'm the problem or if the patch is "bad".I already submitted the problem to the Issues page from the project, but maybe I made something wrong, any help would be apreciated

Rodrigo

Offline

#2 2011-05-25 03:12:40

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Permission problem when trying to patch the kernel

I don't think sudo was meant for strange things like downloading a patch and then piping it into the patch command. If you want that to work, you should either run "su" to make sure you are root beforehand, or split up the commands like so:

sudo curl http://www.absence.it/vaio-acpi/source/patches/vaio-2.6.39.patch >vaio-2.6.39.patch
sudo patch p1 <vaio-2.6.39.patch

The generic instructions for using this patch will probably work but it will be cleaner if you look at the wiki page for Arch's take on custom kernels.

Last edited by ConnorBehan (2011-05-25 03:15:06)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#3 2011-05-25 03:58:53

rodrigian
Member
Registered: 2011-05-25
Posts: 3

Re: Permission problem when trying to patch the kernel

I tried both things:

First executing the "long" all-in-one command in su gave errors, Secondly I tried separate commands, the firs tone didn't work, it gave me permission dennied. So what I did was to manually download the patch and placed it inside the linux-2.6.39 folder, then I ran the second command, which by the way it should be "sudo patch -p1 <vaio-2.6.39.patch"

It seems thaat the kernel has been patched, now I made "sudo make menuconfig" and I should look for a value called CONFIG_SONY_LAPTOP which should be Y, how do I search this file?

Thanks in advance

Offline

#4 2011-05-25 04:14:32

noaham
Member
Registered: 2011-03-13
Posts: 8

Re: Permission problem when trying to patch the kernel

To search type "/" and then type SONY_LAPTOP or whatever you want to search for. It wont take you to the setting but it will show you where it sits in the hierarchy of the menu.

In this case the setting is under ->Device Drivers -> x86 Platform Specific Device Drivers. If you are using the default config from the arch kernel then it should already be set as being built as a module.

Offline

#5 2011-05-25 06:34:51

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Permission problem when trying to patch the kernel

Why are you trying to do it as root anyway? The instructions don't tell you to do that and even if they did, they would be wrong.
patch, compile, whatever as regular user. Install as root. Simple.


neutral

Offline

#6 2011-05-25 10:14:06

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Permission problem when trying to patch the kernel

@OP: While I can't recommend this either, your mistake was in applying sudo to the wrong command, which is something I see all too often:

curl http://... | sudo patch -Np1

You don't need root permissions to write to the pipe, you need them to patch the file. @ConnorBehan: similar applies to your solution as well: sudo doesn't apply to the redirection.

Offline

#7 2011-05-25 18:48:20

rodrigian
Member
Registered: 2011-05-25
Posts: 3

Re: Permission problem when trying to patch the kernel

@noaham I think you are talking about make oldconfig command, don't you?

Offline

#8 2011-05-25 19:30:09

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Permission problem when trying to patch the kernel

I would strongly suggest using abs...


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB