1 |
On Saturday 31 May 2003 23:51, Amiel Martin wrote: |
2 |
> Hi, Ive been playing with my kernel options and trying out a few |
3 |
> different kernels, and Ive got a few small ideas. |
4 |
> |
5 |
> first of all, there are a few packages that need to be re-emerged |
6 |
> when you compile a new kernel (ie nvidia-kernel and emu10k1) |
7 |
> |
8 |
> it would be nice to have a way to be able to run something like |
9 |
> emerge new-kernel |
10 |
> after compiling a new kernel. this could be done with an ebuilkd |
11 |
> variable that registers an ebuild as being dependant on the kernel? |
12 |
|
13 |
I like that idea. I currently use two build-kernel scripts that work |
14 |
around the nvidia-kernel, alsa, emu10k1 and lm_sensors thing: |
15 |
|
16 |
============================================================ |
17 |
#!/bin/sh |
18 |
# /usr/local/bin/build-kernel |
19 |
# start this script from the kernel source directory, |
20 |
# for example /usr/src/linux-2.4.20-xfs-r2 |
21 |
# ...test for that... |
22 |
grep -q "Linux kernel" ./README |
23 |
if [ "$(echo $?)" != "0" ] ; then |
24 |
echo "ERROR: You don't appear to be in a kernel source directory" |
25 |
echo |
26 |
exit |
27 |
fi |
28 |
# This kernel variable produces something like "-2.4.20-xfs-r2" |
29 |
kernel=$(pwd | cut -dx -f2-9) |
30 |
make xconfig |
31 |
make dep clean |
32 |
[ "$(echo $?)" == "0" ] || echo "make dep clean failed" |
33 |
make bzImage |
34 |
[ "$(echo $?)" == "0" ] || echo "make bzImage failed" |
35 |
make modules |
36 |
[ "$(echo $?)" == "0" ] || echo "make modules failed" |
37 |
make modules_install |
38 |
[ "$(echo $?)" == "0" ] || echo "make modules_install failed" |
39 |
mount /boot |
40 |
[ "$(echo $?)" == "0" ] || echo "problem mounting /boot" |
41 |
cp arch/i386/boot/bzImage /boot/vmlinuz$kernel |
42 |
cp System.map /boot/System.map$kernel |
43 |
cp .config /boot/.config$kernel |
44 |
# if just rebuilding booted kernel... |
45 |
if [[ "-$(uname -r)" == "$kernel" ]] ; then |
46 |
AUTOCLEAN="no" ACCEPT_KEYWORDS="~x86" emerge lm_sensors nvidia-kernel |
47 |
else |
48 |
echo "Run build-kernel-2 after next reboot to" |
49 |
echo "update lm_sensors and nvidia-kernel." |
50 |
fi |
51 |
echo |
52 |
echo " All done. Now edit /boot/grub/grub.conf and reboot" |
53 |
============================================================ |
54 |
#!/bin/sh |
55 |
# /usr/local/bin/build-kernel-2 |
56 |
# Run this after booting into a new kernel |
57 |
AUTOCLEAN="no" ACCEPT_KEYWORDS="~x86" emerge lm_sensors nvidia-kernel |
58 |
|
59 |
|
60 |
-- |
61 |
gentoo-dev@g.o mailing list |