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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
--- MAKEDEV.orig 2003-03-09 08:12:11.000000000 +0200
+++ MAKEDEV 2003-03-09 08:26:25.000000000 +0200
@@ -260,48 +260,65 @@
# case `cvt $arg` in
case $arg in
generic)
- # pick the right generic-<arch> using dpkg's knowledge
- case `dpkg --print-installation-architecture` in
- alpha)
- $0 $opts generic-alpha
- ;;
- arm)
- $0 $opts generic-arm
- ;;
- hppa)
- $0 $opts generic-hppa
- ;;
- i386)
- $0 $opts generic-i386
- ;;
- ia64)
- $0 $opts generic-ia64
- ;;
- m68k)
- $0 $opts generic-m68k
- ;;
- mips)
- $0 $opts generic-mips
- ;;
- mipsel)
- $0 $opts generic-mipsel
- ;;
- powerpc)
- $0 $opts generic-powerpc
- ;;
- s390)
- $0 $opts generic-s390
- ;;
- sparc)
- $0 $opts generic-sparc
- ;;
- *)
- echo "$0: no support for generic on this arch" >&2
- exit 1
- ;;
- esac
+ if [ -n "`which dpkg 2> /dev/null`" ]
+ then
+ # pick the right generic-<arch> using dpkg's knowledge
+ case `dpkg --print-installation-architecture` in
+ alpha)
+ $0 $opts generic-alpha
+ ;;
+ arm)
+ $0 $opts generic-arm
+ ;;
+ hppa)
+ $0 $opts generic-hppa
+ ;;
+ i386)
+ $0 $opts generic-i386
+ ;;
+ ia64)
+ $0 $opts generic-ia64
+ ;;
+ m68k)
+ $0 $opts generic-m68k
+ ;;
+ mips)
+ $0 $opts generic-mips
+ ;;
+ mipsel)
+ $0 $opts generic-mipsel
+ ;;
+ powerpc)
+ $0 $opts generic-powerpc
+ ;;
+ s390)
+ $0 $opts generic-s390
+ ;;
+ sparc)
+ $0 $opts generic-sparc
+ ;;
+ *)
+ echo "$0: no support for generic on this arch" >&2
+ exit 1
+ ;;
+ esac
+ else
+ $0 $opts std
+ $0 $opts fd
+ $0 $opts fd0 fd1
+ $0 $opts hda hdb
+ $0 $opts xda xdb
+ $0 $opts sda sdb
+ $0 $opts pty
+ $0 $opts console
+ $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
+ $0 $opts busmice
+ $0 $opts lp
+ $0 $opts par
+ fi
;;
generic-alpha)
+ export MDARCH="alpha"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -321,6 +338,7 @@
$0 $opts fb
;;
generic-arm)
+ export MDARCH="arm"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -340,6 +358,7 @@
$0 $opts fb
;;
generic-hppa)
+ export MDARCH="hppa"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -358,6 +377,7 @@
$0 $opts rtc
;;
generic-i386)
+ export MDARCH="i386"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -380,6 +400,7 @@
$0 $opts lmscd sbpcd aztcd bpcd dac960 ida ataraid cciss
;;
generic-ia64)
+ export MDARCH="ia64"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -400,6 +421,7 @@
$0 $opts efirtc
;;
generic-m68k)
+ export MDARCH="m68k"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -418,6 +440,7 @@
$0 $opts fb
;;
generic-mips)
+ export MDARCH="mips"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -436,6 +459,7 @@
$0 $opts busmice
;;
generic-mipsel)
+ export MDARCH="mipsel"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -454,6 +478,7 @@
$0 $opts rtc
;;
generic-powerpc)
+ export MDARCH="powerpc"
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
@@ -478,6 +503,7 @@
$0 $opts isdn-io
;;
generic-s390)
+ export MDARCH="s390"
$0 $opts std
$0 $opts fd
$0 $opts dasda dasdb dasdc dasdd dasde dasdf dasdg dasdh \
@@ -489,6 +515,7 @@
$0 $opts rtc
;;
generic-sparc)
+ export MDARCH="sparc"
$0 $opts std
$0 $opts fd0-bare fd1-bare
$0 $opts hda hdb hdc hdd
@@ -601,8 +628,19 @@
done
;;
adb)
- # pick the right arch device using dpkg's knowledge
- case `dpkg --print-installation-architecture` in
+ myarch=
+
+ if [ -n "`which dpkg 2> /dev/null`" ]
+ then
+ # pick the right arch device using dpkg's knowledge
+ myarch="`dpkg --print-installation-architecture`"
+
+ elif [ -n "${MDARCH}" ]
+ then
+ myarch="${MDARCH}"
+ fi
+
+ case $myarch in
powerpc)
# ADB bus devices (char)
makedev adb c 56 0 $mouse
|