format <<HERETO
 This script appends System.map and a subset of .config to the end of a
bzImage. It makes the kernel file roughly 30% larger, but doesn't effect
it's effective size in terms of loading or running. Compared to storing
.config and System.map some other way for each kernel, doing it this way
results in only a few more bytes total space consumption. The point of
this is to keep info pertinent to the specific kernel image in the same
file with it. This is cLIeNUX stuff I find useful, and is not at all
necessary for the kernel. The beginning of the appended stuff is marked by
the string "cLIeNUX append", followed by the .config info, and then the
beginning of the System.map is marked by the string "System.map
System.map" . You can read this stuff in the appended kernel file with ed,
for example. If you're wondering about how much checking this script does
then read the script. None, probably.

This script only makes sense if you haven't run it since successfully
building a bzImage.

You may be prompted for other optional actions/featurisms. 

enter y if you want to append this stuff to bzImage

HERETO

read JUNK

if [ $JUNK = "y" ]
then 	{ echo "OK, appending... 
	

"
   echo "
cLIeNUX appendage cLIeNUX appendage cLIeNUX appendage" >> arch/i386/boot/bzImage
   scan -v "#" .config | cat -s >> arch/i386/boot/bzImage
   echo "
System.map System.map System.map" >> arch/i386/boot/bzImage
   cat System.map >> arch/i386/boot/bzImage

}
fi

format <<HERETO


Went OK? If so, perhaps you'd like to move bzImage and vmlinux to
../built.  This will also make the kernel build re-link on the next make,
which may not be the case if vmlinux still exists in this directory. This
is somewhat like a minimal  make clean.  
 

Here's what's in ./built now
HERETO
ls -m ./built

format <<HERETO

 Enter the filename for this bzImage/append in ./built. If you just hit
enter the mv won't happen. If you enter a non-unique name some previous
stuff will be clobbered. 

HERETO

read UNAME 

if [ $UNAME ]
then 	{ mv arch/i386/boot/bzImage ./built/$UNAME
	mv vmlinux ./built/$UNAME.vmlinux
	}
fi

echo "







"
ls -l built

echo "

There you go."
