3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 * @brief tftp, rarpboot, dhcp, nfs, cdp - Boot support
31 #include <environment.h>
38 #ifdef CONFIG_NET_RARP
39 extern void RarpRequest(void);
41 static int do_rarpb(struct command
*cmdtp
, int argc
, char *argv
[])
45 if (NetLoopInit(RARP
) < 0)
49 RarpRequest(); /* Basically same as BOOTP */
51 if ((size
= NetLoop()) < 0)
54 /* NetLoop ok, update environment */
60 BAREBOX_CMD_START(rarpboot
)
62 .usage
= "boot image via network using rarp/tftp protocol",
63 BAREBOX_CMD_HELP("[loadAddress] [bootfilename]\n")
65 #endif /* CONFIG_NET_RARP */
67 static int do_ethact(struct command
*cmdtp
, int argc
, char *argv
[])
69 struct eth_device
*edev
;
72 edev
= eth_get_current();
74 printf("%s%d\n", edev
->dev
.name
, edev
->dev
.id
);
79 return COMMAND_ERROR_USAGE
;
81 edev
= eth_get_byname(argv
[1]);
83 eth_set_current(edev
);
85 printf("no such net device: %s\n", argv
[1]);
92 static const __maybe_unused
char cmd_ethact_help
[] =
93 "Usage: ethact [ethx]\n";
95 BAREBOX_CMD_START(ethact
)
97 .usage
= "set current ethernet device",
98 BAREBOX_CMD_HELP(cmd_ethact_help
)