Lines Matching full:blob
364 struct data blob = empty_data; in dt_to_blob() local
376 die("Unknown device tree blob version %d\n", version); in dt_to_blob()
396 "Warning: blob size %d >= minimum size %d\n", in dt_to_blob()
415 * Assemble the blob: start with the header, add with alignment in dt_to_blob()
419 blob = data_append_data(blob, &fdt, vi->hdr_size); in dt_to_blob()
420 blob = data_append_align(blob, 8); in dt_to_blob()
421 blob = data_merge(blob, reservebuf); in dt_to_blob()
422 blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry)); in dt_to_blob()
423 blob = data_merge(blob, dtbuf); in dt_to_blob()
424 blob = data_merge(blob, strbuf); in dt_to_blob()
427 * If the user asked for more space than is used, pad out the blob. in dt_to_blob()
430 blob = data_append_zeroes(blob, padlen); in dt_to_blob()
432 if (fwrite(blob.val, blob.len, 1, f) != 1) { in dt_to_blob()
434 die("Error writing device tree blob: %s\n", in dt_to_blob()
437 die("Short write on device tree blob\n"); in dt_to_blob()
441 * data_merge() frees the right-hand element so only the blob in dt_to_blob()
444 data_free(blob); in dt_to_blob()
474 die("Unknown device tree blob version %d\n", version); in dt_to_asm()
785 die("Premature FDT_END in device tree blob\n"); in unflatten_tree()
797 die("Invalid opcode word %08x in device tree blob\n", in unflatten_tree()
817 char *blob; in dt_from_blob() local
832 die("Error reading DT blob magic number: %s\n", in dt_from_blob()
836 die("EOF reading DT blob magic number\n"); in dt_from_blob()
843 die("Blob has incorrect magic number\n"); in dt_from_blob()
847 die("Error reading DT blob size: %s\n", strerror(errno)); in dt_from_blob()
850 die("EOF reading DT blob size\n"); in dt_from_blob()
852 die("Mysterious short read reading blob size\n"); in dt_from_blob()
857 die("DT blob size (%d) is too small\n", totalsize); in dt_from_blob()
859 blob = xmalloc(totalsize); in dt_from_blob()
861 fdt = (struct fdt_header *)blob; in dt_from_blob()
866 p = blob + sizeof(magic) + sizeof(totalsize); in dt_from_blob()
870 die("EOF before reading %d bytes of DT blob\n", in dt_from_blob()
875 die("Error reading DT blob: %s\n", in dt_from_blob()
901 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str); in dt_from_blob()
903 inbuf_init(&strbuf, blob + off_str, blob + totalsize); in dt_from_blob()
919 blob + off_mem_rsvmap, blob + totalsize); in dt_from_blob()
920 inbuf_init(&dtbuf, blob + off_dt, blob + totalsize); in dt_from_blob()
927 die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val); in dt_from_blob()
933 die("Device tree blob doesn't end with FDT_END\n"); in dt_from_blob()
935 free(blob); in dt_from_blob()