Changeset 14f2100 in mainline
- Timestamp:
- 2010-07-28T15:24:16Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9a1d8ab
- Parents:
- 7dfd339
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r7dfd339 r14f2100 48 48 endif 49 49 ifeq ($(RDFMT),fat) 50 $(MKFAT) $(DIST_PATH) $@50 $(MKFAT) 1048576 $(DIST_PATH) $@ 51 51 endif 52 52 -
contrib/conf/ia32-qe.sh
r7dfd339 r14f2100 5 5 # Create a disk image if it does not exist 6 6 if [ ! -f "$DISK_IMG" ]; then 7 tools/mkfat.py uspace/dist/data "$DISK_IMG"7 tools/mkfat.py 1048576 uspace/dist/data "$DISK_IMG" 8 8 fi 9 9 -
contrib/conf/mips32-gx.sh
r7dfd339 r14f2100 5 5 # Create a disk image if it does not exist 6 6 if [ ! -f "$DISK_IMG" ]; then 7 tools/mkfat.py uspace/dist/data "$DISK_IMG"7 tools/mkfat.py 1048576 uspace/dist/data "$DISK_IMG" 8 8 fi 9 9 -
tools/mkfat.py
r7dfd339 r14f2100 343 343 def usage(prname): 344 344 "Print usage syntax" 345 print prname + " < PATH> <IMAGE>"345 print prname + " <EXTRA_BYTES> <PATH> <IMAGE>" 346 346 347 347 def main(): 348 if (len(sys.argv) < 3):348 if (len(sys.argv) < 4): 349 349 usage(sys.argv[0]) 350 350 return 351 351 352 path = os.path.abspath(sys.argv[1]) 352 if (not sys.argv[1].isdigit()): 353 print "<EXTRA_BYTES> must be a number" 354 return 355 356 extra_bytes = int(sys.argv[1]) 357 358 path = os.path.abspath(sys.argv[2]) 353 359 if (not os.path.isdir(path)): 354 360 print "<PATH> must be a directory" … … 365 371 366 372 # Make sure the filesystem is large enought for FAT16 367 size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size 373 size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes 368 374 while (size / cluster_size < fat16_clusters): 369 375 if (cluster_size > sector_size): 370 376 cluster_size /= 2 371 size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size 377 size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes 372 378 else: 373 379 size = fat16_clusters * cluster_size + reserved_clusters * cluster_size … … 381 387 data_start = root_start + root_size 382 388 383 outf = file(sys.argv[ 2], "w")389 outf = file(sys.argv[3], "w") 384 390 385 391 boot_sector = xstruct.create(BOOT_SECTOR)
Note:
See TracChangeset
for help on using the changeset viewer.