Lines Matching +full:u +full:- +full:boot

1 /*-
4 * Copyright (c) 2007-2008 Semihalf, Rafal Jaworowski <raj@semihalf.com>
84 printf(" version\t= %d\n", sig->version); in dump_sig()
85 printf(" checksum\t= 0x%08x\n", sig->checksum); in dump_sig()
86 printf(" sc entry\t= 0x%08x\n", sig->syscall); in dump_sig()
112 for (i = 0; i < si->mr_no; i++) in memsize()
113 if (si->mr[i].flags == flags && si->mr[i].size) in memsize()
114 size += (si->mr[i].size); in memsize()
148 namelen = strlen(dt->name); in get_device_type()
149 if (strncmp(dt->name, devstr, namelen) == 0) { in get_device_type()
150 *devtype = dt->type; in get_device_type()
175 * returned value of -1 for type indicates a search should be done for the
176 * first loadable device, otherwise a returned value of -1 for unit
202 * Slice numbers are 1-based. 0 is a wildcard.
213 *unit = -1; in get_load_device()
219 printf("U-Boot env: loaderdev not set, will probe all devices.\n"); in get_load_device()
222 printf("U-Boot env: loaderdev='%s'\n", devstr); in get_load_device()
227 * If type is DEV_TYP_STOR we have a disk-like device. If the remainder in get_load_device()
237 * since it always adds 4. This is the least-bad solution since it makes in get_load_device()
243 if (strcspn(p, " .") == len && strcspn(p, ":") >= len - 1 && in get_load_device()
244 disk_parsedev((struct devdesc **)&dev, p - 4, NULL) == 0) { /* Hack */ in get_load_device()
245 *unit = dev->dd.d_unit; in get_load_device()
246 *slice = dev->d_slice; in get_load_device()
247 *partition = dev->d_partition; in get_load_device()
280 *unit = -1; in get_load_device()
293 *unit = -1; in get_load_device()
302 *unit = -1; in get_load_device()
316 *unit = -1; in get_load_device()
336 *unit = -1; in get_load_device()
378 open_result = -1; in probe_disks()
380 if (load_type == -1) { in probe_disks()
386 open_result = devsw[devidx]->dv_open(&f, &currdev); in probe_disks()
393 return (-1); in probe_disks()
396 if (load_unit == -1) { in probe_disks()
401 if (currdev.dd.d_unit == -1) in probe_disks()
404 open_result = devsw[devidx]->dv_open(&f, &currdev); in probe_disks()
411 return (-1); in probe_disks()
414 if ((currdev.dd.d_unit = uboot_diskgetunit(load_type, load_unit)) != -1) { in probe_disks()
416 open_result = devsw[devidx]->dv_open(&f,&currdev); in probe_disks()
425 return (-1); in probe_disks()
441 * unique error code that U-Boot reports as "## Application terminated, in main()
448 syscall_ptr = sig->syscall; in main()
452 if (sig->version > API_SIG_VERSION) in main()
456 bzero(__sbss_start, __sbss_end - __sbss_start); in main()
457 bzero(__bss_start, _end - __bss_start); in main()
461 * alloc() is usable. We are using the stack u-boot set up near the top in main()
463 * of our bss and the bottom of the u-boot stack to avoid overlap. in main()
473 printf("Compatible U-Boot API signature found @%p\n", sig); in main()
494 * Enumerate U-Boot devices in main()
497 printf("no U-Boot devices found"); in main()
500 printf("Number of U-Boot devices: %d\n", devs_no); in main()
509 if (devsw[i]->dv_init == NULL) in main()
511 if ((devsw[i]->dv_init)() != 0) in main()
514 printf("Found U-Boot device: %s\n", devsw[i]->dv_name); in main()
520 strcmp(devsw[i]->dv_name, "disk") == 0) { in main()
527 strcmp(devsw[i]->dv_name, "net") == 0) in main()
532 * If we couldn't find a boot device, return an error to u-boot. in main()
533 * U-boot may be running a boot script that can try something different in main()
537 printf("No boot device found!\n"); in main()
565 sbrk(0) - end); in command_heap()
583 COMMAND_SET(devinfo, "devinfo", "show U-Boot devices", command_devinfo);
590 command_errmsg = "no U-Boot devices found!?"; in command_devinfo()
594 printf("U-Boot devices:\n"); in command_devinfo()
602 COMMAND_SET(sysinfo, "sysinfo", "show U-Boot system info", command_sysinfo);
609 command_errmsg = "could not retrieve U-Boot sys info!?"; in command_sysinfo()
613 printf("U-Boot system info:\n"); in command_sysinfo()
645 strncat(ldvar, var, sizeof(ldvar) - 7); in handle_uboot_env_var()
647 len = MIN(len, sizeof(ldvar) - 1); in handle_uboot_env_var()
714 COMMAND_SET(ubenv, "ubenv", "show or import U-Boot env vars", command_ubenv);