PROTO= proto
# Common to all architectures
-ETC= system.conf master.passwd
+ETC= system.conf master.passwd group
EXTRA= rc
-PROTO_FILES= proto.common.etc proto.common.dynamic proto.dev
+PROTO_FILES= proto.common.etc proto.common.dynamic
PROG_DRIVERS=
PROG_COMMANDS= mount umount grep fsck.mfs sh service loadramdisk sysenv
PROG_SERVERS= input mfs procfs
# LSC We have to take care of not erasing the source file, so never add EXTRA
# to CLEANFILES
-CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${ETC} image image.c t proto.gen
-CLEANFILES += ${LIBRARIES}
+CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${ETC} image image.c t
+CLEANFILES += proto.gen proto.dev proto.dev.mtree
CLEANFILES += ${PROG_LIBEXEC}
CLEANFILES += ${.OBJDIR}/etc/*
TOOL_PWD_MKDB?= ${NETBSDSRCDIR}/usr.sbin/pwd_mkdb/pwd_mkdb
# Remove "drivers/ramdisk" component from path
-PROGROOT:= ${.OBJDIR:S,drivers/ramdisk,,}
+PROGROOT:= ${.OBJDIR:S,/drivers/ramdisk,,}
# Generate dependencies rules for config files
.for etc in ${ETC}
.endfor # prog
.endfor # srcdir
-image: proto.gen ${ETC} ${EXTRA} pwd.db spwd.db passwd
+realall image: proto.gen ${ETC} ${EXTRA} pwd.db spwd.db passwd group
${_MKMSG_CREATE} "Generating ramdisk image"
${TOOL_MKFSMFS} image proto.gen || { rm -f image; false; }
# if fsck.mfs -s image | grep -q CLEAN; \
pwd.db spwd.db passwd: etc/master.passwd
${INSTALL} etc/${@F} ${@F}
-proto.gen: ${PROTO} ${PROTO_FILES} ${PROGRAMS}
+proto.dev.mtree:
+ @echo ". type=dir uname=root gname=operator mode=0755" \
+ >${.TARGET}.tmp && \
+ echo "./dev type=dir uname=root gname=operator mode=0755" \
+ >>${.TARGET}.tmp && \
+ ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -m -r \
+ >> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
+
+# We have to remove the two first entries of the generated proto file, as
+# well as the two last ones (closing $).
+# Do not forget to double $ so that make doesn't try to expand it.
+proto.dev: proto.dev.mtree pwd.db spwd.db passwd group
+ ${TOOL_MTREE} -f ${.TARGET}.mtree -N ${.OBJDIR} -C -K device | \
+ ${TOOL_TOPROTO} | ${TOOL_SED} -e '1,4d' | \
+ ${TOOL_SED} -e '$$d' |${TOOL_SED} -e '$$d' > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+proto.gen: ${PROTO} ${PROTO_FILES} proto.dev ${PROGRAMS}
${STRIP} ${PROGRAMS}
# We are using the c preprocessor to generate proto.gen
# used in the mkfs tool.
${TOOL_CAT} ${PROTO} | ${CC} \
${RAMDISK_DEFINES} \
- -E - | grep -v "^$$" | grep -v "#" >${.OBJDIR}/${.TARGET}
+ -E - | grep -v "^$$" | grep -v "#" >${.TARGET}
.include <minix.service.mk>
+++ /dev/null
- boot b--600 0 8 1 4
- c0d0 b--600 0 0 3 0
- c0d0p0 b--600 0 0 3 1
- c0d0p0s0 b--600 0 0 3 128
- c0d0p0s1 b--600 0 0 3 129
- c0d0p0s2 b--600 0 0 3 130
- c0d0p0s3 b--600 0 0 3 131
- c0d0p1 b--600 0 0 3 2
- c0d0p1s0 b--600 0 0 3 132
- c0d0p1s1 b--600 0 0 3 133
- c0d0p1s2 b--600 0 0 3 134
- c0d0p1s3 b--600 0 0 3 135
- c0d0p2 b--600 0 0 3 3
- c0d0p2s0 b--600 0 0 3 136
- c0d0p2s1 b--600 0 0 3 137
- c0d0p2s2 b--600 0 0 3 138
- c0d0p2s3 b--600 0 0 3 139
- c0d0p3 b--600 0 0 3 4
- c0d0p3s0 b--600 0 0 3 140
- c0d0p3s1 b--600 0 0 3 141
- c0d0p3s2 b--600 0 0 3 142
- c0d0p3s3 b--600 0 0 3 143
- c0d1 b--600 0 0 3 5
- c0d1p0 b--600 0 0 3 6
- c0d1p0s0 b--600 0 0 3 144
- c0d1p0s1 b--600 0 0 3 145
- c0d1p0s2 b--600 0 0 3 146
- c0d1p0s3 b--600 0 0 3 147
- c0d1p1 b--600 0 0 3 7
- c0d1p1s0 b--600 0 0 3 148
- c0d1p1s1 b--600 0 0 3 149
- c0d1p1s2 b--600 0 0 3 150
- c0d1p1s3 b--600 0 0 3 151
- c0d1p2 b--600 0 0 3 8
- c0d1p2s0 b--600 0 0 3 152
- c0d1p2s1 b--600 0 0 3 153
- c0d1p2s2 b--600 0 0 3 154
- c0d1p2s3 b--600 0 0 3 155
- c0d1p3 b--600 0 0 3 9
- c0d1p3s0 b--600 0 0 3 156
- c0d1p3s1 b--600 0 0 3 157
- c0d1p3s2 b--600 0 0 3 158
- c0d1p3s3 b--600 0 0 3 159
- c0d2 b--600 0 0 3 10
- c0d2p0 b--600 0 0 3 11
- c0d2p0s0 b--600 0 0 3 160
- c0d2p0s1 b--600 0 0 3 161
- c0d2p0s2 b--600 0 0 3 162
- c0d2p0s3 b--600 0 0 3 163
- c0d2p1 b--600 0 0 3 12
- c0d2p1s0 b--600 0 0 3 164
- c0d2p1s1 b--600 0 0 3 165
- c0d2p1s2 b--600 0 0 3 166
- c0d2p1s3 b--600 0 0 3 167
- c0d2p2 b--600 0 0 3 13
- c0d2p2s0 b--600 0 0 3 168
- c0d2p2s1 b--600 0 0 3 169
- c0d2p2s2 b--600 0 0 3 170
- c0d2p2s3 b--600 0 0 3 171
- c0d2p3 b--600 0 0 3 14
- c0d2p3s0 b--600 0 0 3 172
- c0d2p3s1 b--600 0 0 3 173
- c0d2p3s2 b--600 0 0 3 174
- c0d2p3s3 b--600 0 0 3 175
- c0d3 b--600 0 0 3 15
- c0d3p0 b--600 0 0 3 16
- c0d3p0s0 b--600 0 0 3 176
- c0d3p0s1 b--600 0 0 3 177
- c0d3p0s2 b--600 0 0 3 178
- c0d3p0s3 b--600 0 0 3 179
- c0d3p1 b--600 0 0 3 17
- c0d3p1s0 b--600 0 0 3 180
- c0d3p1s1 b--600 0 0 3 181
- c0d3p1s2 b--600 0 0 3 182
- c0d3p1s3 b--600 0 0 3 183
- c0d3p2 b--600 0 0 3 18
- c0d3p2s0 b--600 0 0 3 184
- c0d3p2s1 b--600 0 0 3 185
- c0d3p2s2 b--600 0 0 3 186
- c0d3p2s3 b--600 0 0 3 187
- c0d3p3 b--600 0 0 3 19
- c0d3p3s0 b--600 0 0 3 188
- c0d3p3s1 b--600 0 0 3 189
- c0d3p3s2 b--600 0 0 3 190
- c0d3p3s3 b--600 0 0 3 191
- c0d4 b--600 0 0 3 20
- c0d4p0 b--600 0 0 3 21
- c0d4p0s0 b--600 0 0 3 192
- c0d4p0s1 b--600 0 0 3 193
- c0d4p0s2 b--600 0 0 3 194
- c0d4p0s3 b--600 0 0 3 195
- c0d4p1 b--600 0 0 3 22
- c0d4p1s0 b--600 0 0 3 196
- c0d4p1s1 b--600 0 0 3 197
- c0d4p1s2 b--600 0 0 3 198
- c0d4p1s3 b--600 0 0 3 199
- c0d4p2 b--600 0 0 3 23
- c0d4p2s0 b--600 0 0 3 200
- c0d4p2s1 b--600 0 0 3 201
- c0d4p2s2 b--600 0 0 3 202
- c0d4p2s3 b--600 0 0 3 203
- c0d4p3 b--600 0 0 3 24
- c0d4p3s0 b--600 0 0 3 204
- c0d4p3s1 b--600 0 0 3 205
- c0d4p3s2 b--600 0 0 3 206
- c0d4p3s3 b--600 0 0 3 207
- c0d5 b--600 0 0 3 25
- c0d5p0 b--600 0 0 3 26
- c0d5p0s0 b--600 0 0 3 208
- c0d5p0s1 b--600 0 0 3 209
- c0d5p0s2 b--600 0 0 3 210
- c0d5p0s3 b--600 0 0 3 211
- c0d5p1 b--600 0 0 3 27
- c0d5p1s0 b--600 0 0 3 212
- c0d5p1s1 b--600 0 0 3 213
- c0d5p1s2 b--600 0 0 3 214
- c0d5p1s3 b--600 0 0 3 215
- c0d5p2 b--600 0 0 3 28
- c0d5p2s0 b--600 0 0 3 216
- c0d5p2s1 b--600 0 0 3 217
- c0d5p2s2 b--600 0 0 3 218
- c0d5p2s3 b--600 0 0 3 219
- c0d5p3 b--600 0 0 3 29
- c0d5p3s0 b--600 0 0 3 220
- c0d5p3s1 b--600 0 0 3 221
- c0d5p3s2 b--600 0 0 3 222
- c0d5p3s3 b--600 0 0 3 223
- c0d6 b--600 0 0 3 30
- c0d6p0 b--600 0 0 3 31
- c0d6p0s0 b--600 0 0 3 224
- c0d6p0s1 b--600 0 0 3 225
- c0d6p0s2 b--600 0 0 3 226
- c0d6p0s3 b--600 0 0 3 227
- c0d6p1 b--600 0 0 3 32
- c0d6p1s0 b--600 0 0 3 228
- c0d6p1s1 b--600 0 0 3 229
- c0d6p1s2 b--600 0 0 3 230
- c0d6p1s3 b--600 0 0 3 231
- c0d6p2 b--600 0 0 3 33
- c0d6p2s0 b--600 0 0 3 232
- c0d6p2s1 b--600 0 0 3 233
- c0d6p2s2 b--600 0 0 3 234
- c0d6p2s3 b--600 0 0 3 235
- c0d6p3 b--600 0 0 3 34
- c0d6p3s0 b--600 0 0 3 236
- c0d6p3s1 b--600 0 0 3 237
- c0d6p3s2 b--600 0 0 3 238
- c0d6p3s3 b--600 0 0 3 239
- c0d7 b--600 0 0 3 35
- c0d7p0 b--600 0 0 3 36
- c0d7p0s0 b--600 0 0 3 240
- c0d7p0s1 b--600 0 0 3 241
- c0d7p0s2 b--600 0 0 3 242
- c0d7p0s3 b--600 0 0 3 243
- c0d7p1 b--600 0 0 3 37
- c0d7p1s0 b--600 0 0 3 244
- c0d7p1s1 b--600 0 0 3 245
- c0d7p1s2 b--600 0 0 3 246
- c0d7p1s3 b--600 0 0 3 247
- c0d7p2 b--600 0 0 3 38
- c0d7p2s0 b--600 0 0 3 248
- c0d7p2s1 b--600 0 0 3 249
- c0d7p2s2 b--600 0 0 3 250
- c0d7p2s3 b--600 0 0 3 251
- c0d7p3 b--600 0 0 3 39
- c0d7p3s0 b--600 0 0 3 252
- c0d7p3s1 b--600 0 0 3 253
- c0d7p3s2 b--600 0 0 3 254
- c0d7p3s3 b--600 0 0 3 255
- c1d0 b--600 0 0 8 0
- c1d0p0 b--600 0 0 8 1
- c1d0p0s0 b--600 0 0 8 128
- c1d0p0s1 b--600 0 0 8 129
- c1d0p0s2 b--600 0 0 8 130
- c1d0p0s3 b--600 0 0 8 131
- c1d0p1 b--600 0 0 8 2
- c1d0p1s0 b--600 0 0 8 132
- c1d0p1s1 b--600 0 0 8 133
- c1d0p1s2 b--600 0 0 8 134
- c1d0p1s3 b--600 0 0 8 135
- c1d0p2 b--600 0 0 8 3
- c1d0p2s0 b--600 0 0 8 136
- c1d0p2s1 b--600 0 0 8 137
- c1d0p2s2 b--600 0 0 8 138
- c1d0p2s3 b--600 0 0 8 139
- c1d0p3 b--600 0 0 8 4
- c1d0p3s0 b--600 0 0 8 140
- c1d0p3s1 b--600 0 0 8 141
- c1d0p3s2 b--600 0 0 8 142
- c1d0p3s3 b--600 0 0 8 143
- c1d1 b--600 0 0 8 5
- c1d1p0 b--600 0 0 8 6
- c1d1p0s0 b--600 0 0 8 144
- c1d1p0s1 b--600 0 0 8 145
- c1d1p0s2 b--600 0 0 8 146
- c1d1p0s3 b--600 0 0 8 147
- c1d1p1 b--600 0 0 8 7
- c1d1p1s0 b--600 0 0 8 148
- c1d1p1s1 b--600 0 0 8 149
- c1d1p1s2 b--600 0 0 8 150
- c1d1p1s3 b--600 0 0 8 151
- c1d1p2 b--600 0 0 8 8
- c1d1p2s0 b--600 0 0 8 152
- c1d1p2s1 b--600 0 0 8 153
- c1d1p2s2 b--600 0 0 8 154
- c1d1p2s3 b--600 0 0 8 155
- c1d1p3 b--600 0 0 8 9
- c1d1p3s0 b--600 0 0 8 156
- c1d1p3s1 b--600 0 0 8 157
- c1d1p3s2 b--600 0 0 8 158
- c1d1p3s3 b--600 0 0 8 159
- c1d2 b--600 0 0 8 10
- c1d2p0 b--600 0 0 8 11
- c1d2p0s0 b--600 0 0 8 160
- c1d2p0s1 b--600 0 0 8 161
- c1d2p0s2 b--600 0 0 8 162
- c1d2p0s3 b--600 0 0 8 163
- c1d2p1 b--600 0 0 8 12
- c1d2p1s0 b--600 0 0 8 164
- c1d2p1s1 b--600 0 0 8 165
- c1d2p1s2 b--600 0 0 8 166
- c1d2p1s3 b--600 0 0 8 167
- c1d2p2 b--600 0 0 8 13
- c1d2p2s0 b--600 0 0 8 168
- c1d2p2s1 b--600 0 0 8 169
- c1d2p2s2 b--600 0 0 8 170
- c1d2p2s3 b--600 0 0 8 171
- c1d2p3 b--600 0 0 8 14
- c1d2p3s0 b--600 0 0 8 172
- c1d2p3s1 b--600 0 0 8 173
- c1d2p3s2 b--600 0 0 8 174
- c1d2p3s3 b--600 0 0 8 175
- c1d3 b--600 0 0 8 15
- c1d3p0 b--600 0 0 8 16
- c1d3p0s0 b--600 0 0 8 176
- c1d3p0s1 b--600 0 0 8 177
- c1d3p0s2 b--600 0 0 8 178
- c1d3p0s3 b--600 0 0 8 179
- c1d3p1 b--600 0 0 8 17
- c1d3p1s0 b--600 0 0 8 180
- c1d3p1s1 b--600 0 0 8 181
- c1d3p1s2 b--600 0 0 8 182
- c1d3p1s3 b--600 0 0 8 183
- c1d3p2 b--600 0 0 8 18
- c1d3p2s0 b--600 0 0 8 184
- c1d3p2s1 b--600 0 0 8 185
- c1d3p2s2 b--600 0 0 8 186
- c1d3p2s3 b--600 0 0 8 187
- c1d3p3 b--600 0 0 8 19
- c1d3p3s0 b--600 0 0 8 188
- c1d3p3s1 b--600 0 0 8 189
- c1d3p3s2 b--600 0 0 8 190
- c1d3p3s3 b--600 0 0 8 191
- c1d4 b--600 0 0 8 20
- c1d4p0 b--600 0 0 8 21
- c1d4p0s0 b--600 0 0 8 192
- c1d4p0s1 b--600 0 0 8 193
- c1d4p0s2 b--600 0 0 8 194
- c1d4p0s3 b--600 0 0 8 195
- c1d4p1 b--600 0 0 8 22
- c1d4p1s0 b--600 0 0 8 196
- c1d4p1s1 b--600 0 0 8 197
- c1d4p1s2 b--600 0 0 8 198
- c1d4p1s3 b--600 0 0 8 199
- c1d4p2 b--600 0 0 8 23
- c1d4p2s0 b--600 0 0 8 200
- c1d4p2s1 b--600 0 0 8 201
- c1d4p2s2 b--600 0 0 8 202
- c1d4p2s3 b--600 0 0 8 203
- c1d4p3 b--600 0 0 8 24
- c1d4p3s0 b--600 0 0 8 204
- c1d4p3s1 b--600 0 0 8 205
- c1d4p3s2 b--600 0 0 8 206
- c1d4p3s3 b--600 0 0 8 207
- c1d5 b--600 0 0 8 25
- c1d5p0 b--600 0 0 8 26
- c1d5p0s0 b--600 0 0 8 208
- c1d5p0s1 b--600 0 0 8 209
- c1d5p0s2 b--600 0 0 8 210
- c1d5p0s3 b--600 0 0 8 211
- c1d5p1 b--600 0 0 8 27
- c1d5p1s0 b--600 0 0 8 212
- c1d5p1s1 b--600 0 0 8 213
- c1d5p1s2 b--600 0 0 8 214
- c1d5p1s3 b--600 0 0 8 215
- c1d5p2 b--600 0 0 8 28
- c1d5p2s0 b--600 0 0 8 216
- c1d5p2s1 b--600 0 0 8 217
- c1d5p2s2 b--600 0 0 8 218
- c1d5p2s3 b--600 0 0 8 219
- c1d5p3 b--600 0 0 8 29
- c1d5p3s0 b--600 0 0 8 220
- c1d5p3s1 b--600 0 0 8 221
- c1d5p3s2 b--600 0 0 8 222
- c1d5p3s3 b--600 0 0 8 223
- c1d6 b--600 0 0 8 30
- c1d6p0 b--600 0 0 8 31
- c1d6p0s0 b--600 0 0 8 224
- c1d6p0s1 b--600 0 0 8 225
- c1d6p0s2 b--600 0 0 8 226
- c1d6p0s3 b--600 0 0 8 227
- c1d6p1 b--600 0 0 8 32
- c1d6p1s0 b--600 0 0 8 228
- c1d6p1s1 b--600 0 0 8 229
- c1d6p1s2 b--600 0 0 8 230
- c1d6p1s3 b--600 0 0 8 231
- c1d6p2 b--600 0 0 8 33
- c1d6p2s0 b--600 0 0 8 232
- c1d6p2s1 b--600 0 0 8 233
- c1d6p2s2 b--600 0 0 8 234
- c1d6p2s3 b--600 0 0 8 235
- c1d6p3 b--600 0 0 8 34
- c1d6p3s0 b--600 0 0 8 236
- c1d6p3s1 b--600 0 0 8 237
- c1d6p3s2 b--600 0 0 8 238
- c1d6p3s3 b--600 0 0 8 239
- c1d7 b--600 0 0 8 35
- c1d7p0 b--600 0 0 8 36
- c1d7p0s0 b--600 0 0 8 240
- c1d7p0s1 b--600 0 0 8 241
- c1d7p0s2 b--600 0 0 8 242
- c1d7p0s3 b--600 0 0 8 243
- c1d7p1 b--600 0 0 8 37
- c1d7p1s0 b--600 0 0 8 244
- c1d7p1s1 b--600 0 0 8 245
- c1d7p1s2 b--600 0 0 8 246
- c1d7p1s3 b--600 0 0 8 247
- c1d7p2 b--600 0 0 8 38
- c1d7p2s0 b--600 0 0 8 248
- c1d7p2s1 b--600 0 0 8 249
- c1d7p2s2 b--600 0 0 8 250
- c1d7p2s3 b--600 0 0 8 251
- c1d7p3 b--600 0 0 8 39
- c1d7p3s0 b--600 0 0 8 252
- c1d7p3s1 b--600 0 0 8 253
- c1d7p3s2 b--600 0 0 8 254
- c1d7p3s3 b--600 0 0 8 255
- console c--600 0 0 4 0
- eth c--600 0 0 7 1
- eth0 c--600 0 0 7 1
- fb0 c--644 0 0 19 0
- fbd b--600 0 0 14 0
- fd0 b--666 0 0 2 0
- fd0p0 b--666 0 0 2 112
- fd0p1 b--666 0 0 2 116
- fd0p2 b--666 0 0 2 120
- fd0p3 b--666 0 0 2 124
- fd1 b--666 0 0 2 1
- fd1p0 b--666 0 0 2 113
- fd1p1 b--666 0 0 2 117
- fd1p2 b--666 0 0 2 121
- fd1p3 b--666 0 0 2 125
- filter b--600 0 0 11 0
- hello c--644 0 0 17 0
- imgrd b--600 0 8 1 6
- ip c--600 0 0 7 2
- ip0 c--600 0 0 7 2
- kbdmux c--600 0 0 64 0
- kbd0 c--600 0 0 64 1
- kbd1 c--600 0 0 64 2
- kbd2 c--600 0 0 64 3
- kbd3 c--600 0 0 64 4
- klog c--600 0 0 15 0
- kmem c--640 0 8 1 2
- log c--222 0 0 4 15
- lp c--200 1 1 6 0
- mem c--640 0 8 1 1
- mousemux c--600 0 0 64 64
- mouse0 c--600 0 0 64 65
- mouse1 c--600 0 0 64 66
- mouse2 c--600 0 0 64 67
- mouse3 c--600 0 0 64 68
- null c--666 0 8 1 3
- ptyp0 c--666 0 4 4 192
- ptyp1 c--666 0 4 4 193
- ptyp2 c--666 0 4 4 194
- ptyp3 c--666 0 4 4 195
- ptyp4 c--666 0 4 4 196
- ptyp5 c--666 0 4 4 197
- ptyp6 c--666 0 4 4 198
- ptyp7 c--666 0 4 4 199
- ptyp8 c--666 0 4 4 200
- ptyp9 c--666 0 4 4 201
- ptypa c--666 0 4 4 202
- ptypb c--666 0 4 4 203
- ptypc c--666 0 4 4 204
- ptypd c--666 0 4 4 205
- ptype c--666 0 4 4 206
- ptypf c--666 0 4 4 207
- ptyq0 c--666 0 4 4 208
- ptyq1 c--666 0 4 4 209
- ptyq2 c--666 0 4 4 210
- ptyq3 c--666 0 4 4 211
- ptyq4 c--666 0 4 4 212
- ptyq5 c--666 0 4 4 213
- ptyq6 c--666 0 4 4 214
- ptyq7 c--666 0 4 4 215
- ptyq8 c--666 0 4 4 216
- ptyq9 c--666 0 4 4 217
- ptyqa c--666 0 4 4 218
- ptyqb c--666 0 4 4 219
- ptyqc c--666 0 4 4 220
- ptyqd c--666 0 4 4 221
- ptyqe c--666 0 4 4 222
- ptyqf c--666 0 4 4 223
- ram b--600 0 8 1 0
- ram0 b--600 0 8 1 7
- ram1 b--600 0 8 1 8
- ram2 b--600 0 8 1 9
- ram3 b--600 0 8 1 10
- ram4 b--600 0 8 1 11
- ram5 b--600 0 8 1 12
- random c--644 0 0 16 0
- tcp c--666 0 0 7 3
- tcp0 c--666 0 0 7 3
- tty c--666 0 0 5 0
- tty00 c--666 0 4 4 16
- tty01 c--666 0 4 4 17
- tty02 c--666 0 4 4 18
- tty03 c--666 0 4 4 19
- ttyc1 c--600 0 0 4 1
- ttyc2 c--600 0 0 4 2
- ttyc3 c--600 0 0 4 3
- ttyp0 c--620 0 4 4 128
- ttyp1 c--666 0 4 4 129
- ttyp2 c--666 0 4 4 130
- ttyp3 c--666 0 4 4 131
- ttyp4 c--666 0 4 4 132
- ttyp5 c--666 0 4 4 133
- ttyp6 c--666 0 4 4 134
- ttyp7 c--666 0 4 4 135
- ttyp8 c--666 0 4 4 136
- ttyp9 c--666 0 4 4 137
- ttypa c--666 0 4 4 138
- ttypb c--666 0 4 4 139
- ttypc c--666 0 4 4 140
- ttypd c--666 0 4 4 141
- ttype c--666 0 4 4 142
- ttypf c--666 0 4 4 143
- ttyq0 c--666 0 4 4 144
- ttyq1 c--666 0 4 4 145
- ttyq2 c--666 0 4 4 146
- ttyq3 c--666 0 4 4 147
- ttyq4 c--666 0 4 4 148
- ttyq5 c--666 0 4 4 149
- ttyq6 c--666 0 4 4 150
- ttyq7 c--666 0 4 4 151
- ttyq8 c--666 0 4 4 152
- ttyq9 c--666 0 4 4 153
- ttyqa c--666 0 4 4 154
- ttyqb c--666 0 4 4 155
- ttyqc c--666 0 4 4 156
- ttyqd c--666 0 4 4 157
- ttyqe c--666 0 4 4 158
- ttyqf c--666 0 4 4 159
- udp c--666 0 0 7 4
- udp0 c--666 0 0 7 4
- uds c--666 0 0 18 0
- urandom c--644 0 0 16 0
- video c--600 0 0 4 125
- zero c--644 0 8 1 5
- ipstat c--666 0 0 7 0
CDFILES=${IMG_DIR}/cd
if [ ! -f ${BUILDSH} ]
-then echo "Please invoke me from the root source dir, where ${BUILDSH} is."
+then
+ echo "Please invoke me from the root source dir, where ${BUILDSH} is."
exit 1
fi
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:${PATH}
while getopts "i" c
do
#
# Artifacts from this script are stored in the IMG_DIR
#
-rm -rf $IMG_DIR $IMG
-mkdir -p $IMG_DIR $CDFILES
+rm -rf ${IMG_DIR} ${IMG}
+mkdir -p ${IMG_DIR} ${CDFILES}
#
# Call build.sh using a sloppy file list so we don't need to remove the installed /etc/fstag
export CPPFLAGS=${FLAG}
sh ${BUILDSH} -V SLOPPY_FLIST=yes -V MKBINUTILS=yes -V MKGCCCMDS=yes -j ${JOBS} -m ${ARCH} -O ${OBJ} -D ${DESTDIR} ${BUILDVARS} -U -u distribution
-if [ "$ISOMODE" ]
-then cp ${DESTDIR}/usr/mdec/boot_monitor $CDFILES/boot
- cp ${MODDIR}/* $CDFILES/
+if [ "x${ISOMODE}" = "x1" ]
+then
+ cp ${DESTDIR}/usr/mdec/boot_monitor ${CDFILES}/boot
+ cp ${MODDIR}/* ${CDFILES}/
. ./releasetools/release.functions
cd_root_changes # uses $CDFILES and writes $CDFILES/boot.cfg
# start the image off with the iso image; reduce root size to reserve
- ${CROSS_TOOLS}/nbwriteisofs -s0x0 -l MINIX -B ${DESTDIR}/usr/mdec/bootxx_cd9660 -n $CDFILES $IMG
- ISO_SIZE=$((`stat -c %s $IMG` / 512))
-else # just make an empty iso partition
+ ${CROSS_TOOLS}/nbwriteisofs -s0x0 -l MINIX -B ${DESTDIR}/usr/mdec/bootxx_cd9660 -n ${CDFILES} ${IMG}
+ ISO_SIZE=$((`stat -c %s ${IMG}` / 512))
+else
+ # just make an empty iso partition
ISO_SIZE=8
fi
${CROSS_TOOLS}/nbpwd_mkdb -V 0 -p -d ${DESTDIR} ${DESTDIR}/etc/master.passwd
+#
# make the different file system. this part is *also* hacky. We first convert
# the METALOG.sanitised using mtree into a input METALOG containing uids and
# gids.
# read METALOG and use mtree to convert the user and group names into uid and gids
# FIX put "input somewhere clean"
#
-cat ${DESTDIR}/METALOG.sanitised | ${CROSS_TOOLS}/nbmtree -N ${DESTDIR}/etc -C > ${IMG_DIR}/input
+cat ${DESTDIR}/METALOG.sanitised | ${CROSS_TOOLS}/nbmtree -N ${DESTDIR}/etc -C -K device > ${IMG_DIR}/input
# add fstab
echo "./etc/fstab type=file uid=0 gid=0 mode=0755 size=747 time=1365060731.000000000" >> ${IMG_DIR}/input
# fill root.img (skipping /usr entries while keeping the /usr directory)
-cat ${IMG_DIR}/input | grep -v "^./usr/" | ${CROSS_TOOLS}/nbtoproto -b ${DESTDIR} -o ${IMG_DIR}/root.in
-
-#
-# add device nodes somewhere in the middle of the proto file. Better would be to add the entries in the
-# original METALOG
-# grab the first part
-grep -B 10000 "^ dev" ${IMG_DIR}/root.in > ${IMG_DIR}/root.proto
-# add the device nodes from the ramdisk
-cat ${OBJ}/drivers/ramdisk/proto.dev >> ${IMG_DIR}/root.proto
-# and add the rest of the file
-grep -A 10000 "^ dev" ${IMG_DIR}/root.in | tail -n +2 >> ${IMG_DIR}/root.proto
-rm ${IMG_DIR}/root.in
+cat ${IMG_DIR}/input | grep -v "^./usr/" | ${CROSS_TOOLS}/nbtoproto -b ${DESTDIR} -o ${IMG_DIR}/root.proto
#
# Create proto files for /usr and /home using toproto.
cat ${IMG_DIR}/input | grep "^\./usr/\|^. " | sed "s,\./usr,\.,g" | ${CROSS_TOOLS}/nbtoproto -b ${DESTDIR}/usr -o ${IMG_DIR}/usr.proto
cat ${IMG_DIR}/input | grep "^\./home/\|^. " | sed "s,\./home,\.,g" | ${CROSS_TOOLS}/nbtoproto -b ${DESTDIR}/home -o ${IMG_DIR}/home.proto
+#
# This script creates a bootable image and should at some point in the future
# be replaced by makefs.
#
: ${HOME_SIZE=$(( 128*(2**20) / 512))}
: ${USR_SIZE=$(( 1536*(2**20) / 512))}
-if [ "$ISOMODE" ]
+if [ "x${ISOMODE}" = "x1" ]
then
# In iso mode, make all FSes fit (i.e. as small as possible), but
# leave some space on /
echo "Writing Minix filesystem images"
+#
# Do some math to determine the start addresses of the partitions.
# Ensure the start of the partitions are always aligned, the end will
# always be as we assume the sizes are multiples of 4096 bytes, which
# is always true as soon as you have an integer multiple of 1MB.
-ROOT_START=$ISO_SIZE
+#
+ROOT_START=${ISO_SIZE}
echo " - ROOT"
-ROOT_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $ROOTSIZEARG -I $(($ROOT_START*512)) $IMG ${IMG_DIR}/root.proto`/512))
-USR_START=$(($ROOT_START + $ROOT_SIZE))
+ROOT_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $ROOTSIZEARG -I $(($ROOT_START*512)) ${IMG} ${IMG_DIR}/root.proto`/512))
+USR_START=$((${ROOT_START} + ${ROOT_SIZE}))
echo " - USR"
-USR_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $USRSIZEARG -I $(($USR_START*512)) $IMG ${IMG_DIR}/usr.proto`/512))
-HOME_START=$(($USR_START + $USR_SIZE))
+USR_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $USRSIZEARG -I $(($USR_START*512)) ${IMG} ${IMG_DIR}/usr.proto`/512))
+HOME_START=$((${USR_START} + $USR_SIZE))
echo " - HOME"
-HOME_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $HOMESIZEARG -I $(($HOME_START*512)) $IMG ${IMG_DIR}/home.proto`/512))
+HOME_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -d $HOMESIZEARG -I $(($HOME_START*512)) ${IMG} ${IMG_DIR}/home.proto`/512))
${CROSS_TOOLS}/nbpartition -m ${IMG} 0 81:${ISO_SIZE} 81:${ROOT_SIZE} 81:${USR_SIZE} 81:${HOME_SIZE}
-mods="`( cd $MODDIR; echo mod* | tr ' ' ',' )`"
-if [ "$ISOMODE" ]
-then echo "CD image at `pwd`/$IMG"
-else echo "To boot this image on kvm:"
- echo "cd $MODDIR && kvm -serial stdio -kernel kernel -append \"console=tty00 rootdevname=c0d0p1\" -initrd \"$mods\" -hda `pwd`/$IMG"
+mods="`( cd ${MODDIR}; echo mod* | tr ' ' ',' )`"
+if [ "x${ISOMODE}" = "x1" ]
+then
+ echo "CD image at `pwd`/${IMG}"
+else
+ echo "To boot this image on kvm:"
+ echo "cd ${MODDIR} && kvm -serial stdio -kernel kernel -append \"console=tty00 rootdevname=c0d0p1\" -initrd \"${mods}\" -hda `pwd`/${IMG}"
fi