Messages in this thread | | | Date | Fri, 15 Jan 1999 08:39:28 -0500 | From | Chris Chiappa <> | Subject | Re: [PATCH] Re: Building .config into the kernel |
| |
On Thu, Jan 14, 1999 at 09:30:56PM -0600, Michael Elizabeth Chastain wrote: > It discards semantic information from the .config file, and once that > information is lost, it can't be regenerated. I'm not sure about this. It's trivial to find the version of a running kernel and from that you can deduce anything that *isn't* set in .config, and the space savings are substantial.
> in a standard format (straight gzip compression, no s/CONFIG_// games), ^^^^^^^^^^^ This might be a reasonable thing to do since the way LZ compression is implemented, killing a redundant string doesn't have that much effect. For jollies: -rw-r--r-- 1 griffon root 6960 Jan 15 08:19 config -rw-r--r-- 1 griffon root 2052 Jan 15 08:19 config.gz -rw-r--r-- 1 griffon root 1982 Jan 15 08:25 config.hack.gz -rw-r--r-- 1 griffon root 777 Jan 15 08:22 config.strip.gz -rw-r--r-- 1 griffon root 731 Jan 15 08:23 config.strip.hack.gz config is the original file. config.gz is it compresses with gzip -9. config.hack.gz is it compressed after being run through sed -e s/CONFIG_//. config.strip.gz is the compresses product after running it through egrep -v '(^#|^$)', and config.strip.hack.gz is the compressed product after both the sed and egrep. 46 bytes doesn't seem to me to be all that important a savings. (This might even get lost in alignment fuzz or something, I don't know) I would tend to vote for the "egrep" approach without the "sed" approach.
Other caveats: o The script makes use of an easily guessable name in /tmp. Unless the author wants to be flamed on bugtraq, he should probably change it. o I know the overall tendency is to make files in /proc not human-readable but it seems like even in 2.2 we're going to have /proc/* still be. A gzipped file definitely isn't so it should probably be moved deeped into the hierarchy. /proc/sys/kernel/config.gz maybe? (Unless you want to gunzip on the fly that is, which is probably not a good idea.)
--
+------- --- -- -- - | griffon@snurgle.N0-SPAM.org / My opinions represent snurgle.org : ! Unspoilt by progress / http://www.snurgle.org/~griffon | - -- -- --- -------+
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |