Changeset 94c05b89 in mainline
- Timestamp:
- 2017-07-12T15:02:49Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5772aa1
- Parents:
- f3504c1
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
rf3504c1 r94c05b89 122 122 123 123 clean_dist: 124 rm -f $(INITRD).img $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMP S).o $(COMPS)_desc.o $(COMPS).zip $(LINK)124 rm -f $(INITRD).img $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) $(COMPS).o $(COMPS)_desc.o $(COMPS).zip $(LINK) 125 125 find $(USPACE_PATH)/dist -mindepth 1 -maxdepth 1 -type f -exec rm \{\} \; 126 126 rm -f $(USPACE_PATH)/dist/srv/* -
boot/Makefile.build
rf3504c1 r94c05b89 145 145 unzip -p $< $@ > $@ 146 146 147 $(COMPONENTS_DEFLATE): $(COMPS).zip 148 unzip -p $< $@ > $@ 149 147 150 $(COMPS).zip: $(COMPONENTS) 148 151 $(MKARRAY) --deflate $(COMPS) $(COMP) "$(AS_PROLOG)" ".section .components, \"a\"" $^ -
boot/Makefile.common
rf3504c1 r94c05b89 250 250 $(INITRD).img 251 251 252 COMPONENTS_DEFLATE := $(addsuffix .deflate,$(notdir $(COMPONENTS))) 253 252 254 LINK = arch/$(BARCH)/_link.ld 253 255 COMP = component -
boot/arch/arm32/Makefile.inc
rf3504c1 r94c05b89 107 107 generic/src/inflate.c 108 108 109 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 109 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
boot/arch/ia64/Makefile.inc
rf3504c1 r94c05b89 89 89 bus/isa 90 90 91 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 91 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
boot/arch/mips32/Makefile.inc
rf3504c1 r94c05b89 87 87 generic/src/inflate.c 88 88 89 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 89 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
boot/arch/ppc32/Makefile.inc
rf3504c1 r94c05b89 72 72 generic/src/inflate.c 73 73 74 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 74 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
boot/arch/riscv64/Makefile.inc
rf3504c1 r94c05b89 50 50 generic/src/inflate.c 51 51 52 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 52 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
boot/arch/sparc64/Makefile.inc
rf3504c1 r94c05b89 70 70 generic/src/inflate.c 71 71 72 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c 72 PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) -
tools/mkarray.py
rf3504c1 r94c05b89 77 77 src_cnt = 0 78 78 79 archive = zipfile.ZipFile("%s.zip" % dest, "w", zipfile.ZIP_STORED) 80 79 81 for src in sys.argv[5:]: 80 82 basename = os.path.basename(src) … … 92 94 if compress: 93 95 src_data = deflate(src_data) 96 src_fname = os.path.basename("%s.deflate" % src) 97 archive.writestr(src_fname, src_data) 98 else: 99 src_fname = src 94 100 95 101 if sys.version_info < (3,): … … 105 111 data_ctx.append(".size %s, %u" % (symbol, length_out)) 106 112 data_ctx.append("%s:" % symbol) 107 data_ctx.append("\t. byte 0x" + ', 0x'.join(chunks(binascii.b2a_hex(src_data), 2)) + "\n")113 data_ctx.append("\t.incbin \"%s\"\n" % src_fname) 108 114 109 115 desc_field = [] … … 112 118 desc_field.append("\t\t.addr = (void *) %s," % symbol) 113 119 desc_field.append("\t\t.size = %u," % length_out) 114 desc_field.append("\t\t.inflated = %u" % length) 120 desc_field.append("\t\t.inflated = %u," % length) 121 122 if compress: 123 desc_field.append("\t\t.compressed = true") 124 else: 125 desc_field.append("\t\t.compressed = false") 126 115 127 desc_field.append("\t}") 116 128 … … 120 132 121 133 src_cnt += 1 122 123 archive = zipfile.ZipFile("%s.zip" % dest, "w", zipfile.ZIP_STORED)124 134 125 135 data = '' … … 131 141 data += "#define %sS_H_\n\n" % label.upper() 132 142 data += "#include <stddef.h>\n" 133 data += "#include <stdint.h>\n\n" 143 data += "#include <stdint.h>\n" 144 data += "#include <stdbool.h>\n\n" 134 145 data += "#define %sS %u\n\n" % (label.upper(), src_cnt) 135 146 data += "typedef struct {\n" … … 138 149 data += "\tsize_t size;\n" 139 150 data += "\tsize_t inflated;\n" 151 data += "\tbool compressed;\n" 140 152 data += "} %s_t;\n\n" % label 141 153 data += "extern %s_t %ss[];\n\n" % (label, label)
Note:
See TracChangeset
for help on using the changeset viewer.