Lines Matching full:blob

349 	struct data blob       = empty_data;  in dt_to_blob()  local
361 die("Unknown device tree blob version %d\n", version); in dt_to_blob()
381 "Warning: blob size %"PRIu32" >= minimum size %d\n", in dt_to_blob()
400 * Assemble the blob: start with the header, add with alignment in dt_to_blob()
404 blob = data_append_data(blob, &fdt, vi->hdr_size); in dt_to_blob()
405 blob = data_append_align(blob, 8); in dt_to_blob()
406 blob = data_merge(blob, reservebuf); in dt_to_blob()
407 blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry)); in dt_to_blob()
408 blob = data_merge(blob, dtbuf); in dt_to_blob()
409 blob = data_merge(blob, strbuf); in dt_to_blob()
412 * If the user asked for more space than is used, pad out the blob. in dt_to_blob()
415 blob = data_append_zeroes(blob, padlen); in dt_to_blob()
417 if (fwrite(blob.val, blob.len, 1, f) != 1) { in dt_to_blob()
419 die("Error writing device tree blob: %s\n", in dt_to_blob()
422 die("Short write on device tree blob\n"); in dt_to_blob()
426 * data_merge() frees the right-hand element so only the blob in dt_to_blob()
429 data_free(blob); in dt_to_blob()
459 die("Unknown device tree blob version %d\n", version); in dt_to_asm()
770 die("Premature FDT_END in device tree blob\n"); in unflatten_tree()
782 die("Invalid opcode word %08x in device tree blob\n", in unflatten_tree()
802 char *blob; in dt_from_blob() local
817 die("Error reading DT blob magic number: %s\n", in dt_from_blob()
821 die("EOF reading DT blob magic number\n"); in dt_from_blob()
828 die("Blob has incorrect magic number\n"); in dt_from_blob()
832 die("Error reading DT blob size: %s\n", strerror(errno)); in dt_from_blob()
835 die("EOF reading DT blob size\n"); in dt_from_blob()
837 die("Mysterious short read reading blob size\n"); in dt_from_blob()
842 die("DT blob size (%d) is too small\n", totalsize); in dt_from_blob()
844 blob = xmalloc(totalsize); in dt_from_blob()
846 fdt = (struct fdt_header *)blob; in dt_from_blob()
851 p = blob + sizeof(magic) + sizeof(totalsize); in dt_from_blob()
855 die("EOF before reading %d bytes of DT blob\n", in dt_from_blob()
860 die("Error reading DT blob: %s\n", in dt_from_blob()
886 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str); in dt_from_blob()
888 inbuf_init(&strbuf, blob + off_str, blob + totalsize); in dt_from_blob()
904 blob + off_mem_rsvmap, blob + totalsize); in dt_from_blob()
905 inbuf_init(&dtbuf, blob + off_dt, blob + totalsize); in dt_from_blob()
912 die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val); in dt_from_blob()
918 die("Device tree blob doesn't end with FDT_END\n"); in dt_from_blob()
920 free(blob); in dt_from_blob()