View previous topic :: View next topic |
Author |
Message |
faithfilled n00b
Joined: 18 Jan 2003 Posts: 23 Location: Colorado
|
Posted: Thu Apr 10, 2003 4:00 pm Post subject: Patching ACPI with sources |
|
|
I'm using gentoo-sources 2.4.20 right now, but including ACPI support (even if I build everything as modules) hangs the mahcine at boot time. I was going to try an patch in the most current ACPI sources, but I don't know if this is possible since the gentoo-sources already have some other patch already applied. Is it? (I don't have much knowledge of the patch program...)
Incidentally, I tried to find out which version of the patches were used for gentoo-sources, but it seems like it uses a "ck" version from 2003-02-07, as compared to 20021212 patch on sourceforge.net. Huh? Where did this from? Why is there a custom acpi patch?
My last question is this: Should I setup my BIOS in a particular fashion to accomadate acpi in the kernel? I have a Dell Inspiron 8100 with an nVidia 2 Go graphics card. I don't care if everything in acpi doesn't work - I'll worry about that later. But at least I want to be able to boot my machine!! I've searched all over for help, but I didn't find much of anything that fits my situation. Thanks!! |
|
Back to top |
|
|
faithfilled n00b
Joined: 18 Jan 2003 Posts: 23 Location: Colorado
|
Posted: Thu Apr 10, 2003 9:25 pm Post subject: I can boot |
|
|
Now I can boot fine - I don't know what the problem was before. Might have been my build process. But I did find out that the acpi included with gentoo-sources is an older version. So can I just re-patch the source code? Or do I need to create a slightly modified ebuild and patches file? |
|
Back to top |
|
|
watersb Apprentice
Joined: 04 Sep 2002 Posts: 297 Location: take a left turn in Tesuque
|
Posted: Sat Apr 12, 2003 3:46 pm Post subject: |
|
|
Quote: | So can I just re-patch the source code? Or do I need to create a slightly modified ebuild and patches file? |
In general, patches won't work that way; a patch is usually a search-and-replace operation. So the patch will search for an original version of something that you've already patched, and will likely get confused... you always want to patch against the same thing for which the patches were made.
So apply the patch to vanilla-sources.
Of course, if you want all of the other things have been added to make gentoo-sources, you'll need to add those patches, too... and watch out for patch conflicts... It might be easy, but it might take some work. One of the reasons I love Gentoo is the amount of work in the patch-wrangling that is done already.
Best of luck! I am very interested in your results! |
|
Back to top |
|
|
faithfilled n00b
Joined: 18 Jan 2003 Posts: 23 Location: Colorado
|
Posted: Mon Apr 14, 2003 3:28 am Post subject: Creating your own kernel patch set from existing one |
|
|
Thanks for the help! I actually took it one step further and decided to create my own ebuild to help automate the process. First, I uncommented the PORTAGE_OVERLAY directory in /etc/make.conf and created the /usr/local/portage directory. Then, I copied the gentoo-sources ebuild to the /usr/local/portage/sys-kernel/gentoo-sources directory. (The directory structure must be the same as /usr/portage.)
Next, I modified the copied ebuild file so that, in the unpack function, right before the call to 'kernel_src_unpack', I made a quick swap to my patch:
Code: | if [ -f /dwnld/acpi-20021212-2.4.20.diff.gz ]; then
einfo "Swapping the old acpi patch for the newer..."
# remove old acpi patch:
rm -f 004_acpi*
cp /dwnld/acpi-20021212-2.4.20.diff.gz 004_acpi-20021212-2.4.20.diff.gz
else
einfo "Couldn't find newer acpi patch!"
fi
kernel_src_unpack |
The kernel_src_unpack function adds the patches - this is why I put the code immediately before that call. Also, I had to find out the name of the old acpi patch and place the new one in the same numbered spot (004) just to be safe. The addpatches script adds the patches in numerical order.
After making these changes, I did an 'ebuild /usr/local/.../gentoo-sources...20-r2.ebuild digest' because of suggestions I read on various posts. I don't know if this is strictly necessary.
After that, I just emerged gentoo-sources and it worked beautifully! I even re-compiled and tested the kernel to verify. I learned something new. Awesome!
As a side note, perhaps it would be cleaner to just create my own kernel-patch ebuild, but this is a great quick hack. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|