File: PORTING

package info (click to toggle)
sformat 3.4-3.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,044 kB
  • ctags: 3,434
  • sloc: ansic: 20,882; makefile: 102; sh: 100
file content (103 lines) | stat: -rw-r--r-- 2,833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Porting FAQ for SING (Schily Is Not Gnu) utilities.

-	The base for porting is the makefile system.
	Always look into:
		ftp://ftp.fokus.gmd.de/pub/unix/makefiles
	for the newest version.

	Then read the man pages located in man/man4/*

		to convert a manpage troff->postscript:
			gtroff -man file.tr | grops > file.ps
		to convert a manpage troff->Terminal:
			nroff -man file.tr | more -s


-	To be able to use the makefile system, you need a
	make program that meets the minimum requirements 
	for a make program (see makerules(4) man page)
	Currently, the following make programs meet this
	minimum requirements: Smake (my program), SunPro Make and Gmake


-	To be able to use the makefile system with gmake,
	the operating system must have a command named 'uname'.
	If not, you have to provide it as a shell script.


1)	First step for adding a new architecture is creating
	the appropriate rule files in the RULES directory:

		RULES/os-{newos}.id	For OS identification
		RULES/os-{newos}.def	For OS definition (man style)
		RULES/{newarch}-{newos}-cc.rul
		RULES/{newarch}-{newos}-gcc.rul

	And create a file:

		DEFAULTS/Defaults.{newos}

	Have a look in similar files for a template.

2)	All porting control is located in include/mconfig.h
	There is a checklist with comment at the beginning
	of the file and a template for a new system at the end of
	the file.

	Read the manuals of your operating system and have a look
	into the OS-supplied files in /usr/include to create 
	a new entry for your architecture.

	If some time, GNU autoconf will deal with all I need,
	this file will be created by autoconf.

	NOTE: in cdrecord-1.4 is a bug in mconfig.h
	the define HAVE_SYS_TIME_H is not included in the
	checklist and not included in the template.
	It may be important however.

3)	Everything should compile now.
	If not, try to hack the files and mail me your problems.

Notice for porting tools, that use the SCSI library:

I)	Cdrecord should compile at this moment if you are using
	a new architecture. The SCSI transport however will not work.
	Check this!


II)	Implementing a SCSI Transport Layer for your architecture:

	You need to add a new block into scsihack.c that will add
	support for your OS. Copy the block:

	#ifdef  __NEW_ARCHITECTURE
	#define SCSI_IMPL               /* We have a SCSI implementation for XXX */
	/*
	 * Add new hacks here
	 */
	#include "scsi-new-arch.c"
	#endif

	and rename __NEW_ARCHITECTURE to reflect your new architecture.

	Add a new file that will be called scsi-{newarch}.c
	Have a look into scsi-linux-sg.c for a template how to do this.


4)	Test your ported program.

5)	You may check other programs from me to see if everything compiles
	and works.

6)	Send me your changes

Joerg Schilling

schilling@fokus.gmd.de
joerg@schily.isdn.cs.tu-berlin.de
js@cs.tu-berlin.de