$(call cc,mkzynfw)
$(call cc,lzma2eva,-lz)
$(call cc,mkcasfw)
- $(call cc,mkfwimage,-lz)
+ $(call cc,mkfwimage,-lz -Wall)
$(call cc,mkfwimage2,-lz)
$(call cc,imagetag imagetag_cmdline cyg_crc32)
$(call cc,add_header)
#define OPTIONS "B:hv:m:o:r:k:"
-static int debug = 0;
-
typedef struct image_info {
char magic[16];
char version[256];
fw_layout_t* p;
p = &fw_layout_data[0];
- while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0))
+ while (*p->name && (strcmp(p->name, board_name) != 0))
p++;
- if (p->name == NULL) {
+ if (!*p->name) {
printf("BUG! Unable to find default fw layout!\n");
exit(-1);
}
strcpy(kernel->partition_name, "kernel");
kernel->partition_index = 1;
kernel->partition_baseaddr = p->kern_start;
- if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1);
+ if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1);
kernel->partition_memaddr = p->kern_entry;
kernel->partition_entryaddr = p->kern_entry;
strncpy(kernel->filename, kernelfile, sizeof(kernel->filename));
rootfs->partition_entryaddr = 0x00000000;
strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename));
-printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
-printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
+ printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
+ printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
im->part_count = 2;
return 0;