home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9321 < prev    next >
Encoding:
Text File  |  1992-08-29  |  8.9 KB  |  319 lines

  1. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!daemon
  2. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  3. Newsgroups: comp.os.linux
  4. Subject: Patch to 0.97PL2 to reduce unnecessary compiles during a build
  5. Message-ID: <1992Aug29.054524.28430@athena.mit.edu>
  6. Date: 29 Aug 92 05:45:24 GMT
  7. Sender: daemon@athena.mit.edu (Mr Background)
  8. Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  9. Organization: The Internet
  10. Lines: 307
  11.  
  12. I got tired of waiting for a build of the system to finish, after I only
  13. modified one or two configuration files.  But due to how the UTS_RELEASE
  14. and UTS_VERSION defines were updated, a lot of unnecessary files would
  15. get recompiled due to their dependency on config.h, when they didn't
  16. need to get recompiled.  By separating out those #define's to another
  17. building, we reduce the need to recompile sections of the kernel when we
  18. relink the kernel.
  19.  
  20. Linus, could you make sure this patch makes it to the next release?
  21. Thanks!!!! 
  22.  
  23.                             - Ted
  24.  
  25. *** 1.3    1992/08/28 08:15:36
  26. --- Makefile    1992/08/28 11:43:32
  27. ***************
  28. *** 4,10 ****
  29.   # default of FLOPPY is used by 'build'.
  30.   #
  31.   
  32. ! ROOT_DEV = /dev/hdb1
  33.   
  34.   #
  35.   # uncomment this if you want kernel profiling: the profile_shift is the
  36. --- 4,10 ----
  37.   # default of FLOPPY is used by 'build'.
  38.   #
  39.   
  40. ! ROOT_DEV = /dev/hda4
  41.   
  42.   #
  43.   # uncomment this if you want kernel profiling: the profile_shift is the
  44. ***************
  45. *** 30,38 ****
  46.   # 0x08 - tilde (~)
  47.   # 0x10 - dieresis (umlaut)
  48.   
  49. ! KEYBOARD = -DKBD_FINNISH -DKBDFLAGS=0
  50.   # KEYBOARD = -DKBD_FINNISH_LATIN1 -DKBDFLAGS=0x9F
  51. ! # KEYBOARD = -DKBD_US -DKBDFLAGS=0
  52.   # KEYBOARD = -DKBD_GR -DKBDFLAGS=0
  53.   # KEYBOARD = -DKBD_GR_LATIN1 -DKBDFLAGS=0x9F
  54.   # KEYBOARD = -DKBD_FR -DKBDFLAGS=0
  55. --- 30,38 ----
  56.   # 0x08 - tilde (~)
  57.   # 0x10 - dieresis (umlaut)
  58.   
  59. ! # KEYBOARD = -DKBD_FINNISH -DKBDFLAGS=0
  60.   # KEYBOARD = -DKBD_FINNISH_LATIN1 -DKBDFLAGS=0x9F
  61. ! KEYBOARD = -DKBD_US -DKBDFLAGS=0
  62.   # KEYBOARD = -DKBD_GR -DKBDFLAGS=0
  63.   # KEYBOARD = -DKBD_GR_LATIN1 -DKBDFLAGS=0x9F
  64.   # KEYBOARD = -DKBD_FR -DKBDFLAGS=0
  65. ***************
  66. *** 73,79 ****
  67.   # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
  68.   # The number is the same as you would ordinarily press at bootup.
  69.   #
  70. ! #SVGA_MODE=    -DSVGA_MODE=1
  71.   
  72.   AS    =as
  73.   LD    =ld
  74. --- 73,79 ----
  75.   # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
  76.   # The number is the same as you would ordinarily press at bootup.
  77.   #
  78. ! SVGA_MODE=    -DSVGA_MODE=NORMAL_VGA
  79.   
  80.   AS    =as
  81.   LD    =ld
  82. ***************
  83. *** 107,115 ****
  84.   
  85.   Version:
  86.       @./makever.sh
  87. !     @echo \#define UTS_RELEASE \"0.97.pl2-`cat .version`\" > include/linux/config_rel.h
  88. !     @echo \#define UTS_VERSION \"`date +%D`\" > include/linux/config_ver.h
  89. !     touch include/linux/config.h
  90.   
  91.   Image: boot/bootsect boot/setup tools/system tools/build
  92.       cp tools/system system.tmp
  93. --- 107,117 ----
  94.   
  95.   Version:
  96.       @./makever.sh
  97. !     @echo \#define UTS_RELEASE \"0.97.pl2-`cat .version`\" > version.h
  98. !     @echo \#define UTS_VERSION \"`date +%D`\" >> version.h
  99. !     @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> version.h
  100. !     @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> version.h
  101. !     @echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> version.h
  102.   
  103.   Image: boot/bootsect boot/setup tools/system tools/build
  104.       cp tools/system system.tmp
  105. ***************
  106. *** 130,137 ****
  107.   init/main.o: init/main.c
  108.       $(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
  109.   
  110. ! tools/system:    boot/head.o init/main.o linuxsubdirs
  111. !     $(LD) $(LDFLAGS) -M boot/head.o init/main.o \
  112.           $(ARCHIVES) \
  113.           $(FILESYSTEMS) \
  114.           $(DRIVERS) \
  115. --- 132,139 ----
  116.   init/main.o: init/main.c
  117.       $(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
  118.   
  119. ! tools/system:    boot/head.o init/main.o version.o linuxsubdirs
  120. !     $(LD) $(LDFLAGS) -M boot/head.o init/main.o version.o \
  121.           $(ARCHIVES) \
  122.           $(FILESYSTEMS) \
  123.           $(DRIVERS) \
  124. *** 1.2    1992/08/28 08:10:19
  125. --- include/linux/config.h    1992/08/28 08:27:48
  126. ***************
  127. *** 12,26 ****
  128.   #ifndef UTS_NODENAME
  129.   #define UTS_NODENAME "(none)"    /* set by sethostname() */
  130.   #endif
  131. - #include <linux/config_rel.h>
  132. - #ifndef UTS_RELEASE
  133. - #define UTS_RELEASE "0.95c-0" 
  134. - #endif
  135. - #include <linux/config_ver.h>
  136. - #ifndef UTS_VERSION
  137. - #define UTS_VERSION "mm/dd/yy"
  138. - #endif
  139.   #define UTS_MACHINE "i386"    /* hardware type */
  140.   
  141.   /* Don't touch these, unless you really know what your doing. */
  142.   #define DEF_INITSEG    0x9000
  143. --- 12,22 ----
  144.   #ifndef UTS_NODENAME
  145.   #define UTS_NODENAME "(none)"    /* set by sethostname() */
  146.   #endif
  147.   #define UTS_MACHINE "i386"    /* hardware type */
  148. + /*
  149. +  * The definitions for UTS_RELEASE and UTS_VERSION are now defined
  150. +  * in linux/version.h, and should only be used by linux/version.c
  151. +  */
  152.   
  153.   /* Don't touch these, unless you really know what your doing. */
  154.   #define DEF_INITSEG    0x9000
  155. *** 1.1    1992/08/28 08:30:21
  156. --- include/linux/utsname.h    1992/08/28 08:30:54
  157. ***************
  158. *** 21,24 ****
  159. --- 21,26 ----
  160.       char machine[65];
  161.   };
  162.   
  163. + extern struct new_utsname system_utsname;
  164.   #endif
  165. *** 1.2    1992/08/28 08:15:36
  166. --- kernel/sys.c    1992/08/28 08:31:07
  167. ***************
  168. *** 494,509 ****
  169.       return 0;
  170.   }
  171.   
  172. - static struct new_utsname thisname = {
  173. -     UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION, UTS_MACHINE
  174. - };
  175.   int sys_newuname(struct new_utsname * name)
  176.   {
  177.       if (!name)
  178.           return -EFAULT;
  179.       verify_area(name, sizeof *name);
  180. !     memcpy_tofs(name,&thisname,sizeof *name);
  181.       return 0;
  182.   }
  183.   
  184. --- 494,505 ----
  185.       return 0;
  186.   }
  187.   
  188.   int sys_newuname(struct new_utsname * name)
  189.   {
  190.       if (!name)
  191.           return -EFAULT;
  192.       verify_area(name, sizeof *name);
  193. !     memcpy_tofs(name,&system_utsname,sizeof *name);
  194.       return 0;
  195.   }
  196.   
  197. ***************
  198. *** 512,526 ****
  199.       if (!name)
  200.           return -EINVAL;
  201.       verify_area(name,sizeof *name);
  202. !     memcpy_tofs(&name->sysname,&thisname.sysname,__OLD_UTS_LEN);
  203.       put_fs_byte(0,name->sysname+__OLD_UTS_LEN);
  204. !     memcpy_tofs(&name->nodename,&thisname.nodename,__OLD_UTS_LEN);
  205.       put_fs_byte(0,name->nodename+__OLD_UTS_LEN);
  206. !     memcpy_tofs(&name->release,&thisname.release,__OLD_UTS_LEN);
  207.       put_fs_byte(0,name->release+__OLD_UTS_LEN);
  208. !     memcpy_tofs(&name->version,&thisname.version,__OLD_UTS_LEN);
  209.       put_fs_byte(0,name->version+__OLD_UTS_LEN);
  210. !     memcpy_tofs(&name->machine,&thisname.machine,__OLD_UTS_LEN);
  211.       put_fs_byte(0,name->machine+__OLD_UTS_LEN);
  212.       return 0;
  213.   }
  214. --- 508,522 ----
  215.       if (!name)
  216.           return -EINVAL;
  217.       verify_area(name,sizeof *name);
  218. !     memcpy_tofs(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
  219.       put_fs_byte(0,name->sysname+__OLD_UTS_LEN);
  220. !     memcpy_tofs(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
  221.       put_fs_byte(0,name->nodename+__OLD_UTS_LEN);
  222. !     memcpy_tofs(&name->release,&system_utsname.release,__OLD_UTS_LEN);
  223.       put_fs_byte(0,name->release+__OLD_UTS_LEN);
  224. !     memcpy_tofs(&name->version,&system_utsname.version,__OLD_UTS_LEN);
  225.       put_fs_byte(0,name->version+__OLD_UTS_LEN);
  226. !     memcpy_tofs(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
  227.       put_fs_byte(0,name->machine+__OLD_UTS_LEN);
  228.       return 0;
  229.   }
  230. ***************
  231. *** 537,546 ****
  232.       if (len > __NEW_UTS_LEN)
  233.           return -EINVAL;
  234.       for (i=0; i < len; i++) {
  235. !         if ((thisname.nodename[i] = get_fs_byte(name+i)) == 0)
  236.               return 0;
  237.       }
  238. !     thisname.nodename[i] = 0;
  239.       return 0;
  240.   }
  241.   
  242. --- 533,542 ----
  243.       if (len > __NEW_UTS_LEN)
  244.           return -EINVAL;
  245.       for (i=0; i < len; i++) {
  246. !         if ((system_utsname.nodename[i] = get_fs_byte(name+i)) == 0)
  247.               return 0;
  248.       }
  249. !     system_utsname.nodename[i] = 0;
  250.       return 0;
  251.   }
  252.   
  253. *** 1.2    1992/08/28 08:10:19
  254. --- init/main.c    1992/08/28 11:45:42
  255. ***************
  256. *** 21,26 ****
  257. --- 21,27 ----
  258.   extern unsigned long * prof_buffer;
  259.   extern unsigned long prof_len;
  260.   extern int end;
  261. + extern char *linux_banner;
  262.   
  263.   /*
  264.    * we need this inline - forking from kernel space will result
  265. ***************
  266. *** 172,178 ****
  267.       memory_start = mem_init(memory_start,memory_end);
  268.       buffer_init();
  269.       time_init();
  270. !     printk("Linux version " UTS_RELEASE " " __DATE__ " " __TIME__ "\n");
  271.       floppy_init();
  272.       sock_init();
  273.       sti();
  274. --- 173,179 ----
  275.       memory_start = mem_init(memory_start,memory_end);
  276.       buffer_init();
  277.       time_init();
  278. !     printk(linux_banner);
  279.       floppy_init();
  280.       sock_init();
  281.       sti();
  282. *** /dev/null    Thu Mar 19 11:10:38 1992
  283. --- version.c    Fri Aug 28 08:51:28 1992
  284. ***************
  285. *** 0 ****
  286. --- 1,20 ----
  287. + /*
  288. +  *  linux/version.c
  289. +  *
  290. +  *  Copyright (C) 1992  Theodore Ts'o
  291. +  *
  292. +  *  May be freely distributed as part of Linux.
  293. +  */
  294. + #include <linux/config.h>
  295. + #include <linux/utsname.h>
  296. + #include "./version.h"
  297. + struct new_utsname system_utsname = {
  298. +     UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION, UTS_MACHINE
  299. + };
  300. + char *linux_banner = 
  301. +     "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
  302. +     LINUX_COMPILE_HOST ") " UTS_VERSION " " LINUX_COMPILE_TIME " \n";
  303. *** /dev/null    Thu Mar 19 11:10:38 1992
  304. --- version.h    Fri Aug 28 12:06:02 1992
  305. ***************
  306. *** 0 ****
  307. --- 1,5 ----
  308. + #define UTS_RELEASE "0.97.pl2-25"
  309. + #define UTS_VERSION "08/28/92"
  310. + #define LINUX_COMPILE_TIME "12:06:01"
  311. + #define LINUX_COMPILE_BY "tytso"
  312. + #define LINUX_COMPILE_HOST "rt-11"
  313.