Lines Matching refs:img
69 struct boot_img img; in main() local
76 if ((sizeof(img.header) % 32) != 0) { in main()
115 memset(&img, 0, sizeof(img)); in main()
133 count = read(fd_in, img.code, file_size); in main()
140 img.header.b_instruction = /* b instruction */ in main()
144 memcpy(img.header.magic, BOOT0_MAGIC, 8); /* no '0' termination */ in main()
145 img.header.length = in main()
147 img.header.b_instruction = cpu_to_le32(img.header.b_instruction); in main()
148 img.header.length = cpu_to_le32(img.header.length); in main()
150 memcpy(img.header.spl_signature, SPL_SIGNATURE, 3); /* "sunxi" marker */ in main()
151 img.header.spl_signature[3] = SPL_HEADER_VERSION; in main()
154 if (strlen(default_dt) + 1 <= sizeof(img.header.string_pool)) { in main()
155 strcpy((char *)img.header.string_pool, default_dt); in main()
156 img.header.dt_name_offset = in main()
165 gen_check_sum(&img.header); in main()
167 count = write(fd_out, &img, le32_to_cpu(img.header.length)); in main()
168 if (count != le32_to_cpu(img.header.length)) { in main()