void *load_address;
char *s;
ulong bzImage_size = 0;
+ ulong initrd_addr = 0;
+ ulong initrd_size = 0;
disable_interrupts();
if (s)
bzImage_addr = (void *)simple_strtoul(s, NULL, 16);
- if (argc >= 3)
+ if (argc >= 3) {
/* argv[2] holds the size of the bzImage */
bzImage_size = simple_strtoul(argv[2], NULL, 16);
+ }
+
+ if (argc >= 4)
+ initrd_addr = simple_strtoul(argv[3], NULL, 16);
+ if (argc >= 5)
+ initrd_size = simple_strtoul(argv[4], NULL, 16);
/* Lets look for */
base_ptr = load_zimage(bzImage_addr, bzImage_size, &load_address);
return -1;
}
if (setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET,
- 0, 0, 0)) {
+ 0, initrd_addr, initrd_size)) {
printf("Setting up boot parameters failed ...\n");
return -1;
}
}
U_BOOT_CMD(
- zboot, 2, 0, do_zboot,
+ zboot, 5, 0, do_zboot,
"Boot bzImage",
- ""
+ "[addr] [size] [initrd addr] [initrd size]\n"
+ " addr - The optional starting address of the bzimage.\n"
+ " If not set it defaults to the environment\n"
+ " variable \"fileaddr\".\n"
+ " size - The optional size of the bzimage. Defaults to\n"
+ " zero.\n"
+ " initrd addr - The address of the initrd image to use, if any.\n"
+ " initrd size - The size of the initrd image to use, if any.\n"
);