diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index 3c2e1759b..c1bfd65c5 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -27,9 +27,9 @@ RAMDISK_DEFINES= \ 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= mfs procfs @@ -80,8 +80,8 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/servers # 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/* @@ -93,7 +93,7 @@ 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} @@ -139,7 +139,7 @@ ${PROGROOT}/${srcdir}/${dir.${prog}:U${prog}}/${prog}: .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; \ @@ -160,12 +160,29 @@ etc/master.passwd: ${NETBSDSRCDIR}/etc/master.passwd 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 diff --git a/drivers/ramdisk/proto.dev b/drivers/ramdisk/proto.dev deleted file mode 100644 index 4e86959a5..000000000 --- a/drivers/ramdisk/proto.dev +++ /dev/null @@ -1,455 +0,0 @@ - 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 - kbd c--660 0 0 4 127 - kbdaux c--660 0 0 4 126 - 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 - mouse s--777 0 0 /dev/kbdaux - 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 diff --git a/etc/Makefile b/etc/Makefile index fc5f8a7fc..b1dac1a4f 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -194,9 +194,11 @@ MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \ ${TOOL_AWK} -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \ > ${.TARGET} .else -MAKEDEV: +MAKEDEV: .PHONY if [ ${MKUNPRIVED} != "yes" ]; then \ - cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -s 2>/dev/null ;\ + cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -s; \ + else \ + sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh -m -s >> ${DESTDIR}/METALOG; \ fi .endif # !defined(__MINIX) diff --git a/releasetools/arm_sdimage.sh b/releasetools/arm_sdimage.sh index cc74873dc..58f37faf0 100755 --- a/releasetools/arm_sdimage.sh +++ b/releasetools/arm_sdimage.sh @@ -1,6 +1,5 @@ #!/bin/bash set -e -#set -x # # Source settings if present @@ -128,15 +127,19 @@ dd if=/dev/zero of=${IMG_DIR}/usr.img bs=512 count=1 seek=$(($USR_SIZE -1)) 2>/d # dd if=/dev/zero of=${IMG} bs=512 count=1 seek=$(($IMG_SIZE -1)) +# # Do some math to determine the start addresses of the partitions. # Don't leave holes so the 'partition' invocation later is easy. +# FAT_START=2048 ROOT_START=$(($FAT_START + $FAT_SIZE)) HOME_START=$(($ROOT_START + $ROOT_SIZE)) USR_START=$(($HOME_START + $HOME_SIZE)) +# # Write the partition table using the natively compiled # minix partition utility +# ${CROSS_TOOLS}/nbpartition -m ${IMG} ${FAT_START} "c:${FAT_SIZE}*" 81:${ROOT_SIZE} 81:${HOME_SIZE} 81:${USR_SIZE} # @@ -197,8 +200,8 @@ done # 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. -# Afther that we do some magic processing to add device nodes (also missing from METALOG) -# and convert the METALOG into a proto file that can be used by mkfs.mfs +# Afther that we do some processing to convert the METALOG into a proto file +# that can be used by mkfs.mfs # echo "creating the file systems" @@ -206,24 +209,13 @@ echo "creating the file systems" # read METALOG and use mtree to conver the user and group names into uid and gids # FIX put "input somwhere 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. @@ -234,6 +226,7 @@ cat ${IMG_DIR}/input | grep "^\./home/\|^. " | sed "s,\./home,\.,g" | ${CROSS # # Generate /root, /usr and /home partition images. # +echo "Writing Minix filesystem images" echo " - ROOT" ${CROSS_TOOLS}/nbmkfs.mfs -b $((${ROOT_SIZE} / 8)) ${IMG_DIR}/root.img ${IMG_DIR}/root.proto echo " - USR" diff --git a/releasetools/x86_hdimage.sh b/releasetools/x86_hdimage.sh index 1f4bd14bf..5acfd3f3a 100755 --- a/releasetools/x86_hdimage.sh +++ b/releasetools/x86_hdimage.sh @@ -42,12 +42,10 @@ sh ${BUILDSH} -V SLOPPY_FLIST=yes -V MKBINUTILS=yes -V MKGCCCMDS=yes -j ${JOBS} # All sized are written in 512 byte blocks # # we create a disk image of about 2 gig's -# for alignement reasons, prefer sizes which are multiples of 4096 bytes -# -: ${IMG_SIZE=$(( 2*(2**30) / 512))} -: ${ROOT_SIZE=$(( 64*(2**20) / 512))} -: ${HOME_SIZE=$(( 128*(2**20) / 512))} -: ${USR_SIZE=$((1536*(2**20) / 512))} +: ${IMG_SIZE=$(( 2*(2**30) / 512))} +: ${ROOT_SIZE=$(( 64*(2**20) / 512))} +: ${HOME_SIZE=$(( 128*(2**20) / 512))} +: ${USR_SIZE=$(( 1536*(2**20) / 512))} # # create a fstab entry in /etc this is normally done during the @@ -70,28 +68,31 @@ dd if=/dev/zero of=${IMG_DIR}/root.img bs=512 count=1 seek=$(($ROOT_SIZE -1)) 2> dd if=/dev/zero of=${IMG_DIR}/home.img bs=512 count=1 seek=$(($HOME_SIZE -1)) 2>/dev/null dd if=/dev/zero of=${IMG_DIR}/usr.img bs=512 count=1 seek=$(($USR_SIZE -1)) 2>/dev/null +# # Create the empty image where we later will but the partitions in +# dd if=/dev/zero of=${IMG} bs=512 count=1 seek=$(($IMG_SIZE -1)) # # 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. +# Don't leave holes so the 'partition' invocation later is easy. # ROOT_START=8 HOME_START=$(($ROOT_START + $ROOT_SIZE)) USR_START=$(($HOME_START + $HOME_SIZE)) -set -x +# +# Write the partition table using the natively compiled +# minix partition utility +# ${CROSS_TOOLS}/nbpartition -m ${IMG} ${ROOT_START} 81:${ROOT_SIZE} 81:${HOME_SIZE} 81:${USR_SIZE} -set +x +# # 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. -# Afther that we do some magic processing to add device nodes (also missing from METALOG) -# and convert the METALOG into a proto file that can be used by mkfs.mfs +# Afther that we do some processing to convert the METALOG into a proto file +# that can be used by mkfs.mfs # echo "creating the file systems" @@ -99,24 +100,13 @@ echo "creating the file systems" # read METALOG and use mtree to conver the user and group names into uid and gids # FIX put "input somwhere 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. diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 5bdb81b27..8680d10c2 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -441,6 +441,7 @@ TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic +TOOL_TOPROTO= ${TOOLDIR}/bin/${_TOOL_PREFIX}toproto TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic @@ -540,6 +541,7 @@ TOOL_STRFILE= strfile TOOL_SUNLABEL= sunlabel TOOL_TBL= tbl TOOL_TIC= tic +TOOL_TOPROTO= toproto TOOL_UUDECODE= uudecode TOOL_VGRIND= vgrind -f TOOL_ZIC= zic