Lines Matching defs:fsw
92 def setup_fit(fsw, name):
98 fsw (libfdt.FdtSw): Object to use for writing
101 fsw.INC_SIZE = 65536
102 fsw.finish_reservemap()
103 fsw.begin_node('')
104 fsw.property_string('description', f'{name} with devicetree set')
105 fsw.property_u32('#address-cells', 1)
107 fsw.property_u32('timestamp', int(time.time()))
108 fsw.begin_node('images')
111 def write_kernel(fsw, data, args):
117 fsw (libfdt.FdtSw): Object to use for writing
125 with fsw.add_node('kernel'):
126 fsw.property_string('description', args.name)
127 fsw.property_string('type', 'kernel_noload')
128 fsw.property_string('arch', args.arch)
129 fsw.property_string('os', args.os)
130 fsw.property_string('compression', args.compress)
131 fsw.property('data', data)
132 fsw.property_u32('load', 0)
133 fsw.property_u32('entry', 0)
136 def finish_fit(fsw, entries):
142 fsw (libfdt.FdtSw): Object to use for writing
147 fsw.end_node()
149 with fsw.add_node('configurations'):
152 with fsw.add_node(f'conf-{seq}'):
153 fsw.property('compatible', bytes(compat))
154 fsw.property_string('description', model)
155 fsw.property('fdt', bytes(''.join(f'fdt-{x}\x00' for x in files), "ascii"))
156 fsw.property_string('kernel', 'kernel')
157 fsw.end_node()
194 def output_dtb(fsw, seq, fname, arch, compress):
198 fsw (libfdt.FdtSw): Object to use for writing
204 with fsw.add_node(f'fdt-{seq}'):
205 fsw.property_string('description', os.path.basename(fname))
206 fsw.property_string('type', 'flat_dt')
207 fsw.property_string('arch', arch)
208 fsw.property_string('compression', compress)
212 fsw.property('data', compressed)
266 fsw = libfdt.FdtSw()
267 setup_fit(fsw, args.name)
275 write_kernel(fsw, comp_data, args)
292 output_dtb(fsw, seq, fn, args.arch, args.compress)
299 finish_fit(fsw, entries)
302 return fsw.as_fdt().as_bytearray(), seq + 1, size