[SOLVED] Best way to patch kernel

Hello,
I need to apply a single patch to the kernel to make my AverMedia Volar Green HD (A835B) work. However, this need a kernel recompilation every single time the kernel updates. I need to pull the latest abs tree, alter the PKGBUILD (1 single line) and build it.
Is there any solution to all that mess?
I use the default kernel, but right now I'm testing linux-ck. What can I do? Is there any specific folder that i put all my patches and yaourt applies it? or any way to build the specific module I need with the patch applied outside of the kernel?
Also, I have an nvidia card and I use the propriety drivers (I need 3D acceleration). It may cause some trouble...
Last edited by ttouch (2013-04-27 06:51:35)

--- linux-3.7.1/drivers/media/dvb-core/dvb-usb-ids.h.orig 2012-12-27 23:10:35.000000000 +0100
+++ linux-3.7.1/drivers/media/dvb-core/dvb-usb-ids.h 2012-12-27 23:13:50.049680727 +0100
@@ -233,6 +233,10 @@
#define USB_PID_AVERMEDIA_A815M 0x815a
#define USB_PID_AVERMEDIA_A835 0xa835
#define USB_PID_AVERMEDIA_B835 0xb835
+#define USB_PID_AVERMEDIA_A835B_1835 0x1835
+#define USB_PID_AVERMEDIA_A835B_2835 0x2835
+#define USB_PID_AVERMEDIA_A835B_3835 0x3835
+#define USB_PID_AVERMEDIA_A835B_4835 0x4835
#define USB_PID_AVERMEDIA_1867 0x1867
#define USB_PID_AVERMEDIA_A867 0xa867
#define USB_PID_AVERMEDIA_TWINSTAR 0x0825
--- linux-3.7.1/drivers/media/usb/dvb-usb-v2/it913x.c.orig 2012-12-27 23:10:35.000000000 +0100
+++ linux-3.7.1/drivers/media/usb/dvb-usb-v2/it913x.c 2012-12-27 23:13:49.000693841 +0100
@@ -773,6 +773,18 @@
{ DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9135_9006,
&it913x_properties, "ITE 9135(9006) Generic",
RC_MAP_IT913X_V1) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_1835,
+ &it913x_properties, "Avermedia A835B(1835)",
+ RC_MAP_IT913X_V2) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_2835,
+ &it913x_properties, "Avermedia A835B(2835)",
+ RC_MAP_IT913X_V2) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_3835,
+ &it913x_properties, "Avermedia A835B(3835)",
+ RC_MAP_IT913X_V2) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_4835,
+ &it913x_properties, "Avermedia A835B(4835)",
+ RC_MAP_IT913X_V2) },
{} /* Terminating entry */
I'll report the output PKGBUILD later.

Similar Messages

  • [Solved] 'Best' way to install programs?

    I was wondering what the arch Linux community thought the best way to install things is.
    I was wondering if compiling things from source would be better in some cases then using Pacman, I'm sure I read that you prefer people to install from source, when I was reading the tex live wiki. Now I could have been wrong, read something wrong or just not understood.
    I'm sure this makes the program faster, and makes me be able to install them to my every need, but then is updating and keeping them up to date problematic? Should I install OpenGL and mesa from source, and leave the rest like Firefox to Pacman?
    I am new to Linux, and haven't compiled anything from source, and would like to know how to.
    Last edited by Peilonrayz (2014-06-21 12:03:57)

    Peilonrayz wrote:
    There are two good ways to install TeX Live. One is to use pacman. The other is to use the upstream installer.
    Can you please show me what you are referring to?
    I didn't know about the TeX having it's own installer, it's just as I read this when I was installing it last time: `Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process.`
    After being told about PKGBUILD, this makes much more sense as I read it as compile from source, rather then alternate ways like this.
    The 'install manually' is referring to using upstream's installer. It is not talking about compiling the binaries from source.
    For details of the options offered by upstream, see http://www.tug.org/texlive/. If you have a reasonable network connection and are not planning to install on more than a couple of machines, the network installer is probably the best option. The 'quick installation' instructions are useful but you will want to refer to parts of the full installation documentation as well if doing this for the first time.
    I recommend accepting upstream's defaults for the most part. In particular, I recommend using the 'full' installation scheme unless you are short of disk space.
    I also recommend *not* installing as root. This is also in line with upstream's recommendation. What I did was create a new user and group (texlive:texlive). As root, I also created the directory /usr/local/texlive and made sure it was owned by the texlive user. Then I logged in as that user to install. This works well. Neither the installer nor later use of the utilities can touch your home directory or system files. There is no downside to this - it is no less convenient than having the installation owned by root. So you gain a security benefit for no cost. (Or minimal cost: you have to create a single user and group, make one new directory and chmod that directory appropriately.)
    # adjust options as desired
    useradd -d /usr/local/texlive -m -g texlive -r -s /bin/sh texlive
    Set a password for the new account, and check ownership and permissions on the new directory:
    drwxr-xr-x 7 texlive texlive 4.0K Meh 26 02:14 .
    Then log in as texlive and install.

  • [solved] Best way to update /etc/gshadow?

    'pyther' is a member of the 'video' group in /etc/group but not in /etc/gshadow
    'pyther' is a member of the 'audio' group in /etc/group but not in /etc/gshadow
    'somebody' is a member of the 'audio' group in /etc/group but not in /etc/gshadow
    'mpd' is a member of the 'audio' group in /etc/group but not in /etc/gshadow
    'pyther' is a member of the 'optical' group in /etc/group but not in /etc/gshadow
    'hal' is a member of the 'optical' group in /etc/group but not in /etc/gshadow
    'hal' is a member of the 'floppy' group in /etc/group but not in /etc/gshadow
    'pyther' is a member of the 'storage' group in /etc/group but not in /etc/gshadow
    'hal' is a member of the 'storage' group in /etc/group but not in /etc/gshadow
    Somehow my /etc/group file became out of sync with /etc/gshadow file. What is the best way to fix this? Should I hand edit /etc/gshadow or is there an tool that will sync the two up?
    pyther
    Last edited by pyther (2011-02-08 00:26:43)

    Hello sputnick, please read our policy on bumping old threads: https://wiki.archlinux.org/index.php/Fo … Bumping.22
    Closing.

  • Best way to patch QuickTime when using iTunes?

    I'm wondering if anyone else has run across this issue...
    I have installed iTunes which comes of course with Quicktime. I do a clean install of iTunes each time a new version is released as simply doing a patch install seems to mess up.
    However I've noticed that with Quicktime when a new version is released if I download and install just Quicktime and install it, it can sometimes lead to problems with iTunes, I reckon as iTunes is expecting to find the version it installed as part of it's package but now has different files.
    Has anyone else come across this issue and if so, how do you handle quicktime updates which seem to come out more frequently than iTunes updates?

    Hi colin a.
    Welcome to the Support Communities!
    The article below may be able to help you with this.  Click on the link to see more details and screenshots. 
    Logic: About I/O buffer size and monitoring latency
    http://support.apple.com/kb/ht1314
    Cheers,
    - Judy

  • [solved] Best way to test for record in sqlite3 db?

    In a bash script, I need to know if a sqlite3 'SELECT ... WHERE' operation finds any matches.  I don't need the output; I just need to know if a match is found.  My thought was to do
    if [[ "$(sqlite3 ... "SELECT ..." )" ]];then ...
    Is there a better way to do it?
    Bonus question: if searching a primary key or unique column, is a ' SELECT ... WHERE foo="bar" ' operation smart enough to stop when it finds a match, or will it continue through the rest of the table?
    Thanks.
    Last edited by alphaniner (2012-04-26 14:51:36)

    @alphaniner: Primary key columns are usually indexed, hence a query for a primary key column will not traverse the table, but perform an index lookup. Since primary keys are unique this will end up at a single row.
    To test for existence of a row, you'd usually use "select exists(select 1 from <table> where <condition>)".  This will output 1, if the row exists, and 0 otherwise. I don't know whether the exit state of the "sqlite" tool is reliable, but testing the output will be with this query.
    And again: If you're doing this kind of stuff, you're better off with a real languages with data types and the like. Python provides SQLite support in the standard library.

  • Wondering if this was the correct way to patch my kernel for CFLAGS?

    Hello. I use to build the zen-sources kernel but stopped many months ago. I didn't really need all of those patches but I did miss the Custom CFLAGS/MAKEFLAGS option that the zen kernel had. I also missed the 432HZ Timer frequency setting available in the zen patch.
    So I researched a bit and grabbed these parts from the zen patch to add to the Arch kernel:
    For the CFLAGS/MAKEFLAGS
    diff --git a/Makefile b/Makefile
    index 1ab3ebf..472fe73 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -328,13 +328,12 @@ CHECK = sparse
    CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
    -Wbitwise -Wno-return-void $(CF)
    MODFLAGS = -DMODULE
    -CFLAGS_MODULE = $(MODFLAGS)
    -AFLAGS_MODULE = $(MODFLAGS)
    -LDFLAGS_MODULE =
    -CFLAGS_KERNEL =
    +CFLAGS_MODULE = $(MODFLAGS) $(CUSTOM_CFLAGS)
    +AFLAGS_MODULE = $(MODFLAGS)
    +LDFLAGS_MODULE =
    +CFLAGS_KERNEL = $(CUSTOM_CFLAGS)
    AFLAGS_KERNEL =
    # Use LINUXINCLUDE when you must reference the include/ directory.
    # Needed to be compatible with the O= option
    LINUXINCLUDE := -Iinclude \
    @@ -344,6 +343,9 @@ LINUXINCLUDE := -Iinclude \
    KBUILD_CPPFLAGS := -D__KERNEL__
    +# Apply custom flags
    +KBUILD_CFLAGS += $(CUSTOM_CFLAGS)
    +
    KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
    -fno-strict-aliasing -fno-common \
    -Werror-implicit-function-declaration
    diff --git a/init/Kconfig b/init/Kconfig
    index 6a5c5fe..7b2f4b5 100644
    --- a/init/Kconfig
    +++ b/init/Kconfig
    @@ -672,6 +734,32 @@ config CC_OPTIMIZE_FOR_SIZE
    If unsure, say Y.
    +menu "Custom Build Flags"
    +
    +config CUSTOM_CFLAGS
    + string "Custom CFLAGS for kernel"
    + default ""
    + help
    + You can use this to easily set custom gcc CFLAGS to be used for the
    + entire kernel (including modules).
    +
    + No warning for you, i can't fix stupidity.
    +
    + If unsure, leave blank.
    +
    +config CUSTOM_MAKEFLAGS
    + string "Custom MAKEFLAGS for kernel"
    + default ""
    + help
    + You can use this to easily set custom MAKEFLAGS to be used for building
    + the entire kernel.
    +
    + (Or just use the options when you run make?)
    +
    + If unsure, leave blank.
    +
    +endmenu
    +
    config SYSCTL
    bool
    and for the Timer frequency:
    diff --git a/kernel/Kconfig.hz b/kernel/Kconfig.hz
    index 94fabd5..7a830d4 100644
    --- a/kernel/Kconfig.hz
    +++ b/kernel/Kconfig.hz
    @@ -4,7 +4,7 @@
    choice
    prompt "Timer frequency"
    - default HZ_250
    + default HZ_1000
    help
    Allows the configuration of the timer frequency. It is customary
    to have the timer interrupt run at 1000 Hz but 100 Hz may be more
    @@ -23,6 +23,30 @@ choice
    with lots of processors that may show reduced performance if
    too many timer interrupts are occurring.
    + config HZ_108
    + bool "108 HZ"
    + help
    + 864 HZ is the best value for desktop systems. Most responsive
    + out of all the options. This is for Eight core/Processor systems only
    + as timer frequencies * NR_CPUS = actual frequency.
    + Try this if you have a Eight Core/Processor processor system and a desktop environment.
    +
    + config HZ_144
    + bool "144 HZ"
    + help
    + 864 HZ is the best value for desktop systems. Most responsive
    + out of all the options. This is for Six Core/Processor systems only
    + as timer frequencies * NR_CPUS = actual frequency.
    + Try this if you have a Six core/processor system and a desktop environment.
    +
    + config HZ_216
    + bool "216 HZ"
    + help
    + 864 HZ is the best value for desktop systems. Most responsive
    + out of all the options. This is for Quad-core/Processor systems only
    + as timer frequencies * number of processors = actual frequency.
    + Try this if you have a quad-core/dual processor system and a desktop environment.
    +
    config HZ_250
    bool "250 HZ"
    help
    @@ -39,6 +63,22 @@ choice
    on SMP and NUMA systems and exactly dividing by both PAL and
    NTSC frame rates for video and multimedia work.
    + config HZ_432
    + bool "432 HZ"
    + help
    + 864 HZ is the best value for desktop systems. Most responsive
    + out of all the options. This is for Dual Core/Processor systems only
    + as timer frequencies * number of processors = actual frequency.
    + Try this if you have a dual-core/dual processor system and a desktop environment.
    +
    + config HZ_864
    + bool "864 HZ"
    + help
    + 864 HZ is the best value for desktop systems. Most responsive
    + out of all the options. The only reason it is not default is
    + because it may break few drivers. Give it a try if you have
    + a desktop :).
    +
    config HZ_1000
    bool "1000 HZ"
    help
    @@ -50,8 +90,13 @@ endchoice
    config HZ
    int
    default 100 if HZ_100
    + default 108 if HZ_108
    + default 144 if HZ_144
    + default 216 if HZ_216
    default 250 if HZ_250
    default 300 if HZ_300
    + default 432 if HZ_432
    + default 864 if HZ_864
    default 1000 if HZ_1000
    config SCHED_HRTICK
    Well the code was added to my make menuconfig kernel settings, and is in the .config of my newly compiled kernel..... I'm just wondering if I did this correctly. (I'm pretty sure that I did a crappy job of patching since I just grabbed the pieces of the zen patch that I thought were the correct one)..... This is the message from the patch:
    patching file Makefile
    patching file init/Kconfig
    patch unexpectedly ends in middle of line
    Hunk #1 succeeded at 734 with fuzz 2.
    patching file kernel/Kconfig.hz
    patch unexpectedly ends in middle of line
    Hunk #4 succeeded at 90 with fuzz 1.
    So if someone can tell me a better way to patch the kernel26 for custom CFLAGS and 432HZ Timer frequency (for dual core) I would appreciate it. Thanks.

    I'm still trying to find out if I needed to patch any other parts of the kernel source when I added CFLAGS to the kernel modules? I also would like to know if I did the Timing part correctly (so I could use the 432HZ setting for a dual core).
    ..... so far this kernel has worked ok for the last 4 days. Does anybody know how I can benchmark it and compare it to other kernels that I have built with different settings?
    Any info is appreciated.
    Last edited by methuselah (2009-05-19 15:20:55)

  • Best way to configure patching of multiple groups?

    Howdy,
    We're looking to start using Config Manager 2012 R2 to handle patching of our servers.  I'm looking for any advice or opinions as to how to set everything up to run in the best way.
    We have 3 primary groups that we want to update
    QA/Dev Pilot group (~20 machines)
    QA/Dev All group (~100 machines including the 20 above)
    Production (~90 machines)
    We want to do patching on the weekend and do each group on consecutive weekends.
    Pilot - 3rd saturday
    QA/Dev - 4th Saturday
    Prod - 1st Saturday
    I'm just looking for the best way to set things up in SCCM to handle this.
    We were going to have an Automatic Deployment Rule for each group and schedule them that way.
    Then I saw something that said to just have 1 ADR that points to a collection that contains all those group collections and just set maintenance windows on each group collection to handle the scheduling.
    I'm just trying to figure out if there's a "best" way to do this or if there are multiple ways that all lead to the same end result and it really doesn't matter which one we choose or what.
    We're all still pretty new to SCCM so any advice would be much appreciated.
    Thanks.

    I don't like the idea of using ADRs for handling all the patching, as it gets out of your control. That being said, to achieve something like that you need to run the ADRs on the same time every month, otherwise the deployments will contain different updates.
    So, you can have to play with the deadlines to get your results with the different Saturdays.
    Also, to make sure patches don't get installed during the week, by accident, you can use maintenance windows. For more information see:
    http://technet.microsoft.com/en-us/library/hh508762.aspx
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    We only update the patch list the day after patch Tuesday so all the ADRs should have the same patches.  But that brings up the question I asked about having multiple ADRs scheduled for consecutive Saturdays or have 1 ADR with each collection to have
    a maintenance window to set the Saturday it goes.  I guess having multiple ADRs that run at the same time but with different deadlines would be similar to just having 1 and using the maintenance windows.  But it might be better so that if the deadline
    hits but it doesn't patch for some reason a maintenance window would also keep it from going during the day...
    So maybe multiple ADRs that run on the 3rd Saturday.  Each one with a different deadline on a different saturday.  And then each collection would also have a maintenance window in case it didn't install at the deadline for some reason?  
    hmm...

  • Best way to apply the patch

    Hello,
    Could someone tell me what's the best way to apply the
    patch?
    Should I install create the database after I use the patch?
    Thanks!
    John
    null

    Hey,
        The Best way would be:
    Apply the patch on the secondry one first and then on the primary box.
    You dont really need to make any box a stand alone one. You can apply the patch in the ditributed enviorment.
    One more thing:
    If you apply the patch on the primary box and then perform replication.It WILLNOT replicate the patch on the secondry box.
    Here is the procedure:
    Steps to apply the patch
           Issue the following "acs patch" command in the EXEC mode to install the ACS patch:
           "acs patch install patch-name.tar.gpg repository repository-name"
           ACS displays the following confirmation message:
            Installing an ACS patch requires a restart of ACS services.
           Would you like to continue? yes/no
           Enter yes.
    Please ensure that you use FTP server. Donot use TFTP as its not supported.
    Regards
    Minakshi
    Do rate the helpful posts:)

  • Videos emailed from my iPhone4 won't open or play on the recipients' computer.  Is this a quicktime/windows media player issue?   What is the best way to solve this ?  THANKS!

    Videos emailed from my iPhone4 won't open or play on the recipients' computer.  Is this a quicktime/windows media player issue?   What is the best way to solve this ?  THANKS!

    Is the recipient using QuickTime on their PC to view the video?
    What is the error message provided when trying to open/view the video?

  • What is the best way to upgrade to a new kernel?

    I would like to upgrade to the new kernel: kernel26-2.6.23.14-1 from the one from core (on the CD).
    What is the best way to do this? Also, is there a way to find out what is new / has changed in the new kernel?
    Thanks for any insights.

    Gilneas wrote:
    Surely you have tried pacman -Syu?
    Kernel changelogs are on kernel.org. Perhaps it's more interesting to read articles on kerneltrap.org though.
    I have had a kernel panic one time I upgraded a kernel. I had to walk back step-by-step to backtrack what I did.
    I basically uninstalled the nv kernel driver for xorg and installed the proprietary drivers from their website (which I shouldn't have uninstalled nv drivers, but nonetheless I learned from it). But, somehow I think one of the packages I installed automatically upgraded to the lastest kernel. When I reverted to the properietary drivers it somehow uninstalled the latest kernel. The key thing I learned was "install the right drivers the first time!" But, yes, I know about "Pacman -Syu" in general, but didn't know that was the appropriate way to do it. It's just my two cents.
    Last edited by smitty (2008-02-05 12:28:48)

  • [SOLVED]Best/cleanest way to use pacman -R

    After reading the manual I have came up with my idea of best way to use pacman -R command, please tell me what you think, is there a better/cleaner way to remove packages I don't want anymore, a safer way?
    sudo pacman -Rnsu [target]
    So I don't want backups saved, so I have -n there.
    I don't want all the dependencies installed with the package (I think.....) so I have -s there.
    And I don't want unneeded packages so I have -u there.
    Is this all safe and clean? Thanks guys!
    P.S. I'm removing vim or trying to right now, I forgot about sublime text and how fun it was back when I used to use it. Thanks!
    Last edited by rexineffect (2014-02-18 07:49:37)

    rexineffect wrote:orschiro i dont know what you ment tho...
    Maybe he meant pkg-list_true_orphans http://xyne.archlinux.ca/projects/pkg_scripts/
    rexineffect wrote:Edit is there a way I can flag this as solved?
    https://bbs.archlinux.org/viewtopic.php?id=130309

  • My Iphoto libary is full and will not acept new photos, what is the best way to solve this problem without losing old photos

    Hi
    My Iphoto libary is full and wil not acept new photos what is the best way to solve this problem without losing the old photos?

    Here is a relevant discussion to your situation:
    https://discussions.apple.com/thread/2640787?start=0&tstart=0

  • [SOLVED] What is the best way to load iptables/nftables on boot?

    Hi -
    New arch user migrating from Ubuntu/debian.  I'm used to loading netfilter iptable rules using an /etc/network/interfaces file.  What is the best way to do this using netctl/systemd?
    An RTFM of the wiki and a Google search didn't provide an answer, but maybe I'm just looking in the wrong places.
    Last edited by pgoetz (2014-06-21 08:32:01)

    Ah, OK -- got it.  I can just blindly enable the iptables.service, and systemd will make sure the interfaces are up before running the service.  How cool.  I'm still getting used to the luxury of not having to worry about stuff like this myself.  The only minor issue is it looks like I'll have to get the systemd nftables service out of AUR.
    Last edited by pgoetz (2014-02-24 19:58:53)

  • [Solved] What's the best way for me to help with Arch?

    I've been using Linux for about 10 years and Arch for a little over a year.  I used to do a lot of distro-hopping but I've found that since finding Arch, I haven't been doing much of that.  I don't know why it took me so long to find it.
    Anyway, I'd like to give back a little so what's the best way for me to help?  I'm not a programmer so I'd be no help there.  I have made a couple contributions to the wiki and filed a bug.  I know that kind of stuff is easy and obvious.  Is there anything else I could be doing?
    Last edited by brianhanna (2010-04-07 02:25:34)

    I hear the Arch Linux Magazine could always use some contributions, if you're inclined towards that sort of thing. I've been wanting to write an article for a while, but I've not run into anything in my Arch experience so far that's really inspired an article out of me.

  • [Solved] What is the best way to share pacman cache ?

    I'm wondering what is the best way to share the pacman cache .
    I went with the obvious choice 'sshfs' . But the cache on the server is owned by root so I can't use it dynamically unless I enable root logins , right ?
    Is it safe to enable root logins and mount with the root user ?
    What is the best and safest way to share pacman cache dynamically ?
    Last edited by Nezmer (2008-12-07 01:13:20)

    Interesting. I use sshfs and yes use root login to do business. But I see it this way you want more security created a stronger password. You want more security than that disable passwords and use keys. But once you start NFS you are surely introducing some security issue just as if you enable root ssh login, so why is NFS better?
    Just asking out of interest, I claim to know nothing about security.

Maybe you are looking for