+ /* initrd setup via cmd console */
+ /* first, check if the user uses it with some label */
+ if (!strncmp(params->args, "initrd=", 7)) {
+ DEBUG_F("params->args: %s\n", params->args);
+ definitrd = 0;
+ }
+ /* after, check if there is the 'initrd=' in the imagename string */
+ if (!strncmp(imagename, "initrd=", 7) || !definitrd) {
+
+ /* return the value of definitrd to 1 */
+ if (!definitrd)
+ definitrd = 1;
+
+ /* args = "initrd=blah" */
+ char *args = NULL;
+
+ if (params->args) {
+ args = params->args;
+ params->args = NULL;
+ hasarg = 1;
+ } else
+ args = imagename;
+
+ if (strlen(args)){
+ /* copy the string after the '=' to manualinitrd */
+ strcpy(manualinitrd, args+7);
+ definitrd = 0;
+ prom_printf("New initrd file specified: %s\n", manualinitrd);
+ } else {
+ prom_printf("ERROR: no initrd specified!\n");
+ return 0;
+ }
+
+ /* set imagename with the default values of the config file */
+ if ((prom_get_devtype(boot.dev) == FILE_DEVICE_NET) && !hasarg)
+ imagename = cfg_get_default();
+ else
+ imagename = cfg_get_default();
+ }
+