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()
772 die("Premature FDT_END in device tree blob\n"); in unflatten_tree()
784 die("Invalid opcode word %08x in device tree blob\n", in unflatten_tree()
800 char *blob; in dt_from_blob() local
815 die("Error reading DT blob magic number: %s\n", in dt_from_blob()
819 die("EOF reading DT blob magic number\n"); in dt_from_blob()
826 die("Blob has incorrect magic number\n"); in dt_from_blob()
830 die("Error reading DT blob size: %s\n", strerror(errno)); in dt_from_blob()
833 die("EOF reading DT blob size\n"); in dt_from_blob()
835 die("Mysterious short read reading blob size\n"); in dt_from_blob()
840 die("DT blob size (%d) is too small\n", totalsize); in dt_from_blob()
842 blob = xmalloc(totalsize); in dt_from_blob()
844 fdt = (struct fdt_header *)blob; in dt_from_blob()
849 p = blob + sizeof(magic) + sizeof(totalsize); in dt_from_blob()
853 die("EOF before reading %d bytes of DT blob\n", in dt_from_blob()
858 die("Error reading DT blob: %s\n", in dt_from_blob()
884 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str); in dt_from_blob()
886 inbuf_init(&strbuf, blob + off_str, blob + totalsize); in dt_from_blob()
902 blob + off_mem_rsvmap, blob + totalsize); in dt_from_blob()
903 inbuf_init(&dtbuf, blob + off_dt, blob + totalsize); in dt_from_blob()
910 die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val); in dt_from_blob()
916 die("Device tree blob doesn't end with FDT_END\n"); in dt_from_blob()
918 free(blob); in dt_from_blob()