Changeset 677f620 in mainline
- Timestamp:
- 2008-08-05T21:52:14Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30b3ddb
- Parents:
- 0928526
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/amd64/Makefile.inc
r0928526 r677f620 49 49 $(USPACEDIR)/app/tester/tester \ 50 50 $(USPACEDIR)/app/klog/klog \ 51 $(USPACEDIR)/app/cli/cli 52 ifneq ($(RDFMT),tmpfs) 53 RD_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs 54 endif 55 ifneq ($(RDFMT),fat) 56 RD_TASKS += $(USPACEDIR)/srv/fs/fat/fat 57 endif 51 $(USPACEDIR)/app/cli/cli \ 52 $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ 53 $(USPACEDIR)/srv/fs/fat/fat 58 54 59 55 build: $(BASE)/image.iso … … 76 72 done 77 73 ifeq ($(RDFMT),tmpfs) 78 $(BASE)/tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.img74 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs.img 79 75 endif 80 76 ifeq ($(RDFMT),fat) 81 $(BASE)/tools/mkfat.sh $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd. img77 $(BASE)/tools/mkfat.sh $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs.img 82 78 endif 79 $(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs.img arch/$(ARCH)/iso/boot/initrd.img 80 rm arch/$(ARCH)/iso/boot/initrd.fs.img 83 81 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/ 84 82 -
boot/arch/arm32/loader/Makefile
r0928526 r677f620 123 123 cp $$task $(USPACEDIR)/dist/sbin/ ; \ 124 124 done 125 ../../../../tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ initrd.img 125 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs.img 126 ../../../../tools/mkhord.py 4096 initrd.fs.img initrd.img 127 rm initrd.fs.img 126 128 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 127 129 -
boot/arch/ia32/Makefile.inc
r0928526 r677f620 60 60 cp $$task $(USPACEDIR)/dist/sbin/ ; \ 61 61 done 62 $(BASE)/tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.img 62 $(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs.img 63 $(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs.img arch/$(ARCH)/iso/boot/initrd.img 64 rm arch/$(ARCH)/iso/boot/initrd.fs.img 63 65 mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/ 64 66 -
boot/arch/mips32/loader/Makefile
r0928526 r677f620 124 124 cp $$task $(USPACEDIR)/dist/sbin/ ; \ 125 125 done 126 ../../../../tools/mktmpfs.py 16384 $(USPACEDIR)/dist/ initrd.img 126 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs.img 127 ../../../../tools/mkhord.py 16384 initrd.fs.img initrd.img 128 rm initrd.fs.img 127 129 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned int" $(COMPONENTS) ./initrd.img 128 130 -
boot/arch/ppc32/loader/Makefile
r0928526 r677f620 118 118 cp $$task $(USPACEDIR)/dist/sbin/ ; \ 119 119 done 120 ../../../../tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ initrd.img 120 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs.img 121 ../../../../tools/mkhord.py 4096 initrd.fs.img initrd.img 122 rm initrd.fs.img 121 123 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img 122 124 -
boot/arch/sparc64/loader/Makefile
r0928526 r677f620 121 121 cp $$task $(USPACEDIR)/dist/sbin/ ; \ 122 122 done 123 ../../../../tools/mktmpfs.py 16384 $(USPACEDIR)/dist/ initrd.img 123 ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs.img 124 ../../../../tools/mkhord.py 16384 initrd.fs.img initrd.img 125 rm initrd.fs.img 124 126 ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(COMPONENTS) ./initrd.img 125 127 -
tools/mktmpfs.py
r0928526 r677f620 34 34 import os 35 35 import struct 36 37 def align_up(size, alignment):38 "Align upwards to a given alignment"39 return (((size) + ((alignment) - 1)) & ~((alignment) - 1))40 36 41 37 def usage(prname): … … 77 73 78 74 def main(): 79 if (len(sys.argv) < 4):75 if (len(sys.argv) < 3): 80 76 usage(sys.argv[0]) 81 77 return 82 78 83 if (not sys.argv[1].isdigit()): 84 print "<ALIGNMENT> must be a number" 85 return 86 87 align = int(sys.argv[1], 0) 88 path = os.path.abspath(sys.argv[2]) 79 path = os.path.abspath(sys.argv[1]) 89 80 if (not os.path.isdir(path)): 90 81 print "<PATH> must be a directory" 91 82 return 92 83 93 header_size = align_up(18, align) 94 outf = file(sys.argv[3], "w") 95 outf.write(struct.pack("<" + ("%d" % header_size) + "x")) 84 outf = file(sys.argv[2], "w") 96 85 97 86 outf.write(struct.pack("<5s", "TMPFS")) 98 payload_size = 5 99 100 payload_size += recursion(path, outf) 87 recursion(path, outf) 88 outf.write(struct.pack("<BL", 0, 0)) 89 90 outf.close() 101 91 102 outf.write(struct.pack("<BL", 0, 0))103 payload_size += 5104 105 aligned_size = align_up(payload_size, align)106 107 if (aligned_size - payload_size > 0):108 outf.write(struct.pack("<" + ("%d" % (aligned_size - payload_size)) + "x"))109 110 outf.seek(0)111 outf.write(struct.pack("<4sBBLQ", "HORD", 1, 1, header_size, aligned_size))112 outf.close()113 114 92 if __name__ == '__main__': 115 93 main()
Note:
See TracChangeset
for help on using the changeset viewer.