Lines Matching full:blob

350 	struct data blob       = empty_data;  in dt_to_blob()  local
362 die("Unknown device tree blob version %d\n", version); in dt_to_blob()
382 "Warning: blob size %"PRIu32" >= minimum size %d\n", in dt_to_blob()
401 * Assemble the blob: start with the header, add with alignment in dt_to_blob()
405 blob = data_append_data(blob, &fdt, vi->hdr_size); in dt_to_blob()
406 blob = data_append_align(blob, 8); in dt_to_blob()
407 blob = data_merge(blob, reservebuf); in dt_to_blob()
408 blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry)); in dt_to_blob()
409 blob = data_merge(blob, dtbuf); in dt_to_blob()
410 blob = data_merge(blob, strbuf); in dt_to_blob()
413 * If the user asked for more space than is used, pad out the blob. in dt_to_blob()
416 blob = data_append_zeroes(blob, padlen); in dt_to_blob()
418 if (fwrite(blob.val, blob.len, 1, f) != 1) { in dt_to_blob()
420 die("Error writing device tree blob: %s\n", in dt_to_blob()
423 die("Short write on device tree blob\n"); in dt_to_blob()
427 * data_merge() frees the right-hand element so only the blob in dt_to_blob()
430 data_free(blob); in dt_to_blob()
460 die("Unknown device tree blob version %d\n", version); in dt_to_asm()
771 die("Premature FDT_END in device tree blob\n"); in unflatten_tree()
783 die("Invalid opcode word %08x in device tree blob\n", in unflatten_tree()
803 char *blob; in dt_from_blob() local
818 die("Error reading DT blob magic number: %s\n", in dt_from_blob()
822 die("EOF reading DT blob magic number\n"); in dt_from_blob()
829 die("Blob has incorrect magic number\n"); in dt_from_blob()
833 die("Error reading DT blob size: %s\n", strerror(errno)); in dt_from_blob()
836 die("EOF reading DT blob size\n"); in dt_from_blob()
838 die("Mysterious short read reading blob size\n"); in dt_from_blob()
843 die("DT blob size (%d) is too small\n", totalsize); in dt_from_blob()
845 blob = xmalloc(totalsize); in dt_from_blob()
847 fdt = (struct fdt_header *)blob; in dt_from_blob()
852 p = blob + sizeof(magic) + sizeof(totalsize); in dt_from_blob()
856 die("EOF before reading %d bytes of DT blob\n", in dt_from_blob()
861 die("Error reading DT blob: %s\n", in dt_from_blob()
887 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str); in dt_from_blob()
889 inbuf_init(&strbuf, blob + off_str, blob + totalsize); in dt_from_blob()
905 blob + off_mem_rsvmap, blob + totalsize); in dt_from_blob()
906 inbuf_init(&dtbuf, blob + off_dt, blob + totalsize); in dt_from_blob()
913 die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val); in dt_from_blob()
919 die("Device tree blob doesn't end with FDT_END\n"); in dt_from_blob()
921 free(blob); in dt_from_blob()