summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig12
-rw-r--r--cmd/mdio.c6
-rw-r--r--cmd/scsi.c18
3 files changed, 27 insertions, 9 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 7653c60..586a645 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -203,6 +203,12 @@ config CMD_BOOTEFI_HELLO
for testing that EFI is working at a basic level, and for bringing
up EFI support on a new architecture.
+config CMD_BOOTMENU
+ bool "bootmenu"
+ select MENU
+ help
+ Add an ANSI terminal boot menu command.
+
config CMD_ELF
bool "bootelf, bootvx"
default y
@@ -518,6 +524,12 @@ config CMD_DHCP
help
Boot image via network using DHCP/TFTP protocol
+config CMD_PXE
+ bool "pxe"
+ select MENU
+ help
+ Boot image via network using PXE protocol
+
config CMD_NFS
bool "nfs"
default y
diff --git a/cmd/mdio.c b/cmd/mdio.c
index fb13d05..21dc103 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -27,12 +27,12 @@ static uint last_reg_hi;
static int extract_range(char *input, int *plo, int *phi)
{
char *end;
- *plo = simple_strtol(input, &end, 0);
+ *plo = simple_strtol(input, &end, 16);
if (end == input)
return -1;
if ((*end == '-') && *(++end))
- *phi = simple_strtol(end, NULL, 0);
+ *phi = simple_strtol(end, NULL, 16);
else if (*end == '\0')
*phi = *plo;
else
@@ -79,7 +79,7 @@ static int mdio_read_ranges(struct phy_device *phydev, struct mii_dev *bus,
printf("Reading from bus %s\n", bus->name);
for (addr = addrlo; addr <= addrhi; addr++) {
- printf("PHY at address %d:\n", addr);
+ printf("PHY at address %x:\n", addr);
for (devad = devadlo; devad <= devadhi; devad++) {
for (reg = reglo; reg <= reghi; reg++) {
diff --git a/cmd/scsi.c b/cmd/scsi.c
index 387ca1a..4213ec8 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -17,7 +17,7 @@ static int scsi_curr_dev; /* current device */
/*
* scsi boot command intepreter. Derived from diskboot
*/
-int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
return common_diskboot(cmdtp, "scsi", argc, argv);
}
@@ -25,8 +25,10 @@ int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/*
* scsi command intepreter
*/
-int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
+ int ret;
+
switch (argc) {
case 0:
case 1:
@@ -35,8 +37,10 @@ int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
if (strncmp(argv[1], "res", 3) == 0) {
printf("\nReset SCSI\n");
scsi_bus_reset();
- scsi_scan(1);
- return 0;
+ ret = scsi_scan(1);
+ if (ret)
+ return CMD_RET_FAILURE;
+ return ret;
}
if (strncmp(argv[1], "inf", 3) == 0) {
blk_list_devices(IF_TYPE_SCSI);
@@ -51,8 +55,10 @@ int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
if (strncmp(argv[1], "scan", 4) == 0) {
- scsi_scan(1);
- return 0;
+ ret = scsi_scan(1);
+ if (ret)
+ return CMD_RET_FAILURE;
+ return ret;
}
if (strncmp(argv[1], "part", 4) == 0) {
if (blk_list_part(IF_TYPE_SCSI))