emmanuel_uk Posted October 13, 2006 Report Share Posted October 13, 2006 I have a minimalistic 2.6.12.22mdkcustom (2005 LE), I kept its .config.mandy2005 I understand one cannot reuse .config with "major" kernel version differences, correct? I want to disable in 2.6.17 whatever was disabled in 2.6.12. Is there a bash script/tool out there to do that? I have not come accross one so far. (my bash programming is very slow, so it would take me hours, but I suppose the idea is grepping any line in .config.mandy2005 starting with # and containing "disabled", awk the name of the kernel parameter out of that line and store it. if such a parameter was found, look in .config.mdv2007 if in there and not starting with # , if found then sed it by deleting line and inputing the .config.mandy2005 line (my experience editing by hand is that just putting a # is a bad idea, maybe I am wrong) Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 13, 2006 Report Share Posted October 13, 2006 I'd just start using diff until you see how different it is then you might be better just editing by hand or not. In other words you might be as quick just making a few changes to the old config to account for the nwer kernel as trying to recreate? Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted October 13, 2006 Author Report Share Posted October 13, 2006 I tried the diff -ru method but had to give up quite quickly because the kernel parameters where either too numerous or the diff ouptut was not usefull because the same line in each file were so far away (in terms of number of line between them) that it meant the diff was a very very long output. in the old .config lots of line are prefixed by a # I just gave up at that point, thinking maybe I should sort the line first (alphabetically in case they were not ordered already, but then it meant all # would go together). Then I started to wonder if there was not such a tool anyway the difference between a stock .config and mine is massive: disabled all the cards I do not have, all the file system I do not use, some of the ip modules etc. Quote Link to comment Share on other sites More sharing options...
Guest Milan Avramovic Posted October 13, 2006 Report Share Posted October 13, 2006 You SHOULD be able to use old .config in the same series - basically just copy old .config file into new kernel tree and run make xconfig or whatever - newer features (not present in your old .config) will default, and your settings will be preserved. Quote Link to comment Share on other sites More sharing options...
Mhn Posted October 13, 2006 Report Share Posted October 13, 2006 kompare is quite good to compare files with... Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted October 13, 2006 Author Report Share Posted October 13, 2006 You SHOULD be able to use old .config in the same series - basically just copy old .config file into new kernel tree and run make xconfig or whatever - newer features (not present in your old .config) will default, and your settings will be preserved Thanks, that sounds like it is well-behaved if it just plug gaps, and complain on the few oddities not existing anymore Will try and let you know (will be quite a few days) Quote Link to comment Share on other sites More sharing options...
uralmasha Posted October 13, 2006 Report Share Posted October 13, 2006 What about "make oldconfig" command? This will ask you about all new features that are not mentioned in the .config yet. Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted October 13, 2006 Author Report Share Posted October 13, 2006 thought of that but discarded it because maybe I misunderstood that did not apply when considering two different kernel versions I should try really, good point Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 13, 2006 Report Share Posted October 13, 2006 There's a really nice easy way. Copy the old config file to your /boot directory. Then link the config file to it like this: ln -s config-2.6.16.whatever config now, when you go to compile new kernel, it'll read the default config file and you'll get the options you want automatically. If not, after booting, find out what kernel your running, and then rename the current config file for this kernel, and then copy your customised one to the same name as the one for the running kernel, and go for a make menuconfig after this. Example: [ian@europa boot]$ ls -l total 3334 -rw-r--r-- 1 root root 512 Oct 6 13:36 boot.0300 lrwxrwxrwx 1 root root 18 Oct 13 07:37 config -> config-2.6.17-5mdv -rw-r--r-- 1 root root 77051 Sep 13 20:33 config-2.6.17-5mdv drwxr-xr-x 2 root root 152 Oct 6 13:36 grub/ -rw-r--r-- 1 root root 384450 Oct 6 13:36 initrd-2.6.17-5mdv.img lrwxrwxrwx 1 root root 22 Oct 6 13:36 initrd.img -> initrd-2.6.17-5mdv.img lrwxrwxrwx 1 root root 26 Oct 13 07:38 kernel.h -> /boot/kernel.h-2.6.17-5mdv -rw-r--r-- 1 root root 1493 Oct 6 11:41 kernel.h-2.6.17-5mdv -rw------- 1 root root 287744 Oct 6 13:36 map lrwxrwxrwx 1 root root 15 Oct 6 13:36 message -> message-graphic -rw-r--r-- 1 root root 264808 Oct 6 13:36 message-graphic -rw-r--r-- 1 root root 116 Oct 6 13:36 message-text lrwxrwxrwx 1 root root 22 Oct 6 11:41 System.map -> System.map-2.6.17-5mdv -rw-r--r-- 1 root root 667511 Sep 13 20:33 System.map-2.6.17-5mdv -rw-r--r-- 1 root root 256 Oct 6 13:36 uk-latin1.klt lrwxrwxrwx 1 root root 19 Oct 6 13:35 vmlinuz -> vmlinuz-2.6.17-5mdv -rw-r--r-- 1 root root 1706177 Sep 13 20:33 vmlinuz-2.6.17-5mdv config points to 2.6.17.5 here, but copy yours to 2.6.17.5 or whatever, you get what I mean :P Quote Link to comment Share on other sites More sharing options...
emmanuel_uk Posted October 13, 2006 Author Report Share Posted October 13, 2006 thanks everybody, I must have tried to make my life difficult ;) It happens sometime Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.