home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / minix / 4717 < prev    next >
Encoding:
Text File  |  1992-11-05  |  13.9 KB  |  383 lines

  1. Path: sparky!uunet!pipex!warwick!uknet!mcsun!sun4nl!relay.philips.nl!philce!meulenbr
  2. From: meulenbr@ce.philips.nl (Frans Meulenbroeks)
  3. Newsgroups: comp.os.minix
  4. Subject: atari 1.6.23 missing files (2)
  5. Message-ID: <1992Nov5.100106.27243@philce.ce.philips.nl>
  6. Date: 5 Nov 92 10:01:06 GMT
  7. Sender: usenet@philce.ce.philips.nl (USENET post news)
  8. Organization: Philips Consumer Electronics, Eindhoven
  9. Lines: 372
  10.  
  11. As promised here is a.out.h and minix/config.h
  12. You definitely want to glance through minix/config.h before using it.
  13. Look at the atari specific defines.
  14.  
  15. Enjoy!
  16.  
  17. Frans.
  18.  
  19. #!/bin/sh
  20. # This is a shell archive (shar 3.41)
  21. # made 11/05/1992 10:01 UTC by meulenbr@vdpsun6
  22. # Source directory /tmp_mnt/home/meulenbr/priv/minix/1.6.23
  23. #
  24. # existing files will NOT be overwritten unless -c is specified
  25. #
  26. # This shar contains:
  27. # length  mode       name
  28. # ------ ---------- ------------------------------------------
  29. #   3960 -rw-r--r-- include/a.out.h
  30. #   7856 -rw-r--r-- include/minix/config.h
  31. #
  32. # ============= include/a.out.h ==============
  33. if test ! -d 'include'; then
  34.     echo 'x - creating directory include'
  35.     mkdir 'include'
  36. fi
  37. if test -f 'include/a.out.h' -a X"$1" != X"-c"; then
  38.     echo 'x - skipping include/a.out.h (File already exists)'
  39. else
  40. echo 'x - extracting include/a.out.h (Text)'
  41. sed 's/^X//' << 'SHAR_EOF' > include/a.out.h &&
  42. /* The <a.out> header file describes the format of executable files. */
  43. X
  44. #ifndef _AOUT_H
  45. #define _AOUT_H
  46. X
  47. struct    exec {            /* a.out header */
  48. X  unsigned char    a_magic[2];    /* magic number */
  49. X  unsigned char    a_flags;    /* flags, see below */
  50. X  unsigned char    a_cpu;        /* cpu id */
  51. X  unsigned char    a_hdrlen;    /* length of header */
  52. X  unsigned char    a_unused;    /* reserved for future use */
  53. X  unsigned short a_version;    /* version stamp (not used at present) */
  54. X  long        a_text;        /* size of text segement in bytes */
  55. X  long        a_data;        /* size of data segment in bytes */
  56. X  long        a_bss;        /* size of bss segment in bytes */
  57. X  long        a_no_entry;    /* in fact: entry point, a_entry */
  58. X  long        a_total;    /* total memory allocated */
  59. X  long        a_syms;        /* size of symbol table */
  60. X
  61. X  /* SHORT FORM ENDS HERE */
  62. X  long        a_trsize;    /* text relocation size */
  63. X  long        a_drsize;    /* data relocation size */
  64. X  long        a_tbase;    /* text relocation base */
  65. X  long        a_dbase;    /* data relocation base */
  66. };
  67. X
  68. #define A_MAGIC0      (unsigned char) 0x01
  69. #define A_MAGIC1      (unsigned char) 0x03
  70. #define BADMAG(X)     ((X).a_magic[0] != A_MAGIC0 ||(X).a_magic[1] != A_MAGIC1)
  71. X
  72. /* CPU Id of TARGET machine (byte order coded in low order two bits) */
  73. #define A_NONE    0x00    /* unknown */
  74. #define A_I8086    0x04    /* intel i8086/8088 */
  75. #define A_M68K    0x0B    /* motorola m68000 */
  76. #define A_NS16K    0x0C    /* national semiconductor 16032 */
  77. #define A_I80386 0x10    /* intel i80386 */
  78. #define A_SPARC    0x17    /* Sun SPARC */
  79. X
  80. #define A_BLR(cputype)    ((cputype&0x01)!=0) /* TRUE if bytes left-to-right */
  81. #define A_WLR(cputype)    ((cputype&0x02)!=0) /* TRUE if words left-to-right */
  82. X
  83. /* Flags. */
  84. #define A_UZP    0x01    /* unmapped zero page (pages) */
  85. #define A_EXEC    0x10    /* executable */
  86. #define A_SEP    0x20    /* separate I/D */
  87. #define A_PURE    0x40    /* pure text */        /* not used */
  88. #define A_TOVLY    0x80    /* text overlay */    /* not used */
  89. X
  90. /* Offsets of various things. */
  91. #define A_MINHDR    32
  92. #define    A_TEXTPOS(X)    ((long)(X).a_hdrlen)
  93. #define A_DATAPOS(X)    (A_TEXTPOS(X) + (X).a_text)
  94. #define    A_HASRELS(X)    ((X).a_hdrlen > (unsigned char) A_MINHDR)
  95. #define A_HASEXT(X)    ((X).a_hdrlen > (unsigned char) (A_MINHDR +  8))
  96. #define A_HASLNS(X)    ((X).a_hdrlen > (unsigned char) (A_MINHDR + 16))
  97. #define A_HASTOFF(X)    ((X).a_hdrlen > (unsigned char) (A_MINHDR + 24))
  98. #define A_TRELPOS(X)    (A_DATAPOS(X) + (X).a_data)
  99. #define A_DRELPOS(X)    (A_TRELPOS(X) + (X).a_trsize)
  100. #define A_SYMPOS(X)    (A_TRELPOS(X) + (A_HASRELS(X) ? \
  101. X              ((X).a_trsize + (X).a_drsize) : 0))
  102. X
  103. struct reloc {
  104. X  long r_vaddr;            /* virtual address of reference */
  105. X  unsigned short r_symndx;    /* internal segnum or extern symbol num */
  106. X  unsigned short r_type;    /* relocation type */
  107. };
  108. X
  109. /* r_tyep values: */
  110. #define R_ABBS        0
  111. #define R_RELLBYTE    2
  112. #define R_PCRBYTE    3
  113. #define R_RELWORD    4
  114. #define R_PCRWORD    5
  115. #define R_RELLONG    6
  116. #define R_PCRLONG    7
  117. #define R_REL3BYTE    8
  118. #define R_KBRANCHE    9
  119. X
  120. /* r_symndx for internal segments */
  121. #define S_ABS        ((unsigned short)-1)
  122. #define S_TEXT        ((unsigned short)-2)
  123. #define S_DATA        ((unsigned short)-3)
  124. #define S_BSS        ((unsigned short)-4)
  125. X
  126. struct nlist {            /* symbol table entry */
  127. X  char n_name[8];        /* symbol name */
  128. X  long n_value;            /* value */
  129. X  unsigned char    n_sclass;    /* storage class */
  130. X  unsigned char    n_numaux;    /* number of auxiliary entries (not used) */
  131. X  unsigned short n_type;    /* language base and derived type (not used) */
  132. };
  133. X
  134. /* Low bits of storage class (section). */
  135. #define    N_SECT          07    /* section mask */
  136. #define N_UNDF          00    /* undefined */
  137. #define N_ABS          01    /* absolute */
  138. #define N_TEXT          02    /* text */
  139. #define N_DATA          03    /* data */
  140. #define    N_BSS          04    /* bss */
  141. #define N_COMM          05    /* (common) */
  142. X
  143. /* High bits of storage class. */
  144. #define N_CLASS        0370    /* storage class mask */
  145. #define C_NULL
  146. #define C_EXT        0020    /* external symbol */
  147. #define C_STAT        0030    /* static */
  148. X
  149. /* Function prototypes. */
  150. #ifndef _ANSI_H
  151. #include <ansi.h>
  152. #endif
  153. X
  154. _PROTOTYPE( int nlist, (char *file, struct nlist *nl)            );
  155. X
  156. #endif /* _AOUT_H */
  157. SHAR_EOF
  158. chmod 0644 include/a.out.h ||
  159. echo 'restore of include/a.out.h failed'
  160. Wc_c="`wc -c < include/a.out.h`"
  161. test 3960 -eq "$Wc_c" ||
  162.     echo 'include/a.out.h: original size 3960, current size' "$Wc_c"
  163. fi
  164. # ============= include/minix/config.h ==============
  165. if test ! -d 'include/minix'; then
  166.     echo 'x - creating directory include/minix'
  167.     mkdir 'include/minix'
  168. fi
  169. if test -f 'include/minix/config.h' -a X"$1" != X"-c"; then
  170.     echo 'x - skipping include/minix/config.h (File already exists)'
  171. else
  172. echo 'x - extracting include/minix/config.h (Text)'
  173. sed 's/^X//' << 'SHAR_EOF' > include/minix/config.h &&
  174. #ifndef _CONFIG_H
  175. #define _CONFIG_H
  176. X
  177. /* This file sets configuration parameters for the MINIX kernel, FS, and MM.
  178. X * It is divided up into two main sections.  The first section contains
  179. X * user-settable parameters.  In the second section, various internal system
  180. X * parameters are set based on the user-settable parameters.
  181. X */
  182. X
  183. /*===========================================================================*
  184. X *        This section contains user-settable parameters             *
  185. X *===========================================================================*/
  186. #define MACHINE        ATARI    /* Must be one of the names listed below */
  187. X
  188. #define IBM_PC             1    /* any  8088 or 80x86-based system */
  189. #define IBM_386_VM         2    /* any 386 (486) with virtual memory enabled */
  190. #define SUN_4             40    /* any Sun SPARC-based system */
  191. #define SUN_4_60      40    /* Sun-4/60 (aka SparcStation 1 or Campus) */
  192. #define ATARI             60    /* ATARI ST/STe/TT (68000/68030) */
  193. #define AMIGA             61    /* Commodore Amiga (68000) */
  194. #define MACINTOSH         62    /* Apple Macintosh (68000) */
  195. X
  196. X
  197. /* If ROBUST is set to 1, writes of i-node, directory, and indirect blocks
  198. X * from the cache happen as soon as the blocks are modified.  This gives a more
  199. X * robust, but slower, file system.  If it is set to 0, these blocks are not
  200. X * given any special treatment, which may cause problems if the system crashes.
  201. X */
  202. #define ROBUST             0    /* 0 for speed, 1 for robustness */
  203. X
  204. /* if SCREEN is set to 1 graphical screen operations are possible */
  205. #define SCREEN             1    
  206. X
  207. /* The buffer cache should be made as large as you can afford. */
  208. #if INTEL_32BITS
  209. #define NR_BUFS          320    /* # blocks in the buffer cache */
  210. #define NR_BUF_HASH      512    /* size of buf hash table; MUST BE POWER OF 2*/
  211. #endif
  212. X
  213. #if (MACHINE == SUN_4_60)
  214. #define NR_BUFS         512    /* # blocks in the buffer cache (<=1536) */
  215. #define NR_BUF_HASH     512    /* size of buf hash table; MUST BE POWER OF 2*/
  216. #endif
  217. X
  218. #if (MACHINE == ATARI)
  219. #define NR_BUFS        1536    /* # blocks in the buffer cache (<=1536) */
  220. #define NR_BUF_HASH    2048    /* size of buf hash table; MUST BE POWER OF 2*/
  221. #endif
  222. X
  223. #ifndef NR_BUFS
  224. #define NR_BUFS           40    /* # blocks in the buffer cache */
  225. #define NR_BUF_HASH       64    /* size of buf hash table; MUST BE POWER OF 2*/
  226. #endif
  227. X
  228. /* The number of map slots determines how big a disk partition can be.
  229. X * Each I_MAP_SLOT allows 8K files; each Z_MAP_SLOT allows 8M of data.
  230. X */
  231. #define I_MAP_SLOTS        8    /* max # of blocks in the inode bit map */
  232. #define Z_MAP_SLOTS       16    /* max # of blocks in the zone bit map */
  233. X
  234. /* Defines for kernel configuration. */
  235. #define AUTO_BIOS          0    /* xt_wini.c - use Western's autoconfig BIOS */
  236. #define C_RS232_INT_HANDLERS 0    /* rs232.c - use slower C int handlers */
  237. #define DEFAULT_CLASS      0    /* floppy.c - 3 or 5 to get only that size */
  238. #define LINEWRAP           0    /* console.c - wrap lines at column 80 */
  239. #define KEYBOARD_84        1    /* set to 1 to swap CTRL & CAPSLOCK keys */
  240. #define NO_HANDSHAKE       1    /* rs232.c - don't use CTS/RTS handshaking */
  241. #define ENABLE_NETWORKING  0    /* enable TCP/IP code */
  242. #define ALLOW_GAP_MESSAGES 1    /* proc.c - allow messages in the gap between
  243. X                 * the end of bss and lowest stack address */
  244. /* Determine which device to use for pipes. */
  245. #define PIPE_DEV    ROOT_DEV    /* put pipes on root device */
  246. X
  247. /* These configuration defines control debugging and unfinished code. */
  248. #define FLOPPY_TIMING      0    /* floppy.c - for fine tuning floppy driver */
  249. #define MONITOR           0    /* xt_wini.c - monitor loop in w_wait_int */
  250. #define RECORD_FLOPPY_SKEW 0    /* floppy.c - for deciding nr_sectors */
  251. X
  252. /* These configuration defines control worthless code. */
  253. #define SPARE_VIDEO_MEMORY 0    /* misc.c - use memory from any 2nd vid card */
  254. #define SPLIMITS           0    /* mpx*.x - set stack limits (never checked) */
  255. X
  256. /* NR_CONS and NR_RS_LINES determine number of consoles and RS232 lines. */
  257. #define NR_CONS            2    /* how many consoles can system handle */
  258. #define    NR_RS_LINES       1    /* how many rs232 terminals can system handle*/
  259. X
  260. #if (MACHINE == ATARI)
  261. /* The next define says if you have an ATARI ST or TT */
  262. #define ATARI_TYPE      TT
  263. #define ST           1    /* all ST's and Mega ST's */
  264. #define STE           2    /* all STe and Mega STe's */
  265. #define TT           3
  266. X
  267. /* This define says whether the keyboard generates VT100 or IBM_PC escapes. */
  268. #define KEYBOARD       VT100    /* either VT100 or IBM_PC */
  269. #define VT100         100
  270. X
  271. /* The next define determines the kind of partitioning. */
  272. #define PARTITIONING   SUPRA    /* one of the following or ATARI */
  273. #define SUPRA           1    /*ICD, SUPRA and BMS are all the same */
  274. #define BMS           1
  275. #define ICD           1
  276. #define CBHD           2
  277. #define EICKMANN       3
  278. X
  279. /* Define the number of hard disk drives on your system. */
  280. #define NR_ACSI_DRIVES       3    /* typically 0 or 1 */
  281. #define NR_SCSI_DRIVES       1    /* typically 0 (ST, STe) or 1 (TT) */
  282. X
  283. /* Some systems need to have a little delay after each winchester
  284. X * commands. These systems need FAST_DISK set to 0. Other disks do not
  285. X * need this delay, and thus can have FAST_DISK set to 1 to avoid this delay.
  286. X */
  287. #define FAST_DISK       1    /* 0 or 1 */
  288. X
  289. /* Note: if you want to make your kernel smaller, you can set NR_FD_DRIVES
  290. X * to 0. You will still be able to boot minix.img from floppy. However, you
  291. X * MUST fetch both the root and usr filesystem from a hard disk
  292. X */
  293. X
  294. /* Define the number of floppy disk drives on your system. */
  295. #define NR_FD_DRIVES       1    /* 0, 1, 2 */
  296. X
  297. /* This configuration define controls parallel printer code. */
  298. #define PAR_PRINTER       1    /* disable (0) / enable (1) parallel printer */
  299. X
  300. /* This configuration define controls disk controller clock code. */
  301. #define HD_CLOCK       1    /* disable (0) / enable (1) hard disk clock */
  302. X
  303. #endif
  304. X
  305. X
  306. /*===========================================================================*
  307. X *    There are no user-settable parameters after this line             *
  308. X *===========================================================================*/
  309. /* Set the CHIP type based on the machine selected. The symbol CHIP is actually
  310. X * indicative of more than just the CPU.  For example, machines for which
  311. X * CHIP == INTEL are expected to have 8259A interrrupt controllers and the
  312. X * other properties of IBM PC/XT/AT/386 types machines in general. */
  313. #define INTEL             1    /* CHIP type for PC, XT, AT, 386 and clones */
  314. #define M68000            2    /* CHIP type for Atari, Amiga, Macintosh    */
  315. #define SPARC             3    /* CHIP type for SUN-4 (e.g. SPARCstation)  */
  316. X
  317. /* Set the FP_FORMAT type based on the machine selected, either hw or sw    */
  318. #define FP_NONE          0    /* no floating point support                */
  319. #define FP_IEEE          1    /* conform IEEE floating point standard     */
  320. X
  321. #if (MACHINE == IBM_PC)
  322. #define CHIP          INTEL
  323. #define SHADOWING      0
  324. #endif
  325. X
  326. #if (MACHINE == ATARI) || (MACHINE == AMIGA) || (MACHINE == MACINTOSH)
  327. #define CHIP         M68000
  328. #define SHADOWING      1
  329. #endif
  330. X
  331. #if (MACHINE == SUN_4) || (MACHINE == SUN_4_60)
  332. #define CHIP          SPARC
  333. #define FP_FORMAT   FP_IEEE
  334. #define SHADOWING      0
  335. #endif
  336. X
  337. #if (MACHINE == ATARI) || (MACHINE == SUN_4)
  338. #define ASKDEV            1    /* ask for boot device */
  339. #define FASTLOAD          1    /* use multiple block transfers to init ram */
  340. #endif
  341. X
  342. #if (ATARI_TYPE == TT) /* and all other 68030's */
  343. #define FPP
  344. #undef SHADOWING
  345. #define SHADOWING 0
  346. #endif
  347. X
  348. #ifndef FP_FORMAT
  349. #define FP_FORMAT   FP_NONE
  350. #endif
  351. X
  352. /* The file buf.h uses MAYBE_WRITE_IMMED. */
  353. #if ROBUST
  354. #define MAYBE_WRITE_IMMED  WRITE_IMMED    /* slower but perhaps safer */
  355. #else
  356. #define MAYBE_WRITE_IMMED 0        /* faster */
  357. #endif
  358. X
  359. #ifndef MACHINE
  360. error "In <minix/config.h> please define MACHINE"
  361. #endif
  362. X
  363. #ifndef CHIP
  364. error "In <minix/config.h> please define MACHINE to have a legal value"
  365. #endif
  366. X
  367. #if (MACHINE == 0)
  368. error "MACHINE has incorrect value (0)"
  369. #endif
  370. X
  371. #endif /* _CONFIG_H */
  372. SHAR_EOF
  373. chmod 0644 include/minix/config.h ||
  374. echo 'restore of include/minix/config.h failed'
  375. Wc_c="`wc -c < include/minix/config.h`"
  376. test 7856 -eq "$Wc_c" ||
  377.     echo 'include/minix/config.h: original size 7856, current size' "$Wc_c"
  378. fi
  379. exit 0
  380. --
  381. Frans Meulenbroeks        Philips Research Laboratories
  382. preferred email address:     meulenbr@prl.philips.nl
  383.